123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <template>
- <view class="container cashier">
- <ws-custom :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :isBackType="true" :path="'/pages/user/cart/cart'"></ws-custom>
- <view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
- <view class="container-wrapper">
- <view class="cash-icon">
- <image src="../../../static/ws/dd_success.png" mode=""></image>
- </view>
- <view class="cash-text">
- <text>{{ successText }}</text>
- </view>
- <view class="cash-btn">
- <view class="btn btn-pay" v-if="payType === 'confirm'" @click="this.$api.redirectTo(`/pages/user/order/order-payment?type=payfirm&orderId=${orderId}`)">支付订单</view>
- <view class="btn btn-open" @click="this.$api.redirectTo('/pages/user/order/order-details?type=confim&orderId='+orderId)">查看订单</view>
- <view class="btn btn-pay" v-if="payType === 'success'" @click="this.$api.redirectTo('/pages/goods/list')">继续采购</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default{
- data(){
- return{
- orderId:'',
- nvabarData: { //顶部自定义导航
- haveBack:true,
- showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
- showSearch: 0,
- title: '', // 导航栏 中间的标题
- textLeft:this.$store.state.isIphone
- },
- headerBtnPosi:this.setHeaderBtnPosi(),//获取设备顶部胶囊高度
- systeminfo:this.setSysteminfo(), //获取设备信息
- isIphoneX:this.$store.state.isIphoneX,
- CustomBar:this.CustomBar,// 顶部导航栏高度
- successText:'订单提交成功~',
- payType:''
- }
- },
- onLoad(option) {
- this.initData(option)
- },
- methods:{
- setHeaderBtnPosi(){
- // 获得胶囊按钮位置信息
- let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
- return headerBtnPosi
- },
- setSysteminfo(){
- let systeminfo;
- uni.getSystemInfo({ // 获取设备信息
- success: (res) => {
- systeminfo = res
- },
- })
- return systeminfo
- },
- initData(option){
- this.orderId = option.orderId
- this.payType = option.type
- if(this.payType === 'success'){
- this.successText = '订单提交并支付成功'
- }else{
- this.successText = '订单提交成功'
- }
- }
- },
- onShow() {
-
- }
- }
- </script>
- <style lang="scss">
- page{
- height: auto !important;
- }
- .container-cash{
- width: 100%;
- .container-wrapper{
- width:662rpx;
- margin: 0 auto;
- margin-top: 120rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .cash-icon{
- width: 332rpx;
- height: 269rpx;
- margin-top: 112rpx;
- image{
- width: 332rpx;
- height: 269rpx;
- }
- }
- .cash-text{
- font-size: $font-size-28;
- color:#666666;
- line-height: 104rpx;
- }
- .cash-btn{
- margin-top: 79rpx;
- .btn{
- width: 600rpx;
- height: 90rpx;
- border-radius: 45rpx;
- line-height: 90rpx;
- text-align: center;
- font-size: $font-size-26;
- color: #FFFFFF;
- box-sizing: border-box;
- border: 1px solid #333333;
- margin-bottom: 24rpx;
- &.btn-open{
- color: #333333;
- }
- &.btn-pay{
- background:#191919;
- }
- }
- }
- }
- }
- </style>
|