15 Commits

Author SHA1 Message Date
d06394f6ad Merge pull request 'xbx' (#300) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/300
2020-08-25 14:38:13 +08:00
f4de9fe13b Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx 2020-08-25 14:37:35 +08:00
2512923891 Merge pull request '版本更新跳转' (#299) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/299
2020-08-25 14:21:38 +08:00
4ab89711b2 版本更新跳转 2020-08-25 14:21:15 +08:00
gyh
4876ddb383 Merge pull request '1.0.1' (#298) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/298
2020-08-25 13:04:20 +08:00
Gdpao
9b5fca48a2 1.0.1 2020-08-25 13:03:24 +08:00
81955085b5 Merge pull request '版本更新跳转' (#297) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/297
2020-08-25 12:21:55 +08:00
ffa18c92d2 版本更新跳转 2020-08-25 12:21:26 +08:00
b63a84149e Merge pull request '版本更新跳转' (#296) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/296
2020-08-25 12:07:07 +08:00
1aee3f3320 版本更新跳转 2020-08-25 12:06:37 +08:00
6d0c6a6b15 Merge pull request '完善' (#295) from xbx-new into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/295
2020-08-25 11:53:18 +08:00
3e87a5aaf5 Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx 2020-08-24 14:23:22 +08:00
52e6489a2c 优惠券完成 2020-08-22 16:45:26 +08:00
92771d8174 图标 2020-08-22 09:46:30 +08:00
60a619fa7b fix 756 2020-08-22 09:00:00 +08:00
10 changed files with 59 additions and 16 deletions

View File

@@ -28,7 +28,10 @@
// #endif // #endif
}, },
onShow(){ onShow(){
this.getVersion(); // this.getVersion();
},
onLoad() {
}, },
onHide(){ onHide(){

View File

@@ -1,6 +1,6 @@
<template> <template>
<view class="c-coupon" v-if="goodsClass.length"> <view class="c-coupon" v-if="goodsClass.length" @click="use">
<view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'"> <view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'" :style="{'width': type ? '650rpx' : '' }">
<view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }"> <view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
<div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div> <div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
<div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div> <div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
@@ -14,12 +14,13 @@
<view class="info-integral">兑换积分{{ couponInfo.voucher_points }}积分</view> <view class="info-integral">兑换积分{{ couponInfo.voucher_points }}积分</view>
<view class="info-date">有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}</view> <view class="info-date">有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}</view>
</view> </view>
<view class="coupon-btn"> <view class="coupon-btn" :style="{'right': type ? '110rpx' : '' }">
<text v-if="couponInfo.voucher_state == 1" @click="use">立即使用</text> <text v-if="couponInfo.voucher_state == 1">立即使用</text>
<image v-if="couponInfo.voucher_state == 2" src="/static/image/mine/28.png"></image> <image v-if="couponInfo.voucher_state == 2" src="/static/image/mine/28.png"></image>
<image v-if="couponInfo.voucher_state == 3" src="/static/image/mine/29.png"></image> <image v-if="couponInfo.voucher_state == 3" src="/static/image/mine/29.png"></image>
</view> </view>
</view> </view>
<image v-if="type" style="width:35rpx;height:35rpx;margin-left:14rpx;" :src="'/static/image/mine/' + (sel ? '41.png' : '42.png') "></image>
</view> </view>
</template> </template>
<script> <script>
@@ -37,6 +38,8 @@ export default {
status: Number, status: Number,
couponInfo: Object, couponInfo: Object,
goodsClass: Array, goodsClass: Array,
type:Boolean,
sel:Boolean
}, },
created() { created() {
// console.log(this.goodsClass); // console.log(this.goodsClass);
@@ -53,6 +56,7 @@ export default {
}, },
methods: { methods: {
use() { use() {
if(this.couponInfo.voucher_state != 1) return;
this.$emit('use', this.couponInfo); this.$emit('use', this.couponInfo);
}, },
}, },
@@ -63,6 +67,8 @@ export default {
position: relative; position: relative;
z-index: 9; z-index: 9;
margin-bottom: 30rpx; margin-bottom: 30rpx;
display: flex;
align-items: center;
@mixin coupon-image($url) { @mixin coupon-image($url) {
width: 690rpx; width: 690rpx;
height: 194rpx; height: 194rpx;

View File

@@ -2,7 +2,7 @@
"name" : "德铭阳光", "name" : "德铭阳光",
"appid" : "__UNI__EBFF00A", "appid" : "__UNI__EBFF00A",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.1",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

View File

@@ -70,13 +70,13 @@
<scroll-view class="coupon-choose" scroll-y style="height: 50vh;" v-if="this.couponType.type == 1"> <scroll-view class="coupon-choose" scroll-y style="height: 50vh;" v-if="this.couponType.type == 1">
<view class="title">优惠券详情</view> <view class="title">优惠券详情</view>
<view class="text">平台优惠券</view> <view class="text">平台优惠券</view>
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon> <Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index" :type="true" :sel="coupon.sel"></Coupon>
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length" style="height: 200rpx"></u-empty> <u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length" style="height: 200rpx"></u-empty>
</scroll-view> </scroll-view>
<scroll-view class="coupon-choose" scroll-y style="height: 50vh;" v-if="this.couponType.type == 2"> <scroll-view class="coupon-choose" scroll-y style="height: 50vh;" v-if="this.couponType.type == 2">
<view class="title">优惠券详情</view> <view class="title">优惠券详情</view>
<view class="text">店铺优惠券</view> <view class="text">店铺优惠券</view>
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon> <Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index" :type="true" :sel="coupon.sel"></Coupon>
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length" style="height: 200rpx"></u-empty> <u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length" style="height: 200rpx"></u-empty>
</scroll-view> </scroll-view>
</u-popup> </u-popup>
@@ -282,15 +282,42 @@ export default {
this.couponStatus = true; this.couponStatus = true;
}, },
useCoupon(coupon) { useCoupon(coupon) {
if(this.couponType.type == 1) this.choiceCoupon = coupon; console.log(coupon)
if(this.couponType.type == 1){
this.choiceCoupon = {}
for(let i in this.orderInfo.store_voucher_all_list){
if(this.orderInfo.store_voucher_all_list[i].voucher_id == coupon.voucher_id && !this.orderInfo.store_voucher_all_list[i].sel){
this.orderInfo.store_voucher_all_list[i].sel = true
this.choiceCoupon = coupon;
}else{
this.orderInfo.store_voucher_all_list[i].sel = false
}
}
this.$forceUpdate()
}
if(this.couponType.type == 2) { if(this.couponType.type == 2) {
Object.assign(this.storeCoupon, { this.storeCoupon = {}
[this.couponType.store_id]: coupon for(let i in this.orderInfo.store_voucher_list[this.couponType.store_id]){
}) console.log(this.orderInfo.store_voucher_list[this.couponType.store_id][i])
if(this.orderInfo.store_voucher_list[this.couponType.store_id][i].voucher_id == coupon.voucher_id && !this.orderInfo.store_voucher_list[this.couponType.store_id][i].sel){
this.orderInfo.store_voucher_list[this.couponType.store_id][i].sel = true
Object.assign(this.storeCoupon, {
[this.couponType.store_id]: coupon
})
}else{
this.orderInfo.store_voucher_list[this.couponType.store_id][i].sel = false
}
}
this.$forceUpdate()
} }
// console.log(this.choiceCoupon); // console.log(this.choiceCoupon);
// console.log(this.storeCoupon); // console.log(this.storeCoupon);
this.couponStatus = false; // this.couponStatus = false;
this.setTotalPrice(); // 计算总价 this.setTotalPrice(); // 计算总价
}, },
getFreight() { getFreight() {

View File

@@ -43,7 +43,7 @@
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
page { page {
background-color: #ECECEC; background-color: #ECECEC;
} }

View File

@@ -18,6 +18,7 @@
2. 新增Modal模态框组件<br> 2. 新增Modal模态框组件<br>
3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br> 3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
`, `,
isAutoUpdate: false,
} }
}, },
onLoad(option) { onLoad(option) {
@@ -45,7 +46,13 @@
// #endif // #endif
}, },
closeModal() { closeModal() {
uni.navigateBack(); const pages = getCurrentPages();
// console.log(pages);
if(pages.length == 2) {
this.$u.route('/pageA/welcome/welcome');
} else {
uni.navigateBack();
}
} }
} }
} }

View File

@@ -49,7 +49,7 @@ export default {
}, },
updateVersion() { updateVersion() {
this.$u.route('/pageE/setting/updateVersion', { this.$u.route('/pageE/setting/updateVersion', {
status: this.status status: this.status,
}); });
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1008 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/image/mine/41.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/image/mine/42.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB