Просмотр исходного кода

Merge branch 'feature/commission' into develop

shenxin 4 лет назад
Родитель
Сommit
4ec20f9a92
54 измененных файлов с 1367 добавлено и 35 удалено
  1. 20 9
      src/App.vue
  2. 36 0
      src/api/commissionApi.js
  3. 4 3
      src/api/request.js
  4. 8 1
      src/api/userApi.js
  5. 61 0
      src/components/feed.vue
  6. 36 3
      src/main.js
  7. 35 0
      src/pages.json
  8. 0 4
      src/pages/index.vue
  9. 110 10
      src/pages/my.vue
  10. 12 2
      src/pagesSub/activity/activityDetail.vue
  11. 217 0
      src/pagesSub/commission/commission.vue
  12. 129 0
      src/pagesSub/commission/commissionApply.vue
  13. 68 0
      src/pagesSub/commission/commissionConfirm.vue
  14. 139 0
      src/pagesSub/commission/commissionRecord.vue
  15. 133 0
      src/pagesSub/commission/components/ApplyList.vue
  16. 322 0
      src/pagesSub/commission/invite.vue
  17. 16 1
      src/pagesSub/order/submitOutcome.vue
  18. BIN
      src/static/common/bg_sy.png
  19. BIN
      src/static/common/def_location.png
  20. BIN
      src/static/common/def_network_err.png
  21. BIN
      src/static/common/def_order.png
  22. BIN
      src/static/common/icon_bq_ybm.png
  23. BIN
      src/static/common/icon_bq_yqg.png
  24. BIN
      src/static/common/icon_lc_fgx.png
  25. BIN
      src/static/common/icon_numbei_1.png
  26. BIN
      src/static/common/icon_numbei_2.png
  27. BIN
      src/static/common/icon_numbei_3.png
  28. BIN
      src/static/common/icon_numbei_4.png
  29. BIN
      src/static/common/logo_bt.png
  30. BIN
      src/static/common/logo_gywm.png
  31. BIN
      src/static/icon/aboutour.png
  32. BIN
      src/static/icon/avatar.png
  33. BIN
      src/static/icon/icon_arrow.png
  34. BIN
      src/static/icon/icon_bt.png
  35. BIN
      src/static/icon/icon_commission.png
  36. BIN
      src/static/icon/icon_commission_book.png
  37. BIN
      src/static/icon/icon_commission_go.png
  38. BIN
      src/static/icon/icon_dingwei.png
  39. BIN
      src/static/icon/icon_dp.png
  40. BIN
      src/static/icon/icon_kf.png
  41. BIN
      src/static/icon/icon_money.png
  42. BIN
      src/static/icon/icon_pp_elm.png
  43. BIN
      src/static/icon/icon_pp_lxsj.png
  44. BIN
      src/static/icon/icon_pp_mt.png
  45. BIN
      src/static/icon/icon_pz_close.png
  46. BIN
      src/static/icon/icon_success.png
  47. BIN
      src/static/icon/icon_zujian_sctp.png
  48. BIN
      src/static/icon/jiantou.png
  49. BIN
      src/static/icon/order.png
  50. BIN
      src/static/icon/problem.png
  51. BIN
      src/static/icon/wechat-logo.png
  52. 13 1
      src/store/index.js
  53. 3 1
      src/store/storageKeys.js
  54. 5 0
      src/uni.scss

+ 20 - 9
src/App.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-01-25 11:32:04
+ * @LastEditTime: 2021-03-19 14:18:30
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\App.vue
+-->
 <script>
 <script>
 import { getSystemConfig } from '@/api/app'
 import { getSystemConfig } from '@/api/app'
 export default {
 export default {
@@ -16,6 +24,9 @@ export default {
       const { code, data } = await getSystemConfig()
       const { code, data } = await getSystemConfig()
       if (code === 200) {
       if (code === 200) {
         this.$store.state.ossImgResize = data.oss_img_resize
         this.$store.state.ossImgResize = data.oss_img_resize
+        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
       }
       }
     }
     }
   }
   }
@@ -23,13 +34,13 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-  /*每个页面公共css */
-  @import "uview-ui/index.scss";
-  page {
-    min-height: 100vh;
-    font-size: 24px;
-    font-family: PingFangSC-Regular, PingFang SC;
-    color: $u-main-color;
-    background-color: $bg-color;
-  }
+/*每个页面公共css */
+@import 'uview-ui/index.scss';
+page {
+  min-height: 100vh;
+  font-size: 24px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  color: $u-main-color;
+  background-color: $bg-color;
+}
 </style>
 </style>

+ 36 - 0
src/api/commissionApi.js

@@ -0,0 +1,36 @@
+/*
+ * @Author: your name
+ * @Date: 2021-03-18 22:04:33
+ * @LastEditTime: 2021-03-19 13:46:34
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\api\commissionApi.js
+ */
+import ajax from './request'
+export const getCommissionApplyList = data => {
+  return ajax.get({
+    url: 'mobile/commission/apply/list',
+    data
+  })
+}
+
+export const getCommissionRecordList = data => {
+  return ajax.get({
+    url: 'mobile/commission/record/list',
+    data
+  })
+}
+
+export const commitCommissionApply = data => {
+  return ajax.post({
+    url: 'mobile/commission/apply/commit',
+    data
+  })
+}
+
+export const getCommissionFeedList = () => {
+  return ajax.get({
+    url: 'mobile/commission/feed/list',
+    data: {}
+  })
+}

+ 4 - 3
src/api/request.js

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-01-25 11:32:04
  * @Date: 2021-01-25 11:32:04
- * @LastEditTime: 2021-03-08 21:22:17
+ * @LastEditTime: 2021-03-19 11:00:41
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: \rebatedine-mini\src\api\request.js
  * @FilePath: \rebatedine-mini\src\api\request.js
