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/ltefe2iGqNPa7eeb7ab61a1b713835d0587ee595b211.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('userInfo')).setMealCode) {
  26. uni.navigateToMiniProgram({
  27. appId: 'wx57a08b407511613d',
  28. path: '//凯辉/首页/YWUe2IrfXEryMkw'
  29. })
  30. } else {
  31. uni.showModal({
  32. title: '此权益需要开通会员才可使用',
  33. cancelText: '下次再说',
  34. confirmText: '立即开通',
  35. success(res) {
  36. if (res.confirm) {
  37. uni.navigateTo({
  38. url: '/my/memberCenter/index'
  39. })
  40. }
  41. }
  42. })
  43. }
  44. } else {
  45. return uni.showModal({
  46. title: '请登录',
  47. confirmText: '去登录',
  48. success(res) {
  49. if (res.confirm) {
  50. uni.navigateTo({
  51. url: '/login/login/login?redirect=/special/water'
  52. })
  53. }
  54. }
  55. })
  56. }
  57. },
  58. loadedPage() {
  59. uni.hideLoading()
  60. },
  61. onmessage(val) {
  62. console.log(val);
  63. }
  64. },
  65. created() {},
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .kaihuiLink {
  70. margin: 0;
  71. padding: 0;
  72. overflow-x: hidden;
  73. .imgBox {
  74. height: 100vh;
  75. position: relative;
  76. &>image {
  77. width: 100%;
  78. }
  79. }
  80. }
  81. </style>