kaihui.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. export default {
  12. data() {
  13. return {
  14. showWeb: false,
  15. src: ''
  16. }
  17. },
  18. methods: {
  19. handleBtn() {
  20. if (uni.getStorageSync('token')) {
  21. if (JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0 && JSON.parse(uni.getStorageSync(
  22. 'userInfo')).setMealCode) {
  23. uni.navigateToMiniProgram({
  24. appId: 'wx57a08b407511613d',
  25. path: '//凯辉/首页/YWUe2IrfXEryMkw'
  26. })
  27. } else {
  28. uni.showModal({
  29. title: '此权益需要开通会员才可使用',
  30. cancelText: '下次再说',
  31. confirmText: '立即开通',
  32. success(res) {
  33. if (res.confirm) {
  34. uni.navigateTo({
  35. url: '/my/memberCenter/index'
  36. })
  37. }
  38. }
  39. })
  40. }
  41. } else {
  42. return uni.showModal({
  43. title: '请登录',
  44. confirmText: '去登录',
  45. success(res) {
  46. if (res.confirm) {
  47. uni.navigateTo({
  48. url: '/login/login/login?redirect=/special/kaihui'
  49. })
  50. }
  51. }
  52. })
  53. }
  54. },
  55. loadedPage() {
  56. uni.hideLoading()
  57. },
  58. onmessage(val) {
  59. console.log(val);
  60. }
  61. },
  62. created() {},
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .kaihuiLink {
  67. .imgBox {
  68. &>image {
  69. width: 100vw;
  70. height: 100vh;
  71. object-fit: cover;
  72. position: fixed;
  73. top: 0;
  74. left: 0;
  75. z-index: -1;
  76. }
  77. }
  78. }
  79. </style>