Quellcode durchsuchen

Merge branch 'bobo/feat/sign-in' into jeffrey/feat/coupon-center

# Conflicts:
#	app.json
#	project.config.json
#	project.private.config.json
#	utils/request.js
#	utils/util.js
xing.li vor 3 Jahren
Ursprung
Commit
b492d2f7ac

+ 49 - 0
api/signIn.js

@@ -0,0 +1,49 @@
+import request from '../utils/request.js'
+
+class SignIn extends request {
+
+  static getActivityData(mobile) {
+    let params = {
+      mobile
+    };
+    return this.postRequest(`${this.BASE_URL}open/sign-in/activity/detail`, params, true)
+  }
+
+  static triggerSignIn(activityId, mobile) {
+    const params = {
+      activityId,
+      mobile,
+    }
+    return this.postRequest(`${this.BASE_URL}open/sign-in/click`, params, true)
+  }
+  /**
+   * 券列表
+   */
+  static getUserAwardCouponList(params) {
+    return this.postRequest(`${this.BASE_URL}open/sign-in/user-award-coupon-list`, params);
+  }
+
+  /**
+   * 券签名列表
+   */
+  static getUserSignInList(params) {
+    return this.postRequest(`${this.BASE_URL}open/sign-in/user-sign-in-list`, params);
+  }
+
+  /**
+   * 券使用状态列表
+   */
+  static getUserAwardCouponUseStateList(params) {
+    return this.postRequest(`${this.BASE_URL}open/sign-in/user-award-coupon-use-state-list`, params);
+  }
+
+    /**
+   * 未使用的券数量
+   */
+  static getUserAwardCouponNum(params) {
+    return this.postRequest(`${this.BASE_URL}open/sign-in/user-award-coupon-num`, params, true)
+  }
+
+}
+
+export default SignIn

+ 2 - 0
app.json

@@ -7,6 +7,8 @@
     "pages/index/index",
     "pages/receiveCoupon/receiveCoupon",
     "pages/logs/logs",
+    "pages/signIn/activity/activity",
+    "pages/signIn/record/record",
     "pages/welfareMall/personal/personal",
     "pages/welfareMall/historical/historical",
     "pages/welfareMall/order/orderCompletion",

+ 23 - 0
components/jumpmallapp.js

@@ -0,0 +1,23 @@
+// components/jumpmallapp.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
components/jumpmallapp.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 9 - 0
components/jumpmallapp.wxml

@@ -0,0 +1,9 @@
+<!--components/jumpmallapp.wxml-->
+<navigator class="_btn _exchange" 
+                target = "miniProgram" 
+                app-id="wxd92a2d29f8022f40"
+                path="pages/index/index"
+                extra-data="{foo: 'bar'}"
+                open-type='navigate'>
+                    <slot></slot>
+</navigator>

+ 1 - 0
components/jumpmallapp.wxss

@@ -0,0 +1 @@
+/* components/jumpmallapp.wxss */

BIN
images/signIn/cash_coupon.png


BIN
images/signIn/cc_use_now.png


BIN
images/signIn/close.png


BIN
images/signIn/coupon1.png


BIN
images/signIn/coupon_use_now.png


BIN
images/signIn/finishsign.png


BIN
images/signIn/losesign.png


BIN
images/signIn/per_head.png


+ 285 - 0
pages/signIn/activity/activity.js

