You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jiansheng/pages/order/order.vue

456 lines
9.2 KiB

4 months ago
<template>
<view>
3 months ago
<image src="@/static/bg.png" mode="widthFix" class="bg" style="width: 100%;height: 928rpx;"></image>
<view class="top" @click="previous" :style="{'padding-top': top+'px'}">
4 months ago
<view class="xuzou">
3 months ago
<uni-icons type="left" size="22" style="margin-left: 25rpx;"></uni-icons>
4 months ago
<text class="title">订单确认</text>
</view>
3 months ago
<image src="@/static/bg.png" mode="widthFix" class="hs"></image>
4 months ago
</view>
3 months ago
<view class="content" :style="{'top': (top+44)+'px'}">
<view class="mendian">
<view class="mddz">
<view class="huiy">
<image class="huiyimg" src="@/static/huangguan.png" mode=""></image>
<view class="huiywz">运动湾会员</view>
</view>
<view class="mddz1">
<view class="mddz1wz">{{mandianxinxi.name}}</view>
</view>
<view class="mddz2">
<view class="address">
<image class="mddz1img1" src="@/static/定位1.png" mode=""></image>
<text class="dz">地址{{mandianxinxi.address}}</text>
</view>
<!-- <image class="mddz1img2" src="@/static/电话o.png" mode=""></image> -->
<view class="qihuanmd" @click="qhmd">切换门店</view>
</view>
4 months ago
</view>
3 months ago
<view class="taoc">
<view class="taoctitle">
会员套餐
</view>
<view class="taoctitle1">
<view class="taoctitle1wz">{{vipxinxi.name}}</view>
<view class="taoctitle1q">{{vipxinxi.price}}</view>
</view>
<view class="taoctitle2">
<view class="smwz" v-if='vipxinxi.validity_num>0'>次数{{vipxinxi.validity_num}}</view>
<view class="smwz" v-if='vipxinxi.validity_day>0'>期限{{vipxinxi.validity_day}}</view>
<view class="smwz hengxian" v-if="vipxinxi.original_price">原价{{vipxinxi.original_price}}</view>
</view>
<view class="smwz" v-if="vipxinxi.introduce">说明{{vipxinxi.introduce}}</view>
<view class="smwz" v-if="vipxinxi.buy_limit >= 1">限购{{vipxinxi.buy_limit}}</view>
4 months ago
</view>
3 months ago
<view class="zhif">
<view class="zfwi">支付方式</view>
<view class="zhifright">
<image class="wxpay" src="@/static/wxpay.png" mode=""></image>
<view class="zfwi1">微信支付</view>
4 months ago
</view>
4 months ago
</view>
</view>
3 months ago
<checkbox-group class="chgroup" v-model="checkboxValue1" @change='change'>
<label class="radio">
<checkbox value="r1" color="#F8A617" />
已阅读并同意
<text class="xy" @click="yhxy('yonghu')">用户协议</text>
</label>
</checkbox-group>
<view class="fot">
<view class="fotwz">
支付<text style="color: #F0503E;">{{vipxinxi.price}}</text>
4 months ago
</view>
3 months ago
<view class="fotbtn" @click="zfsub">
立即支付
4 months ago
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
4 months ago
mandianxinxi: {},
vipxinxi: {},
3 months ago
yhxyactive: false,
3 months ago
top: 0,
userxixin: {}
4 months ago
}
},
4 months ago
onLoad(option) {
console.log('option', option);
var that = this
3 months ago
var tuijianlist = JSON.parse(decodeURIComponent(option.tuijianlist))
var vipxinxi = JSON.parse(decodeURIComponent(option.item))
4 months ago
that.vipxinxi = vipxinxi
that.mandianxinxi = tuijianlist
3 months ago
that.top = uni.getSystemInfoSync().statusBarHeight
4 months ago
},
onShow() {
2 weeks ago
this.memberInfo();
4 months ago
var xzmd = uni.getStorageSync('xzmd')
console.log('xzmd',xzmd);
if (xzmd != '') {
this.mandianxinxi = JSON.parse(xzmd)
this.mandianxinxi.id=this.mandianxinxi.store_id
}
2 months ago
this.memberInfo();
4 months ago
console.log('this.mandianxinxi',this.mandianxinxi);
},
4 months ago
methods: {
4 months ago
qhmd() {
uni.navigateTo({
url: '/pages/mendainlist/mendainlist'
})
},
3 months ago
memberInfo() {
this.$api.memberInfo().then(res => {
this.userxixin = res.data
})
},
4 months ago
change(e) {
console.log(123, e);
if (e.detail.value.length != 0) {
this.yhxyactive = true
} else {
this.yhxyactive = false
}
},
4 months ago
previous() {
uni.navigateBack()
},
4 months ago
yhxy() {},
zfsub() {
if (!this.yhxyactive) {
uni.showToast({
icon: "none",
title: '请先勾选用户协议',
duration: 3000
});
} else {
3 months ago
if(!this.userxixin.face_id) {
uni.showModal({
title: "温馨提示",
content:"当前用户没有人脸识别,是否立即前往?",
confirmColor: "#F8A617",
confirmText: "前往",
success(res) {
if(res.confirm){
uni.navigateTo({
2 weeks ago
url: "/pages/face/face?type=order"
3 months ago
})
}
}
})
return ;
}
4 months ago
this.$api.cardBuy({
card_id: this.vipxinxi.card_id,
store_id: this.mandianxinxi.id
}).then(res => {
if (res.code == 200) {
this.$api.cardPay({
order_no: res.data.order_no,
pay_type: 1
}).then(res => {
uni.requestPayment({
provider: 'wxpay',
timeStamp:res.data.timeStamp,
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign:res.data.paySign,
success: function (res) {
console.log('success:' + JSON.stringify(res));
3 months ago
uni.switchTab({
4 months ago
url: '/pages/user/index'
})
4 months ago
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
});
})
}
})
}
},
4 months ago
}
}
</script>
<style scoped>
3 months ago
.hengxian{
text-decoration-line: line-through;
}
4 months ago
.xy {
4 months ago
color: #F8A617;
}
4 months ago
.chgroup {
4 months ago
position: fixed;
left: 24rpx;
bottom: 127rpx;
3 months ago
font-size: 26rpx;
color: #666;
4 months ago
}
4 months ago
4 months ago
.fot {
width: 750rpx;
height: 101rpx;
background: #FFFFFF;
box-shadow: 0rpx -4rpx 10rpx 0rpx rgba(41, 24, 0, 0.08);
border: 1px solid #EAEAEA;
position: fixed;
left: 0;
bottom: 0;
display: flex;
justify-content: space-between;
3 months ago
font-weight: 500;
font-size: 30rpx;
color: #222222;
4 months ago
}
4 months ago
.fotwz {
4 months ago
line-height: 101rpx;
margin-left: 26rpx;
}
4 months ago
.fotbtn {
4 months ago
width: 200rpx;
height: 70rpx;
background: #F8A617;
4 months ago
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(19, 14, 4, 0.14);
4 months ago
border-radius: 35rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
line-height: 70rpx;
margin-top: 15rpx;
margin-right: 24rpx;
}
4 months ago
4 months ago
.zhif {
width: 650rpx;
3 months ago
padding: 30rpx 28rpx;
4 months ago
margin-top: 20rpx;
background: #FFFFFF;
display: flex;
justify-content: space-between;
3 months ago
border-radius: 20rpx;
4 months ago
}
.zfwi {
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #222222;
}
.zfwi1 {
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #222222;
}
.zhifright {
display: flex;
}
.taoctitle1q {
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 30rpx;
color: #EF3D25;
}
.wxpay {
width: 44rpx;
height: 44rpx;
3 months ago
margin-right: 20rpx;
4 months ago
}
.taoctitle1wz {
font-family: PingFang SC;
font-weight: bold;
font-size: 30rpx;
color: #222222;
}
.smwz {
font-weight: 400;
font-size: 28rpx;
color: #999999;
3 months ago
margin-top: 20rpx;
4 months ago
}
.taoctitle1 {
display: flex;
justify-content: space-between;
margin-top: 36rpx;
}
3 months ago
.taoctitle2{
display: flex;
justify-content: space-between;
}
4 months ago
.taoctitle {
font-family: PingFang SC;
font-weight: bold;
font-size: 36rpx;
color: #222222;
}
.taoc {
width: 650rpx;
3 months ago
/* height: 322rpx; */
4 months ago
background: #FFFFFF;
box-shadow: 0rpx 3rpx 9rpx 0rpx rgba(19, 14, 4, 0.08);
border-radius: 20rpx;
padding: 20rpx 28rpx;
margin-top: 20rpx;
}
.huiyimg {
width: 51rpx;
height: 40rpx;
}
.huiywz {
margin-left: 21rpx;
margin-top: 5rpx;
}
.huiy {
display: flex;
margin-bottom: 20rpx;
3 months ago
align-items: center;
4 months ago
}
3 months ago
.bg{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 1;
background: #f5f5f5;
}
.content{
width: 100%;
position: relative;
left: 0;
top: 0;
z-index: 2;
}
4 months ago
.top {
3 months ago
width: 100%;
left: 0;
z-index: 22;
height: 88rpx;
overflow: hidden;
position: fixed;
}
.top .xuzou{
width: 100%;
height: 88rpx;
4 months ago
display: flex;
3 months ago
position: fixed;
align-items: center;
position: relative;
z-index: 23;
}
.top .hs{
width: 100%;
height: 100%;
4 months ago
position: absolute;
3 months ago
left: 0;
top: 0;
z-index: 1;
4 months ago
}
.title {
padding-left: 14rpx;
}
.mddz1img2 {
width: 44rpx;
height: 44rpx;
float: right;
}
4 months ago
.qihuanmd {
width: 150rpx;
height: 50rpx;
background: rgba(248, 166, 23, 0);
border-radius: 25rpx;
border: 1px solid #F8A617;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #F8A617;
text-align: center;
line-height: 50rpx;
/* margin-top: 20rpx; */
/* float: right; */
}
4 months ago
.mddz2 {
3 months ago
margin-top: 20rpx;
4 months ago
display: flex;
justify-content: space-between;
4 months ago
}
3 months ago
.mddz2 .address{
flex: 1;
margin-right: 20rpx;
}
4 months ago
.dz {
margin-left: 17rpx;
4 months ago
font-weight: 500;
font-size: 26rpx;
color: #999999;
4 months ago
}
.mddz1img1 {
width: 22rpx;
height: 27rpx;
}
.mddz1 {
display: flex;
}
.mddz1img {
width: 60rpx;
height: 60rpx;
}
.mddz1wz {
font-family: PingFang SC;
font-weight: bold;
font-size: 30rpx;
color: #222222;
/* margin-left: 21rpx; */
margin-top: 12rpx;
}
.mddz {
width: 650rpx;
4 months ago
/* height: 192rpx; */
4 months ago
background: #FFFFFF;
box-shadow: 0rpx 3rpx 9rpx 0rpx rgba(19, 14, 4, 0.08);
border-radius: 20rpx;
margin-top: 24rpx;
3 months ago
padding: 25rpx 28rpx;
4 months ago
}
.mendian {
3 months ago
padding: 0 25rpx 25rpx;
overflow: hidden;
4 months ago
}
</style>