Ver código fonte

Merge branch 'master' of http://git.topboom0912.com/czj/rebatedine-mini

dreamnight 5 anos atrás
pai
commit
45aac2317f

+ 10 - 4
.eslintrc.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2021-01-25 11:32:04
+ * @LastEditTime: 2021-01-25 13:35:42
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\.eslintrc.js
+ */
 // https://eslint.org/docs/user-guide/configuring
 
 module.exports = {
@@ -16,9 +24,7 @@ module.exports = {
     'standard'
   ],
   // required to lint *.vue files
-  plugins: [
-    'vue'
-  ],
+  plugins: ['vue'],
   // add your custom rules here
   rules: {
     // allow async-await
@@ -26,7 +32,7 @@ module.exports = {
     // allow debugger during development
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
     'no-tabs': 'off',
-    indent: ['warn', 2],
+    indent: ['warn', 2, { SwitchCase: 1 }],
     'no-async-promise-executor': 'off',
     'no-undef': 'off'
   }

+ 1 - 1
.gitignore

@@ -2,7 +2,7 @@
 node_modules/
 unpackage/
 dist/
-
+package-lock.json
 loginTipsDialog.vue
 
 # local env files

Diferenças do arquivo suprimidas por serem muito extensas
+ 5185 - 5200
package-lock.json


+ 13 - 2
src/api/request.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2021-01-25 11:32:04
+ * @LastEditTime: 2021-01-25 13:33:39
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\api\request.js
+ */
 /**
  * 通用uni-app网络请求
  * 基于 Promise 对象实现更简单的 request 使用方式,支持请求和响应拦截
@@ -6,7 +14,10 @@ import { USER_TOKEN } from '../store/storageKeys'
 
 export default {
   config: {
-    baseUrl: process.env.NODE_ENV === 'development' ? 'https://apitest.topboom0912.com/rebate/' : 'https://apitest.topboom0912.com/rebate/',
+    baseUrl:
+      process.env.NODE_ENV === 'development'
+        ? 'https://apitest.topboom0912.com/bwc/'
+        : 'https://apitest.topboom0912.com/bwc/',
     data: '',
     header: {
       'Content-Type': 'application/x-www-form-urlencoded'
@@ -28,7 +39,7 @@ export default {
       options.header.token = uni.getStorageSync(USER_TOKEN)
     }
 
-    return new Promise((resolve) => {
+    return new Promise(resolve => {
       options.complete = ({ statusCode, data }) => {
         if (statusCode !== 200) {
           uni.showToast({

+ 43 - 34
src/components/activityCard.vue

@@ -1,6 +1,10 @@
 <template>
-  <view class="activity-card-main u-flex u-col-bottom" @click.stop="clickCard">
-    <image class="card-image" lazy-load :src="value.imgs | imgFilter(2)" mode="aspectFill"></image>
+  <view class="activity-card-main u-flex u-col-bottom"
+        @click.stop="clickCard">
+    <image class="card-image"
+           lazy-load
+           :src="value.imgs | imgFilter(2)"
+           mode="aspectFill"></image>
     <view class="u-flex-1 u-m-l-16">
       <view class="card-title u-font-28 bold u-line-1">{{value.title}}</view>
       <view class="card-desc u-flex u-content-color u-m-t-4 u-m-b-12">
@@ -25,13 +29,18 @@
         <view>
           <block v-if="status * 1 === 1">
             <view class="u-primary-color u-text-center u-font-20 line-28">剩余{{value.join_count - value.join_number}}</view>
-            <button class="join-btn u-m-t-2 u-font-22 line-32" @click.stop="signUp">参与报名</button>
+            <button class="join-btn u-m-t-2 u-font-22 line-32"
+                    @click.stop="signUp">参与报名</button>
           </block>
           <block v-if="status * 1 === 2">
-            <image class="already-img" src="../static/common/icon_bq_ybm.png" @click.stop="clickYBM"></image>
+            <image class="already-img"
+                   src="../static/common/icon_bq_ybm.png"
+                   @click.stop="clickYBM"></image>
           </block>
           <block v-if="status * 1 === 3">
-            <image class="already-img" src="../static/common/icon_bq_yqg.png" @click.stop="clickYQG"></image>
+            <image class="already-img"
+                   src="../static/common/icon_bq_yqg.png"
+                   @click.stop="clickYQG"></image>
           </block>
         </view>
       </view>
@@ -44,12 +53,12 @@ export default {
   props: {
     value: {
       type: Object,
-      default: () => {}
+      default: () => { }
     }
   },
   computed: {
     status () {
-      if (this.value.join_status === 1) {
+      if (this.value.join_status === 1 || this.value.join_status === 2 || this.value.join_status === 3 || this.value.join_status === 4) {
         return 2
       } else if (this.value.join_count === this.value.join_number) {
         return 3
@@ -88,32 +97,32 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  .activity-card-main {
-    .card-image {
-      width: 180px;
-      height: 180px;
-      border-radius: 12px;
-    }
-    .card-title {
-      max-width: 498px;
-      @include lineHeight(20px)
-    }
-    .card-desc {
-      @include lineHeight(17px)
-    }
-    .join-btn {
-      box-sizing: border-box;
-      padding: 10px 16px;
-      width: 120px;
-      height: 50px;
-      border-radius: 26px;
-      color: #fff;
-      background-color: $u-type-primary;
-    }
-    .already-img {
-      width: 76px;
-      height: 76px;
-      vertical-align: bottom;
-    }
+.activity-card-main {
+  .card-image {
+    width: 180px;
+    height: 180px;
+    border-radius: 12px;
   }
+  .card-title {
+    max-width: 498px;
+    @include lineHeight(20px);
+  }
+  .card-desc {
+    @include lineHeight(17px);
+  }
+  .join-btn {
+    box-sizing: border-box;
+    padding: 10px 16px;
+    width: 120px;
+    height: 50px;
+    border-radius: 26px;
+    color: #fff;
+    background-color: $u-type-primary;
+  }
+  .already-img {
+    width: 76px;
+    height: 76px;
+    vertical-align: bottom;
+  }
+}
 </style>

+ 19 - 3
src/components/imgText.vue

@@ -1,10 +1,21 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-01-25 11:32:04
+ * @LastEditTime: 2021-01-25 16:21:30
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\components\imgText.vue
+-->
 <template>
-  <view>
+  <view class="img-text-container">
     <block v-if="type * 1 === 1">
       <text class="u-m-b-16 u-font-24 u-content-color line-40">{{value}}</text>
     </block>
     <block v-if="type * 1 === 2">
-      <image class="u-m-b-16" :src="value | imgFilter" mode="aspectFit" @click="lookImg(value)"></image>
+      <image class="u-m-b-16 image"
+             :src="value | imgFilter"
+             mode="widthFix"
+             @click="lookImg(value)"></image>
     </block>
   </view>
 </template>
@@ -35,5 +46,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-
+.img-text-container {
+  width: 100%;
+  .image {
+    width: 100%;
+  }
+}
 </style>

+ 79 - 81
src/pages/index.vue

@@ -1,57 +1,54 @@
 <template>
   <view class="index-main">
     <network-error />
-    <view class="first" :style="{height: `${firstHeight}rpx`}">
+    <view class="first"
+          :style="{height: `${firstHeight}rpx`}">
       <view class="index-header">
-        <view class="index-banner" v-if="bannerList.length" v-show="!isSticky">
-          <u-swiper
-            mode="dot"
-            img-mode="scaleToFill"
-            :list="bannerList | bannerListFilter | imgListFilter(1)"
-            name="url"
-            height="176"
-            border-radius="20"
-            @click="bannerClick"
-          >
+        <view class="index-banner"
+              v-if="bannerList.length"
+              v-show="!isSticky">
+          <u-swiper mode="dot"
+                    img-mode="scaleToFill"
+                    :list="bannerList | bannerListFilter | imgListFilter(1)"
+                    name="url"
+                    height="176"
+                    border-radius="20"
+                    @click="bannerClick">
           </u-swiper>
         </view>
       </view>
-      <view class="activity-flow u-p-t-34" v-show="!isSticky">
+      <view class="activity-flow u-p-t-34"
+            v-show="!isSticky">
         <activity-flow></activity-flow>
       </view>
     </view>
     <view class="index-body u-m-t-16">
-      <u-sticky
-        :enable="enable"
-        offset-top="0"
-        h5-nav-height="0"
-        @fixed="stickyFixed"
-        @unfixed="unStickyFixed"
-      >
+      <u-sticky :enable="enable"
+                offset-top="0"
+                h5-nav-height="0"
+                @fixed="stickyFixed"
+                @unfixed="unStickyFixed">
         <!-- 只能有一个根元素 -->
         <view class="sticky">
-          <view
-            class="nav-title u-font-32 bold line-44 u-text-center"
-            :style="{
+          <view class="nav-title u-font-32 bold line-44 u-text-center"
+                :style="{
               paddingTop: `${navTitleStyle.paddingTop}rpx`,
               paddingBottom: `${navTitleStyle.paddingBottom}rpx`,
               lineHeight: `${navTitleStyle.lineHeight}rpx`,
               fontSize: `${navTitleStyle.fontSize}rpx`
-            }"
-          >
+            }">
             首页
           </view>
           <view class="index-tabs u-flex u-col-bottom u-row-between">
-            <u-tabs
-              :is-scroll="false"
-              :list="tabList"
-              :current="currentTab"
-              height="44"
-              font-size="34"
-              active-color="#111111"
-              inactive-color="#111111"
-              :gutter="0"
-              :bar-style="{
+            <u-tabs :is-scroll="false"
+                    :list="tabList"
+                    :current="currentTab"
+                    height="44"
+                    font-size="34"
+                    active-color="#111111"
+                    inactive-color="#111111"
+                    :gutter="0"
+                    :bar-style="{
                 bottom: '-10rpx',
                 marginLeft: '-34rpx',
                 width: '104rpx',
@@ -60,23 +57,23 @@
                 backgroundColor: '#FD6D4E',
                 boxShadow: '0px 1px 1px 0px rgba(255, 102, 50, 0.3)'
               }"
-              @change="tabsChange"
-            >
+                    @change="tabsChange">
             </u-tabs>
-            <view class="u-font-22 u-content-color">单平台每天只能报名1次</view>
+            <view class="u-font-22 u-content-color">单平台门店每天只能报名1次</view>
           </view>
         </view>
       </u-sticky>
       <block v-if="isLocation">
-        <view class="activity-list" :style="{paddingTop: `${activityListPT}rpx`}">
+        <view class="activity-list"
+              :style="{paddingTop: `${activityListPT}rpx`}">
           <block v-if="activityList.length !== 0">
-            <view class="activity-card u-border-bottom" v-for="(item, index) in activityList" :key="index">
-              <activity-card
-                :value="item"
-                @signUp="toActivityDetail"
-                @clickYBM="toActivityDetail"
-                @clickYQG="toActivityDetail"
-              >
+            <view class="activity-card u-border-bottom"
+                  v-for="(item, index) in activityList"
+                  :key="index">
+              <activity-card :value="item"
+                             @signUp="toActivityDetail"
+                             @clickYBM="toActivityDetail"
+                             @clickYQG="toActivityDetail">
               </activity-card>
             </view>
             <view class="touch-bottom u-font-22 line-32 u-text-center">{{isLoadMore ? '加载中...' : '到底了~'}}</view>
@@ -245,33 +242,33 @@ export default {
       const banner = this.bannerList[index]
       console.log(banner)
       switch (banner.jump_type * 1) {
-      case 1:
-        uni.navigateTo({
-          url: `/pagesSub/other/webView?url=${banner.jump_content}`
-        })
-        break
-      case 2:
-        this.$store.dispatch('toOtherApplte', banner.jump_content)
-        break
-      case 3:
-        uni.navigateTo({
-          url: `/pagesSub/activity/activityDetail?id=${banner.jump_content}`
-        })
-        break
-      case 4:
-        console.log('jump_content', banner.jump_content)
-        this.$store.commit('changeCateId', banner.jump_content)
-        uni.switchTab({
-          url: '/pages/classification'
-        })
-        break
-      case 5:
-        this.$store.commit('changeCateId', banner.jump_content)
-        uni.navigateTo({
-          url: '/pagesSub/other/noviceStrategy'
-        })
-        break
-      default:
+        case 1:
+          uni.navigateTo({
+            url: `/pagesSub/other/webView?url=${banner.jump_content}`
+          })
+          break
+        case 2:
+          this.$store.dispatch('toOtherApplte', banner.jump_content)
+          break
+        case 3:
+          uni.navigateTo({
+            url: `/pagesSub/activity/activityDetail?id=${banner.jump_content}`
+          })
+          break
+        case 4:
+          console.log('jump_content', banner.jump_content)
+          this.$store.commit('changeCateId', banner.jump_content)
+          uni.switchTab({
+            url: '/pages/classification'
+          })
+          break
+        case 5:
+          this.$store.commit('changeCateId', banner.jump_content)
+          uni.navigateTo({
+            url: '/pagesSub/other/noviceStrategy'
+          })
+          break
+        default:
       }
     }
   },
@@ -326,7 +323,8 @@ export default {
         transition: padding 1s;
       }
     }
-    .no-location, .activity-list {
+    .no-location,
+    .activity-list {
       padding: 0 28px;
       min-height: 100vh;
       background-color: #fff;
@@ -336,7 +334,7 @@ export default {
     }
     .touch-bottom {
       padding: 30px 0;
-      color: #BABBBC;
+      color: #babbbc;
     }
   }
   .def-content {
@@ -346,11 +344,11 @@ export default {
 </style>
 
 <style >
-  .index-tabs >>> .u-tab-item {
-    z-index: 10;
-    font-weight: bold!important;
-  }
-  .index-tabs >>> .u-tab-item + .u-tab-item {
-    margin-left: 42px;
-  }
+.index-tabs >>> .u-tab-item {
+  z-index: 10;
+  font-weight: bold !important;
+}
+.index-tabs >>> .u-tab-item + .u-tab-item {
+  margin-left: 42px;
+}
 </style>

+ 25 - 29
src/pages/order.vue

@@ -1,22 +1,19 @@
 <template>
   <view class="order-main">
     <network-error />
-    <u-sticky
-      :enable="enable"
-      offset-top="0"
-      h5-nav-height="0"
-    >
+    <u-sticky :enable="enable"
+              offset-top="0"
+              h5-nav-height="0">
       <view class="order-tabs">
-        <u-tabs
-          :is-scroll="false"
-          :list="tabList"
-          :current="currentTab"
-          height="72"
-          font-size="28"
-          active-color="#111111"
-          inactive-color="#111111"
-          :gutter="32"
-          :bar-style="{
+        <u-tabs :is-scroll="false"
+                :list="tabList"
+                :current="currentTab"
+                height="72"
+                font-size="28"
+                active-color="#111111"
+                inactive-color="#111111"
+                :gutter="32"
+                :bar-style="{
             bottom: '8rpx',
             marginLeft: '-8rpx',
             width: '56rpx',
@@ -25,20 +22,19 @@
             backgroundColor: '#FD5B36',
             boxShadow: '0px 1px 1px 0px rgba(255, 102, 50, 0.3)'
           }"
-          @change="changeTab"
-        >
+                @change="changeTab">
         </u-tabs>
       </view>
     </u-sticky>
     <view class="order-list">
       <block v-if="orderList.length !== 0">
-        <view class="u-m-b-16" v-for="(item, index) in orderList" :key="index">
-          <order-card
-            :value="item"
-            @click-card="toActivityDetail"
-            @submit-result="toSubmitOrder"
-            @cancel-sign-up="cancelSignUp"
-          >
+        <view class="u-m-b-16"
+              v-for="(item, index) in orderList"
+              :key="index">
+          <order-card :value="item"
+                      @click-card="toActivityDetail"
+                      @submit-result="toSubmitOrder"
+                      @cancel-sign-up="cancelSignUp">
           </order-card>
         </view>
         <view class="touch-bottom u-font-22 line-32 u-text-center">{{isLoadMore ? '加载中...' : '到底了~'}}</view>
@@ -194,7 +190,7 @@ export default {
     },
     toActivityDetail (e) {
       uni.navigateTo({
-        url: `/pagesSub/activity/activityDetail?id=${e.activity_id}`
+        url: `/pagesSub/activity/activityDetail?id=${e.activity_id}&record_id=${e.user_activity_id}`
       })
     },
     toSubmitOrder (e) {
@@ -221,13 +217,13 @@ export default {
   }
   .touch-bottom {
     padding: 16px 0;
-    color: #BABBBC;
+    color: #babbbc;
   }
 }
 </style>
 
 <style >
-  .order-tabs >>> .u-tab-item {
-    z-index: 10;
-  }
+.order-tabs >>> .u-tab-item {
+  z-index: 10;
+}
 </style>

+ 61 - 37
src/pagesSub/activity/activityDetail.vue

@@ -1,8 +1,11 @@
 <template>
-  <view class="act-deltail-main" :style="{paddingBottom: `${footerHeight}rpx`}">
+  <view class="act-deltail-main"
+        :style="{paddingBottom: `${footerHeight}rpx`}">
     <network-error />
     <view class="over-view">
-      <image class="detail-img" :src="detail.imgs" mode="aspectFill"></image>
+      <image class="detail-img"
+             :src="detail.imgs"
+             mode="aspectFill"></image>
       <view class="detail-over">
         <text class="detail-title u-line-2 u-font-40 line-56 u-tips-color bold">【{{detail.activity_type | activityTyepFilter}}】{{detail.title}}</text>
         <view class="u-flex u-col-bottom u-p-t-24 u-p-b-14 u-border-bottom">
@@ -21,7 +24,8 @@
         </view>
         <view class="u-flex u-row-between u-p-t-22 line-34">
           <text class="u-content-color">{{detail.join_number}}已参与</text>
-          <button class="share-btn u-primary-color u-font-24 line-34" open-type="share">分享活动</button>
+          <button class="share-btn u-primary-color u-font-24 line-34"
+                  open-type="share">分享活动</button>
         </view>
       </view>
     </view>
@@ -30,7 +34,8 @@
       <view class="u-flex">
         <view class="u-flex-1 u-p-r-32">
           <text class="shop-name u-font-28 u-tips-color line-40 u-line-1">【{{detail.plat_type | platFilter}}】{{detail.shop_name}}</text>
-          <view class="u-flex" @click="openMap">
+          <view class="u-flex"
+                @click="openMap">
             <view class="icon-map-wh icon-map"></view>
             <view class="u-content-color u-m-l-8 u-m-r-16">{{(detail.distance / 1000).toFixed(1)}}km</view>
             <text class="shop-address u-flex-1 u-content-color u-line-1">{{detail.shop_address}}</text>
@@ -38,13 +43,15 @@
         </view>
         <view class="divider-right"></view>
         <block v-if="detail.plat_type === 8">
-          <view class="to-btn u-p-l-28" @click="openOtherApplte(8)">
+          <view class="to-btn u-p-l-28"
+                @click="openOtherApplte(8)">
             <view class="icon-mt-wh icon-elm"></view>
             <view class="u-m-t-2 u-font-22 u-content-color line-32">打开饿了么</view>
           </view>
         </block>
         <block v-if="detail.plat_type === 9">
-          <view class="to-btn u-p-l-28" @click="openOtherApplte(9)">
+          <view class="to-btn u-p-l-28"
+                @click="openOtherApplte(9)">
             <view class="icon-mt-wh icon-mt"></view>
             <view class="u-m-t-2 u-font-22 u-content-color line-32">打开美团</view>
           </view>
@@ -56,7 +63,8 @@
       <view class="u-flex">
         <text class="u-flex-1 u-content-color line-40 u-line-2 u-p-r-32">{{businessHours}}营业时间可用(当天参与报名,需当天提交资料才能有效返款)</text>
         <view class="divider-right"></view>
-        <button class="to-btn contact-btn u-p-l-28" open-type="contact">
+        <button class="to-btn contact-btn u-p-l-28"
+                open-type="contact">
           <view class="icon-phone-wh icon-phone"></view>
           <view class="u-m-t-2 u-font-22 u-content-color line-32">联系客服</view>
         </button>
@@ -64,15 +72,14 @@
     </view>
     <view class="act-desc u-m-t-16">
       <view class="act-tabs u-border-bottom">
-        <u-tabs
-          :is-scroll="false"
-          :list="[{name: '活动规则'}, {name: '评价要求'}]"
-          :current="currentTab"
-          height="104"
-          font-size="30"
-          active-color="#FF6632"
-          inactive-color="#111111"
-          :bar-style="{
+        <u-tabs :is-scroll="false"
+                :list="[{name: '活动规则'}, {name: '评价要求'}]"
+                :current="currentTab"
+                height="104"
+                font-size="30"
+                active-color="#FF6632"
+                inactive-color="#111111"
+                :bar-style="{
             bottom: '-4rpx',
             marginLeft: '-40rpx',
             width: '120rpx',
@@ -80,18 +87,20 @@
             borderRadius: 0,
             backgroundColor: 'linear-gradient(270deg, #FFB76B 0%, #FE4028 100%)'
           }"
-          @change="changeTab"
-        >
+                @change="changeTab">
         </u-tabs>
       </view>
       <view class="u-m-b-18 u-p-t-32 u-p-b-32">
         <block v-if="currentTab === 0">
-          <block v-for="(item, index) in detail.content" :key="index">
-            <img-text :value="item.content" :type="item.contentType"></img-text>
+          <block v-for="(item, index) in detail.content"
+                 :key="index">
+            <img-text :value="item.content"
+                      :type="item.contentType"></img-text>
           </block>
         </block>
         <block v-else>
-          <img-text :value="detail.requirement" type="1"></img-text>
+          <img-text :value="detail.requirement"
+                    type="1"></img-text>
         </block>
       </view>
     </view>
@@ -104,12 +113,15 @@
               <view class="u-font-20 u-content-color line-28">{{remainingTime}}</view>
             </view>
             <block v-if="status * 1 === 1">
-              <button class="sign-up-btn u-font-30 bold line-42" @click="join">我要报名</button>
+              <button class="sign-up-btn u-font-30 bold line-42"
+                      @click="join">我要报名</button>
             </block>
             <block v-if="status * 1 === 2">
               <view class="u-flex">
-                <button class="canel-btn u-font-28 line-40" @click="cancelJoin">取消报名</button>
-                <button class="submit-btn u-font-28 line-40 u-m-l-16" @click="toSubmiteOrder">提交结果</button>
+                <button class="canel-btn u-font-28 line-40"
+                        @click="cancelJoin">取消报名</button>
+                <button class="submit-btn u-font-28 line-40 u-m-l-16"
+                        @click="toSubmiteOrder">提交结果</button>
               </view>
             </block>
           </block>
@@ -126,19 +138,22 @@
                 <view class="u-font-20 u-content-color line-28">返利金额将在第二日到账</view>
               </view>
             </block>
-            <button class="sign-up-btn u-font-30 bold line-42" disabled>已提交</button>
+            <button class="sign-up-btn u-font-30 bold line-42"
+                    disabled>已提交</button>
           </block>
           <block v-if="status * 1 === 5">
             <view class="u-flex-1">
               <view class="line-34 bold">审核驳回:</view>
-              <view class="u-font-20 u-content-color line-28">审核驳回理由审核驳回理由审核驳回理由</view>
+              <view class="u-font-20 u-content-color line-28">{{detail.reject_reason}}</view>
             </view>
           </block>
           <block v-if="status * 1 === 6">
-            <button class="end-btn u-m-l-12" disabled>已结束</button>
+            <button class="end-btn u-m-l-12"
+                    disabled>已结束</button>
           </block>
           <block v-if="status * 1 === 7">
-            <button class="end-btn u-m-l-12" disabled>已抢光</button>
+            <button class="end-btn u-m-l-12"
+                    disabled>已抢光</button>
           </block>
         </view>
       </fixed-bottom>
@@ -162,6 +177,7 @@ export default {
       footerHeight: 0,
       currentTab: 0,
       activityId: '',
+      recordId: '',
       detail: {
         imgs: '',
         activity_type: '',
@@ -234,6 +250,7 @@ export default {
   },
   onLoad (options) {
     this.activityId = options.id
+    this.recordId = options.record_id
   },
   onShow () {
     if (!this.userId) {
@@ -298,6 +315,9 @@ export default {
         lng: location.longitude,
         lat: location.latitude
       }
+      if (this.recordId) {
+        params.record_id = this.recordId
+      }
       const { code, data } = await getActivityDetail(params)
       if (code === 200) {
         this.detail = data
@@ -414,7 +434,8 @@ export default {
       }
     }
   }
-  .act-able-time, .shop-info {
+  .act-able-time,
+  .shop-info {
     padding: 32px 40px 28px;
     background-color: #fff;
     .shop-name {
@@ -442,7 +463,9 @@ export default {
       width: 20px;
       height: 24px;
     }
-    .icon-phone-wh, .icon-elm-wh, .icon-mt-wh {
+    .icon-phone-wh,
+    .icon-elm-wh,
+    .icon-mt-wh {
       width: 56px;
       height: 56px;
     }
@@ -469,7 +492,8 @@ export default {
       background-color: $u-type-primary;
       white-space: nowrap;
     }
-    .canel-btn, .submit-btn {
+    .canel-btn,
+    .submit-btn {
       padding: 16px 40px;
       width: 192px;
       height: 72px;
@@ -480,7 +504,7 @@ export default {
       color: $u-type-primary;
       background-color: #fff;
       &::after {
-        content: "";
+        content: '';
         display: flex;
         align-items: center;
         width: 200%;
@@ -504,8 +528,8 @@ export default {
   }
 }
 button[disabled] {
-  color: #fff!important;
-  background-color: #D3D4D5!important;
+  color: #fff !important;
+  background-color: #d3d4d5 !important;
 }
 button[disabled]::after {
   border-color: transparent;
@@ -513,7 +537,7 @@ button[disabled]::after {
 </style>
 
 <style >
-  .act-tabs >>> .u-tab-item + .u-tab-item {
-    margin-left: 42px;
-  }
+.act-tabs >>> .u-tab-item + .u-tab-item {
+  margin-left: 42px;
+}
 </style>

+ 108 - 82
src/pagesSub/order/submitOrder.vue

@@ -1,28 +1,34 @@
 <template>
   <view>
     <network-error />
-    <u-notice-bar mode="horizontal" :list="['虚假填写信息将被列入黑名单,永久不得参加活动']"></u-notice-bar>
+    <u-notice-bar mode="horizontal"
+                  :list="['虚假填写信息将被列入黑名单,永久不得参加活动']"></u-notice-bar>
     <view class="main">
       <view class="item u-flex u-row-left u-border-bottom">
         <view class="label u-flex label-w">
           <view class="icon-bt"></view>
           <view>外卖订单编号</view>
         </view>
-        <input v-model="form.ordersn" placeholder="请输入订单编号"/>
+        <input v-model="form.ordersn"
+               placeholder="请输入订单编号" />
       </view>
       <view class="item u-flex u-row-left u-border-bottom">
         <view class="label u-flex label-w">
           <view class="icon-bt"></view>
           <view>实际支付金额</view>
         </view>
-        <input v-model="form.real_pay_price" type="digit" placeholder="请输入实际支付金额"/>
+        <input v-model="form.real_pay_price"
+               type="digit"
+               placeholder="请输入实际支付金额" />
       </view>
       <view class="item u-flex u-row-left u-border-bottom">
         <view class="label u-flex label-w">
           <view class="icon-bt"></view>
           <view>手机号</view>
         </view>
-        <input v-model="form.contact_phone" type="number" placeholder="请输入手机号"/>
+        <input v-model="form.contact_phone"
+               type="number"
+               placeholder="请输入手机号" />
       </view>
       <view class="item u-border-bottom">
         <view class="label u-flex">
@@ -30,13 +36,18 @@
           <view>订单截图<span class="u-content-color u-font-30 line-42">(含店名与实付金额)</span></view>
         </view>
         <view class="u-flex u-flex-wrap u-p-t-40">
-          <block v-for="(item, index) in imgList1" :key="index">
+          <block v-for="(item, index) in imgList1"
+                 :key="index">
             <view class="u-rela img-item">
-              <image :src="item.url | imgFilter(4)" mode="aspectFill" @click="lookImg(imgList2, index)"></image>
-              <view class="icon-del-red-wh icon-del-red" @click="delImg(index, 1)"></view>
+              <image :src="item.url | imgFilter(4)"
+                     mode="aspectFill"
+                     @click="lookImg(imgList2, index)"></image>
+              <view class="icon-del-red-wh icon-del-red"
+                    @click="delImg(index, 1)"></view>
             </view>
           </block>
-          <view class="upload icon-upload-bg" @click="uploadImg(1)"></view>
+          <view class="upload icon-upload-bg"
+                @click="uploadImg(1)"></view>
         </view>
       </view>
       <view class="item u-border-bottom">
@@ -45,34 +56,47 @@
           <view>订单截图<span class="u-content-color u-font-30 line-42">(含下单时间与订单号)</span></view>
         </view>
         <view class="u-flex u-flex-wrap u-p-t-40">
-          <block v-for="(item, index) in imgList2" :key="index">
+          <block v-for="(item, index) in imgList2"
+                 :key="index">
             <view class="u-rela img-item">
-              <image :src="item.url | imgFilter(4)" mode="aspectFill" @click="lookImg(imgList2, index)"></image>
-              <view class="icon-del-red-wh icon-del-red" @click="delImg(index, 2)"></view>
+              <image :src="item.url | imgFilter(4)"
+                     mode="aspectFill"
+                     @click="lookImg(imgList2, index)"></image>
+              <view class="icon-del-red-wh icon-del-red"
+                    @click="delImg(index, 2)"></view>
             </view>
           </block>
-          <view class="upload icon-upload-bg" @click="uploadImg(2)"></view>
+          <view class="upload icon-upload-bg"
+                @click="uploadImg(2)"></view>
         </view>
       </view>
       <view class="item u-border-bottom">
         <view class="label u-flex">
           <view class="icon-bt"></view>
           <view>评价截图<span class="u-content-color u-font-30 line-42">(需上传评价截图)</span>
-            <span class="rule u-m-l-32" @click="toRule">评价规则</span>
+            <span class="rule u-m-l-32"
+                  @click="toRule">评价规则</span>
           </view>
         </view>
         <view class="u-flex u-flex-wrap u-p-t-40">
-          <block v-for="(item, index) in imgList3" :key="index">
+          <block v-for="(item, index) in imgList3"
+                 :key="index">
             <view class="u-rela img-item">
-              <image :src="item.url | imgFilter(4)" mode="aspectFill" @click="lookImg(imgList2, index)"></image>
-              <view class="icon-del-red-wh icon-del-red" @click="delImg(index, 3)"></view>
+              <image :src="item.url | imgFilter(4)"
+                     mode="aspectFill"
+                     @click="lookImg(imgList2, index)"></image>
+              <view class="icon-del-red-wh icon-del-red"
+                    @click="delImg(index, 3)"></view>
             </view>
           </block>
-          <view class="upload icon-upload-bg" @click="uploadImg(3)"></view>
+          <view class="upload icon-upload-bg"
+                @click="uploadImg(3)"></view>
         </view>
       </view>
     </view>
-    <button class="sub u-m-t-12" :disabled="disabledBtn" @click="submit">提交</button >
+    <button class="sub u-m-t-12"
+            :disabled="disabledBtn"
+            @click="submit">提交</button>
   </view>
 </template>
 
@@ -123,6 +147,7 @@ export default {
     // 提交订单信息
     async submitForm () {
       const params = JSON.parse(JSON.stringify(this.form))
+      params.real_pay_price = params.real_pay_price * 100
       const { code, msg } = await submitOrderInfo(params)
       if (code === 200) {
         uni.navigateTo({
@@ -203,72 +228,73 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  .main {
-    background-color: #FFF;
-  }
-  .icon-bt {
-    width: 14px;
-    height: 14px;
-    margin-right: 4px;
-  }
-  .item {
-    padding: 32px 32px 32px 24px;
-  }
-  .label {
-    font-size: 30px;
-    color: $u-main-color;
-    line-height: 42px;
-  }
-  .label-w {
-    width: 200px;
-    margin-right: 78px;
-  }
-  .sub {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    width: 100%;
-    height: 116px;
-    border-radius: 0;
-    background-color: $u-type-primary;
-    color: #FFF;
-    font-size: 36px;
-    line-height: 50px;
-    &::after {
-      border-color: transparent;
-    }
-  }
-  .img-item image, .upload {
-    width: 160px;
-    height: 160px;
-    border-radius: 4px;
-    font-size: 0;
-  }
-  .upload {
-    margin-bottom: 16px;
-  }
-  .img-item {
-    margin-right: 14px;
-    margin-bottom: 10px;
-  }
-  .icon-del-red-wh {
-    position: absolute;
-    top: 8px;
-    right: 8px;
-    width: 28px;
-    height: 28px;
-  }
-  .rule {
-    color: $u-type-other;
-  }
-  button[disabled] {
-    color: #F8F9FB;
-    background-color: #F8BCA9;
+.main {
+  background-color: #fff;
+}
+.icon-bt {
+  width: 14px;
+  height: 14px;
+  margin-right: 4px;
+}
+.item {
+  padding: 32px 32px 32px 24px;
+}
+.label {
+  font-size: 30px;
+  color: $u-main-color;
+  line-height: 42px;
+}
+.label-w {
+  width: 200px;
+  margin-right: 78px;
+}
+.sub {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 116px;
+  border-radius: 0;
+  background-color: $u-type-primary;
+  color: #fff;
+  font-size: 36px;
+  line-height: 50px;
+  &::after {
+    border-color: transparent;
   }
+}
+.img-item image,
+.upload {
+  width: 160px;
+  height: 160px;
+  border-radius: 4px;
+  font-size: 0;
+}
+.upload {
+  margin-bottom: 16px;
+}
+.img-item {
+  margin-right: 14px;
+  margin-bottom: 10px;
+}
+.icon-del-red-wh {
+  position: absolute;
+  top: 8px;
+  right: 8px;
+  width: 28px;
+  height: 28px;
+}
+.rule {
+  color: $u-type-other;
+}
+button[disabled] {
+  color: #f8f9fb;
+  background-color: #f8bca9;
+}
 </style>
 
 <style scoped>
-  .u-notice-bar >>> .u-notice-text {
-    font-size: 26px;
-  }
+.u-notice-bar >>> .u-notice-text {
+  font-size: 26px;
+}
 </style>

+ 6 - 4
src/store/index.js

@@ -7,7 +7,7 @@ Vue.use(Vuex)
 
 const store = new Vuex.Store({
   state: {
-    imgPrefix: 'https://image.4008737773.com/',
+    imgPrefix: 'https://image.topboom0912.com/',
     ossImgResize: {},
     openid: uni.getStorageSync(storageKeys.OPENIDID) || '', // 微信code换取openid
     userInfo: uni.getStorageSync(storageKeys.USER_INFO) || {}, // 用户信息
@@ -40,7 +40,7 @@ const store = new Vuex.Store({
   },
   actions: {
     async getUserInfo ({ commit, state, dispatch }) {
-      return new Promise(async (resolve) => {
+      return new Promise(async resolve => {
         const sessionInfo = await new Promise(resolve => {
           uni.checkSession({
             success: res => resolve(res),
@@ -54,7 +54,9 @@ const store = new Vuex.Store({
         let params = {}
         if (state.openid === '' || sessionInfo.errMsg !== 'checkSession:ok') {
           const openid = await dispatch('getUserCode')
-          if (!openid) { return }
+          if (!openid) {
+            return
+          }
           userData = await uni.getUserInfo({ withCredentials: true })
         }
         if (!Array.isArray(userData) && !userData.userInfo) {
@@ -96,7 +98,7 @@ const store = new Vuex.Store({
     getUserCode ({ commit }) {
       return new Promise(async (resolve, reject) => {
         try {
-          const loginData = await new Promise((resolve) => {
+          const loginData = await new Promise(resolve => {
             uni.login({
               success: res => resolve(res),
               fail: err => {