Procházet zdrojové kódy

福利购图片统一

kk.shi před 3 roky
rodič
revize
11bbb67e55

+ 11 - 2
pages/luckDraw/profile.js

@@ -2,6 +2,7 @@
 import LuckDraw from '../../api/luck-draw'
 import { parseTime } from '../../utils/util'
 import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync} from '../../utils/user'
+import WelfareMall from '../../api/welfareMall';
 Page({
 
     /**
@@ -24,13 +25,15 @@ Page({
         thirdPrizeNum: 0,
         goodsType: 1,
         goodsItemList: [],
-        showCustomPreview: false
+        showCustomPreview: false,
+        prizeImgList: [],
+        config: {},
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
+    onLoad: async function (options) {
         this.setData({
             isLogin: getMobileCache() != '',
             mobileTop:getMobileCache(),
@@ -44,6 +47,12 @@ Page({
             })
             this.getUserPrizeList();
         }
+
+        let info =  await WelfareMall.getIndexList();
+        this.setData({
+          prizeImgList:info.data.prizeImgList,
+          config:info.data.config,
+        })
     },
 
     /**

+ 16 - 17
pages/luckDraw/profile.wxml

@@ -16,32 +16,31 @@
   <!-- 优惠券内容 -->
   <view hidden="{{hidden1}}">
     <view class="coupon-wrap-list">
-        <coupon-wrap wx:if="{{goodsItemList.length>0}}" 
-        coupon-list="{{goodsItemList}}"
-        class="coupon_wrap"
-        coupon-item-ex-class="coupon-item-style"
-        coupon-circule-ex-class="coupon-circule-style"
-        />
+      <coupon-wrap wx:if="{{goodsItemList.length>0}}" coupon-list="{{goodsItemList}}" class="coupon_wrap" coupon-item-ex-class="coupon-item-style" coupon-circule-ex-class="coupon-circule-style" />
     </view>
-    
+
     <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
     <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>
   </view>
 
   <!-- 奖品 -->
   <view hidden="{{hidden2}}">
-    <view class="prize-content flex-row" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" data-src="{{item.goodsData.fullPhotoUrl}}" catchtap="toLookHitPhoto">
-      <view class="coupon-content">
-        <view class="coupon-title over-ellipsis">{{item.goodsName?item.goodsName:'未设置名称'}}</view>
-        <view class="coupon-data flex-row">
-          <view class="coupon-data-time">{{item.createTime}}</view>
-          <view class="coupon-refund flex-row">
-            <view class="lower-coupon-text">立即兑换</view>
+    <view wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" data-src="{{item.goodsData.fullPhotoUrl}}" catchtap="toLookHitPhoto">
+      <image class="prize-content-img" src="{{prizeImgList.length > 0 && prizeImgList[0].figure?prizeImgList[0].figure:'https://dy.shpr.top/welfareGo/luck-draw1.png'}}">
+      </image>
+      <view class="prize-content flex-row">
+        <view class="coupon-content">
+          <view class="coupon-title over-ellipsis">{{item.goodsName?item.goodsName:'未设置名称'}}</view>
+          <view class="coupon-data flex-row">
+            <view class="coupon-data-time">{{item.createTime}}</view>
+            <view class="coupon-refund flex-row" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+              <view class="lower-coupon-text" style="color: {{config.secColor?config.secColor:'#B01717'}};">立即兑换</view>
+            </view>
           </view>
         </view>
-      </view>
-      <view class="coupon-img flex-column">
-        <image class="coupon-img-url" src="{{item.fullGoodsBigImage}}"></image>
+        <view class="coupon-img flex-column">
+          <image class="coupon-img-url" src="{{item.fullGoodsBigImage}}"></image>
+        </view>
       </view>
     </view>
     <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>

+ 11 - 4
pages/luckDraw/profile.wxss

@@ -70,10 +70,17 @@ page{
 .coupon,.prize-content{
   width: 707rpx;
   height: 203rpx;
-  background-image: url(https://dy.shpr.top/welfareGo/luck-draw1.png);
-  background-size: 100% 100%;
   justify-content: space-between;
   margin-bottom: 19rpx;
+  position: relative;
+}
+
+.prize-content-img{
+  width: 707rpx;
+  height: 203rpx;
+  /* background-image: url(https://dy.shpr.top/welfareGo/luck-draw1.png);
+  background-size: 100% 100%; */
+  position: absolute;
 }
 
 .coupon-title,.coupon-data{
@@ -116,14 +123,14 @@ page{
 .coupon-refund{
   width: 139rpx;
   height: 40rpx;
-  border: 1px solid #b0d342;
+  border: 1px solid;
   border-radius: 50rpx;
 }
 
 .lower-coupon-text{
   font-size: 22rpx;
   font-weight: 500;
-  color: #b0d342;
+  /* color: #b0d342; */
 }
 
 .no_result {

+ 6 - 1
pages/welfareMall/personal/personal.js

@@ -16,7 +16,9 @@ Page({
     navigationList:[],
     couponPath: false,
     avatarUrl : 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
-    hasUserInfo:false
+    hasUserInfo:false,
+    personHeadList: [],
+    staffImgList: [],
 
   },
   onChooseAvatar(e) {
@@ -101,8 +103,11 @@ Page({
   async getIndexList(){
     let res =  await WelfareMall.getPersonalData();
     await this.getPath(res.data.navigationList);
+    let info =  await WelfareMall.getIndexList();
     this.setData({
       navigationList:res.data.navigationList,
+      personHeadList:info.data.personHeadList,
+      staffImgList:info.data.staffImgList,
     })
   },
 

+ 2 - 2
pages/welfareMall/personal/personal.wxml

@@ -1,6 +1,6 @@
 <!--pages/welfareMall/personal/personal.wxml-->
 <page-wrap id="Page" class="{{grayTheme?'page':''}}">
-  <custom-page head-bg-image="https://dy.shpr.top/welfareGo/personal-my.png" bind:sizes="handlePageSizes">
+  <custom-page head-bg-image="{{personHeadList.length > 0 && personHeadList[0].figure?personHeadList[0].figure:'https://dy.shpr.top/welfareGo/personal-my.png'}}" bind:sizes="handlePageSizes">
     <view slot="body" class="sign-scroll-body">
     <view slot="body" class="personal flex-column">
       <!-- 首部个人信息 -->
@@ -56,7 +56,7 @@
       </view>
       <!-- 员工通道 -->
       <view><button class="wx-isLogin-broadcast" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getStaff"></button>
-        <view class="broadcast" catchtap="toStaff"></view>
+        <image class="broadcast" catchtap="toStaff" src="{{staffImgList.length > 0 && staffImgList[0].figure?staffImgList[0].figure:'https://dy.shpr.top/welfareGo/broadcast1.png'}}"></image>
       </view>
       <!-- 内容 -->
       <view class="content flex-column">

+ 2 - 2
pages/welfareMall/personal/personal.wxss

@@ -237,8 +237,8 @@ page{
 .broadcast{
   width: 678rpx;
   height: 130rpx;
-  background-image: url(https://dy.shpr.top/welfareGo/broadcast1.png);
-  background-size: 100% 100%;
+  /* background-image: url(https://dy.shpr.top/welfareGo/broadcast1.png);
+  background-size: 100% 100%; */
   margin-top: 50rpx;
 }