@@ -14,9 +14,10 @@ import { USER_TOKEN } from '../store/storageKeys'
 
 
 export default {
 export default {
   config: {
   config: {
+    // baseUrl: 'https://apitest.qcbwc.cn/bwc/',
     baseUrl:
     baseUrl:
-      process.env.NODE_ENV === 'development1'
-        ? 'http://localhost:18333/'
+      process.env.NODE_ENV === 'development'
+        ? 'https://apitest.topboom0912.com/bwc/'
         : 'https://api.qcbwc.cn/',
         : 'https://api.qcbwc.cn/',
     data: '',
     data: '',
     header: {
     header: {

+ 8 - 1
src/api/userApi.js

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-01-25 11:32:04
  * @Date: 2021-01-25 11:32:04
- * @LastEditTime: 2021-01-27 13:25:49
+ * @LastEditTime: 2021-03-18 16:16:43
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: \rebatedine-mini\src\api\userApi.js
  * @FilePath: \rebatedine-mini\src\api\userApi.js
@@ -16,6 +16,13 @@ export const editUserInfo = data => {
   })
   })
 }
 }
 
 
+export const getUserInfoByToken = () => {
+  return ajax.get({
+    url: 'mobile/user/getUserInfoByToken',
+    data: {}
+  })
+}
+
 // 参与活动
 // 参与活动
 export const editJoinActivity = data => {
 export const editJoinActivity = data => {
   return ajax.post({
   return ajax.post({

+ 61 - 0
src/components/feed.vue

@@ -0,0 +1,61 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 11:33:39
+ * @LastEditTime: 2021-03-19 13:57:50
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\components\feed.vue
+-->
+<template>
+  <view class="feed">
+    <image :src="imageUrl"
+           class="avatar"
+           v-if="flase"></image>
+    <view class="feed-container">
+      <text class="content">{{content}}</text>
+    </view>
+  </view>
+</template>
+<script>
+export default {
+  props: {
+    imageUrl: {
+      default: ''
+    },
+    content: {
+      default: ''
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.feed {
+  // width: 308rpx;
+  height: 50rpx;
+  position: relative;
+  .avatar {
+    position: absolute;
+    width: 50rpx;
+    height: 50rpx;
+    border-radius: 25rpx;
+    z-index: 100;
+    background-image: url(/static/icon/avatar.png);
+    background-size: 100%;
+  }
+  .feed-container {
+    width: fit-content;
+    padding-right: 25rpx;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.1);
+    border-radius: 25rpx 25rpx 25rpx 25rpx;
+    display: flex;
+    align-items: center;
+    color: #fff;
+    font-weight: 400;
+    .content {
+      margin-left: 25rpx;
+      font-size: 22rpx;
+    }
+  }
+}
+</style>

+ 36 - 3
src/main.js

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-01-25 11:32:04
  * @Date: 2021-01-25 11:32:04
- * @LastEditTime: 2021-03-11 09:53:56
+ * @LastEditTime: 2021-03-19 09:40:02
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: \rebatedine-mini\src\main.js
  * @FilePath: \rebatedine-mini\src\main.js
@@ -35,18 +35,51 @@ Vue.filter('imgListFilter', (fileList, type) => {
 })
 })
 
 
 Vue.mixin({
 Vue.mixin({
+  onLoad (options) {
+    options = this.dealOptions(options)
+    const inviteId = options.INVITE_ID
+    if (inviteId && !this.$store.state.INVITE_ID) {
+      this.$store.commit('saveInviteId', inviteId)
+    }
+  },
+  methods: {
+    dealOptions (options) {
+      let option = options
+      if (Object.prototype.hasOwnProperty.call(option, 'scene')) {
+        const str = decodeURIComponent(option.scene).split('&')
+        const json = {}
+        str.forEach(item => {
+          const index = item.indexOf('=')
+          json[item.slice(0, index)] = item.slice(index + 1)
+        })
+        option = json
+      }
+      for (const key in option) {
+        option[key.toUpperCase()] = option[key]
+      }
+      return option
+    }
+  },
   onShareAppMessage (res) {
   onShareAppMessage (res) {
     const title = '请你趣吃霸王餐'
     const title = '请你趣吃霸王餐'
+    let url = '/pages/index'
+    if (this.$store.userInfo) {
+      url += '?invite_id=' + this.$store.userInfo.id
+    }
     return {
     return {
       title: title,
       title: title,
-      path: '/pages/index'
+      path: url
     }
     }
   },
   },
   onShareTimeline (res) {
   onShareTimeline (res) {
     const title = '请你趣吃霸王餐'
     const title = '请你趣吃霸王餐'
+    let url = '/pages/index'
+    if (this.$store.userInfo) {
+      url += '?invite_id=' + this.$store.userInfo.id
+    }
     return {
     return {
       title: title,
       title: title,
-      path: '/pages/index'
+      path: url
     }
     }
   }
   }
 })
 })

+ 35 - 0
src/pages.json

@@ -51,6 +51,41 @@
       ]
       ]
     },
     },
     {
     {
+      "root": "pagesSub/commission",
+      "pages": [
+        {
+          "path": "invite",
+          "style": {
+            "navigationBarTitleText": "邀请好友,赚现金"
+          }
+        },
+        {
+          "path": "commission",
+          "style": {
+            "navigationBarTitleText": "我的返利金",
+            "enablePullDownRefresh": true
+          }
+        },
+        {
+          "path": "commissionRecord",
+          "style": {
+            "navigationBarTitleText": "分佣查看",
+            "enablePullDownRefresh": true
+          }
+        },
+        {
+          "path": "commissionApply",
+          "style": {
+            "navigationBarTitleText": "提现"
+          }
+        },
+        {
+          "path": "commissionConfirm",
+          "style": { "navigationBarTitleText": "提现" }
+        }
+      ]
+    },
+    {
       "root": "pagesSub/my",
       "root": "pagesSub/my",
       "pages": [
       "pages": [
         {
         {

+ 0 - 4
src/pages/index.vue

@@ -380,10 +380,6 @@ export default {
         padding: 32px 0;
         padding: 32px 0;
       }
       }
     }
     }
-    .touch-bottom {
-      padding: 30px 0;
-      color: #babbbc;
-    }
   }
   }
   .def-content {
   .def-content {
     margin-top: 212px;
     margin-top: 212px;

+ 110 - 10
src/pages/my.vue

@@ -19,12 +19,28 @@
         </view>
         </view>
       </block>
       </block>
     </view>
     </view>
+    <view class="commission"
+          @click="jumpToCommissionApply">
+      <view class="left">
+        <image src="~@/static/icon/icon_commission.png"
+               class="icon"></image>
+        <text class="title">可返金额</text>
+      </view>
+      <view class="right">
+        <text class="right-flag">¥</text>
+        <text class="right-money">{{userInfo ? (userInfo.amount*1/100).toFixed(2) : '--'}}</text>
+      </view>
+    </view>
+    <image class="banner"
+           :src="bannerUrl"
+           @click="jumpToCommission"></image>
+    <view class="divider"></view>
     <view class="item-list">
     <view class="item-list">
-      <view class="item u-flex u-border-bottom"
-            @click="toDetail(1)">
-        <view class="icon-wh icon-problem"></view>
-        <view class="u-font-28 ml-28 u-flex-1 title">常见问题</view>
-        <view class="jiantou-wh icon-jiantou "></view>
+      <view class="item u-flex"
+            @click="toDetail(3)">
+        <view class="icon-wh icon-order"></view>
+        <view class="u-font-28 ml-28 u-flex-1 title">我的订单</view>
+        <view class="jiantou-wh icon-jiantou"></view>
       </view>
       </view>
       <view class="item u-flex u-border-bottom"
       <view class="item u-flex u-border-bottom"
             @click="toDetail(2)">
             @click="toDetail(2)">
@@ -38,17 +54,18 @@
         <view class="u-font-28 ml-28 u-flex-1 title">联系客服</view>
         <view class="u-font-28 ml-28 u-flex-1 title">联系客服</view>
         <view class="jiantou-wh icon-jiantou "></view>
         <view class="jiantou-wh icon-jiantou "></view>
       </view>
       </view>
-      <view class="item u-flex"
-            @click="toDetail(3)">
-        <view class="icon-wh icon-order"></view>
-        <view class="u-font-28 ml-28 u-flex-1 title">订单</view>
-        <view class="jiantou-wh icon-jiantou"></view>
+      <view class="item u-flex u-border-bottom"
+            @click="toDetail(1)">
+        <view class="icon-wh icon-problem"></view>
+        <view class="u-font-28 ml-28 u-flex-1 title">常见问题</view>
+        <view class="jiantou-wh icon-jiantou "></view>
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>
 </template>
 </template>
 
 
 <script>
 <script>
+import * as api from '../api/userApi'
 export default {
 export default {
   data () {
   data () {
     return {}
     return {}
@@ -56,6 +73,18 @@ export default {
   computed: {
   computed: {
     userInfo () {
     userInfo () {
       return this.$store.state.userInfo
       return this.$store.state.userInfo
+    },
+    bannerUrl () {
+      return this.$store.state.commission_banner
+    }
+  },
+  onShow () {
+    if (this.userInfo) {
+      api.getUserInfoByToken().then(({ code, data }) => {
+        if (code === 200) {
+          this.$store.commit('updateUserInfo', data)
+        }
+      })
     }
     }
   },
   },
   methods: {
   methods: {
@@ -86,6 +115,24 @@ export default {
         url: '/pagesSub/other/login'
         url: '/pagesSub/other/login'
       })
       })
     },
     },
+    jumpToCommissionApply () {
+      if (this.userInfo) {
+        uni.navigateTo({ url: '/pagesSub/commission/commission' })
+      } else {
+        uni.navigateTo({
+          url: '/pagesSub/other/login'
+        })
+      }
+    },
+    jumpToCommission () {
+      if (this.userInfo) {
+        uni.navigateTo({ url: '/pagesSub/commission/invite' })
+      } else {
+        uni.navigateTo({
+          url: '/pagesSub/other/login'
+        })
+      }
+    },
     // 个人信息
     // 个人信息
     toUserDetail () {
     toUserDetail () {
       uni.navigateTo({
       uni.navigateTo({
@@ -97,6 +144,59 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.divider {
+  height: 16rpx;
+  background-color: #f4f5f9;
+}
+
+.commission {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 90%;
+  margin-left: 5%;
+  box-shadow: 0px 0px 20rpx 2rpx rgba(0, 0, 0, 0.06);
+  border-radius: 40rpx;
+  height: 100rpx;
+  padding: 0 40rpx 0 40rpx;
+  margin-bottom: 40rpx;
+  .left {
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    .icon {
+      width: 44rpx;
+      height: 48rpx;
+    }
+    .title {
+      margin-left: 14rpx;
+      font-size: 28rpx;
+      font-weight: 600;
+      color: #111;
+    }
+  }
+  .right {
+    color: #ff6632;
+    &-flag {
+      bottom: 0;
+      font-size: 24rpx;
+      font-weight: 600;
+    }
+    &-money {
+      bottom: 0;
+      font-size: 36rpx;
+      font-weight: 600;
+    }
+  }
+}
+
+.banner {
+  height: 170rpx;
+  width: 90%;
+  margin-left: 5%;
+  margin-bottom: 40rpx;
+}
 .pensonal {
 .pensonal {
   width: 750px;
   width: 750px;
   background: #fff;
   background: #fff;

+ 12 - 2
src/pagesSub/activity/activityDetail.vue

@@ -287,7 +287,7 @@ export default {
     const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
     const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
     return {
     return {
       title: title,
       title: title,
-      path: `/pagesSub/activity/activityDetail?id=${this.detail.id}`,
+      path: this.getShareUrl(),
       imageUrl: this.detail.imgs
       imageUrl: this.detail.imgs
     }
     }
   },
   },
@@ -295,11 +295,18 @@ export default {
     const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
     const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
     return {
     return {
       title: title,
       title: title,
-      path: `/pagesSub/activity/activityDetail?id=${this.detail.id}`,
+      path: this.getShareUrl(),
       imageUrl: this.detail.imgs
       imageUrl: this.detail.imgs
     }
     }
   },
   },
   methods: {
   methods: {
+    getShareUrl () {
+      let url = `/pagesSub/activity/activityDetail?id=${this.detail.id}`
+      if (this.userInfo) {
+        url += '&invite_id=' + this.userInfo.id
+      }
+      return url
+    },
     reNowTime () {
     reNowTime () {
       clearTimeout(this.timer)
       clearTimeout(this.timer)
       this.timer = setTimeout(() => {
       this.timer = setTimeout(() => {
@@ -353,6 +360,9 @@ export default {
         if (this.$store.state.lng) {
         if (this.$store.state.lng) {
           params.lng = this.$store.state.lng
           params.lng = this.$store.state.lng
         }
         }
+        if (this.$store.state.INVITE_ID) {
+          params.invite_id = this.$store.state.INVITE_ID
+        }
       } else {
       } else {
         params.record_id = this.detail.user_activity_id
         params.record_id = this.detail.user_activity_id
       }
       }

+ 217 - 0
src/pagesSub/commission/commission.vue

@@ -0,0 +1,217 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 13:14:13
+ * @LastEditTime: 2021-03-19 15:47:45
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\pagesSub\commission\commission.vue
+-->
+<template>
+  <view class="commission-main">
+    <network-error />
+    <view class="commission">
+      <view class="commission-top">
+        <view class="commission-top-top"
+              @click="jumpToCommissionRecord">
+          <text class="label">分佣查看</text>
+          <image class="icon"
+                 src="~@/static/icon/icon_arrow.png"></image>
+        </view>
+        <view class="commission-top-middle">
+          <image src="~@/static/icon/icon_money.png"
+                 class="icon"></image>
+          <text class="label">{{(userInfo.amount/100).toFixed(2)}}</text>
+        </view>
+        <text class="commission-top-tips">提现金额将在提现后,一个工作日隔天到账</text>
+        <button class="commission-top-button"
+                @click="jumpToApply">提 现</button>
+      </view>
+      <u-gap height="20"></u-gap>
+      <view class="commission-bottom">
+        <view>
+          <u-tabs-swiper ref="uTabs"
+                         :list="list"
+                         :current="current"
+                         @change="tabsChange"
+                         :is-scroll="false"
+                         active-color="#212121"
+                         inactive-color="#AAAAAA"
+                         font-size="28"
+                         swiperWidth="750"></u-tabs-swiper>
+        </view>
+        <swiper :current="swiperCurrent"
+                @transition="transition"
+                @animationfinish="animationfinish">
+          <swiper-item class="swiper-item"
+                       v-for="(item, index) in list"
+                       :key="index">
+            <apply-list :type="index"
+                        :ref="'list-' + index"></apply-list>
+          </swiper-item>
+        </swiper>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import ApplyList from './components/ApplyList.vue'
+import * as userApi from '../../api/userApi'
+export default {
+  components: { ApplyList },
+  data () {
+    return {
+      current: 0,
+      swiperCurrent: 0,
+      list: [
+        { name: '已申请' },
+        { name: '打款中' },
+        { name: '已打款' },
+        {
+          name: '已拒绝'
+        }]
+    }
+  },
+  onShow () {
+    userApi.getUserInfoByToken().then(({ code, data }) => {
+      if (code === 200) {
+        this.$store.commit('updateUserInfo', data)
+      }
+    })
+  },
+  onPullDownRefresh () {
+    this.$refs[`list-${this.current}`][0].refresh()
+  },
+  onReachBottom () {
+    // if (this.isMoreData) {
+    //   this.getList()
+    // }
+  },
+  computed: {
+    userInfo () {
+      return this.$store.state.userInfo
+    }
+  },
+  methods: {
+    jumpToApply () {
+      if (!this.$store.state.userInfo.alipay_account) {
+        uni.navigateTo({
+          url: '/pagesSub/my/userDetail?toastType=1'
+        })
+        return
+      }
+      uni.navigateTo({
+        url: '/pagesSub/commission/commissionApply'
+      })
+    },
+    jumpToCommissionRecord () {
+      uni.navigateTo({
+        url: '/pagesSub/commission/commissionRecord'
+      })
+    },
+    // tabs通知swiper切换
+    tabsChange (index) {
+      this.swiperCurrent = index
+    },
+    // swiper-item左右移动,通知tabs的滑块跟随移动
+    transition (e) {
+      const dx = e.detail.dx
+      this.$refs.uTabs.setDx(dx)
+    },
+    // 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
+    // swiper滑动结束,分别设置tabs和swiper的状态
+    animationfinish (e) {
+      const current = e.detail.current
+      this.$refs.uTabs.setFinishCurrent(current)
+      this.swiperCurrent = current
+      this.current = current
+    },
+    // scroll-view到底部加载更多
+    onreachBottom () {
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.commission-main {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+}
+.commission {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  &-top {
+    display: flex;
+    padding: 40rpx;
+    background-color: white;
+    flex-direction: column;
+    &-top {
+      display: flex;
+      justify-content: flex-end;
+      align-items: center;
+      .label {
+        color: #212121;
+        font-size: 24rpx;
+        font-weight: 400;
+      }
+      .icon {
+        width: 16rpx;
+        height: 16rpx;
+        margin-left: 4rpx;
+      }
+    }
+    &-middle {
+      display: flex;
+      justify-content: center;
+      align-items: flex-end;
+      .icon {
+        width: 28rpx;
+        height: 28rpx;
+      }
+      .label {
+        font-size: 96rpx;
+        color: #212121;
+        margin-bottom: -24rpx;
+        margin-left: 4rpx;
+        font-weight: 600;
+      }
+    }
+    &-tips {
+      margin-top: 36rpx;
+      font-size: 22rpx;
+      color: #767778;
+      text-align: center;
+      font-weight: 200;
+    }
+    &-button {
+      margin-top: 56rpx;
+      height: 88rpx;
+      line-height: 88rpx;
+      background: #ff6632;
+      border-radius: 44px;
+      color: #ffffff;
+      font-size: 32rpx;
+      width: 90%;
+    }
+  }
+  &-bottom {
+    flex: 1;
+    .scroll-content {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+</style>
+
+<style lang="scss">
+.commission-bottom {
+  swiper {
+    height: calc(100% - 80rpx);
+  }
+}
+</style>

+ 129 - 0
src/pagesSub/commission/commissionApply.vue

@@ -0,0 +1,129 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 15:02:07
+ * @LastEditTime: 2021-03-19 15:48:53
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\pagesSub\commission\commissionApply.vue
+-->
+<template>
+  <view class="main">
+    <network-error />
+    <view class="content">
+      <text class="content-title">提现金额</text>
+      <view class="content-input">
+        <text class="content-input-flag">¥</text>
+        <input type="digit"
+               class="content-input-input"
+               v-model="apply_amount" />
+      </view>
+      <view class="content-divider"></view>
+      <text class="content-tips">最低提现金额{{(this.$store.state.min_apply_amount/100).toFixed(2)}},可提现金额{{(userInfo.amount/100).toFixed(2)}}元</text>
+    </view>
+    <button class="button"
+            @click="onConfirm">工作日隔天到账,确认提现</button>
+  </view>
+</template>
+
+<script>
+import * as userApi from '../../api/userApi'
+import * as commissionApi from '../../api/commissionApi'
+export default {
+  data () {
+    return {
+      apply_amount: ''
+    }
+  },
+  computed: {
+    userInfo () {
+      return this.$store.state.userInfo
+    }
+  },
+  onShow () {
+    if (this.userInfo) {
+      userApi.getUserInfoByToken().then(({ code, data }) => {
+        if (code === 200) {
+          this.$store.commit('updateUserInfo', data)
+        }
+      })
+    }
+  },
+  methods: {
+    onConfirm () {
+      if (this.apply_amount > this.userInfo.amount) {
+        uni.showToast({
+          title: '提现金额不能大于当前可用金额',
+          icon: 'none'
+        })
+      }
+      if (!this.$store.state.userInfo.alipay_account) {
+        uni.navigateTo({
+          url: '/pagesSub/my/userDetail?toastType=1'
+        })
+        return
+      }
+      commissionApi.commitCommissionApply({ amount: this.apply_amount * 100 }).then(({ code, msg }) => {
+        if (code === 200) {
+          console.log('success')
+          uni.redirectTo({ url: '/pagesSub/commission/commissionConfirm' })
+        } else {
+          uni.showToast({ title: msg, icon: 'none' })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 32rpx;
+  margin-top: 16rpx;
+  background-color: white;
+  &-title {
+    font-size: 32rpx;
+    color: #212121;
+    font-weight: 600;
+  }
+  &-input {
+    margin-top: 48rpx;
+    display: flex;
+    color: #111111;
+    align-items: flex-end;
+    &-flag {
+      color: #212121;
+      font-size: 60rpx;
+      font-weight: 600;
+    }
+    &-input {
+      font-size: 92rpx;
+      font-weight: 500;
+      line-height: 92rpx;
+      height: 92rpx;
+      margin-bottom: 4rpx;
+      margin-left: 16rpx;
+    }
+  }
+  &-divider {
+    height: 2rpx;
+    width: 100%;
+    background-color: #eaebec;
+    margin-top: 24rpx;
+    margin-bottom: 22rpx;
+  }
+  &-tips {
+    font-size: 28rpx;
+    color: #767778;
+  }
+}
+.button {
+  margin: 56rpx 40rpx 0 40rpx;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: #ff6632;
+  border-radius: 44rpx;
+  font-size: 32rpx;
+  color: white;
+  font-weight: 400;
+}
+</style>

+ 68 - 0
src/pagesSub/commission/commissionConfirm.vue

@@ -0,0 +1,68 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 15:26:54
+ * @LastEditTime: 2021-03-19 15:51:22
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\pagesSub\commission\commissionConfirm.vue
+-->
+<template>
+  <view class="main">
+    <network-error />
+    <view class="content">
+      <image class="success"
+             src="~@/static/icon/icon_success.png">
+      </image>
+      <text class="tips">提现申请成功</text>
+      <button class="button"
+              @click="goHome">回到首页</button>
+    </view>
+  </view>
+</template>
+<script>
+export default {
+  methods: {
+    goHome () {
+      uni.switchTab({
+        url: '/pages/index'
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  background-color: white;
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+  .success {
+    margin-top: 116rpx;
+    width: 132rpx;
+    height: 132rpx;
+  }
+
+  .tips {
+    margin-top: 40rpx;
+    font-size: 40rpx;
+    font-weight: 600;
+    color: #111111;
+    text-align: center;
+  }
+
+  .button {
+    margin-top: 116rpx;
+    width: 320rpx;
+    height: 88rpx;
+    line-height: 88rpx;
+    font-size: 28rpx;
+    color: #111111;
+    background: #ffffff;
+    border-radius: 44rpx;
+    border: 2rpx solid #d3d4d5;
+  }
+}
+</style>

+ 139 - 0
src/pagesSub/commission/commissionRecord.vue

@@ -0,0 +1,139 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 14:43:45
+ * @LastEditTime: 2021-03-19 09:03:26
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\pagesSub\commission\commissionRecord.vue
+-->
+<template>
+  <view class="main">
+    <network-error />
+    <scroll-view class="list"
+                 scroll-y>
+      <view v-for="(item,index) in list"
+            :key="index"
+            class="item">
+        <view class="item-content">
+          <view class="item-content-left">
+            <image class="avatar"
+                   :src="item.head_url"></image>
+            <text class="name">{{item.nick_name}}</text>
+          </view>
+          <text class="time">{{item.created_at}}</text>
+        </view>
+        <view class="gap"></view>
+      </view>
+      <view class="touch-bottom u-font-22 line-32 u-text-center">{{isMoreData ? '加载中...' : '到底了~'}}</view>
+    </scroll-view>
+  </view>
+</template>
+<script>
+import * as commissionApi from '../../api/commissionApi'
+export default {
+  data () {
+    return {
+      triggered: false,
+      page_no: 0,
+      isMoreData: true,
+      list: []
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  onPullDownRefresh () {
+    this.triggered = true
+    this.getList()
+  },
+  onReachBottom () {
+    if (this.isMoreData) {
+      this.getList()
+    }
+  },
+  methods: {
+    getList () {
+      const params = { page_no: this.page_no, page_size: 10 }
+      if (this.triggered) {
+        params.page_no = 0
+      }
+      commissionApi.getCommissionRecordList(params).then(({ code, data }) => {
+        if (code === 200) {
+          if (this.triggered) {
+            this.page_no = 0
+          }
+          if (this.page_no === 0) {
+            this.list = data.list
+          } else {
+            this.list.push(...data.list)
+          }
+          if (data.list.length < 10) {
+            this.isMoreData = false
+          } else {
+            this.isMoreData = true
+            this.page_no++
+          }
+        }
+        this.triggered = false
+        uni.stopPullDownRefresh()
+      }, () => {
+        this.triggered = false
+        uni.stopPullDownRefresh()
+      })
+    },
+    onreachBottom () {
+      if (this.isMoreData) {
+        this.getList()
+      }
+    }
+  },
+  computed: {
+    userInfo () {
+      return this.$store.state.userInfo
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.list {
+  width: 100%;
+  height: 100%;
+}
+.item {
+  background-color: white;
+  &-content {
+    padding: 32rpx;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    &-left {
+      display: flex;
+      align-items: center;
+      .avatar {
+        background-image: url(~@/static/icon/avatar.png);
+        background-size: 100%;
+        width: 72rpx;
+        height: 72rpx;
+        border-radius: 36rpx;
+      }
+      .name {
+        font-size: 30rpx;
+        color: #212121;
+        font-weight: 400;
+        margin-left: 16rpx;
+      }
+    }
+    .time {
+      font-size: 22rpx;
+      color: #767778;
+      font-weight: 400;
+    }
+  }
+  .gap {
+    height: 2rpx;
+    width: 100%;
+    background-color: #eaebec;
+    margin-left: 32rpx;
+  }
+}
+</style>

+ 133 - 0
src/pagesSub/commission/components/ApplyList.vue

@@ -0,0 +1,133 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 14:08:34
+ * @LastEditTime: 2021-03-19 16:21:24
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\pagesSub\commission\components\ApplyList.vue
+-->
+<template>
+  <scroll-view class="apply-list"
+               scroll-y
+               @scrolltolower="onreachBottom">
+    <view v-for="(item,index) in list"
+          :key="index"
+          class="item">
+      <view class="item-content">
+        <view class="item-left">
+          <text class="name">{{item.status === 3 ? (item.reason ? item.reason : '') : '提现'}}</text>
+          <text class="time">{{item.created_at}}</text>
+        </view>
+        <text class="amount">-{{(item.amount/100).toFixed(2)}}</text>
+      </view>
+      <view class="gap"></view>
+    </view>
+    <view class="touch-bottom u-font-22 line-32 u-text-center">{{isMoreData ? '加载中...' : '到底了~'}}</view>
+  </scroll-view>
+</template>
+<script>
+import * as commissionApi from '../../../api/commissionApi'
+export default {
+  props: {
+    type: {
+      default: 1
+    }
+  },
+  data () {
+    return {
+      triggered: false,
+      page_no: 0,
+      isMoreData: true,
+      list: []
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  methods: {
+    refresh () {
+      if (!this.triggered) {
+        this.triggered = true
+        this.getList()
+      }
+    },
+    getList () {
+      const params = { type: this.type, page_no: this.page_no, page_size: 10 }
+      if (this.triggered) {
+        params.page_no = 0
+      }
+      commissionApi.getCommissionApplyList(params).then(({ code, data }) => {
+        if (code === 200) {
+          if (this.triggered) {
+            this.page_no = 0
+          }
+          if (this.page_no === 0) {
+            this.list = data.list
+          } else {
+            this.list.push(...data.list)
+          }
+          if (data.list.length < 10) {
+            this.isMoreData = false
+          } else {
+            this.isMoreData = true
+            this.page_no++
+          }
+        }
+        this.triggered = false
+        uni.stopPullDownRefresh()
+      }, () => {
+        this.triggered = false
+        uni.stopPullDownRefresh()
+      })
+    },
+    // scroll-view到底部加载更多
+    onreachBottom () {
+      if (this.isMoreData) {
+        this.getList()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.apply-list {
+  width: 100%;
+  height: 100%;
+  .item {
+    background-color: white;
+    &-content {
+      padding: 32rpx;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      .item-left {
+        display: flex;
+        flex-direction: column;
+        .name {
+          color: #212121;
+          font-size: 28rpx;
+          font-weight: 400;
+        }
+        .time {
+          color: #767778;
+          font-size: 22rpx;
+          font-weight: 400;
+          margin-top: 8rpx;
+        }
+      }
+      .amount {
+        color: #111111;
+        font-size: 32rpx;
+        font-weight: 600;
+      }
+    }
+    .gap {
+      height: 2rpx;
+      width: 100%;
+      background-color: #eaebec;
+      margin-left: 32rpx;
+    }
+  }
+}
+</style>

+ 322 - 0
src/pagesSub/commission/invite.vue

@@ -0,0 +1,322 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-03-18 11:16:06
+ * @LastEditTime: 2021-03-19 15:44:14
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\pagesSub\commission\invite.vue
+-->
+<template>
+  <view class="main">
+    <network-error />
+    <view class="top">
+
+      <feed class="top-feed"
+            v-show="feedContent"
+            :content="feedContent"></feed>
+
+      <view class="container">
+        <button class="button"
+                v-if="!userInfo"
+                @click="jumpToLogin">立即邀请</button>
+        <button class="button"
+                open-type="share"
+                v-if="userInfo">立即邀请</button>
+        <button class="button-disable">面对面扫码 敬请期待</button>
+      </view>
+    </view>
+    <view class="middle">
+      <view class="middle-top">
+        <view class="middle-top-left">
+          <view class="middle-top-left-top">
+            <text class="number">{{(userInfo.total_amount/100).toFixed(0)}}</text>
+            <text class="unit">元</text>
+          </view>
+          <text class="tips">累计收益</text>
+        </view>
+        <view class="middle-top-right">
+          <view class="middle-top-right-top">
+            <text class="number">{{userInfo.invite_count}}</text>
+            <text class="unit">位</text>
+          </view>
+          <text class="tips">成功邀请</text>
+        </view>
+      </view>
+      <view class="middle-middle">
+        <button class="middle-middle-button"
+                v-if="!userInfo"
+                @click="jumpToLogin">
+          <text class="text">立即邀请好友</text>
+          <image class="icon"
+                 src="~@/static/icon/icon_commission_go.png"></image>
+        </button>
+        <button class="middle-middle-button"
+                open-type="share"
+                v-if="userInfo">
+          <text class="text">立即邀请好友</text>
+          <image class="icon"
+                 src="~@/static/icon/icon_commission_go.png"></image>
+        </button>
+        <view class="middle-middle-money"
+              @click="jumpToCommission">
+          <image class="icon"
+                 src="~@/static/icon/icon_commission_book.png"></image>
+          <text class="text">查看返利金</text>
+        </view>
+      </view>
+    </view>
+    <image mode="widthFix"
+           class="award-info"
+           :src="awardUrl"></image>
+  </view>
+</template>
+
+<script>
+import Feed from '../../components/feed'
+import * as userApi from '../../api/userApi'
+import * as commissionApi from '../../api/commissionApi'
+export default {
+  components: {
+    Feed
+  },
+  data () {
+    return {
+      feeds: [],
+      feedContent: null,
+      feedTimer: null
+    }
+  },
+  onUnload () {
+    if (this.feedTimer) {
+      clearInterval(this.feedTimer)
+    }
+  },
+  onShow () {
+    userApi.getUserInfoByToken().then(({ code, data }) => {
+      if (code === 200) {
+        this.$store.commit('updateUserInfo', data)
+      }
+    })
+    this.feedTimer = setInterval(() => {
+      if (this.feeds.length === 0) {
+        commissionApi.getCommissionFeedList().then(({ code, data }) => {
+          if (code === 200) {
+            this.feeds = data
+            if (this.feeds.length > 0) {
+              const item = this.feeds.pop()
+              this.feedContent = item.content
+            }
+          }
+        })
+      } else {
+        const item = this.feeds.pop()
+        this.feedContent = item.content
+      }
+    }, 3000)
+  },
+  onHide () {
+    if (this.feedTimer) {
+      clearInterval(this.feedTimer)
+      this.feedTimer = null
+    }
+  },
+  onShareAppMessage (res) {
+    const title = '亲爱的,我请你趣吃霸王餐啦!赶紧查收!'
+    return {
+      title: title,
+      path: this.getShareUrl(),
+      imageUrl: 'https://image.qcbwc.cn/share/invite-share.png'
+    }
+  },
+  onShareTimeline (res) {
+    const title = '亲爱的,我请你趣吃霸王餐啦!赶紧查收!'
+    return {
+      title: title,
+      path: this.getShareUrl(),
+      imageUrl: 'https://image.qcbwc.cn/share/invite-share.png'
+    }
+  },
+  methods: {
+    change () {
+      this.show = !this.show
+    },
+    getShareUrl () {
+      let url = '/pages/index'
+      if (this.userInfo) {
+        url += '?invite_id=' + this.userInfo.id
+      }
+      return url
+    },
+    jumpToLogin () {
+      uni.navigateTo({ url: '/pagesSub/other/login' })
+    },
+    jumpToCommission () {
+      uni.navigateTo({
+        url: '/pagesSub/commission/commission'
+      })
+    }
+  },
+  computed: {
+    awardUrl () {
+      return 'https://image.qcbwc.cn/background/invite_bottom.png?t=' + new Date().getTime()
+    },
+    userInfo () {
+      return this.$store.state.userInfo
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.top {
+  height: 1354rpx;
+  background-image: url('https://image.qcbwc.cn/background/invite_top.png');
+  background-size: 100%;
+  .top-feed {
+    width: 100%;
+    position: absolute;
+    display: flex;
+    justify-content: center;
+    margin-top: 274rpx;
+  }
+  .container {
+    width: 100%;
+    position: absolute;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin-top: 956rpx;
+    .button {
+      height: 88rpx;
+      line-height: 88rpx;
+      width: 65%;
+      background: linear-gradient(
+        180deg,
+        #fcf9c7 0%,
+        #fcd890 52%,
+        #fdbb61 100%
+      );
+      box-shadow: 0px 4rpx 20rpx 0px rgba(141, 14, 33, 0.31);
+      border-radius: 44rpx;
+      margin-bottom: 32rpx;
+      font-size: 32rpx;
+      color: #e40c0c;
+      font-weight: 600;
+    }
+    .button-disable {
+      height: 88rpx;
+      width: 65%;
+      line-height: 88rpx;
+      border-radius: 44rpx;
+      margin-bottom: 32rpx;
+      font-size: 32rpx;
+      font-weight: 600;
+      background: #d3d4d5;
+      box-shadow: 0px 4rpx 20rpx 0px rgba(141, 14, 33, 0.31);
+      border-radius: 44rpx;
+      color: #767778;
+      font-weight: 600;
+    }
+  }
+}
+.middle {
+  height: 624rpx;
+  background-image: url('https://image.qcbwc.cn/background/invite_middle.png');
+  background-size: 100%;
+  &-top {
+    position: absolute;
+    display: flex;
+    width: 90%;
+    margin-left: 5%;
+    margin-top: 130rpx;
+    &-left {
+      border-right: 2rpx solid #d3d4d5;
+    }
+    &-left,
+    &-right {
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      &-top {
+        display: flex;
+        justify-content: center;
+        align-items: flex-end;
+        color: #ed2701;
+        .number {
+          font-size: 80rpx;
+          font-weight: 600;
+        }
+        .unit {
+          margin-bottom: 14rpx;
+          font-size: 28rpx;
+          margin-left: 4rpx;
+          font-weight: 600;
+        }
+      }
+
+      .tips {
+        font-size: 28rpx;
+        color: #98999a;
+        font-weight: 400;
+      }
+    }
+  }
+  &-middle {
+    position: absolute;
+    margin-top: 404rpx;
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    &-button {
+      display: flex;
+      width: 65%;
+      height: 88rpx;
+      line-height: 88rpx;
+      justify-content: center;
+      align-items: center;
+      background: linear-gradient(
+        180deg,
+        #ff6160 0%,
+        #ff2b39 52%,
+        #ff0823 100%
+      );
+      box-shadow: 0px 4rpx 20rpx 0px rgba(141, 14, 33, 0.31);
+      border-radius: 44rpx;
+      .text {
+        font-size: 32rpx;
+        font-weight: 600;
+        color: #fcebc6;
+      }
+      .icon {
+        width: 36rpx;
+        height: 36rpx;
+        margin-left: 12rpx;
+      }
+    }
+
+    &-money {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin-top: 40rpx;
+      .icon {
+        width: 24rpx;
+        height: 24rpx;
+        margin-right: 8rpx;
+      }
+      .text {
+        color: #ff6632;
+        font-size: 24rpx;
+        font-weight: 400;
+      }
+    }
+  }
+}
+.award-info {
+  width: 100%;
+}
+</style>

+ 16 - 1
src/pagesSub/order/submitOutcome.vue

@@ -36,11 +36,26 @@ export default {
     const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
     const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
     return {
     return {
       title: title,
       title: title,
-      path: `/pagesSub/activity/activityDetail?id=${this.detail.id}`,
+      path: this.getShareUrl(),
+      imageUrl: this.detail.imgs
+    }
+  },
+  onShareTimeline (res) {
+    const title = `${this.detail.activity_type === 1 ? '【免费吃】' : '【返利餐】'}${this.detail.title}`
+    return {
+      title: title,
+      path: this.getShareUrl(),
       imageUrl: this.detail.imgs
       imageUrl: this.detail.imgs
     }
     }
   },
   },
   methods: {
   methods: {
+    getShareUrl () {
+      let url = `/pagesSub/activity/activityDetail?id=${this.detail.id}`
+      if (this.userInfo) {
+        url += '&invite_id=' + this.userInfo.id
+      }
+      return url
+    },
     // 获取用户经纬度
     // 获取用户经纬度
     getLocation () {
     getLocation () {
       return new Promise((resolve, reject) => {
       return new Promise((resolve, reject) => {

BIN
src/static/common/bg_sy.png


BIN
src/static/common/def_location.png


BIN
src/static/common/def_network_err.png


BIN
src/static/common/def_order.png


BIN
src/static/common/icon_bq_ybm.png


BIN
src/static/common/icon_bq_yqg.png


BIN
src/static/common/icon_lc_fgx.png


BIN
src/static/common/icon_numbei_1.png


BIN
src/static/common/icon_numbei_2.png


BIN
src/static/common/icon_numbei_3.png


BIN
src/static/common/icon_numbei_4.png


BIN
src/static/common/logo_bt.png


BIN
src/static/common/logo_gywm.png


BIN
src/static/icon/aboutour.png


BIN
src/static/icon/avatar.png


BIN
src/static/icon/icon_arrow.png


BIN
src/static/icon/icon_bt.png


BIN
src/static/icon/icon_commission.png


BIN
src/static/icon/icon_commission_book.png


BIN
src/static/icon/icon_commission_go.png


BIN
src/static/icon/icon_dingwei.png


BIN
src/static/icon/icon_dp.png


BIN
src/static/icon/icon_kf.png


BIN
src/static/icon/icon_money.png


BIN
src/static/icon/icon_pp_elm.png


BIN
src/static/icon/icon_pp_lxsj.png


BIN
src/static/icon/icon_pp_mt.png


BIN
src/static/icon/icon_pz_close.png


BIN
src/static/icon/icon_success.png


BIN
src/static/icon/icon_zujian_sctp.png


BIN
src/static/icon/jiantou.png


BIN
src/static/icon/order.png


BIN
src/static/icon/problem.png


BIN
src/static/icon/wechat-logo.png


+ 13 - 1
src/store/index.js

@@ -9,9 +9,13 @@ const store = new Vuex.Store({
   state: {
   state: {
     imgPrefix: 'https://image.qcbwc.cn/',
     imgPrefix: 'https://image.qcbwc.cn/',
     ossImgResize: {},
     ossImgResize: {},
+    enable_commission: false,
+    min_apply_amount: 2000,
+    commission_banner: 'https://image.qcbwc.cn/banner/commission-banner.png',
     openid: uni.getStorageSync(storageKeys.OPENIDID) || '', // 微信code换取openid
     openid: uni.getStorageSync(storageKeys.OPENIDID) || '', // 微信code换取openid
     userInfo: uni.getStorageSync(storageKeys.USER_INFO) || {}, // 用户信息
     userInfo: uni.getStorageSync(storageKeys.USER_INFO) || {}, // 用户信息
     cateId: '',
     cateId: '',
+    INVITE_ID: uni.getStorageSync(storageKeys.INVITE_ID) || '',
     lat: uni.getStorageSync(storageKeys.LAT) || '',
     lat: uni.getStorageSync(storageKeys.LAT) || '',
     lng: uni.getStorageSync(storageKeys.LNG) || ''
     lng: uni.getStorageSync(storageKeys.LNG) || ''
   },
   },
@@ -19,6 +23,14 @@ const store = new Vuex.Store({
     changeOssImgResize (state, data) {
     changeOssImgResize (state, data) {
       state.ossImgResize = data
       state.ossImgResize = data
     },
     },
+    saveInviteId (state, data) {
+      if (data) {
+        if (!state.INVITE_ID) {
+          state.INVITE_ID = data
+          uni.setStorageSync(storageKeys.INVITE_ID, data)
+        }
+      }
+    },
     changeLocation (state, data) {
     changeLocation (state, data) {
       if (data) {
       if (data) {
         state.lat = data.lat
         state.lat = data.lat
@@ -54,7 +66,7 @@ const store = new Vuex.Store({
   actions: {
   actions: {
     async getUserInfo ({ commit, state, dispatch }) {
     async getUserInfo ({ commit, state, dispatch }) {
       return new Promise(async resolve => {
       return new Promise(async resolve => {
-        const sessionInfo = await new Promise(resolve => {
+        await new Promise(resolve => {
           uni.checkSession({
           uni.checkSession({
             success: res => resolve(res),
             success: res => resolve(res),
             fail: err => {
             fail: err => {

+ 3 - 1
src/store/storageKeys.js

@@ -1,13 +1,15 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-01-25 11:32:04
  * @Date: 2021-01-25 11:32:04
- * @LastEditTime: 2021-03-12 11:54:23
+ * @LastEditTime: 2021-03-19 09:26:12
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: \rebatedine-mini\src\store\storageKeys.js
  * @FilePath: \rebatedine-mini\src\store\storageKeys.js
  */
  */
 export const OPENIDID = 'OPENIDID' // openid
 export const OPENIDID = 'OPENIDID' // openid
 
 
+export const INVITE_ID = 'INVITE_ID'
+
 export const USER_TOKEN = 'USER_TOKEN'
 export const USER_TOKEN = 'USER_TOKEN'
 
 
 export const USER_INFO = 'USER_INFO'
 export const USER_INFO = 'USER_INFO'

+ 5 - 0
src/uni.scss

@@ -20,6 +20,11 @@ $u-border-color: #EAEBEC;
   line-height: $line * 2;
   line-height: $line * 2;
 }
 }
 
 
+.touch-bottom {
+  padding: 30px 0;
+  color: #babbbc;
+}
+
 .u-primary-color {
 .u-primary-color {
   color: $u-type-primary;
   color: $u-type-primary;
 }
 }