kaihui.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="kaihuiLink">
  3. <view class="imgBox">
  4. <image src="../static/kaihui.png" mode="widthFix"></image>
  5. </view>
  6. <view class="btn">
  7. <view class="kaihuiBtn" @click="handleBtn">立即下单</view>
  8. </view>
  9. <view class="kaihuiRule">
  10. <view class="title">
  11. <image src="../static/kaihuifuli.png" mode="widthFix"></image>
  12. </view>
  13. <view class="text">*仅限本平台会员中国移动用户专享</view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import {
  19. qrcode
  20. } from '@/api/common.js';
  21. export default {
  22. data() {
  23. return {
  24. showWeb: false,
  25. src: '',
  26. test: ''
  27. }
  28. },
  29. methods: {
  30. handleBtn() {
  31. if(uni.getStorageSync('token')){
  32. if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0&&JSON.parse(uni.getStorageSync('userInfo')).setMealCode){
  33. uni.navigateToMiniProgram({
  34. appId:'wx57a08b407511613d',
  35. path:'//凯辉/首页/YWUe2IrfXEryMkw'
  36. })
  37. }else{
  38. uni.showModal({
  39. title:'此权益需要开通会员才可使用',
  40. cancelText:'下次再说',
  41. confirmText:'立即开通',
  42. success(res) {
  43. if(res.confirm){
  44. uni.navigateTo({
  45. url:'/my/memberCenter/index'
  46. })
  47. }
  48. }
  49. })
  50. }
  51. }else{
  52. return uni.showModal({
  53. title:'请登录',
  54. confirmText:'去登录',
  55. success(res){
  56. if(res.confirm){
  57. uni.navigateTo({
  58. url:'/login/login/login?redirect=/special/water'
  59. })
  60. }
  61. }
  62. })
  63. }
  64. },
  65. loadedPage(){
  66. uni.hideLoading()
  67. },
  68. onmessage(val){
  69. console.log(val);
  70. }
  71. },
  72. created() {},
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .kaihuiLink {
  77. .imgBox {
  78. &>image {
  79. width: 100%;
  80. }
  81. }
  82. .btn {
  83. width: 100%;
  84. display: flex;
  85. align-items: center;
  86. justify-content: center;
  87. position: relative;
  88. .kaihuiBtn {
  89. position: absolute;
  90. width: 360rpx;
  91. height: 80rpx;
  92. border-radius: 40rpx;
  93. background-color: #EE4320;
  94. color: white;
  95. display: flex;
  96. align-items: center;
  97. justify-content: center;
  98. font-size: 32rpx;
  99. font-weight: bold;
  100. }
  101. }
  102. .kaihuiRule {
  103. margin-top: 60rpx;
  104. width: 100%;
  105. position: relative;
  106. .title{
  107. position: absolute;
  108. left:200rpx;
  109. &>image{
  110. width: 350rpx;
  111. }
  112. }
  113. .text{
  114. position: absolute;
  115. top: 40rpx;
  116. font-size: 24rpx;
  117. margin-top: 20rpx;
  118. margin-left: 20rpx;
  119. }
  120. }
  121. }
  122. </style>