shenxin 4 anos atrás
pai
commit
7c464d7ba8

+ 2 - 1
src/App.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-01-25 11:32:04
- * @LastEditTime: 2021-03-19 14:18:30
+ * @LastEditTime: 2021-03-25 21:46:18
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \rebatedine-mini\src\App.vue
@@ -27,6 +27,7 @@ export default {
         this.$store.state.enable_commission = data.enable_commission
         this.$store.state.commission_banner = data.commission_banner
         this.$store.state.min_apply_amount = data.min_apply_amount
+        this.$store.state.joinTemplateIds = JSON.parse(data.join_template_ids)
       }
     }
   }

+ 14 - 11
src/components/activityCard.vue

@@ -14,17 +14,20 @@
         <view v-else>距离&gt;99km</view>
       </view>
       <view class="card-footer u-flex u-col-bottom">
-        <view class="u-flex u-flex-1 u-col-bottom">
-          <view class="u-content-color line-34">返利</view>
-          <block v-if="value.activity_type * 1 === 1">
-            <view class="u-m-l-8 u-primary-color u-font-32 line-44 bold">实付全返</view>
-          </block>
-          <block v-if="value.activity_type * 1 === 2">
-            <view class="u-m-l-8 u-flex u-col-bottom">
-              <text class="u-primary-color u-font-24 line-34 bold">¥</text>
-              <text class="u-primary-color u-font-36 line-44 bold">{{(value.rebate_amount / 100).toFixed(2)}}</text>
-            </view>
-          </block>
+        <view class="u-flex-1 u-col-bottom">
+          <view class="u-content-color u-p-b-12">{{value.activity_type === 2 ? '门槛:' + (value.floor_price / 100).toFixed(2) + '元' : ''}}</view>
+          <view class="u-flex u-flex-1 u-col-bottom">
+            <view class="u-content-color line-34">返利</view>
+            <block v-if="value.activity_type * 1 === 1">
+              <view class="u-m-l-8 u-primary-color u-font-32 line-44 bold">实付全返</view>
+            </block>
+            <block v-if="value.activity_type * 1 === 2">
+              <view class="u-m-l-8 u-flex u-col-bottom">
+                <text class="u-primary-color u-font-24 line-34 bold">¥</text>
+                <text class="u-primary-color u-font-36 line-44 bold">{{(value.rebate_amount / 100).toFixed(2)}}</text>
+              </view>
+            </block>
+          </view>
         </view>
         <view>
           <block v-if="status * 1 === 1">

+ 17 - 18
src/pagesSub/activity/activityDetail.vue

@@ -396,25 +396,24 @@ export default {
     },
     // 我要报名
     join () {
-      // uni.requestSubscribeMessage({
-      //   tmplIds: [''],
-      //   success: (res) => {
-      //     this.joinActivity(1)
-      //   }
-      // })
-      if (this.detail.tips) {
-        uni.showModal({
-          title: '提示',
-          content: this.detail.tips,
-          success: (res) => {
-            if (res.confirm) {
-              this.joinActivity(1)
-            }
+      uni.requestSubscribeMessage({
+        tmplIds: this.$store.state.joinTemplateIds,
+        complete: () => {
+          if (this.detail.tips) {
+            uni.showModal({
+              title: '提示',
+              content: this.detail.tips,
+              success: (res) => {
+                if (res.confirm) {
+                  this.joinActivity(1)
+                }
+              }
+            })
+          } else {
+            this.joinActivity(1)
           }
-        })
-      } else {
-        this.joinActivity(1)
-      }
+        }
+      })
     },
     // 取消报名
     cancelJoin () {

+ 1 - 0
src/store/index.js

@@ -15,6 +15,7 @@ const store = new Vuex.Store({
     openid: uni.getStorageSync(storageKeys.OPENIDID) || '', // 微信code换取openid
     userInfo: uni.getStorageSync(storageKeys.USER_INFO) || {}, // 用户信息
     cateId: '',
+    joinTemplateIds: ['JkOW6dK9TarfbXHJ5r-GfxuCpgmiSxi01yEGbhhW_Rw'],
     INVITE_ID: uni.getStorageSync(storageKeys.INVITE_ID) || '',
     lat: uni.getStorageSync(storageKeys.LAT) || '',
     lng: uni.getStorageSync(storageKeys.LNG) || ''