kaihui.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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(
  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/water'
  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. margin: 0;
  72. padding: 0;
  73. overflow-x: hidden;
  74. .imgBox {
  75. height: 100vh;
  76. position: relative;
  77. &>image {
  78. width: 100%;
  79. }
  80. }
  81. }
  82. </style>