kaihui.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="kaihuiLink">
  3. <view class="imgBox" @click="handleBtn">
  4. <image
  5. src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/hYSp4iUadCmd423d83bffdb8bb80607cfcac5ff64a0c.jpg/1.jpg"
  6. mode="widthFix"></image>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import {
  12. qrcode
  13. } from '@/api/common.js';
  14. export default {
  15. data() {
  16. return {
  17. showWeb: false,
  18. src: '',
  19. test: ''
  20. }
  21. },
  22. methods: {
  23. handleBtn() {
  24. if (uni.getStorageSync('token')) {
  25. if (JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0 && JSON.parse(uni.getStorageSync(
  26. 'userInfo')).setMealCode) {
  27. uni.navigateToMiniProgram({
  28. appId: 'wx57a08b407511613d',
  29. path: '//凯辉/首页/YWUe2IrfXEryMkw'
  30. })
  31. } else {
  32. uni.showModal({
  33. title: '此权益需要开通会员才可使用',
  34. cancelText: '下次再说',
  35. confirmText: '立即开通',
  36. success(res) {
  37. if (res.confirm) {
  38. uni.navigateTo({
  39. url: '/my/memberCenter/index'
  40. })
  41. }
  42. }
  43. })
  44. }
  45. } else {
  46. return uni.showModal({
  47. title: '请登录',
  48. confirmText: '去登录',
  49. success(res) {
  50. if (res.confirm) {
  51. uni.navigateTo({
  52. url: '/login/login/login?redirect=/special/kaihui'
  53. })
  54. }
  55. }
  56. })
  57. }
  58. },
  59. loadedPage() {
  60. uni.hideLoading()
  61. },
  62. onmessage(val) {
  63. console.log(val);
  64. }
  65. },
  66. created() {},
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .kaihuiLink {
  71. .imgBox {
  72. &>image {
  73. width: 100vw;
  74. height: 100vh;
  75. object-fit: cover;
  76. position: fixed;
  77. top: 0;
  78. left: 0;
  79. z-index: -1;
  80. }
  81. }
  82. }
  83. </style>