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

455 lines
9.2 KiB

5 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'}">
5 months ago
<view class="xuzou">
3 months ago
<uni-icons type="left" size="22" style="margin-left: 25rpx;"></uni-icons>
5 months ago
<text class="title">订单确认</text>
</view>
3 months ago
<image src="@/static/bg.png" mode="widthFix" class="hs"></image>
5 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>
5 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>
5 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>
5 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>
5 months ago
</view>
3 months ago
<view class="fotbtn" @click="zfsub">
立即支付
5 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: {}
5 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
3 months ago
this.memberInfo();
4 months ago
},
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'
})
},
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
}
},
5 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({
url: "/pages/face/face"
})
}
}
})
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));
}
});
})
}
})
}
},
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;
3 months ago
font-size: 26rpx;
color: #666;
5 months ago
}
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;
3 months ago
font-weight: 500;
font-size: 30rpx;
color: #222222;
5 months ago
}
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;
3 months ago
padding: 30rpx 28rpx;
5 months ago
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;
3 months ago
margin-right: 20rpx;
5 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;
5 months ago
}
.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;
3 months ago
align-items: center;
5 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;
}
5 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;
5 months ago
display: flex;
3 months ago
position: fixed;
align-items: center;
position: relative;
z-index: 23;
}
.top .hs{
width: 100%;
height: 100%;
5 months ago
position: absolute;
3 months ago
left: 0;
top: 0;
z-index: 1;
5 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; */
}
5 months ago
.mddz2 {
3 months ago
margin-top: 20rpx;
4 months ago
display: flex;
justify-content: space-between;
5 months ago
}
3 months ago
.mddz2 .address{
flex: 1;
margin-right: 20rpx;
}
5 months ago
.dz {
margin-left: 17rpx;
4 months ago
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;
3 months ago
padding: 25rpx 28rpx;
5 months ago
}
.mendian {
3 months ago
padding: 0 25rpx 25rpx;
overflow: hidden;
5 months ago
}
</style>