@@ -0,0 +1,285 @@
+// pages/signIn/index.js
+import SignIn from '../../../api/signIn'
+import { isEmpty } from '../../../utils/util'
+import { getMobileCache, getPhoneNumber as getPhoneNumberSync } from '../../../utils/user'
+const app = getApp();
+ 
+Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        showPage: false,
+        showSignInSuccessDlg: false,
+        activity: {},
+        signInNodes: [{ pos: 1, text: '星期一' }, 
+                      { pos: 2,  text: '星期二' }, 
+                      { pos: 3, text: '星期三' }, 
+                      { pos: 4, text: '星期四' }, 
+                      { pos: 5, text: '星期五' }, 
+                      { pos: 6, text: '星期六' }],
+        lastSignInNode: { pos: 7, text: '星期天' },
+        todayIsSigned: false,
+        isLogin: getMobileCache() != "",
+        notUseNum: 0
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.data.dayOfWeek = this.getDayOfWeek()
+        this.startLoadActivityData()
+        this.setPageStyle()
+    },
+
+    startLoadActivityData() {
+        SignIn.getActivityData(getMobileCache()).then(res => {
+            if (res.code == 200) {
+                this.setData({
+                    activity: res.data
+                })
+                this.mapToView(res.data)
+            }
+        }).catch(_ => {
+
+        }).finally(_ => {
+            this.setData({
+                showPage: true
+            })
+        })
+        if (this.data.isLogin) {
+            SignIn.getUserAwardCouponNum({
+                mobile: getMobileCache()
+            }).then( res => {
+                if (res.code == 200) {
+                    this.setData({
+                        notUseNum: res.data.notUseNum || 0
+                    })
+                }
+                console.log(res)
+            }).catch(_ => {})
+        }
+        
+    },
+
+    setPageStyle() {
+        let dwObj = wx.getMenuButtonBoundingClientRect()
+        let navHeight_ = (dwObj.top + dwObj.height)
+        let capsuleTop_ = dwObj.top
+        let windowHeight = wx.getSystemInfoSync().windowHeight
+
+        this.setData({
+            navHeight: navHeight_,
+            capsuleTop:capsuleTop_, 
+            capHeight: dwObj.height,
+            bodyHeight: windowHeight - navHeight_,
+        });
+    },
+
+    mapToView(data) {
+        this.setColors(data.color)
+        if (data.dayAwardList && data.dayAwardList.length > 0) {
+            data.dayAwardList.forEach(item => {
+                if (item.dayNo == 7) {
+                    this.preDealItemData(this.data.lastSignInNode, item);
+                } else {
+                    if (this.data.signInNodes[item.dayNo - 1]) {
+                        this.preDealItemData(this.data.signInNodes[item.dayNo - 1], item)
+                    }
+                }
+            });
+
+            this.setData({
+                signInNodes: this.data.signInNodes,
+                lastSignInNode: this.data.lastSignInNode
+            })
+        }
+    },
+
+    preDealItemData(target, item) {
+        // 未签到的情况下,计算是否属于过签
+        Object.assign(target, item);
+        if (target.isSignIn == 0 && target.pos < this.data.dayOfWeek) {
+            target.isSignIn = -1;
+            target.textBgGround = this.data.grayBackGroudStyle
+        } else {
+            target.textBgGround = this.data.backGroundStyle
+        }
+        if (target.pos == this.data.dayOfWeek) {
+            this.setData({
+                todayIsSigned: target.isSignIn == 1
+            })
+        }
+    },
+
+    getDayOfWeek(date) {
+        var now = date || new Date();
+        var day = now.getDay();
+        if (day == 0) {
+            return 7
+        }
+        return day;
+    },
+
+    setColors(color) {
+        if (isEmpty(color)) {
+            color = "#EE5A5A"
+        }
+        if (color.length == 4) {
+            color = color.replace(/#(.)(.)(.)$/, "#$1$1$2$2$3$3")
+        }
+        let newColor = "#";
+        for (let i = 1; i <= 6; i++) {
+            if (color.charAt(i) == 'a' || color.charAt(i) == 'A') {
+                newColor += "9"
+            } else if (color.charAt(i) == '0') {
+                newColor += "0"
+            } else {
+                newColor += String.fromCharCode(color.charCodeAt(i) - 1)
+            }
+        }
+        this.setData({
+            mainColor: color,
+            secColor: newColor,
+            backGroundStyle:  "background: linear-gradient(" +color+", "+ newColor+ ", "+color+");",
+            grayBackGroudStyle: "background: #c6c6c6"
+        })
+    },
+
+    popMessage(message) {
+        app.showToast(message, "none")
+    },
+
+    tapSignIn: function() {
+        if (!this.data.isLogin) {
+            return;
+        }
+        if (!this.data.activity.id) {
+            this.popMessage("未找到签到活动")
+            return;
+        }
+
+        if (this.isLocked) {
+            return
+        }
+        this.isLocked = true
+
+        SignIn.triggerSignIn(this.data.activity.id, getMobileCache()).then(res => {
+            console.log(res)
+            if (res.code == 200) {
+                this.dealSignResult(res.data)
+                this.startLoadActivityData()
+            }
+        }).catch(_ => {
+            console.log(_)
+        }).finally(_ => {
+            this.isLocked = false
+        })
+    },
+
+    /**
+     * 处理签到结果
+     */
+    dealSignResult(data) {
+        if (data.isHit == 0 || data.coupon == null) {
+            // 没有配置奖品的情况下
+            this.popMessage("签到成功!")
+            return
+        }
+
+        const hitResult = data.coupon;
+
+        if (hitResult.couponType == "C") {
+            // 现金券
+            if (hitResult.formatReduceCost.length >= 3) {
+                hitResult._classSmallStyle = "_small"
+            }
+
+        } else if (hitResult.couponType == "D") {
+            // 折扣券
+            if (hitResult.formatReduceCost.length >= 3) {
+                hitResult._classSmallStyle = "_small"
+            }
+        }
+        if (hitResult.formatLeastCost == "0") {
+            hitResult.formatLeastCostStr = "无门槛使用"
+        } else {
+            hitResult.formatLeastCostStr = "满" + hitResult.formatLeastCost + "元使用"
+        }
+
+        this.setData({
+            hitResult: hitResult,
+            showSignInSuccessDlg: true
+        })
+    },
+
+    // 授权手机号
+    getPhoneNumber(e) {
+        getPhoneNumberSync(e, _ => {
+            this.setData({ isLogin: true })
+            this.startLoadActivityData()
+        })
+    },
+
+    closeDlg() {
+        this.setData({
+            showSignInSuccessDlg: false
+        })
+    },
+
+    toRecordDetailPage() {
+        wx.navigateTo({
+          url: '../record/record',
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/signIn/activity/activity.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "jumpmallapp": "../../../components/jumpmallapp"
+  },
+  "navigationStyle": "custom"
+}

+ 139 - 0
pages/signIn/activity/activity.wxml

@@ -0,0 +1,139 @@
+<!--pages/signIn/index.wxml-->
+<view wx:if="{{showPage}}">
+
+<!-- 页面主体 -->
+<view class="sign-scroll-body" style="margin-top:{{navHeight}}px; height: {{bodyHeight}}px;">
+    <view class="sign-info-extra">
+        <view class="coupon_num_box">
+          <view class="my_coupon_title">我的优惠券</view>
+          <view class="_num_arear">
+              <text class="_num">{{notUseNum}}</text>
+              <text class="_unit">张</text>
+              <view class="_btn" wx:if="{{notUseNum > 0}}">
+               <jumpmallapp>去使用</jumpmallapp>
+              </view>
+          </view>
+        </view>
+        <view class="_look_btn" catchtap="toRecordDetailPage">明细 | 查看</view>
+    </view>
+    <!-- 签到卡片 -->
+    <view class="sign-card-box">
+        <view class="sign-item-box">
+            <view class="_left">
+                <view class="_item" wx:for="{{signInNodes}}" wx:key="index" >
+                    <image class="_figure" src="{{item.figure}}" mode="aspectFill" />
+                    <view class="_no" style="{{item.textBgGround}}">{{item.text}}</view>
+                    <image wx:if="{{item.isSignIn == -1}}" class="_lose_sign_in" src="/images/signIn/losesign.png" />
+                    <image wx:if="{{item.isSignIn == 1}}" class="_finish_sign_in" src="/images/signIn/finishsign.png" />
+                </view>
+            </view>
+            <view class="_right">
+                <view class="_item">
+                    <image class="_figure" src="{{lastSignInNode.figure}}" mode="aspectFill" />
+                    <view class="_no" style="{{lastSignInNode.textBgGround}}">{{lastSignInNode.text}}</view>
+                    <image wx:if="{{lastSignInNode.isSignIn == -1}}" class="_lose_sign_in" src="/images/signIn/losesign.png" />
+                    <image wx:if="{{lastSignInNode.isSignIn == 1}}" class="_finish_sign_in" src="/images/signIn/finishsign.png" />
+                </view>
+            </view>
+        </view>
+        
+        <block wx:if="{{todayIsSigned}}">
+            <view class="_sign_in_btn">今日已签到</view>
+        </block>
+        <block wx:else>
+            <view class="_sign_in_btn" style="{{backGroundStyle}}" catchtap="tapSignIn">
+                签到领好礼
+                <button wx:if="{{!isLogin}}" class="phone-button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
+            </view>
+        </block>
+
+    </view>
+
+    <!-- 签到任务列表 -->
+    <view class="sign-task-box">
+        <view class="_task_title">做任务领优惠券</view>
+        <view class="_task_list">
+            <!-- 签到项 -->
+            <view wx:for="{{activity.taskAwardList}}" wx:key="index" class="_task_item">
+               <view  class="_task_item_left">
+                   <view class="_ico">
+                     <image src="{{item.figure}}" mode="aspectFill" />
+                   </view>
+                   <view class="_info">
+                        <view class="_title">{{item.taskTitle}}</view>
+                        <view class="_des">{{item.taskSubtitle}}</view>
+                   </view>
+               </view>
+               <view class="_task_item_right">
+                   <view style="color:#999;" class="_btn" wx:if="{{item.isComplete == 1}}">
+                    已完成
+                   </view>
+                   <view style="color: {{mainColor}};" class="_btn" wx:else>
+                    未完成
+                   </view>
+               </view>
+            </view>
+        </view>
+    </view>
+
+    <!-- 活动说明 -->
+    <view class="activity-des">
+       <view class="_title">活动说明</view>
+       <view class="_des">
+          <text>{{activity.activityDesc}}</text>
+       </view>
+    </view>
+
+</view>
+
+<!-- 页面头部 -->
+<view class="sign-head">
+   <view class="head-bg">
+    <image src="{{activity.themePic}}" />
+   </view>
+   <view class="head-bar" style="height:{{navHeight}}px">
+      <view style="margin-top: {{capsuleTop}}px;line-height: {{capHeight}}px;">签到中心</view>
+   </view>
+</view>
+
+
+<!-- 签到成功弹窗 -->
+<view class="dlg" wx:if="{{showSignInSuccessDlg}}">
+    <view class="sign-pop-body">
+        <view class="_body">
+           <view class="gift_wrap">
+                <view class="coupon_node">
+                    <view wx:if="{{hitResult.couponType=='D'}}" class="_node_left _zk {{hitResult._classSmallStyle}}">
+                        <view class="_num">{{hitResult.formatDiscount}}</view>
+                        <view class="_zhe">折</view>
+                    </view>
+                    <view wx:if="{{hitResult.couponType=='C'}}" class="_node_left _cash {{hitResult._classSmallStyle}}">
+                        <view class="_unit">¥</view>
+                        <view class="_num">{{hitResult.formatReduceCost}}</view>
+                    </view>
+                    <view class="_node_right">
+                        <view class="_coupont_title">{{hitResult.couponTitle}}</view>
+                        <view class="_coupon_sub_title">{{hitResult.formatLeastCostStr}}</view>
+                        <view class="_coupon_times"></view>
+                    </view>
+                    <image wx:if="{{hitResult.couponType=='D'}}" class="_bg" src="/images/signIn/coupon1.png" />
+                    <image wx:if="{{hitResult.couponType=='C'}}" class="_bg" src="/images/signIn/cash_coupon.png" />
+                </view>
+           </view>
+           <view class="award_des" style="color:{{secColor}};">恭喜您签到成功 获得9折扣折扣券</view>
+
+           <view class="_btn" style="{{backGroundStyle}}">
+            <jumpmallapp>去使用</jumpmallapp>
+           </view>
+
+        </view>
+        
+        <image class="_layer_bg" src="{{activity.popBgPic}}" />
+    </view>
+    
+    <view class="_layer" catchtap="closeDlg" >
+        <image class="_close" src="/images/signIn/close.png" />
+    </view>
+</view>
+
+</view>

+ 502 - 0
pages/signIn/activity/activity.wxss

@@ -0,0 +1,502 @@
+/* pages/signIn/index.wxss */
+page {
+    background: #EDEDED;
+}
+
+.sign-head {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 0;
+    width: 100vw;
+}
+.head-bg image{
+    width: 100vw;
+}
+
+.head-bar {
+    width: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    text-align: center;
+    color: #fff;
+    font-size: 32rpx;
+}
+.sign-scroll-body {
+    position: relative;
+    z-index: 2;
+    height: 10000rpx;
+    overflow-y: auto;
+}
+
+.sign-info-extra {
+    height: 285rpx;
+    width: 100vw;
+    display: flex;
+    flex-direction: row;
+}
+
+.coupon_num_box {
+    flex: 1;
+    box-sizing: border-box;
+    padding: 52rpx 0 20rpx 80rpx;
+}
+
+.coupon_num_box {
+    color: #fff;
+}
+.my_coupon_title {
+    font-size: 24rpx;
+    font-weight: 400;
+}
+.coupon_num_box ._num_arear {
+    padding: 18rpx 0  0 20rpx;
+    box-sizing: border-box;
+    height: 162rpx;
+    width: 480rpx;
+    white-space: nowrap;
+}
+._num_arear ._num {
+    font-size: 128rpx;
+    vertical-align: baseline;
+    height: 144rpx;
+    display: inline-block;
+}
+._num_arear ._unit {
+    padding-left: 10rpx;
+    font-size: 52rpx;
+    font-weight: 400;
+    vertical-align: baseline;
+    display: inline-block;
+}
+
+._num_arear ._btn {
+    display: inline-block;
+    font-size: 24rpx;
+    border: 1px solid #fff;
+    height: 26rpx;
+    border-radius: 24rpx;
+    padding: 4rpx 12rpx;
+    margin-left: 20rpx;
+    line-height: 24rpx;
+}
+
+.sign-info-extra ._look_btn {
+    width: 180rpx;
+    box-sizing: border-box;
+    padding: 140rpx 60rpx 0 0;
+    font-size: 24rpx;
+    color: #fff;
+    font-weight: 400;
+}
+
+
+.sign-card-box {
+    width: 704rpx;
+    height: 550rpx;
+    margin: auto;
+    background: #fff;
+    border-radius: 8px;
+    box-sizing: border-box;
+    padding: 56rpx 40rpx 40rpx 40rpx;
+}
+
+.sign-item-box {
+    display: flex;
+    flex-direction: row;
+}
+
+.sign-item-box ._left {
+    width: 390rpx;
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+}
+
+.sign-item-box ._left ._item {
+    width: 112rpx;
+    height: 156rpx;
+    border-radius: 12rpx;
+    background: #F4F4F4;
+    position: relative;
+    overflow: hidden;
+}
+.sign-item-box ._left ._item:nth-child(1), .sign-item-box ._left ._item:nth-child(2) , .sign-item-box ._left ._item:nth-child(2)  {
+    margin-bottom: 28rpx;
+}
+
+.sign-item-box ._left ._item ._figure {
+    width: 112rpx;
+    height: 154rpx;
+    position: absolute;
+    display: block;
+    left: 0;
+    top: 0;
+    z-index: 0;
+}
+.sign-item-box ._left ._item ._lose_sign_in {
+    width: 110rpx;
+    height: 82rpx;
+    position: absolute;
+    left: 2rpx;
+    display: block;
+    top: 36rpx;
+    z-index: 3;
+}
+.sign-item-box ._left ._item ._finish_sign_in {
+    width: 36rpx;
+    height: 22rpx;
+    position: absolute;
+    z-index: 3;
+    left: 38rpx;
+    top: 66rpx;
+}
+
+.sign-item-box ._left ._item ._no {
+    height: 32rpx;
+    width: 100%;
+    position: absolute;
+    z-index: 2;
+    left: 0;
+    bottom: 0;
+    color: #fff;
+    font-size: 24rpx;
+    text-align: center;
+    line-height: 32rpx;
+    background: linear-gradient(#EE5A5A, #cc4949,  #EE5A5A);
+}
+
+.sign-item-box ._right {
+    width: 202rpx;
+    margin-left: 32rpx;
+}
+.sign-item-box ._right ._item {
+    width: 202rpx;
+    height: 340rpx;
+    border-radius: 12rpx;
+    background: #F4F4F4;
+    position: relative;
+    overflow: hidden;
+}
+
+.sign-item-box ._right ._item ._figure {
+    width: 202rpx;
+    height: 340rpx;
+    display: block;
+    position: absolute;
+    left: 0;
+    top: 0;
+}
+
+.sign-item-box ._right ._item ._lose_sign_in {
+    width: 186rpx;
+    height: 140rpx;
+    display: block;
+    position: absolute;
+    left: 8rpx;
+    top: 122rpx;
+    z-index: 3;
+}
+
+.sign-item-box ._right ._item ._finish_sign_in {
+    width: 82rpx;
+    height: 50rpx;
+    position: absolute;
+    z-index: 3;
+    left: 60rpx;
+    top: 145rpx;
+}
+
+.sign-item-box ._right ._item ._no {
+    height: 46rpx;
+    width: 100%;
+    position: absolute;
+    z-index: 2;
+    left: 0;
+    bottom: 0;
+    color: #fff;
+    font-size: 24rpx;
+    text-align: center;
+    line-height: 46rpx;
+}
+
+._sign_in_btn {
+    width: 480rpx;
+    height: 68rpx;
+    border-radius: 68rpx;
+    margin: 46rpx auto 0;
+    text-align: center;
+    color: #fff;
+    position: relative;
+    line-height: 68rpx;
+    font-size: 36rpx;
+    font-weight: 500;
+    background: #c6c6c6;
+}
+._sign_in_btn button.phone-button {
+    width: 480rpx;
+    height: 68rpx;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 3;
+    opacity: 0;
+}
+
+
+.sign-task-box {
+    width: 704rpx;
+    margin: auto;
+    background: #fff;
+    border-radius: 8px;
+    margin-top: 28rpx;
+    box-sizing: border-box;
+    padding: 42rpx 28rpx;
+}
+.sign-task-box ._task_title {
+    font-size: 36rpx;
+    color: #303030;
+    font-weight: 400;
+}
+.sign-task-box ._task_list {
+    margin-top: 40rpx;
+}
+.sign-task-box ._task_item {
+    display: flex;
+    flex-direction: row;
+    margin-bottom: 46rpx;
+}
+.sign-task-box ._task_item_left {
+    width: 650rpx;
+    display: flex;
+    flex-direction: row;
+}
+._task_item_left ._ico {
+    width: 52rpx;
+    height: 52rpx;
+    padding-top: 10rpx;
+}
+._task_item_left ._ico image {
+    width: 52rpx;
+    height: 52rpx;
+    display: block;
+}
+._task_item_left ._info {
+    margin-left: 20rpx;
+}
+._task_item_left ._title {
+    font-size: 28rpx;
+    color: #303030;
+    vertical-align: top;
+}
+._task_item_left ._des {
+    font-size: 24rpx;
+    color: #a2a2a2;
+}
+
+
+.sign-task-box ._task_item_right {
+    width: 148rpx;
+    padding-top: 10rpx;
+}
+.sign-task-box ._task_item_right ._btn {
+    width: 148rpx;
+    height: 52rpx;
+    text-align: center;
+    line-height: 52rpx;
+    border-radius: 52rpx;
+    font-size: 28rpx;
+}
+
+
+.activity-des {
+    width: 704rpx;
+    margin: auto;
+    margin-top: 40rpx;
+    font-size: 28rpx;
+    color: #979797;
+    padding-bottom: 100rpx;
+}
+
+.activity-des ._des {
+    padding-top: 20rpx;
+    font-size: 24rpx;
+}
+
+.dlg {
+    width: 100vw;
+    height: 100vh;
+    z-index: 1001;
+    background: rgba(0, 0, 0, 0.9);
+    left: 0;
+    top: 0;
+    position: fixed;
+}
+.dlg ._layer {
+    width: 100vw;
+    height: 100vh;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
+}
+
+.sign-pop-body {
+    width: 622rpx;
+    height: 896rpx;
+    position: absolute;
+    left: calc(100vw / 2 - 622rpx / 2);
+    top: calc(100vh / 2 - 896rpx / 2 - 60rpx);
+}
+
+.sign-pop-body ._body {
+    width: 568rpx;
+    height: 484rpx;
+    position: absolute;
+    left: 26rpx;
+    top: 412rpx;
+    z-index: 2;
+}
+.gift_wrap {
+    width: 100%;
+    height: 232rpx;
+    box-sizing: border-box;
+}
+
+.coupon_node {
+    width: 522rpx;
+    height: 176rpx;
+    margin: auto;
+    display: flex;
+    flex-direction: row;
+    position: relative;
+}
+.coupon_node ._bg {
+    width: 522rpx;
+    height: 176rpx;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
+}
+
+.coupon_node ._node_left {
+    width: 160rpx;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    z-index: 1;
+    position: relative;
+    justify-content: center;
+    align-items: baseline;
+    color: #443E5B;
+}
+
+._node_left._zk ._num {
+    padding-top: 48rpx;
+    height: 176rpx;
+    font-size: 100rpx;
+    font-weight: 600;
+    box-sizing:border-box;
+}
+
+._node_left._zk._small ._num {
+    font-size: 56rpx;
+    padding-top: 72rpx;
+}
+
+._node_left._zk ._zhe {
+    font-size: 32rpx;
+}
+
+
+._node_left._cash ._num {
+    padding-top: 48rpx;
+    height: 176rpx;
+    font-size: 100rpx;
+    font-weight: 600;
+    box-sizing:border-box;
+}
+
+._node_left._cash._small ._num {
+    font-size: 56rpx;
+    padding-top: 72rpx;
+}
+
+._node_left._cash ._unit {
+    font-size: 32rpx;
+    position: relative;
+    top: -2rpx;
+    padding-right: 2rpx;
+}
+
+.coupon_node ._node_right {
+    position: relative;
+    z-index: 1;
+    text-align: center;
+    white-space: nowrap;
+    box-sizing: border-box;
+    padding: 20rpx;
+}
+._node_right ._coupont_title {
+    font-size: 32rpx;
+    font-weight: 600;
+}
+._node_right ._coupon_sub_title {
+    font-size: 28rpx;
+    padding: 14rpx 0;
+}
+._node_right ._coupon_sub_title:before, ._node_right ._coupon_sub_title:after {
+    width: 5px;
+    height: 5px;
+    background: #443E5B;
+    transform:rotate(45deg);
+    margin: 0 10rpx;
+    display: inline-block;
+    content: "";
+    vertical-align: middle;
+}
+
+._node_right ._coupon_times {
+    font-size: 24rpx;
+}
+
+.sign-pop-body .award_des {
+    text-align: center;
+    color: #BF2637;
+    font-size: 28rpx;
+    height: 120rpx;
+    line-height: 120rpx;
+}
+
+.sign-pop-body ._btn {
+    width: 360rpx;
+    height: 76rpx;
+    border-radius: 76rpx;
+    text-align: center;
+    color: #fff;
+    line-height: 76rpx;
+    margin: auto;
+    font-size: 42rpx;
+}
+
+.sign-pop-body ._layer_bg {
+    width: 622rpx;
+    height: 896rpx;
+    position: absolute;
+    z-index: 0;
+    left: 0;
+    top: 0;
+    display: block;
+}
+
+.dlg ._close {
+    width: 54rpx;
+    height: 54rpx;
+    position: absolute;
+    display: block;
+    left: calc(100vw / 2 - 54rpx / 2);
+    top: calc(100vh / 2 + 896rpx / 2 + 10rpx);
+}
+

+ 352 - 0
pages/signIn/record/record.js

@@ -0,0 +1,352 @@
+// pages/signIn/record/record.js
+import SignIn from '../../../api/signIn'
+import { parseTime } from '../../../utils/util'
+import {getMobileCache, getPhoneNumber as getPhoneNumberSync} from '../../../utils/user'
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        page: 1,
+        pageSize: 10,
+        lock: false,
+        noResult: false,
+        noMore: false,
+        noCoupon: false,
+        noDetail: false,
+        noUtility: false,
+        isLogin: false,
+        hiddenCoupon: false,
+        hiddenDetail: false,
+        hiddenUtility: false,
+        mobileTop: 'TONY WU',
+        couponNum: 0,
+        productNum: 0,
+        couponList: [],
+        detailList: [],
+        stateList: [],
+        notUseNum: 0
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            isLogin: getMobileCache() != ''
+        })
+        wx.setNavigationBarTitle({
+            title: '我的优惠',
+          })
+        if(this.data.isLogin){
+            this.setData({
+                hiddenCoupon: false,
+                hiddenDetail: true,
+                hiddenUtility: true,
+                noCoupon: true,
+                noDetail: false,
+                noUtility: false,
+            })
+            this.getUserAwardCouponNum();
+            this.getRequestData();
+        }
+        
+    },
+
+    // 类型区分
+    getRequestData() {
+        if (this.data.noCoupon) {
+            this.getUserAwardCouponList();
+        }
+        if (this.data.noDetail) {
+            this.getUserSignInList();
+        }
+        if (this.data.noUtility) {
+            this.getCouponStateList();
+        }
+    },
+
+    builtPublicParams() {
+        return {
+            page: this.data.page,
+            pageSize: this.data.pageSize,
+            mobile: getMobileCache(),
+        }
+    },
+    // 优惠券数据
+    getUserAwardCouponList: function() {
+        SignIn.getUserAwardCouponList(this.builtPublicParams()).then(res => {
+            if (res.code == 200) {
+                this.userCouponListView(res.data)
+            }
+            this.data.lock = false
+        }).catch(_ => {
+            console.log(_)
+            this.data.lock = false
+        })
+    },
+
+    userCouponListView: function(data) {
+        if (!Array.isArray(data) || data.length == 0) {
+            console.log("优惠券数据为空");
+            if (this.data.page == 1) {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noResult: true
+                })
+            } else {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noMore: true
+                })
+            }
+            return
+        }
+        data.forEach(v => {
+            let beginTime = v.coupon.couponBeginTimestamp
+            let endTime = v.coupon.couponEndTimestamp
+            v.coupon.couponBeginTimestamp = parseTime(beginTime, "{y}.{m}.{d}")
+            v.coupon.couponEndTimestamp = parseTime(endTime, "{y}.{m}.{d}")
+        })
+
+        this.data.couponList = this.data.couponList.concat(...data)
+        this.setData({
+            mobileTop:getMobileCache(),
+            couponList: this.data.couponList
+        })
+    },
+
+    //未使用的券数量
+    getUserAwardCouponNum: function() {
+        SignIn.getUserAwardCouponNum(this.builtPublicParams()).then(res => {
+            if (res.code == 200) {
+                this.setData({
+                    notUseNum: res.data.notUseNum
+                })
+            }
+            this.data.lock = false
+        }).catch(_ => {
+            console.log(_)
+            this.data.lock = false
+        })
+    },
+
+    // 签到明细
+    getUserSignInList: function() {
+        SignIn.getUserSignInList(this.builtPublicParams()).then(res => {
+            if (res.code == 200) {
+                this.userDetailListView(res.data)
+            }
+            this.data.lock = false
+        }).catch(_ => {
+            console.log(_)
+            this.data.lock = false
+        })
+    },
+
+    userDetailListView: function(data) {
+        if (!Array.isArray(data) || data.length == 0) {
+            console.log("获取明细数据为空");
+            if (this.data.page == 1) {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noResult: true
+                })
+            } else {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noMore: true
+                })
+            }
+            return
+        }
+        data.forEach(v => {
+            let crateTime = v.crateTime
+            v.crateTime = parseTime(crateTime, "{y}-{m}-{d} {h}:{i}")
+        })
+
+        this.data.detailList = this.data.detailList.concat(...data)
+        this.setData({
+            mobileTop:getMobileCache(),
+            detailList: this.data.detailList
+        })
+    },
+
+    // 使用失效
+    getCouponStateList: function() {
+        SignIn.getUserAwardCouponUseStateList(this.builtPublicParams()).then(res => {
+            if (res.code == 200) {
+                this.userStateListView(res.data)
+            }
+            this.data.lock = false
+        }).catch(_ => {
+            console.log(_)
+            this.data.lock = false
+        })
+    },
+
+    userStateListView: function(data) {
+        if (!Array.isArray(data) || data.length == 0) {
+            console.log("使用失效数据为空");
+            if (this.data.page == 1) {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noResult: true
+                })
+            } else {
+                this.setData({
+                    mobileTop:getMobileCache(),
+                    noMore: true
+                })
+            }
+            return
+        }
+        data.forEach(v => {
+            let crateTime = v.crateTime
+            v.crateTime = parseTime(crateTime, "{y}-{m}-{d} {h}:{i}")
+        })
+
+        this.data.stateList = this.data.stateList.concat(...data)
+        this.setData({
+            mobileTop:getMobileCache(),
+            stateList: this.data.stateList
+        })
+    },
+
+    // 授权手机号
+    getPhoneNumber(e) {
+        getPhoneNumberSync(e, _ => {
+            this.setData({
+                isLogin: true,
+                mobileTop: getMobileCache(),
+                noCoupon: true,
+            })
+            this.getRequestData();
+            this.getUserAwardCouponNum();
+        })
+    },
+
+    // 优惠券
+    getCoupon(e) {
+        this.setData({
+            hiddenCoupon: false,
+            hiddenDetail: true,
+            hiddenUtility: true,
+            page: 1,
+            goodsType: 1,
+            noMore: false,
+            noResult: false,
+            noCoupon: true,
+            noDetail: false,
+            noUtility: false,
+        })
+        this.data.couponList= [],
+        this.data.detailList= [],
+        this.data.stateList= [],
+        this.getUserAwardCouponList()
+        wx.setNavigationBarTitle({
+            title: '我的优惠',
+          })
+    },
+    //明细
+    getDetail(e) {
+        this.setData({
+            hiddenCoupon: true,
+            hiddenDetail: false,
+            hiddenUtility: true,
+            page: 1,
+            goodsType: 2,
+            noMore: false,
+            noResult: false,
+            noDetail: true,
+            noCoupon: false,
+            noUtility: false,
+        })
+        this.data.couponList= [],
+        this.data.detailList= [],
+        this.data.stateList= [],
+        this.getUserSignInList()
+        wx.setNavigationBarTitle({
+            title: '获取明细',
+          })
+            
+    },
+   //使用失效
+    getUtility(e) {
+        this.setData({
+            hiddenCoupon: true,
+            hiddenDetail: true,
+            hiddenUtility: false,
+            page: 1,
+            goodsType: 2,
+            noMore: false,
+            noResult: false,
+            noUtility: true,
+            noCoupon: false,
+            noDetail: false,
+        })
+        this.data.couponList= [],
+        this.data.detailList= [],
+        this.data.stateList= [],
+        this.getCouponStateList()
+        wx.setNavigationBarTitle({
+            title: '使用/失效',
+          })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+        if (this.data.lock || this.data.noMore) {
+            return
+        }
+        this.data.lock = true
+        this.data.page++
+        this.getRequestData();
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 4 - 0
pages/signIn/record/record.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarBackgroundColor": "#BF2637"
+}

