Sfoglia il codice sorgente

8/23卡券字体调整

Foystor 3 anni fa
parent
commit
5d2b070552
4 ha cambiato i file con 94 aggiunte e 115 eliminazioni
  1. 1 1
      project.private.config.json
  2. 1 1
      src/App.vue
  3. 82 105
      src/components/index/personal.vue
  4. 10 8
      src/pages/coupons/index.vue

+ 1 - 1
project.private.config.json

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

+ 1 - 1
src/App.vue

@@ -9,7 +9,7 @@ export default {
   onLaunch(options){
       console.log('启动小程序的场景值:', options.scene)
       let scene = options.scene
-      if(scene == 1007 || scene == 1008 || scene == 1035){
+      if(scene == 1007 || scene == 1008 || scene == 1035 || scene == 1017){
         console.log('外发给你哦')
         wx.setStorageSync("is_out", true);
       }else{

+ 82 - 105
src/components/index/personal.vue

@@ -78,33 +78,26 @@
       overlay
       z-index="99"
     >
-      <div class="quan_container padding-top-lg">
-        <view class=" margin-top-lg flex justify-center">
-              <text class="title" >
-                水母会员次卡体验券1张
-              </text>
-              
-              </view>
-        <view class="flex justify-center">
-                <text class="text-xs">
-                {{userinfo.certainTime}}&nbsp;当天领取有效
-              </text>
-            </view>
-
-            <view class="flex justify-center margin-top-xs">
-                <text class="experience time margin-right-xs">
-                {{gift_time}}
-              </text>
-              <text class="time_text margin-top-xs">
-                次
-              </text>
-            </view>
-          </div>  
-            <view class="flex justify-center margin-top-xl">
-              <button class="cu-btn get_btn text-white" @click="get_ticket">领取</button>
+      <div class="quan_container padding-top-xl ">
+        <view class="margin-top-xl flex justify-center">
+            <text class="title" >水母会员次卡体验券1张</text>
+        </view>
+        <view class="flex justify-center margin-top">
+            <text class="text-xs">{{userinfo.certainTime}}&nbsp;当天领取有效</text>
+        </view>
+        <div class="flex justify-center margin-top" >
+            <view class="flex justify-center quan_container_lil">
+              <div style="display: flex;align-items: baseline">
+                <text class="experience time">{{ gift_time }}</text>
+                <text class="time_text margin-left-xs">次</text>
+              </div>  
             </view>
+        </div>
+      </div>  
+      <view class="flex justify-center margin-top-xl">
+         <button class="cu-btn get_btn text-white" @click="get_ticket">领取</button>
+      </view>
 
-      
     </van-popup>
 
     <!--    外发领券弹窗-->
@@ -116,81 +109,60 @@
       z-index="99"
     >
       <div class="quan_container padding-tb-xl">
-        <view class=" margin-top-xs flex justify-center">
-              <text class="title">
-                {{outCouponData.name}}
-              </text>
-              
-              </view>
-        <view class="flex justify-center">
-                <text class="text-xs" v-if="outCouponData.validity_time.type==1">
-                {{outCouponData.validity_time.time_format}}&nbsp;之前领取有效
-              </text>
-              <text class="text-xs" v-else>
-                {{outCouponData.validity_time.start_time_format}}&nbsp;至&nbsp;{{outCouponData.validity_time.end_time_format}}&nbsp;之前领取有效
-              </text>
-            </view>
+          <view class="margin-top-xl flex justify-center">
+              <text class="title">{{outCouponData.name}}</text>
+          </view>
+          <view class="flex justify-center margin-top">
+              <text class="text-xs" v-if="outCouponData.validity_time.type==1">{{outCouponData.validity_time.time_format}}&nbsp;之前领取有效</text>
+              <text class="text-xs" v-else>{{outCouponData.validity_time.start_time_format}}&nbsp;至&nbsp;{{outCouponData.validity_time.end_time_format}}&nbsp;之前领取有效</text>
+          </view>
             <!-- 核销 -->
-            <view class="flex justify-center margin-top-xl padding-top-xs" v-if="outCouponData.type==1">
-                <text class="hexiao time margin-right-xs">
-                  {{ outCouponData.discount.time }}
-                </text>
-                <text class="time_text margin-top-xs" v-if="outCouponData.discount.type==0">
-                  分钟
-                </text>
-                <text class="time_text margin-top-xs" v-else>
-                  次
-                </text>
+            <view class="flex justify-center margin-top" v-if="outCouponData.type==1">
+              <div class="flex justify-center quan_container_lil">
+                <div style="display: flex;align-items: baseline">
+                 <text class="hexiao time margin-right-xs">{{ outCouponData.discount.time }}</text>
+                 <text class="time_text" v-if="outCouponData.discount.type==0">分钟</text>
+                 <text class="time_text" v-else>次</text>
+                </div> 
+              </div>
             </view>
            <!-- 满减 -->
-            <view class="flex justify-center margin-top-xl padding-top-xs margin-left-xs" v-if="outCouponData.type==2">
-                <text class="time_text margin-top-xs">
-                  满
-                </text>
-                <text class="manjian time margin-lr-xs">
-                   {{ outCouponData.discount.full }}
-                </text>
-                <text class="time_text margin-top-xs">
-                  减
-                </text>
-                <text class="manjian time margin-left-xs">
-                   {{ outCouponData.discount.reduce }}
-                </text>
+            <view class="flex justify-center margin-top" v-if="outCouponData.type==2">
+              <div class="flex justify-center quan_container_lil">
+                <div style="display: flex;align-items: baseline">
+                  <text class="time_text">满</text>
+                  <text class="manjian time margin-lr-xs">{{ outCouponData.discount.full }}</text>
+                  <text class="time_text">减</text>
+                  <text class="manjian time margin-left-xs">{{ outCouponData.discount.reduce }}</text>
+                </div>  
+              </div>   
             </view>
             <!-- 折扣 -->
-            <view class="flex justify-center margin-top-xl padding-top-xs margin-left-xs" v-if="outCouponData.type==3">
-                <text class="time_text margin-top-xs">
-                  打
-                </text>
-                <text class="discount time margin-lr-sm">
-                   {{ outCouponData.discount.discount*10 }}
-                </text>
-                <text class="time_text margin-top-xs">
-                  折
-                </text>
+            <view class="flex justify-center margin-top" v-if="outCouponData.type==3">
+              <div class="flex justify-center quan_container_lil">
+                <div style="display: flex;align-items: baseline">
+                  <text class="time_text">打</text>
+                  <text class="discount time margin-lr-sm">{{ outCouponData.discount.discount*10 }}</text>
+                  <text class="time_text">折</text>
+                </div>
+              </div>  
             </view>
             <!-- 随机 -->
-            <view class="flex justify-center margin-top-xl padding-top-xs margin-left-xs" v-if="outCouponData.type==4">
-                <text class="time_text margin-top-xs">
-                  随机
-                </text>
-                <text class="random time margin-lr-xs">
-                   {{ outCouponData.discount.start }}
-                </text>
-                <text class="time_text margin-top-xs">
-                  至
-                </text>
-                <text class="random time margin-lr-xs">
-                   {{ outCouponData.discount.end }}
-                </text>
-                <text class="time_text margin-top-xs">
-                  元
-                </text>
-            </view>
-            </div>
-            <view class="flex justify-center margin-top-xl">
-              <button class="cu-btn get_btn text-white" @click="get_coupon">领取</button>
+            <view class="flex justify-center margin-top" v-if="outCouponData.type==4">
+              <div class="flex justify-center quan_container_lil">
+                <div style="display: flex;align-items: baseline">
+                  <text class="time_text">随机</text>
+                  <text class="random time margin-lr-xs">{{ outCouponData.discount.start }}</text>
+                  <text class="time_text">至</text>
+                  <text class="random time margin-lr-xs">{{ outCouponData.discount.end }}</text>
+                  <text class="time_text">元</text>
+                </div> 
+              </div>  
             </view>
+       </div>
+       <view class="flex justify-center margin-top-xl">
+          <button class="cu-btn get_btn text-white" @click="get_coupon">领取</button>
+       </view>
 
       
     </van-popup>
@@ -365,7 +337,7 @@ export default {
 
     //判断是否每月20号
     let day = new Date().getDate();
-    if (day == 19) {
+    if (day == 20) {
       wx.setStorageSync("is_twenty", true);
       couponReceiveFirstID().then((res)=>{
         console.log('体验次卡',res.data.data.discount.time)
@@ -375,7 +347,7 @@ export default {
       wx.setStorageSync("is_twenty", false);
     }
     $this.twenty = wx.getStorageSync("is_twenty");
-    console.log("可以领会员日注册体验券吗", $this.first & $this.twenty);
+    console.log("可以领注册体验券吗", $this.first & $this.twenty);
   },
   onShow() {
     reload_userinfo($this);
@@ -437,13 +409,22 @@ export default {
 }
 
 .quan_container {
-  background-image: url("https://img.shuimuai.com/pic_getCoupon.png");
+  background-image: url("https://img.shuimuai.com/pic_getCoupon2.png");
   background-position: center;
   background-size: 100% 100%;
   width: 270px;
   height: 235px;
+  padding-left: 5px
+}
+.quan_container_lil{
+  background-image: url("https://img.shuimuai.com/pic_getCouponlil.png");
+  background-position: center;
+  background-size: 100% 100%;
+  width: 185px;
+  height: 56px;
+  display: flex;
+  align-items: center
 }
-
 /*标题*/
 .quan_container .title {
   font-size: 15px;
@@ -466,24 +447,20 @@ export default {
   font-weight: bold;
   color: #6858C4;
 }
-.experience{
+.hexiao,.discount,.experience{
   font-size: 36px;
-  line-height: 22px;
 }
-.hexiao,.discount{
-  font-size: 36px;
-  line-height: 8px;
+.random{
+  font-size: 19px;
 }
-.manjian,.random{
-  font-size: 28px;
-  line-height: 8px;
+.manjian{
+  font-size: 24px;
 }
 /*分钟二字*/
 .quan_container .time_text {
   font-size: 12px;
   font-weight: 400;
   color: #6858C4;
-  line-height: 24px;
 }
 
 /* 领取按钮 */

+ 10 - 8
src/pages/coupons/index.vue

@@ -24,7 +24,7 @@
                   <van-col span="17" >
                    <!-- 核销券 -->
                    <view style="margin-top:36rpx" v-if="item.type==1">
-                     <text class="time">{{ item.discount.time }}</text>
+                     <text class="time margin-right-xs">{{ item.discount.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>
@@ -32,15 +32,15 @@
                    <!-- 满减券 -->
                    <view style="margin-top:36rpx" v-if="item.type==2">
                      <text class="time_text">满</text>
-                     <text class="time">{{ item.discount.full }}</text>
+                     <text class="time margin-lr-xs">{{ item.discount.full }}</text>
                      <text class="time_text">减</text>
-                     <text class="time">{{ item.discount.reduce }}</text>
+                     <text class="time margin-left-xs">{{ item.discount.reduce }}</text>
                    </view>
 
                    <!-- 折扣券 -->
                    <view style="margin-top:36rpx" v-if="item.type==3">
                      <text class="time_text">打</text>
-                     <text class="time">{{ item.discount.discount*10 }}</text>
+                     <text class="time margin-lr-xs">{{ item.discount.discount*10 }}</text>
                      <text class="time_text">折</text>
                    </view>
 
@@ -393,16 +393,18 @@ export default {
   font-size: 10px;
   font-weight: 400;
   color: #030000;
-  line-height: 24px;
+  line-height: 23px;
 
 }
 
 /*分钟数*/
 .time {
-  font-size: 24px;
+  font-size: 19px;
   font-weight: 400;
   color: #030000;
-  line-height: 24px;
+  line-height: 28px;
+  display:inline-block;
+  -webkit-transform:scale(1,1.1);
 }
 
 /*分钟二字*/
@@ -410,7 +412,7 @@ export default {
   font-size: 12px;
   font-weight: 400;
   color: #030000;
-  line-height: 24px;
+  line-height: 28px;
 }
 
 /*领取二字*/