|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <view class="content" :class="mtype==1?'mone':'mbase'" v-if="baseURL">
|
|
|
|
|
|
|
+ <view class="content mone" v-if="baseURL">
|
|
|
<view class="m-top">
|
|
<view class="m-top">
|
|
|
<image :src="baseURL + '/resource/icon/model1/top-base.png'" mode="" class="top-bg"></image>
|
|
<image :src="baseURL + '/resource/icon/model1/top-base.png'" mode="" class="top-bg"></image>
|
|
|
<image :src="baseURL + '/resource/icon/model1/resume.png'" mode="" class="readme"></image>
|
|
<image :src="baseURL + '/resource/icon/model1/resume.png'" mode="" class="readme"></image>
|
|
@@ -53,7 +53,8 @@
|
|
|
<text style="flex-shrink: 0;">服务地区:</text>
|
|
<text style="flex-shrink: 0;">服务地区:</text>
|
|
|
<view class="fwdz flex">
|
|
<view class="fwdz flex">
|
|
|
<view v-for="(fwitem,fwindex) in cardInfo.service_area_all">
|
|
<view v-for="(fwitem,fwindex) in cardInfo.service_area_all">
|
|
|
- {{fwitem}}{{fwindex ==(cardInfo.service_area_all.length -1) ?'': '、' }}</view>
|
|
|
|
|
|
|
+ {{fwitem}}{{fwindex ==(cardInfo.service_area_all.length -1) ?'': '、' }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-item-q flex" style="align-items: flex-start;">
|
|
<view class="info-item-q flex" style="align-items: flex-start;">
|
|
@@ -61,10 +62,10 @@
|
|
|
<view class="gzt">
|
|
<view class="gzt">
|
|
|
<image :src="baseURL + '/resource/icon/model1/tiao.png'" mode=""></image>
|
|
<image :src="baseURL + '/resource/icon/model1/tiao.png'" mode=""></image>
|
|
|
<view class="gzt-price">
|
|
<view class="gzt-price">
|
|
|
- <text>{{cardInfo.service_min_price}}</text>元/{{cardInfo.service_time_type_title.replace('每','')}}
|
|
|
|
|
|
|
+ <text>{{cardInfo.service_min_price}}</text>元/{{ cardInfo.service_time_type_title && cardInfo.service_time_type_title.replace('每','')}}
|
|
|
</view>
|
|
</view>
|
|
|
<view class=" gzt-price-b">
|
|
<view class=" gzt-price-b">
|
|
|
- <text>{{cardInfo.service_max_price}}</text>元/{{cardInfo.service_time_type_title.replace('每','')}}
|
|
|
|
|
|
|
+ <text>{{cardInfo.service_max_price}}</text>元/{{cardInfo.service_time_type_title && cardInfo.service_time_type_title.replace('每','')}}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<image :src="baseURL + '/resource/icon/model1/yrz.png'" mode="" class="rz"></image>
|
|
<image :src="baseURL + '/resource/icon/model1/yrz.png'" mode="" class="rz"></image>
|
|
@@ -165,7 +166,8 @@
|
|
|
import {
|
|
import {
|
|
|
getUserCardInfo,
|
|
getUserCardInfo,
|
|
|
getCommonUserCardInfo,
|
|
getCommonUserCardInfo,
|
|
|
- getShowTemplateItem
|
|
|
|
|
|
|
+ getShowTemplateItem,
|
|
|
|
|
+ subShowTemplateOrder
|
|
|
} from '@/api/model.js'
|
|
} from '@/api/model.js'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -173,27 +175,28 @@
|
|
|
mtype: 1,
|
|
mtype: 1,
|
|
|
shareId: '',
|
|
shareId: '',
|
|
|
cardInfo: {},
|
|
cardInfo: {},
|
|
|
- modelInfo: {}
|
|
|
|
|
|
|
+ modelInfo: {},
|
|
|
|
|
+ payType: 'wxpay'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapState(['baseURL']),
|
|
...mapState(['baseURL']),
|
|
|
- ...mapState('user',['userInfo'])
|
|
|
|
|
|
|
+ ...mapState('user', ['userInfo'])
|
|
|
},
|
|
},
|
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
|
// this.getUserCardInfo()
|
|
// this.getUserCardInfo()
|
|
|
- opt.mtype = opt.mtype
|
|
|
|
|
- if(opt.uid) {
|
|
|
|
|
|
|
+ this.mtype = opt.mtype
|
|
|
|
|
+ if (opt.uid) {
|
|
|
this.shareId = opt.uid
|
|
this.shareId = opt.uid
|
|
|
this.getCommonUserCardInfo(opt.uid)
|
|
this.getCommonUserCardInfo(opt.uid)
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.getUserCardInfo()
|
|
this.getUserCardInfo()
|
|
|
this.getShowTemplateItem()
|
|
this.getShowTemplateItem()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onShareAppMessage(options) {
|
|
onShareAppMessage(options) {
|
|
|
// 设置菜单中的转发按钮触发转发事件时的转发内容
|
|
// 设置菜单中的转发按钮触发转发事件时的转发内容
|
|
@@ -227,23 +230,57 @@
|
|
|
let that = this
|
|
let that = this
|
|
|
subShowTemplateOrder({
|
|
subShowTemplateOrder({
|
|
|
id: that.mtype,
|
|
id: that.mtype,
|
|
|
- pay_type: 'wxpay'
|
|
|
|
|
|
|
+ pay_type: that.payType
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
-
|
|
|
|
|
|
|
+ let da = res.data.jsApiParameters;
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ appId: da.appId,
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ timestamp: da.timeStamp,
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef MP
|
|
|
|
|
+ timeStamp: da.timeStamp + '',
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ nonceStr: da.nonceStr,
|
|
|
|
|
+ package: da.package,
|
|
|
|
|
+ signType: da.signType,
|
|
|
|
|
+ paySign: da.paySign,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ // obj.paySuccessTo();
|
|
|
|
|
+ // alert('支付成功')
|
|
|
|
|
+ console.log('支付成功')
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: (err) => {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ // alert('支付失败')
|
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
|
+ // url: '/pages/order/order?state=0'
|
|
|
|
|
+ // });
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ console.log(data, 'timeStamp')
|
|
|
|
|
+ if (that.payType == 'wxpay') {
|
|
|
|
|
+ console.log('到这里')
|
|
|
|
|
+ wx.requestPayment(data)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getShowTemplateItem() {
|
|
getShowTemplateItem() {
|
|
|
let that = this
|
|
let that = this
|
|
|
getShowTemplateItem({
|
|
getShowTemplateItem({
|
|
|
id: that.mtype
|
|
id: that.mtype
|
|
|
- }).then(res=> {
|
|
|
|
|
|
|
+ }).then(res => {
|
|
|
that.modelInfo = res.data
|
|
that.modelInfo = res.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getCommonUserCardInfo(uid) {
|
|
getCommonUserCardInfo(uid) {
|
|
|
let that = this
|
|
let that = this
|
|
|
getCommonUserCardInfo({
|
|
getCommonUserCardInfo({
|
|
|
- uid:uid
|
|
|
|
|
|
|
+ uid: uid
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
let arr = []
|
|
let arr = []
|
|
|
let basearr = res.data.service_area_all
|
|
let basearr = res.data.service_area_all
|
|
@@ -687,7 +724,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.fxmp {
|
|
.fxmp {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
width: 750rpx;
|
|
width: 750rpx;
|
|
@@ -705,6 +742,7 @@
|
|
|
line-height: 78rpx;
|
|
line-height: 78rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.create-model {
|
|
.create-model {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
width: 750rpx;
|
|
width: 750rpx;
|
|
@@ -714,19 +752,23 @@
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
line-height: 98rpx;
|
|
line-height: 98rpx;
|
|
|
|
|
+
|
|
|
.price-show {
|
|
.price-show {
|
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|
|
|
|
|
+
|
|
|
text {
|
|
text {
|
|
|
font-size: 48rpx;
|
|
font-size: 48rpx;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
color: #FC6F6D;
|
|
color: #FC6F6D;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .to-show, .by-now{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .to-show,
|
|
|
|
|
+ .by-now {
|
|
|
width: 223rpx;
|
|
width: 223rpx;
|
|
|
height: 98rpx;
|
|
height: 98rpx;
|
|
|
background: #fa98b6;
|
|
background: #fa98b6;
|
|
@@ -734,8 +776,9 @@
|
|
|
font-size: 34rpx;
|
|
font-size: 34rpx;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.by-now {
|
|
.by-now {
|
|
|
- background:#f65486;
|
|
|
|
|
|
|
+ background: #f65486;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|