+ 112 - 0
pages/signIn/record/record.wxml

@@ -0,0 +1,112 @@
+<!--pages/signIn/record/record.wxml-->
+<view class="record flex-column">
+  <!-- 首部信息 -->
+  <view class="head flex-column">
+    <view class="head_num" wx:if="{{!isLogin}}">{{notUseNum}}</view>
+    <view class="head_num" wx:if="{{isLogin}}">{{notUseNum?notUseNum:0}}</view>
+    <view class="head_text" wx:if="{{isLogin}}">请在优惠券有效期内尽快使用</view>
+    <button class="sigin-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">登录</button>
+  </view>
+  <!-- 中部说明 -->
+  <view class="explain flex-row">
+    <view class="explain-left flex-column" catchtap="{{isLogin?'getCoupon':''}}">
+      <view class="explain-discount">我的优惠</view>
+      <view class="{{noCoupon?'explain-column':'explain-columnNo'}}"></view>
+    </view>
+    <view class="explain-center flex-column" catchtap="{{isLogin?'getDetail':''}}">
+      <view class="explain-detailed">获取明细</view>
+      <view class="{{noDetail?'explain-column':'explain-columnNo'}}"></view>
+    </view>
+    <view class="explain-right flex-column" catchtap="{{isLogin?'getUtility':''}}">
+      <view class="explain-utility">使用/失效</view>
+      <view class="{{noUtility?'explain-column':'explain-columnNo'}}"></view>
+    </view>
+  </view>
+
+  <!-- 使用内容 -->
+  <view class="content">
+    <!-- 主要内容 -->
+    <view class="check-in-content flex-column">
+      <!-- 优惠券内容 -->
+      <view hidden="{{hiddenCoupon}}">
+        <view wx:for="{{couponList}}" wx:key="index" data-id="{{item.id}}">
+          <view class="{{item.coupon.couponType == 'C'?'coupon flex-row':'coupon2 flex-row'}}">
+            <view class="coupon-left flex-row">
+              <!-- 代金券 -->
+              <view class="coupon-left-symbol" wx:if="{{item.coupon.couponType == 'C'}}">¥</view>
+              <view class="{{item.coupon.formatReduceCost.length > 3 ?'coupon-left-numSmall':'coupon-left-num'}}" wx:if="{{item.coupon.couponType == 'C'}}">{{item.coupon.formatReduceCost ?item.coupon.formatReduceCost:0}}</view>
+              <!-- 折扣券 -->
+              <view class="{{item.coupon.formatDiscount.length > 3 ?'coupon-left-numSmall':'coupon-left-num'}}" wx:if="{{item.coupon.couponType == 'D'}}">{{item.coupon.formatDiscount ?item.coupon.formatDiscount:0}}</view>
+              <view class="coupon-left-symbol" wx:if="{{item.coupon.couponType == 'D'}}" style="font-size: 16px;">折</view>
+            </view>
+            <view class="coupon-center flex-column">
+              <view class="coupon-center-upper">{{item.coupon.couponTitle}}</view>
+              <view class="coupon-center-bm flex-row">
+                <view class="coupon-center-block1"></view>
+                <view class="coupon-center-middle" wx:if="{{item.coupon.formatLeastCost == '0'}}">无门槛</view>
+                <view class="coupon-center-middle" wx:if="{{item.coupon.formatLeastCost != '0'}}">满{{item.coupon.formatLeastCost}}使用</view>
+                <view class="coupon-center-block2"></view>
+              </view>
+              <view class="coupon-center-lower">{{item.coupon.couponBeginTimestamp}}-{{item.coupon.couponEndTimestamp}}</view>
+            </view>
+            <view class="coupon-right">
+              <view class="{{item.coupon.couponType == 'C'?'coupon-right-usenow flex-row':'coupon-right-usenow2 flex-row'}}">
+                <navigator class="btn_exchange" target="miniProgram" app-id="wxd92a2d29f8022f40" path="page/index/index" open-type='navigate'>
+                </navigator>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <!-- 获得明细 -->
+      <view class="detailed flex-column" hidden="{{hiddenDetail}}">
+        <view class="detailed-content" wx:for="{{detailList}}" wx:key="index" data-id="{{item.id}}">
+          <view class="detailed-sign flex-row">
+            <view class="detailed-sign-index flex-column">
+              <view class="detailed-sign-text">{{item.source =='1'?'签到':'任务'}}</view>
+              <view class="detailed-sign-date">{{item.crateTime}}</view>
+            </view>
+            <view class="detailed-coupon flex-column">
+              <view class="detailed-coupon-text">{{item.coupon.couponTitle}}</view>
+            </view>
+          </view>
+          <view class="detailed-date flex-column">
+            <view class="detailed-date-lower"></view>
+          </view>
+        </view>
+       
+      </view>
+      <!-- 使用/失效 -->
+      <view class="detailed flex-column" hidden="{{hiddenUtility}}">
+        <view class="detailed-content" wx:for="{{stateList}}" wx:key="index" data-id="{{item.id}}">
+          <view class="detailed-sign flex-row">
+            <view class="detailed-sign-index flex-column">
+              <view class="detailed-sign-text">{{item.coupon.couponTitle}}</view>
+              <view class="detailed-sign-date">{{item.crateTime}}</view>
+            </view>
+            <view class="detailed-coupon flex-column" style="color: #8F8F8F;" wx:if="{{item.invalid}}">已失效</view>
+            <view class="detailed-coupon flex-column" style="color: #8F8F8F;" wx:elif="{{item.used}}">已使用</view>
+            <view class="detailed-coupon flex-column" style="color: #8F8F8F;" wx:else="{{!item.used}}">未使用</view>
+          </view>
+          <view class="detailed-date flex-column">
+            <view class="detailed-date-lower"></view>
+          </view>
+        </view>
+        
+      </view>
+      <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
+      <view class="no_result" wx:if="{{noMore}}">———— 更多优惠券 | 敬请期待 ————</view>
+    </view>
+  </view>
+</view>
+
+<!-- 使用wxs 手机号码中间四位显示为*号 -->
+<wxs module="phone">
+  var toHide = function (array) {
+    var mphone = array.substring(0, 3) + '****' + array.substring(7);
+    return mphone;
+  }
+  module.exports.toHide = toHide;
+</wxs>
+<!-- 底部导航 -->
+<tab-bar />

