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

387 lines
7.6 KiB

5 months ago
<template>
<view>
<image src="@/static/bg.png" mode="" style="width: 100%;height: 928rpx;"></image>
<view class="top" @click="previous">
<view class="xuzou">
<uni-icons type="left" size="18"></uni-icons>
<text class="title">订单确认</text>
</view>
</view>
<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">
4 months ago
<view class="mddz1wz">{{mandianxinxi.name}}</view>
5 months ago
</view>
<view class="mddz2">
4 months ago
<view class="">
<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>
5 months ago
</view>
</view>
<view class="taoc">
<view class="taoctitle">
会员套餐
</view>
<view class="taoctitle1">
4 months ago
<view class="taoctitle1wz">{{vipxinxi.name}}</view>
<view class="taoctitle1q">{{vipxinxi.price}}</view>
5 months ago
</view>
3 months ago
<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">原价{{vipxinxi.original_price}}</view>
</view>
4 months ago
<view class="smwz">说明{{vipxinxi.introduce}}</view>
<view class="smwz">限购{{vipxinxi.buy_limit}}</view>
5 months ago
</view>
<view class="zhif">
<view class="zfwi">支付方式</view>
<view class="zhifright">
<image class="wxpay" src="@/static/wxpay.png" mode=""></image>
<view class="zfwi1">微信支付</view>
</view>
</view>
</view>
4 months ago
<checkbox-group class="chgroup" v-model="checkboxValue1" @change='change'>
5 months ago
<label class="radio">
4 months ago
<checkbox value="r1" />
5 months ago
已阅读并同意
<text class="xy" @click="yhxy('yonghu')">用户协议</text>
</label>
</checkbox-group>
<view class="fot">
<view class="fotwz">
4 months ago
支付<text style="color: #F0503E;">{{vipxinxi.price}}</text>
5 months ago
</view>
4 months ago
<view class="fotbtn" @click="zfsub">
5 months ago
立即支付
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
4 months ago
mandianxinxi: {},
vipxinxi: {},
yhxyactive: false
5 months ago
}
},
4 months ago
onLoad(option) {
console.log('option', option);
var that = this
var tuijianlist = JSON.parse(option.tuijianlist)
var vipxinxi = JSON.parse(option.item)
that.vipxinxi = vipxinxi
that.mandianxinxi = tuijianlist
},
onShow() {
var xzmd = uni.getStorageSync('xzmd')
console.log('xzmd',xzmd);
if (xzmd != '') {
this.mandianxinxi = JSON.parse(xzmd)
this.mandianxinxi.id=this.mandianxinxi.store_id
}
console.log('this.mandianxinxi',this.mandianxinxi);
},
5 months ago
methods: {
4 months ago
qhmd() {
uni.navigateTo({
url: '/pages/mendainlist/mendainlist'
})
},
change(e) {
console.log(123, e);
if (e.detail.value.length != 0) {
this.yhxyactive = true
} else {
this.yhxyactive = false
}
},
5 months ago
previous() {
uni.navigateBack()
},
4 months ago
yhxy() {},
zfsub() {
if (!this.yhxyactive) {
uni.showToast({
icon: "none",
title: '请先勾选用户协议',
duration: 3000
});
} else {
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));
}
});
})
}
})
}
},
5 months ago
}
}
</script>
<style scoped>
3 months ago
.hengxian{
text-decoration-line: line-through;
}
4 months ago
.xy {
5 months ago
color: #F8A617;
}
4 months ago
.chgroup {
5 months ago
position: fixed;
left: 24rpx;
bottom: 127rpx;
}
4 months ago
5 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;
}
4 months ago
.fotwz {
5 months ago
line-height: 101rpx;
margin-left: 26rpx;
}
4 months ago
.fotbtn {
5 months ago
width: 200rpx;
height: 70rpx;
background: #F8A617;
4 months ago
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(19, 14, 4, 0.14);
5 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
5 months ago
.zhif {
width: 650rpx;
padding: 20rpx 28rpx;
margin-top: 20rpx;
background: #FFFFFF;
display: flex;
justify-content: space-between;
3 months ago
border-radius: 20rpx;
5 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;
}
.taoctitle1wz {
font-family: PingFang SC;
font-weight: bold;
font-size: 30rpx;
color: #222222;
}
.smwz {
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 28rpx;
color: #999999;
margin-top: 23rpx;
}
.taoctitle1 {
display: flex;
justify-content: space-between;
margin-top: 36rpx;
}
3 months ago
.taoctitle2{
display: flex;
justify-content: space-between;
}
5 months ago
.taoctitle {
font-family: PingFang SC;
font-weight: bold;
font-size: 36rpx;
color: #222222;
}
.taoc {
width: 650rpx;
3 months ago
/* height: 322rpx; */
5 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;
}
.top {
display: flex;
position: absolute;
top: 96rpx;
left: 20rpx;
}
.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; */
}
5 months ago
.mddz2 {
margin-top: 32rpx;
4 months ago
display: flex;
justify-content: space-between;
5 months ago
}
.dz {
margin-left: 17rpx;
4 months ago
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #999999;
5 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; */
5 months ago
background: #FFFFFF;
box-shadow: 0rpx 3rpx 9rpx 0rpx rgba(19, 14, 4, 0.08);
border-radius: 20rpx;
margin-top: 24rpx;
4 months ago
padding: 45rpx 28rpx;
5 months ago
}
.mendian {
position: absolute;
top: 152rpx;
left: 24rpx;
}
</style>