kaihui.vue 1.7 KB

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