This commit is contained in:
2021-10-15 17:24:43 +08:00
parent 199c61af55
commit 4854c04fb7
82 changed files with 3982 additions and 3589 deletions

View File

@@ -92,6 +92,7 @@
@change="confirmDatePicker"
>
</u-calendar>
</u-calendar>
<!-- <tn-date-picker :show="showDatePicker" :monthNum="12" color="#e93340" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/> -->
</block>
<block v-if="timeIndex === 1">
@@ -138,8 +139,8 @@
],
timeIndex : 0,
times : [
{ type: 2, text: '固定时间(区间范围)' },
{ type: 1, text: '延期券(用户领取后有效天数)' }
{ type: 1, text: '固定时间(区间范围)' },
{ type: 2, text: '延期券(用户领取后有效天数)' }
],
showDatePicker : false, // 活动弹出层时间
datePickerValue : [], // 活动时间

View File

@@ -17,8 +17,7 @@
<view class="sku">
<span>数量</span>
<span>
<u-number-box v-model="params.qty" :min='1' :max='1000'
@change='numberBoxChange' />
<u-number-box v-model="params.qty" :min='1' :max='1000' @change='numberBoxChange' />
</span>
</view>
</view>
@@ -57,8 +56,8 @@
<span>可用Eb总额{{account.getEBBalance}}</span>
</view>
</view>
<u-icon v-if="selectTypeId!== '1'" name="checkmark-circle" color="#f7f7f7" size="50"></u-icon>
<u-icon v-else name="checkmark-circle-fill" color="#e93340" size="50"></u-icon>
<u-icon v-if="selectTypeId!== '1'" name="checkmark-circle" color="#f7f7f7" size="50" />
<u-icon v-else name="checkmark-circle-fill" color="#e93340" size="50" />
</view>
</view>
@@ -181,8 +180,7 @@
apiUrl = wxPay
data = {
order_no: this.order_no,
type: 'miniapp',
openid: uni.getStorageSync('openid')
type: 'app'
}
} else {
apiUrl = ebPay
@@ -191,16 +189,16 @@
}
}
apiUrl(data).then(res => {
let payInfo = res
let payInfo = JSON.parse(res)
console.log(payInfo, 'timeStamp...')
if (this.selectTypeId === '2') {
if (payInfo.timeStamp) {
if (payInfo.timestamp) {
// app 支付未完。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
uni.requestPayment({
provider: 'wxpay',
timeStamp: payInfo.timeStamp,
nonceStr: payInfo.nonceStr,
package: payInfo.package,
signType: payInfo.signType,
paySign: payInfo.paySign,
provider: "wxpay",
orderInfo: JSON.stringify(payInfo),
success: res => {
this.$refs.uToast.show({
title: '支付成功',
@@ -210,7 +208,7 @@
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/order/payStatus?success=true'
url: '/pages/property/coupon/payStatus?success=true'
})
}, 3000);
},
@@ -224,12 +222,16 @@
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/order/payStatus?success=false'
url: '/pages/property/coupon/payStatus?success=false'
})
}, 3000);
}
});
})
// app 支付未完。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
} else {
this.$refs.uToast.show({
title: '创建订单成功',
@@ -239,12 +241,10 @@
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/order/payStatus?success=true'
url: '/pages/property/coupon/payStatus?success=true'
})
}, 3000);
}
} else {
this.$refs.uToast.show({
title: res,
@@ -254,11 +254,10 @@
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/order/payStatus?success=true'
url: '/pages/property/coupon/payStatus?success=true'
})
}, 3000);
}
}).catch(err => {
this.$refs.uToast.show({
title: err.message,

View File

@@ -2,7 +2,7 @@
<view class="Coupon">
<!-- 有优惠券列表 -->
<view class="coupon-content">
<couponTemplate v-for="(item,index) in lists" :key='index' :item="{...item}" :action="actions" />
<couponTemplate v-for="(item,index) in lists" :key='index' :item="{...item}" />
</view>
<!-- 没有优惠券列表 -->

View File

@@ -0,0 +1,101 @@
<template>
<view class="PayStatus">
<image class="payStatusImg" :src="success?'/static/images/paySuccess.png':'/static/images/payFail.png'" mode="widthFix" />
<view class="payTitle">{{success?'支付成功':'支付失败'}}</view>
<view class="payDes">{{success?'您已支付完成,订单稍后配送':'吼吼,您的支付未完成'}}</view>
<view class="payBackCheck">
<!-- <view class="check" v-if='success' @click="check">查看权证</view> -->
<view class="back" @click="back">返回首页</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
success:false,// 支付失败false 支付成功true
};
},
onLoad(e) {
if(e.success === 'true'){
uni.setNavigationBarTitle({
title:'支付成功'
})
this.success=true
}else{
uni.setNavigationBarTitle({
title:'支付失败'
})
this.success=false
}
},
methods: {
check() {
uni.reLaunch({
url:'/pages/property/order/numberWeight'
})
},
back() {
uni.reLaunch({
url:'/pages/equity/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.PayStatus {
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.payStatusImg {
width: 300rpx;
padding: 50rpx 0;
margin-top: 100rpx;
}
.payTitle {
font-size: 34rpx;
font-weight: bold;
color: #353535;
}
.payDes {
font-size: 26rpx;
color: #666;
padding: 20rpx;
margin-bottom: 30rpx;
}
.payBackCheck {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
font-size: 28rpx;
width: 100%;
.check {
border: $main-color solid 1rpx;
color: $main-color;
padding: 14rpx 50rpx;
border-radius: 4rpx;
}
.back {
background-color: $main-color;
color: #fff;
padding: 14rpx 50rpx;
border-radius: 4rpx;
}
}
}
</style>

View File

@@ -258,6 +258,7 @@
},
// 添加展示模块
addModule(){
console.log('添加模板,,,,')
let modulesList = this.modulesType.map(val => {
return val.value
})
@@ -407,6 +408,8 @@
color: $text-price;
background: white;
margin-top: $margin;
position: relative;
z-index: 10;
.icon{
vertical-align: middle;
margin-right: $margin/3;

View File

@@ -1,5 +1,4 @@
<template>
<!-- v-if="!loding" -->
<view class="content">
<swiper class="vip-container" previous-margin="45rpx" next-margin="45rpx" circular @change="swiperChange">
<swiper-item class="swiper-item" v-for="(item, index) in identities" :key="index">