card.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view>
  3. <button class="card btnCss" style="font-size: 30rpx;color: #5c5c5c;border-radius: 0;border: none;"
  4. v-for="(item,index) in menuList" :key="index" @click="jump(item.path)">
  5. <view style="display: flex;">
  6. <view class="center">
  7. <image style="width: 36rpx;height: 36rpx;" :src="item.icon"></image>
  8. </view>
  9. <view class="center">
  10. <text class="padding-left-10">{{item.name}}</text>
  11. </view>
  12. </view>
  13. <view class="">
  14. <text class="cuIcon-right"></text>
  15. </view>
  16. </button>
  17. <button open-type="contact" class="card btnCss"
  18. style="font-size: 30rpx;color: #5c5c5c;border-radius: 0;border: none;">
  19. <view style="display: flex;">
  20. <view class="center">
  21. <image style="width: 36rpx;height: 36rpx;" src="/static/icon/kefu.png"></image>
  22. </view>
  23. <view class="center">
  24. <text class="padding-left-10">在线咨询</text>
  25. </view>
  26. </view>
  27. <view class="">
  28. <text class="cuIcon-right"></text>
  29. </view>
  30. </button>
  31. <u-modal @confirm="$jump('/pages/member/member')" :show-cancel-button="true" confirm-color="#ff9447" confirm-text="立即开启" cancel-text="暂不开启" v-model="isOpenMemberShow" content="请先创建会员中心"></u-modal>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. menuList: [{
  39. icon: '/static/icon/shangjia.png',
  40. name: '商家认证',
  41. path: '/pages/shop-info/shop-info?edit=true&phone=' + this.$cache.get('phone')
  42. },
  43. {
  44. icon: '/static/icon/bank.png',
  45. name: '银行卡',
  46. path: '/pages/userBank/userBank'
  47. },
  48. {
  49. icon: '/static/icon/xiazai.png',
  50. name: '物料下载',
  51. path: '/pages/material-download/material-download'
  52. },
  53. {
  54. icon: '/static/icon/wendang.png',
  55. name: '意见反馈',
  56. path: ''
  57. },
  58. ],
  59. isOpenMemberShow:false
  60. }
  61. },
  62. methods: {
  63. jump(url) {
  64. if (this.$isEmpty(url)) {
  65. this.$u.toast('即将推出')
  66. return
  67. }
  68. if (url=='/pages/material-download/material-download'&&!this.vuex_isOpenMember) {
  69. //物料下载
  70. this.isOpenMemberShow=true
  71. return
  72. }
  73. uni.navigateTo({
  74. url
  75. })
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. .card {
  82. display: flex;
  83. justify-content: space-between;
  84. margin: 16rpx 0;
  85. padding: 8rpx 30rpx;
  86. background-color: #FFFFFF;
  87. }
  88. </style>