+ 320 - 0
pages/signIn/record/record.wxss

@@ -0,0 +1,320 @@
+/* pages/signIn/record/record.wxss */
+.record{
+  width: 750rpx;
+  height: auto;
+  padding-bottom: 119rpx; 
+}
+
+/* 垂直方向布局,水平居中 **/
+.flex-column{
+  display: flex;
+  flex-flow: column nowrap;
+  align-items: center;
+  justify-content: left;
+}
+
+/* 水平方向布局,垂直居中 **/
+.flex-row{
+  display: flex;
+  flex-flow: row nowrap;
+  align-items: center;
+  justify-content: center;
+}
+
+.head{
+  width: 750rpx;
+  height: 464rpx;
+  background-image: url(https://dy.shpr.top/luckDraw/per_head.png);
+  background-size: 100% 100%;
+}
+
+.head_num{
+  font-size: 136rpx;
+  font-family: Source Han Sans CN;
+  font-weight: 500;
+  color: #FEFEFE;
+  margin-top: 120rpx;
+}
+
+.head_text{
+  font-size: 32rpx;
+  font-family: Source Han Sans CN;
+  font-weight: 400;
+  color: #FEFEFE;
+}
+
+.sigin-isLogin{
+  color: #FEFEFE;
+  font-weight: 400;
+  background-color: transparent;
+  border-style: none;
+}
+
+.explain{
+  width: 750rpx;
+  height: 120rpx;
+  justify-content: space-between !important;
+}
+
+.explain-left,.explain-center,.explain-right{
+  width: 250rpx;
+  text-align: center;
+}
+
+.explain-discount,.explain-detailed,.explain-utility{
+  font-size: 32rpx;
+  font-family: Source Han Sans CN;
+  font-weight: 400;
+  color: #303030;
+}
+
+
+.explain-column{
+  width: 39px;
+  height: 3px;
+  background: #BF2637;
+  border-radius: 2px;
+  margin-top: 10px;
+}
+
+.explain-columnNo{
+  width: 39px;
+  height: 3px;
+  border-radius: 2px;
+  margin-top: 10px;
+}
+
+.content{
+  width: 100%;
+  height: auto;
+  background: #F3F3F3;
+}
+
+.check-in-content{
+  width: 100%;
+  height: auto;
+  background: #FFFFFF;
+  margin-top: 4px;
+}
+
+.coupon{
+  width: 708rpx;
+  height: 220rpx;
+  background-image: url(https://dy.shpr.top/luckDraw/cash_coupon.png);
+  background-size: 100% 100%;
+  margin-top: 30rpx;
+  justify-content: left !important;
+}
+
+.coupon2{
+  width: 708rpx;
+  height: 220rpx;
+  background-image: url(https://dy.shpr.top/luckDraw/coupon.png);
+  background-size: 100% 100%;
+  margin-top: 30rpx;
+  justify-content: left !important;
+}
+
+.coupon-left{
+  width: 110px;
+  height: 100%;
+  text-align: center;
+  align-items: flex-end;
+}
+
+.coupon-center{
+  width: 164px;
+  height: 100%;
+  align-items: flex-start !important;
+  justify-content: space-between;
+}
+
+.coupon-right{
+  width: 98px;
+  height: 100%;
+}
+
+.coupon-left-symbol{
+  font-size: 20px;
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #443E5B;
+  line-height: 40px;
+}
+
+.coupon-left-num{
+  font-size: 59px;
+  font-family: Impact;
+  font-weight: 400;
+  color: #443E5B;
+  line-height: 71px;
+}
+
+.coupon-left-numSmall{
+  font-size: 36px;
+  font-family: Impact;
+  font-weight: 400;
+  color: #443E5B;
+  line-height: 71px;
+}
+
+.coupon-left-symbol,.coupon-left-num{
+  margin-bottom: 8px;
+}
+
+.coupon-center-upper,.coupon-center-bm,.coupon-center-lower{
+  margin-left: 18px;
+}
+.coupon-center-upper{
+  width: 140px;
+  height: 20px;
+  font-size: 20px;
+  font-weight: 500;
+  color: #443E5B;
+  line-height: 19px;
+  margin-top: 24px;
+  overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}
+
+.coupon-center-middle{
+  width: 63px;
+  height: 15px;
+  font-size: 13px;
+  font-weight: 400;
+  color: #443E5B;
+  line-height: 16px;
+  overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}
+
+.coupon-center-lower{
+  width: 146px;
+  height: 15px;
+  font-size: 13px;
+  font-weight: 400;
+  color: #443E5B;
+  line-height: 16px;
+  margin-bottom: 11px;
+}
+
+.coupon-right-usenow{
+  width: 81px;
+  height: 28px;
+  background-image: url(https://dy.shpr.top/luckDraw/cash_use_now.png);
+  background-size: 100% 100%;
+  margin-top: 47px;
+  margin-left: -10px;
+}
+
+.coupon-right-usenow2{
+  width: 81px;
+  height: 28px;
+  background-image: url(https://dy.shpr.top/luckDraw/coupon_use_now.png);
+  background-size: 100% 100%;
+  margin-top: 47px;
+  margin-left: -10px;
+}
+
+.coupon-center-bm{
+  width: 100px;
+  height: 15px;
+}
+
+.coupon-center-block1,.coupon-center-block2{
+  width: 5px;
+  height: 5px;
+  background: #443E5B;
+  transform:rotate(45deg);
+  margin: 0 10rpx;
+}
+
+.btn_exchange{
+  width: 100%;
+  height: 100%;
+}
+
+.no_result {
+  font-size: 24rpx;
+  color: #B1B1B1;
+  line-height: 100rpx;
+  font-weight: 1000;
+}
+
+.detailed{
+  width: 100%;
+  height: auto;
+  background: #F3F3F3;
+}
+
+.detailed-content{
+  width: 750rpx;
+  height: auto;
+  /* margin-top: 4px; */
+}
+
+
+.detailed-date{
+  width: 750rpx;
+  height: 2rpx;
+  background: #FFFFFF;
+}
+
+.detailed-date-lower{
+  width: 340px;
+  height: 1px;
+  background: #EFEFEF;
+}
+
+.detailed-sign{
+  width: 750rpx;
+  height: 178rpx;
+  background: #FFFFFF;
+}
+
+.detailed-sign-index,.detailed-coupon{
+  width: 50%;
+  height: 100%;
+}
+
+.detailed-sign-index{
+  align-items: flex-start !important;
+  justify-content: space-between;
+}
+
+.detailed-sign-text{
+  font-size: 18px;
+  font-weight: 500;
+  color: #6E6E6E;
+  margin-left: 27px;
+  margin-top: 22px;
+}
+
+.detailed-sign-date{
+  font-size: 14px;
+  font-family: Source Han Sans CN;
+  font-weight: 400;
+  color: #6E6E6E;
+  margin-left: 26px;
+  margin-bottom: 20px;
+}
+
+.detailed-coupon{
+  justify-content: center;
+}
+
+.detailed-coupon-text{
+  width: 90%;
+  height: 30px;
+  font-size: 20px;
+  font-family: Source Han Sans CN;
+  font-weight: 500;
+  color: #BF2637;
+  text-align: center;
+  overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}
+

+ 1 - 1
project.config.json

@@ -12,7 +12,7 @@
     "minified": false,
     "newFeature": false,
     "coverView": true,
-    "nodeModules": true,
+    "nodeModules": false,
     "autoAudits": false,
     "showShadowRootInWxmlPanel": true,
     "scopeDataCheck": false,

+ 12 - 0
project.private.config.json

@@ -89,6 +89,18 @@
           "pathName": "pages/luckDraw/profile",
           "query": "",
           "scene": null
+        },
+        {
+          "name": "pages/signIn/activity/activity",
+          "pathName": "pages/signIn/activity/activity",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/signIn/record/record",
+          "pathName": "pages/signIn/record/record",
+          "query": "",
+          "scene": null
         }
       ]
     }

+ 19 - 1
utils/util.js

@@ -138,6 +138,22 @@ function parseTime(time, cFormat) {
   return time_str
 }
 
+function isEmpty(v, eZ) {
+  if (typeof v == "undefined") {
+    return true
+  }
+  if (typeof v === "string") {
+    return /^\s*$/g.test(v) || (!eZ && v === '0')
+  }
+  if (!eZ && Number.isInteger(v)) {
+    return v === 0
+  }
+  if (Array.isArray(v)) {
+    return v.length === 0
+  }
+  return v === null
+}
+
 module.exports = {
   formatTime,
   sha1,
@@ -145,5 +161,7 @@ module.exports = {
   format,
   add0,
   getQueryVariable,
-  parseTime
+  parseTime,
+  isEmpty
 }
+