Commit f02640ee authored by 小耗子's avatar 小耗子

商城支付

parent 3b7064b1
<template>
<view class="back">
<view class="lf" @click="goback">
返回
</view>
<view class="title">{{info.title}}</view>
</view>
</template>
<script>
export default {
props:{
info:{
type: Object
}
},
data() {
return {
}
},
methods:{
goback(){
uni.navigateTo({
url: '/pages/h5/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.back{
position: fixed;width:100%;margin-top:50rpx;position: relative; margin-top: 26px; height: 80px;line-height: 80px;
.lf{
position: absolute;width: 40px;text-align: center;padding-left:10rpx;
}
.title{
width: 100%;text-align:center
}
}
</style>
<template> <template>
<view> <view>
<sh-custom-nav :info="info" ></sh-custom-nav>
<view class="pay-container" v-if="!isPay"> <view class="pay-container" v-if="!isPay">
<view class="money-box"><text class="money">{{actuallyPay}}</text></view> <view class="money-box"><text class="money">{{actuallyPay}}</text></view>
<u-button @click="pay" shape="circle" type="primary" text="确认支付" color="#61b077"></u-button> <u-button @click="pay" shape="circle" type="primary" text="确认支付" color="#61b077"></u-button>
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<u-button type="primary" color="#61b077" text="查看订单" @click="goPath('shopMallList')"></u-button> <u-button type="primary" color="#61b077" text="查看订单" @click="goPath('shopMallList')"></u-button>
</view> </view>
<view class="rt"> <view class="rt">
<u-button type="primary" color="#61b077" :plain="true" text="继续购买" @click="goPath('')"></u-button> <u-button type="primary" color="#61b077" :plain="true" text="回到商城" @click="goPath('')"></u-button>
</view> </view>
</view> </view>
</view> </view>
...@@ -24,7 +25,11 @@ ...@@ -24,7 +25,11 @@
</template> </template>
<script> <script>
import http from '@/shopro/request/index'; import http from '@/shopro/request/index';
import shCustomNav from '@/components/sh-custom-nav/sh-custom-nav';
export default { export default {
components:{
shCustomNav
},
data() { data() {
return { return {
params:{}, params:{},
...@@ -32,7 +37,10 @@ ...@@ -32,7 +37,10 @@
payStatus:'pending', payStatus:'pending',
payTips:"等待中", payTips:"等待中",
orderId:"", orderId:"",
isPay:false isPay:false,
info:{
title:'支付'
}
} }
}, },
methods: { methods: {
...@@ -77,16 +85,23 @@ ...@@ -77,16 +85,23 @@
} }
}) })
} },
goback: function() {
// var pages = getCurrentPages();
// console.log(666,pages);
// wx.navigateBack({
// delta: pages.length-2
// })
uni.navigateTo({
url: '/pages/h5/index'
})
}
}, },
onLoad(option){ onLoad(option){
let {data,orderId,actuallyPay} = option; let {data,orderId,actuallyPay} = option;
this.actuallyPay = actuallyPay; this.actuallyPay = actuallyPay;
this.orderId = orderId; this.orderId = orderId;
this.params = JSON.parse(decodeURIComponent(data)); this.params = JSON.parse(decodeURIComponent(data));
},
onLaunch(){
console.log("关闭")
} }
} }
...@@ -94,12 +109,12 @@ ...@@ -94,12 +109,12 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.pay-container{ .pay-container{
.money-box{ .money-box{
font-size: 28rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
margin: 100rpx 0 ; margin: 100rpx 0 ;
text-align: center; text-align: center;
.money{ .money{
font-size: 48rpx; font-size: 60rpx;
} }
} }
::v-deep .u-button{ ::v-deep .u-button{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment