|
@@ -1,123 +1,86 @@
|
|
<!--pages/luckDraw/profile.wxml-->
|
|
<!--pages/luckDraw/profile.wxml-->
|
|
-<view class="personal">
|
|
|
|
-<!-- 个人中心视图 -->
|
|
|
|
- <view class="head-bg" catchtap="turnPrize">
|
|
|
|
- <image class="image_bg" src="/images/luck-draw/per_head.png" />
|
|
|
|
- <!-- 获取用户头像 -->
|
|
|
|
- <view wx:if="{{isLogin}}" class="image_portrait"><open-data type="userAvatarUrl"></open-data></view>
|
|
|
|
- <image wx:if="{{!isLogin}}" class="image_portrait" src="/images/luck-draw/portrait.png" />
|
|
|
|
- <button class="luck-draw-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" >登录</button>
|
|
|
|
- <view class="luck-draw-pro-nickname" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="luck-draw-pro-cp">
|
|
|
|
- <!-- 优惠券 -->
|
|
|
|
- <view class="luck-draw-coupon" catchtap="getProfile">
|
|
|
|
- <view class="luck-draw-cn">{{couponNum}}</view>
|
|
|
|
- <view class="luck-draw-cz">优惠券</view>
|
|
|
|
- <view wx:if="{{goodsType == 1}}" class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
|
|
|
|
- </view>
|
|
|
|
- <!-- 奖品 -->
|
|
|
|
- <view class="luck-draw-prize" catchtap="getPrize">
|
|
|
|
- <view class="luck-draw-pn">{{thirdPrizeNum}}</view>
|
|
|
|
- <view class="luck-draw-pz">奖品</view>
|
|
|
|
- <view wx:if="{{goodsType == 3}}" class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
|
|
|
|
|
|
+<!-- 首部信息 -->
|
|
|
|
+<view class="head flex-column">
|
|
|
|
+ <image wx:if="{{!isLogin}}" class="head_portrait" src="/images/welfareMall/head-portrait.png" />
|
|
|
|
+ <!-- 获取用户头像 -->
|
|
|
|
+ <open-data wx:if="{{isLogin}}" class="head_portrait" type="userAvatarUrl"></open-data>
|
|
|
|
+ <view class="head_text" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</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?'getProfile':''}}">
|
|
|
|
+ <view class="explain-text">{{couponNum}}</view>
|
|
|
|
+ <view class="explain-discount">优惠券</view>
|
|
|
|
+ <view class="{{noCoupon?'explain-column':'explain-columnNo'}}"></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="explain-right flex-column" catchtap="{{isLogin?'getPrize':''}}">
|
|
|
|
+ <view class="explain-text">{{thirdPrizeNum}}</view>
|
|
|
|
+ <view class="explain-utility">奖品</view>
|
|
|
|
+ <view class="{{noPrize?'explain-column':'explain-columnNo'}}"></view>
|
|
|
|
+ </view>
|
|
|
|
+</view>
|
|
|
|
+<!-- 主要内容 -->
|
|
|
|
+<view class="check-in-content flex-column">
|
|
|
|
+ <!-- 优惠券内容 -->
|
|
|
|
+ <view hidden="{{hidden1}}">
|
|
|
|
+ <view wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" class="{{item.couponType == 'C'?'coupon flex-row':'coupon2 flex-row'}}">
|
|
|
|
+ <view class="coupon-left flex-row">
|
|
|
|
+ <!-- 代金券 -->
|
|
|
|
+ <view class="coupon-left-symbol" wx:if="{{item.couponType == 'C'}}">¥</view>
|
|
|
|
+ <view class="{{item.formatReduceCost.length > 3 ?'coupon-left-numSmall':'coupon-left-num'}}" wx:if="{{item.couponType == 'C'}}">{{item.formatReduceCost ?item.formatReduceCost:0}}</view>
|
|
|
|
+ <!-- 折扣券 -->
|
|
|
|
+ <view class="{{item.formatDiscount.length > 3 ?'coupon-left-numSmall':'coupon-left-num'}}" wx:if="{{item.couponType == 'D'}}">{{item.formatDiscount ?item.formatDiscount:0}}</view>
|
|
|
|
+ <view class="coupon-left-symbol" wx:if="{{item.couponType == 'D'}}" style="font-size: 16px;">折</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view id="couponZD" class="luck-draw-theme" hidden="{{hidden1}}">
|
|
|
|
- <!-- 折扣券 -->
|
|
|
|
- <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" >
|
|
|
|
- <view class="luck-draw-words">
|
|
|
|
- <view class="luck-draw-discount1">
|
|
|
|
- <view class="{{item.formatDiscoun.length > 3?'luck-draw-zkz4c':'luck-draw-zkz4'}}" wx:if="{{item.couponType == 'D'}}">{{item.formatDiscount ?item.formatDiscount:0}}</view>
|
|
|
|
- <view class="{{item.formatDiscoun.length > 3?'luck-draw-zkz5c':'luck-draw-zkz5'}}" wx:if="{{item.couponType == 'D'}}">折</view>
|
|
|
|
-
|
|
|
|
- <view class="luck-draw-djz4" wx:if="{{item.couponType == 'C'}}">¥</view>
|
|
|
|
- <view class="{{item.formatReduceCost.length > 3 ?'luck-draw-djz5c':'luck-draw-djz5'}}" wx:if="{{item.couponType == 'C'}}">{{item.formatReduceCost ?item.formatReduceCost:0}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="luck-draw-discount2">
|
|
|
|
- <view class="luck-draw-zkz1">{{item.goodsName}}</view>
|
|
|
|
- <view class="luck-draw-mj">
|
|
|
|
- <view class="luck-draw-zkz21"></view>
|
|
|
|
- <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost == '0'}}">无门槛</view>
|
|
|
|
- <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost != '0'}}">满{{item.formatLeastCost}}元使用</view>
|
|
|
|
- <view class="luck-draw-zkz22"></view>
|
|
|
|
- </view>
|
|
|
|
- <view class="luck-draw-zkz3">{{item.couponBeginTimestamp}}-{{item.couponEndTimestamp}}</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="coupon-center flex-column">
|
|
|
|
+ <view class="coupon-center-upper over-ellipsis">{{item.couponTitle}}</view>
|
|
|
|
+ <view class="coupon-center-bm flex-row">
|
|
|
|
+ <view class="coupon-center-block1"></view>
|
|
|
|
+ <view class="coupon-center-middle" wx:if="{{item.formatLeastCost == '0'}}">无门槛</view>
|
|
|
|
+ <view class="coupon-center-middle" wx:if="{{item.formatLeastCost != '0'}}">满{{item.formatLeastCost}}使用</view>
|
|
|
|
+ <view class="coupon-center-block2"></view>
|
|
</view>
|
|
</view>
|
|
- <image wx:if="{{item.couponType == 'D'}}" class="image_zk" src="/images/luck-draw/coupon1.png" />
|
|
|
|
- <image wx:if="{{item.couponType == 'D'}}" class="image_zk_un" src="/images/luck-draw/coupon_use_now.png" />
|
|
|
|
-
|
|
|
|
- <image wx:if="{{item.couponType == 'C'}}" class="image_zk" src="/images/luck-draw/cash_coupon.png" />
|
|
|
|
- <image wx:if="{{item.couponType == 'C'}}" class="image_zk_un" src="/images/luck-draw/cc_use_now.png" />
|
|
|
|
- <navigator class="_btn _exchange"
|
|
|
|
- target = "miniProgram"
|
|
|
|
- app-id="wxd92a2d29f8022f40"
|
|
|
|
- path="pages/index/index"
|
|
|
|
- extra-data="{foo: 'bar'}"
|
|
|
|
- open-type='navigate'>
|
|
|
|
- </navigator>
|
|
|
|
|
|
+ <view class="coupon-center-lower">{{item.couponBeginTimestamp}}-{{item.couponEndTimestamp}}</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 代金券
|
|
|
|
- <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.couponType == 'C' && item.goodsType == 1}}">
|
|
|
|
- <image class="image_zk" src="/images/luck-draw/cash_coupon.png" />
|
|
|
|
- <image class="image_zk_un" src="/images/luck-draw/cc_use_now.png" />
|
|
|
|
- <navigator class="_btn _exchange"
|
|
|
|
- target = "miniProgram"
|
|
|
|
- app-id="wxd92a2d29f8022f40"
|
|
|
|
- path="page/index/index"
|
|
|
|
- open-type='navigate'>
|
|
|
|
- </navigator>
|
|
|
|
- <view class="luck-draw-words">
|
|
|
|
- <view class="luck-draw-discount1">
|
|
|
|
- <view class="luck-draw-djz4">¥</view>
|
|
|
|
- <view class="luck-draw-djz5">{{item.formatReduceCost ?item.formatReduceCost:0}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="luck-draw-discount2">
|
|
|
|
- <view class="luck-draw-zkz1">{{item.goodsName}}</view>
|
|
|
|
- <view class="luck-draw-mj">
|
|
|
|
- <view class="luck-draw-zkz21"></view>
|
|
|
|
- <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost == '0'}}">无门槛</view>
|
|
|
|
- <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost != '0'}}">满{{item.formatLeastCost}}使用</view>
|
|
|
|
- <view class="luck-draw-zkz22"></view>
|
|
|
|
- </view>
|
|
|
|
- <view class="luck-draw-zkz3">{{item.couponBeginTimestamp ?item.couponBeginTimestamp:0}}-{{item.couponEndTimestamp ?item.couponEndTimestamp:0}}</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="coupon-right">
|
|
|
|
+ <view class="{{item.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 class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
|
|
|
|
- <view class="no_result" wx:if="{{noMore}}">———— 更多优惠券 | 敬请期待 ————</view>
|
|
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
|
|
|
|
+ <view class="no_result" wx:if="{{noMore}}">———— 更多优惠券 | 敬请期待 ————</view>
|
|
|
|
+ </view>
|
|
|
|
|
|
- <view id="prize" class="luck-draw-theme" hidden="{{hidden2}}">
|
|
|
|
- <!-- 奖品 -->
|
|
|
|
- <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.goodsType == 3}}">
|
|
|
|
- <view class="luck-draw-wordsj">
|
|
|
|
- <view class="luck-draw-discount1j">
|
|
|
|
-
|
|
|
|
- <image class="luck-draw-zkzj" src="{{item.fullGoodsSmallImage}}" />
|
|
|
|
- </view>
|
|
|
|
- <view class="luck-draw-discount2">
|
|
|
|
- <view class="luck-draw-zkz1j over-ellipsis">{{item.goodsName}}</view>
|
|
|
|
- <view class="luck-draw-zkz3j over-ellipsis-two">{{item.hitDesc}}</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <!-- 奖品 -->
|
|
|
|
+ <view hidden="{{hidden2}}">
|
|
|
|
+ <view class="prize-content flex-row" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}">
|
|
|
|
+ <view class="prize-img flex-column">
|
|
|
|
+ <image class="prize-img-small" src="{{item.fullGoodsSmallImage}}" />
|
|
|
|
+ </view>
|
|
|
|
+ <view class="prize-text">
|
|
|
|
+ <view class="prize-text-top over-ellipsis">{{item.goodsName}}</view>
|
|
|
|
+ <view class="prize-text-buttom over-ellipsis-two">{{item.hitDesc}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="prize-jump flex-row">
|
|
|
|
+ <view class="btn_exchange" data-src="{{item.fullGoodsBigImage}}" catchtap="toLookHitPhoto">
|
|
</view>
|
|
</view>
|
|
- <image class="image_zk_unj" src="/images/luck-draw/coupon_use_now.png" />
|
|
|
|
- <view data-src="{{item.fullGoodsBigImage}}" catchtap="toLookHitPhoto" class="_btn _exchange"></view>
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
|
|
|
|
- <view class="no_result" wx:if="{{noMore}}">———— 更多奖品 | 敬请期待 ————</view>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
|
|
|
|
+ <view class="no_result" wx:if="{{noMore}}">———— 更多奖品 | 敬请期待 ————</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 使用wxs 手机号码中间四位显示为*号 -->
|
|
<!-- 使用wxs 手机号码中间四位显示为*号 -->
|
|
<wxs module="phone">
|
|
<wxs module="phone">
|
|
-var toHide = function(array) {
|
|
|
|
- var mphone = array.substring(0, 3) + '****' + array.substring(7);
|
|
|
|
- return mphone;
|
|
|
|
-}
|
|
|
|
-module.exports.toHide = toHide;
|
|
|
|
|
|
+ var toHide = function (array) {
|
|
|
|
+ var mphone = array.substring(0, 3) + '****' + array.substring(7);
|
|
|
|
+ return mphone;
|
|
|
|
+ }
|
|
|
|
+ module.exports.toHide = toHide;
|
|
</wxs>
|
|
</wxs>
|
|
<!-- 底部导航 -->
|
|
<!-- 底部导航 -->
|
|
-<!-- <tab-bar /> -->
|
|
|
|
|
|
+<!-- <tab-bar /> -->
|