修改
This commit is contained in:
parent
4a4e8cf5ae
commit
14274bf574
@ -186,14 +186,6 @@
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/confirmOrder/confirmOrder",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#4C7BC9", //背景颜色
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/disease/disease",
|
||||
"style": {
|
||||
|
||||
@ -473,7 +473,7 @@
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
url: '/pages/paysuccess/paysuccess'
|
||||
url: `/pages/orderDetails/orderDetails?goodsOrderId=${id}`
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
.PurchasePage {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
height: 1150rpx;
|
||||
height: 1220rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx 30rpx 0px 0px;
|
||||
|
||||
@ -344,7 +344,7 @@
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/paysuccess/paysuccess`
|
||||
url: `/pages/ServiceDetails/ServiceDetails?orderNo=${obj.orderNo}`
|
||||
})
|
||||
}, 1500)
|
||||
},
|
||||
|
||||
@ -1,242 +0,0 @@
|
||||
.app{
|
||||
padding: 0;
|
||||
}
|
||||
.header {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 36rpx;
|
||||
color: #969394;
|
||||
margin-left: 7%;
|
||||
}
|
||||
|
||||
.number {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 8%;
|
||||
}
|
||||
.bodys {
|
||||
height: 480rpx;
|
||||
background: #4C7BC9;
|
||||
.addressinfo {
|
||||
position: relative;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 65rpx;
|
||||
top: 15%;
|
||||
margin-left: 8%;
|
||||
.address{
|
||||
margin-top: 20rpx;
|
||||
width:92%;
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
word-break:break-all;
|
||||
}
|
||||
.namephone{
|
||||
width: 70%;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.picture {
|
||||
position: absolute;
|
||||
top:0%;
|
||||
right:5%;
|
||||
|
||||
image {
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
color: #FFFFFF;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.commodity {
|
||||
width: 95%;
|
||||
height: 332rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: -25%;
|
||||
.commodityInfo {
|
||||
height: 235rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
width: 97%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
image {
|
||||
width: 174rpx;
|
||||
height: 174rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.infos {
|
||||
position: absolute;
|
||||
top:10%;
|
||||
left: 35%;
|
||||
width: 60%;
|
||||
font-size: 36rpx;
|
||||
.detail {
|
||||
color: #000000;
|
||||
line-height: 67rpx;
|
||||
.spangoodsName{
|
||||
width: 100%;
|
||||
overflow:hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.spanprice {
|
||||
color: #969394;
|
||||
line-height: 67rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.model {
|
||||
font-size: 33rpx;
|
||||
color: #969394;
|
||||
line-height: 67rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.quantity {
|
||||
margin-top: 34rpx;
|
||||
}
|
||||
|
||||
}
|
||||
.integral{
|
||||
width: 95%;
|
||||
height: 92rpx;
|
||||
line-height: 92rpx;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0,0,0,0.03);
|
||||
border-radius: 20rpx;
|
||||
margin:15rpx auto;
|
||||
}
|
||||
.price{
|
||||
width: 95%;
|
||||
height: 290rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0,0,0,0.03);
|
||||
border-radius: 20rpx;
|
||||
margin: 20rpx auto;
|
||||
font-size: 36rpx;
|
||||
.money{
|
||||
line-height: 68rpx;
|
||||
color: #969394;
|
||||
|
||||
}
|
||||
.priceinfo{
|
||||
margin: 0 auto;
|
||||
padding-top: 20rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.freight{
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
margin-top:10rpx ;
|
||||
border-top: 1rpx solid #D8D4D4;
|
||||
|
||||
.total{
|
||||
margin-top: 30rpx;
|
||||
font-size: 42rpx;
|
||||
color: #D43953;
|
||||
line-height: 67rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom{
|
||||
position: fixed;
|
||||
bottom:0;
|
||||
// margin-top: 50rpx;
|
||||
padding-left: 3%;
|
||||
width:100%;
|
||||
height: 140rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0,0,0,0.03);
|
||||
.moneys{
|
||||
height: 140rpx;
|
||||
font-size: 54rpx;
|
||||
color: #D43953;
|
||||
line-height: 141rpx;
|
||||
position: absolute;
|
||||
left:3%;
|
||||
}
|
||||
|
||||
.submit{
|
||||
text-align: center;
|
||||
width: 226rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background: #4C7BC9;
|
||||
border-radius: 26rpx;
|
||||
font-size: 34rpx;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
right:3%;
|
||||
top:30rpx;
|
||||
// float: right;
|
||||
}
|
||||
}
|
||||
// 弹框支付
|
||||
.payment {
|
||||
width: 390px;
|
||||
height: 130rpx;
|
||||
font-size: 42rpx;
|
||||
color: #000000;
|
||||
line-height: 130rpx;
|
||||
text-align: center;
|
||||
// margin: 0 auto;
|
||||
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
display: flex;
|
||||
span{
|
||||
margin-left: 30%;
|
||||
}
|
||||
.cencel{
|
||||
margin-left: 20%;
|
||||
image {
|
||||
width: 31rpx;
|
||||
height: 31rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.chat {
|
||||
span {
|
||||
display: block;
|
||||
height: 68rpx;
|
||||
font-size: 42rpx;
|
||||
color: #000000;
|
||||
line-height: 68rpx;
|
||||
margin-left: 25%;
|
||||
margin-top: -10%;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 79rpx;
|
||||
height: 69rpx;
|
||||
margin-top: 7%;
|
||||
padding-left: 10%;
|
||||
}
|
||||
}
|
||||
|
||||
.submits {
|
||||
width: 501rpx;
|
||||
height: 71rpx;
|
||||
line-height: 71rpx;
|
||||
background: #4C7BC9;
|
||||
border-radius: 26rpx;
|
||||
font-size: 34rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
margin-top: 25%;
|
||||
}
|
||||
@ -1,213 +0,0 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="bodys">
|
||||
<view class="addressinfo">
|
||||
<view class="namephone">
|
||||
{{updata.receiver}},{{updata.phone}}
|
||||
</view>
|
||||
<view class="picture">
|
||||
<span @tap='upaddress()'>修改地址</span>
|
||||
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
|
||||
</view>
|
||||
<view class="address">
|
||||
{{updata.receiveAddress}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="commodity">
|
||||
<view class="commodityInfo">
|
||||
<image :src="updata.img" mode=""></image>
|
||||
<view class="infos">
|
||||
<view class="detail">
|
||||
<view class="spangoodsName">
|
||||
{{updata.goodsName}}
|
||||
</view>
|
||||
<view class="spanprice"> ¥{{updata.goodsPrice}}</view>
|
||||
</view>
|
||||
<view class="model">
|
||||
型号:<span>{{updata.goodsAttributeName}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quantity">
|
||||
<view class="header">
|
||||
数量
|
||||
</view>
|
||||
<view class="number">
|
||||
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount" @minus='delnumber'
|
||||
@plus='addnumber'>
|
||||
</u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="integral">
|
||||
<view class="header">
|
||||
积分抵扣
|
||||
</view>
|
||||
<view class="number">
|
||||
共5积分,满100可用
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="price">
|
||||
<view class="priceinfo">
|
||||
<view class="header money">
|
||||
商品金额
|
||||
</view>
|
||||
<view class="number money">
|
||||
¥{{updata.totalPrice}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="priceinfo">
|
||||
<view class="header money">
|
||||
运费
|
||||
</view>
|
||||
<view class="number money">
|
||||
+¥0.0
|
||||
</view>
|
||||
</view>
|
||||
<view class="freight">
|
||||
<view class="number total">
|
||||
¥{{updata.totalPrice}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="moneys">
|
||||
¥{{updata.totalPrice}}
|
||||
</view>
|
||||
<view class="submit" @tap='show=true'>
|
||||
提交订单
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<view class="frame">
|
||||
<u-popup v-model="show" mode="bottom" length="45%" border-radius="30">
|
||||
<view class="payment">
|
||||
<span>请选择支付方式</span>
|
||||
<view class="cencel" @tap="show = false">
|
||||
<image src="../../static/gb.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat">
|
||||
<image src="/static/chat.png" mode=""></image>
|
||||
<span>微信支付</span>
|
||||
</view>
|
||||
<view class="submits" @tap='buy'>
|
||||
<span>确认支付</span><span>¥{{updata.totalPrice}}</span>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
addStationGoodsOrder,
|
||||
appletGoodsOrderPay
|
||||
} from '@/api/confirmOrder/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
openid: '',
|
||||
updata: {},
|
||||
Patient: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buy() {
|
||||
var that = this
|
||||
addStationGoodsOrder(this.updata).then(res => {
|
||||
if (res.code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
} else {
|
||||
let id = res.data.id
|
||||
let paydata = res.data
|
||||
paydata.openid = this.openid
|
||||
paydata.payType = "WECHAT_PAY"
|
||||
paydata.paymentPrice = res.data.totalPrice
|
||||
appletGoodsOrderPay(paydata).then(response => {
|
||||
if (response.code == 200) {
|
||||
uni.requestPayment({
|
||||
timeStamp: response.data.timeStamp,
|
||||
nonceStr: response.data.nonceStr,
|
||||
package: response.data.prepayId,
|
||||
signType: response.data.signType,
|
||||
paySign: response.data.paySign,
|
||||
success: function(res) {
|
||||
that.$refs.uToast.show({
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
url: '/pages/paysuccess/paysuccess'
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
|
||||
// })
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: response.msg,
|
||||
type: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
delnumber(e) {
|
||||
this.updata.totalPrice = (e.value * this.updata.goodsPrice).toFixed(2)
|
||||
},
|
||||
addnumber(e) {
|
||||
this.updata.totalPrice = (e.value * this.updata.goodsPrice).toFixed(2)
|
||||
},
|
||||
upaddress() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.updata = JSON.parse(options.updata)
|
||||
if (this.updata.totalPrice == 'null' || !this.updata.totalPrice) {
|
||||
this.updata.totalPrice = 0
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
that.openid = value
|
||||
} else {}
|
||||
let useritem = null
|
||||
uni.$on('updata', function(data) {
|
||||
that.updata = JSON.parse(data.updata)
|
||||
if (data.useritem) {
|
||||
useritem = JSON.parse(data.useritem)
|
||||
that.updata.receiver = useritem.receiveName
|
||||
that.updata.phone = useritem.receivePhone
|
||||
that.updata.receiveAddress = useritem.address
|
||||
}
|
||||
uni.$off('updata')
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './confirmOrder.scss'
|
||||
</style>
|
||||
@ -124,7 +124,7 @@
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/paysuccess/paysuccess`
|
||||
url: `/pages/orderDetails/orderDetails?goodsOrderId=${id}`
|
||||
})
|
||||
}, 1500)
|
||||
},
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/paysuccess/paysuccess`
|
||||
url: `/pages/ServiceDetails/ServiceDetails?orderNo=${obj.orderNo}`
|
||||
})
|
||||
}, 1500)
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user