app-order-share-modal.vue 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <view class="app-order-share-modal dir-left-nowrap main-center cross-center" v-if="show">
  3. <view class="modal">
  4. <view class="title">温馨提示</view>
  5. <view class="content">
  6. <template v-if="share_setting.become_condition == 1">
  7. <view class="mb-24">您单次消费满<text :style="{'color': getTheme.color}">¥{{share_setting.auto_share_val}}</text></view>
  8. </template>
  9. <template v-if="share_setting.become_condition == 4">
  10. <view class="mb-24">您累计消费满<text :style="{'color': getTheme.color}">¥{{share_setting.total_consume}}</text></view>
  11. </template>
  12. <template v-else-if="share_setting.become_condition == 2">
  13. <template v-if="share_setting.share_goods_status == 2">
  14. <view class="mb-24">您已购买指定商品</view>
  15. </template>
  16. <template v-else-if="share_setting.share_goods_status == 3">
  17. <view class="mb-24">您已购买指定分类商品</view>
  18. </template>
  19. </template>
  20. <view class="">{{share_setting.become_condition == 3 || share_setting.share_goods_status == 1 ? '您' : ''}}可申请成为{{custom_setting.words.share_name.name ? custom_setting.words.share_name.name : custom_setting.words.share_name.default}}</view>
  21. </view>
  22. <view class="footer dir-left-nowrap cross-center">
  23. <view class="box-grow-1" @click="show=false">取消</view>
  24. <view class="box-grow-1" :style="{'color': getTheme.color}"
  25. @click="$jump({url: '/pages/share/index/index', open_type: 'navigate'})">申请推广专员</view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import {mapState, mapGetters} from "vuex";
  32. export default {
  33. name: "app-order-share-modal",
  34. data() {
  35. return {
  36. show: true,
  37. };
  38. },
  39. computed: {
  40. ...mapState({
  41. share_setting: state => state.mallConfig.share_setting,
  42. custom_setting: state => state.mallConfig.share_setting_custom,
  43. }),
  44. ...mapGetters('mallConfig', {
  45. getTheme: 'getTheme'
  46. })
  47. }
  48. }
  49. </script>
  50. <style scoped lang="scss">
  51. .app-order-share-modal {
  52. position: fixed;
  53. top: 0;
  54. left: 0;
  55. background-color: rgba(0, 0, 0, 0.5);
  56. width: 100%;
  57. height: 100%;
  58. .modal {
  59. background-color: #ffffff;
  60. width: #{620rpx};
  61. border-radius: #{16rpx};
  62. text-align: center;
  63. .title {
  64. margin-top: #{40rpx};
  65. }
  66. .content {
  67. margin: #{62rpx 0};
  68. }
  69. .footer {
  70. border-top: #{1rpx solid #e2e2e2};
  71. height: #{88rpx};
  72. view {
  73. width: 50%;
  74. &:first-child {
  75. color: #666666;
  76. border-right: #{1rpx solid #e2e2e2};
  77. }
  78. }
  79. }
  80. .mb-24 {
  81. margin-bottom: #{24rpx};
  82. text {
  83. font-size: 40rpx;
  84. }
  85. }
  86. }
  87. }
  88. </style>