Sfoglia il codice sorgente

8/23体验版合并

Foystor 3 anni fa
parent
commit
2f3e9f5f0e

+ 1 - 1
project.private.config.json

@@ -16,7 +16,7 @@
           "name": "pages/index/main",
           "pathName": "pages/index/main",
           "query": "",
-          "scene": 1017
+          "scene": 1007
         },
         {
           "name": "pages/coupons/main",

+ 17 - 17
src/components/index/personal.vue

@@ -71,7 +71,7 @@
     </view>
 
     <!--    会员日注册领券弹窗-->
-    <van-popup
+    <!-- <van-popup
       :show="twenty&first"
       :close-on-click-overlay="false"
       custom-class="pop"
@@ -98,7 +98,7 @@
          <button class="cu-btn get_btn text-white" @click="get_ticket">领取</button>
       </view>
 
-    </van-popup>
+    </van-popup> -->
 
     <!--    外发领券弹窗-->
     <van-popup
@@ -209,8 +209,8 @@ export default {
       pop_show: false,
       receive: 0,
       invite_code: false,
-      twenty: false,
-      //外发
+      // twenty: false,
+      // 外发
       output: false,
       is_outShow: false,
       outCouponData:{
@@ -222,7 +222,7 @@ export default {
           type:Number
         }
       },
-      gift_time: Number
+      // gift_time: Number
     };
   },
   methods: {
@@ -336,18 +336,18 @@ export default {
     }
 
     //判断是否每月20号
-    let day = new Date().getDate();
-    if (day == 20) {
-      wx.setStorageSync("is_twenty", true);
-      couponReceiveFirstID().then((res)=>{
-        console.log('体验次卡',res.data.data.discount.time)
-        $this.gift_time = res.data.data.discount.time
-      })
-    } else {
-      wx.setStorageSync("is_twenty", false);
-    }
-    $this.twenty = wx.getStorageSync("is_twenty");
-    console.log("可以领注册体验券吗", $this.first & $this.twenty);
+    // let day = new Date().getDate();
+    // if (day == 20) {
+    //   wx.setStorageSync("is_twenty", true);
+    //   couponReceiveFirstID().then((res)=>{
+    //     console.log('体验次卡',res.data.data.discount.time)
+    //     $this.gift_time = res.data.data.discount.time
+    //   })
+    // } else {
+    //   wx.setStorageSync("is_twenty", false);
+    // }
+    // $this.twenty = wx.getStorageSync("is_twenty");
+    // console.log("可以领注册体验券吗", $this.first & $this.twenty);
   },
   onShow() {
     reload_userinfo($this);

+ 28 - 27
src/pages/coupons/index.vue

@@ -8,7 +8,7 @@
           <div v-for="(item,index) in rec_list" :key="index">
             <div class="quan_container container" >
             <van-row gutter="10">
-              <van-col span="15" offset="1">
+              <van-col span="17" offset="1">
                 <div class="padding-top">
                   <text class="title">{{ item.name }}</text>
                 </div>
@@ -47,14 +47,14 @@
                    <!-- 随机券 -->
                    <view style="margin-top:36rpx" v-if="item.type==4">
                      <text class="time_text">随机</text>
-                     <text class="time">{{ item.discount.start }}</text>
+                     <text class="time margin-lr-xs">{{ item.discount.start }}</text>
                      <text class="time_text">至</text>
-                     <text class="time">{{ item.discount.end }}</text>
+                     <text class="time margin-lr-xs">{{ item.discount.end }}</text>
                      <text class="time_text">元</text>
                    </view>
                  </van-col> 
 
-                  <van-col span="7" >
+                  <van-col span="7">
                     <view class="margin-top-xl" @click="ruleShow(item.coupon_category_id)">
                       <text class="text-sm text-grey rule">使用规则</text>
                     </view>
@@ -62,7 +62,7 @@
                </van-row>
 
               </van-col>
-              <van-col span="5" offset="3" class="" @click="get_ticket(item)">
+              <van-col span="5" offset="1" class="" @click="get_ticket(item)">
                 <view class="get_ticket_text">领取</view>
               </van-col>
             </van-row>
@@ -92,7 +92,7 @@
           <div v-for="(item,index) in cp_list" :key="index">
             <div class="quan_container_get container">
             <van-row gutter="10">
-              <van-col span="15" offset="1">
+              <van-col span="17" offset="1">
                 <div :class="item.type==1?'margin-bottom padding-top':'padding-top'">
                   <text class="title">{{ item.name }}</text>
                 </div>
@@ -105,7 +105,7 @@
                   <van-col span="17" >
                     <!-- 核销券 -->
                     <view style="margin-top:36rpx" v-if="item.type==1">
-                      <text class="time">{{ item.time }}</text>
+                      <text class="time margin-right-xs">{{ item.time }}</text>
                       <text class="time_text" v-if="item.discount_type==0">分钟</text>
                       <text class="time_text" v-if="item.discount_type==1">次</text>
                     </view>
@@ -113,22 +113,22 @@
                     <!-- 满减券 -->
                     <view style="margin-top:36rpx" v-if="item.type==2">
                       <text class="time_text">满</text>
-                      <text class="time">{{ item.full }}</text>
+                      <text class="time margin-lr-xs">{{ item.full }}</text>
                       <text class="time_text">减</text>
-                      <text class="time">{{ item.reduce }}</text>
+                      <text class="time margin-left-xs">{{ item.reduce }}</text>
                     </view>
 
                     <!-- 折扣券 -->
                     <view style="margin-top:36rpx" v-if="item.type==3">
                       <text class="time_text">打</text>
-                      <text class="time">{{ item.discount*10 }}</text>
+                      <text class="time margin-lr-xs">{{ item.discount*10 }}</text>
                       <text class="time_text">折</text>
                     </view>
 
                     <!-- 随机券 -->
                     <view style="margin-top:36rpx" v-if="item.type==4">
                       <text class="time_text">减</text>
-                      <text class="time">{{ item.random }}</text>
+                      <text class="time margin-lr-xs">{{ item.random }}</text>
                       <text class="time_text">元</text>
                     </view>
                   </van-col> 
@@ -141,7 +141,7 @@
                 </van-row>
 
               </van-col>
-              <van-col span="5" offset="2">
+              <van-col span="5" offset="0">
                 <view class="get_ticket_text" v-if="item.status==2">已使用</view>
                 <view class="get_ticket_text" v-else>已领取</view>
               </van-col>
@@ -172,7 +172,7 @@
           <div v-for="(item,index) in ov_list" :key="index">
             <div class="quan_container_gray container">
             <van-row gutter="10">
-              <van-col span="15" offset="1">
+              <van-col span="17" offset="1">
                 <div class="padding-top">
                   <text class="title">{{ item.name }}</text>
                 </div>
@@ -185,7 +185,7 @@
                   <van-col span="17" >
                     <!-- 核销券 -->
                     <view style="margin-top:36rpx" v-if="item.type==1">
-                      <text class="time">{{ item.time }}</text>
+                      <text class="time margin-right-xs">{{ item.time }}</text>
                       <text class="time_text" v-if="item.discount_type==0">分钟</text>
                       <text class="time_text" v-if="item.discount_type==1">次</text>
                     </view>
@@ -193,22 +193,22 @@
                     <!-- 满减券 -->
                      <view style="margin-top:36rpx" v-if="item.type==2">
                       <text class="time_text">满</text>
-                      <text class="time">{{ item.full }}</text>
+                      <text class="time margin-lr-xs">{{ item.full }}</text>
                       <text class="time_text">减</text>
-                      <text class="time">{{ item.reduce }}</text>
+                      <text class="time margin-left-xs">{{ item.reduce }}</text>
                     </view>
 
                     <!-- 折扣券 -->
                     <view style="margin-top:36rpx" v-if="item.type==3">
                       <text class="time_text">打</text>
-                      <text class="time">{{ item.discount*10 }}</text>
+                      <text class="time margin-lr-xs">{{ item.discount*10 }}</text>
                       <text class="time_text">折</text>
                     </view>
 
                     <!-- 随机券 -->
                     <view style="margin-top:36rpx" v-if="item.type==4">
                       <text class="time_text">减</text>
-                      <text class="time">{{ item.random }}</text>
+                      <text class="time margin-lr-xs">{{ item.random }}</text>
                       <text class="time_text">元</text>
                     </view>
                   </van-col> 
@@ -221,7 +221,7 @@
                 </van-row>
 
               </van-col>
-              <van-col span="5" offset="2">
+              <van-col span="5" offset="0">
                 <view class="get_ticket_text">已过期</view>
               </van-col>
             </van-row>
@@ -312,19 +312,20 @@ export default {
     get_ticket($item) {
       couponReceive($item).then((res) => {
         let $res = res.data;
-        if ($res.code == 0 || $res.code == 204) {
+        if ($res.code == 0) {
           Toast.success({
             message: $res.errmsg,
-            onClose() {
-              $this.get_coupon_list()
-              $this.get_rec_coupon_list()
-              $this.get_overdue_list()
-            }
           })
           $this.get_rec_coupon_list()
           $this.get_coupon_list()
+          $this.get_overdue_list()
         } else {
-          Toast.fail($res.errmsg)
+          Toast.fail({
+            message: $res.errmsg,
+          })
+          $this.get_rec_coupon_list()
+          $this.get_coupon_list()
+          $this.get_overdue_list()
         }
       }).catch((err)=>{
         console.log("错误",err)
@@ -400,7 +401,7 @@ export default {
 /*分钟数*/
 .time {
   font-size: 19px;
-  font-weight: 400;
+  font-weight: bold;
   color: #030000;
   line-height: 28px;
   display:inline-block;

+ 1 - 1
src/pages/user_center/confirmPay/index.vue

@@ -73,7 +73,7 @@
       <div class="err_container flex flex-direction align-center justify-around padding-top-xl padding-bottom-sm">
         <view>
           <text class="payTitle">
-            充值失败,请再次尝试
+            充值失败
           </text>
         </view>
         <img

+ 8 - 8
src/utils/user.js

@@ -43,14 +43,14 @@ export function reload_userinfo($this) {
     }
 
     //当天具体日期
-    let date = new Date();
-    let day = date.getDate();
-    let Y = date.getFullYear() + "."
-    let M = (date.getMonth() + 1 < 10 ?
-      "0" + (date.getMonth() + 1) :
-      date.getMonth() + 1) + ".";
-    let D = (day < 10 ? "0" + day : day);
-    $this.userinfo.certainTime = Y + M + D;
+    // let date = new Date();
+    // let day = date.getDate();
+    // let Y = date.getFullYear() + "."
+    // let M = (date.getMonth() + 1 < 10 ?
+    //   "0" + (date.getMonth() + 1) :
+    //   date.getMonth() + 1) + ".";
+    // let D = (day < 10 ? "0" + day : day);
+    // $this.userinfo.certainTime = Y + M + D;
 
     $this.userinfo['validity_time'] = formatTime($this.userinfo['validity_time'])
     // console.log("数据:", $this.userinfo['validity_unformattedTime']);