提交 2df02534 authored 作者: 宋雄's avatar 宋雄

修改bug

上级 6f47c35f
......@@ -98,7 +98,6 @@
},
// 获取手机号
async getUserPhone(e) {
let res = await analysisMobileApi({
code: e.detail.code,
iv: e.detail.iv,
......
......@@ -8,7 +8,7 @@
<view class="picture-box">
<text class="text">头像</text>
<button class="button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" hover-class="none">
<image class="avatar" :src="userForm.userAvatarUrl || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" mode="aspectFill"></image>
<image class="avatar" :src="userForm.userAvatarUrl || 'https://life.cloud.hjxbc.cn/sys/common/static/miniapp/avatar.png'" mode="aspectFill"></image>
</button>
</view>
<view class="picture-box">
......
......@@ -612,4 +612,15 @@ export const uploadFile = (params = {}, config = {})=> {
.then(res=> { resolve(res) })
.catch(err=> { reject(err) })
})
}
// 支付
export const payOrderApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.post('/property-community/wechat/communityPayment/payOrder',
{ ...params },
{ ...config })
.then(res=> { resolve(res) })
.catch(err=> { reject(err) })
})
}
\ No newline at end of file
......@@ -146,6 +146,11 @@
"style": {
"navigationBarTitleText": "缴费详情"
}
}, {
"path": "pages/payStatus/index",
"style": {
"navigationBarTitleText": "缴费状态"
}
}, {
"path": "pages/payCostStatistical/index",
"style": {
......
......@@ -7,7 +7,7 @@
<image mode="aspectFill" src="../../static/images/icon_up.png" class="icon"></image>
</view>
<view class="nav-top" v-else>
<view class="title" @click="quickEntry">请选择小区</view>
<view class="title" @click.stop="quickEntry">请选择小区</view>
</view>
</view>
<view class="banner">
......@@ -245,7 +245,7 @@
if(bannerList.length === 0) {
this.bannerList.push({
id: '123423423',
imageUrl: 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/Q3xhphkpF4EF3143e0a21b5cf40fc5ff8cc5d1bbfa88_1687863385027.jpg'
imageUrl: 'https://life.cloud.hjxbc.cn/sys/common/static/miniapp/banner.jpg'
})
} else {
this.bannerList = bannerList
......@@ -711,7 +711,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/fG1tlfXpaIgzd8acb4b81de5c80e74c292351e26460b_1687860842910.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/miniapp/bg_home.png');
}
.page {
......@@ -842,7 +842,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/HIoZ0YFlMHhnc5dd3b7fc0345f4383c75e72a2d26ea1_1687860931825.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/miniapp/bg_guanjia.png');
padding: 20rpx 30rpx;
margin: 30rpx 0;
......
......@@ -2,7 +2,7 @@
<view class="container">
<view class="page">
<view class="user">
<image :src="userAvatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" class="icon"></image>
<image :src="userAvatar || 'https://life.cloud.hjxbc.cn/sys/common/static/miniapp/avatar.png'" class="icon"></image>
<view class="name" v-if="userName">{{userName}}</view>
<view class="name" v-else @click="quickEntry">请认证</view>
<view class="phone" v-if="userName">{{userPhone}}</view>
......@@ -252,10 +252,8 @@
}
.user {
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/6WNT5CXhljet5e81b552ffa70bf463a4557dc95a0df9_1687861430349.png');
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background: url('https://life.cloud.hjxbc.cn/sys/common/static/miniapp/bg_mine.png') no-repeat 100%/100%;
background-size: 1;
border-radius: 16rpx;
display: flex;
flex-direction: column;
......
......@@ -9,7 +9,7 @@
头像
</view>
<view class="form-item-fr">
<image :src="formData.avatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" class="icon"></image>
<image :src="formData.avatar || 'https://life.cloud.hjxbc.cn/sys/common/static/miniapp/avatar.png'" class="icon"></image>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
</view>
......
......@@ -65,7 +65,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/FsmkoAO0xopVfd9d2ef557272cd792026eb115d8d69f_1687861255975.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/miniapp/bg_pay.png');
}
.page {
......
......@@ -41,6 +41,7 @@
<script>
import {
payOrderApi,
communityPaymentDetailApi
} from '@/config/api.js'
export default {
......@@ -54,17 +55,26 @@
let res = await communityPaymentDetailApi({id})
this.payDetail = res.result
},
onSubmit() {
uni.requestPayment({
provider: 'alipay',
orderInfo: 'orderInfo', //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
success: function (res) {
console.log('success:' + JSON.stringify(res));
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
});
async onSubmit() {
// uni.requestPayment({
// provider: 'alipay',
// orderInfo: 'orderInfo', //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
// success: function (res) {
// console.log('success:' + JSON.stringify(res));
// },
// fail: function (err) {
// console.log('fail:' + JSON.stringify(err));
// }
// });
payOrderApi({id: this.payDetail.id}).then(res=> {
uni.navigateTo({
url: `/pages/payStatus/index?id=${this.payDetail.id}&type=1&price=${this.payDetail.totalAmount}`
});
}).catch(err=> {
uni.navigateTo({
url: `/pages/payStatus/index?id=${this.payDetail.id}&type=0&price=${this.payDetail.totalAmount}`
});
})
}
},
onLoad(option) {
......
......@@ -121,7 +121,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/htzJ6ruOcDUeca5cbf2cebdb71687d0c742f74997109_1687861702873.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/miniapp/bg_cost.png');
border-radius: 16rpx;
padding: 40rpx;
......
......@@ -111,7 +111,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/htzJ6ruOcDUeca5cbf2cebdb71687d0c742f74997109_1687861702873.png');
background-image: url('https://life.cloud.hjxbc.cn/sys/common/static/miniapp/bg_cost.png');
border-radius: 16rpx;
padding: 40rpx;
......
<template>
<view class="content">
<view class="box">
<text class="text">{{type === '0'?'支付失败':'支付成功'}}</text>
<view class="money"><text class="number">{{totalPrice}}</text></view>
<view class="payment-fail" v-if="type === '0'">
抱歉,你的订单支付失败
</view>
<button v-if="type === '1'" @click="goDetail" type="default" class="custom-btn">返回</button>
<view v-else class="btn-fail">
<button @click="onPay" type="default" class="custom-btn">重新支付</button>
<button @click="goDetail" type="default" class="view-order">返回</button>
</view>
</view>
</view>
</template>
<script>
import {
payOrderApi,
} from '@/config/api.js'
export default {
data() {
return {
id: '',
type: '0', // 0:支付失败 1:支付成功
totalPrice: '0.00' // 订单总价
}
},
onLoad(options) {
this.id = options.id
this.totalPrice = options.price
this.type = options.type
},
methods: {
onPay() {
payOrderApi({id: this.id}).then(res=> {
this.type = '1'
}).catch(err=> {
this.type = '0'
})
},
goDetail() {
uni.switchTab({
url: '/pages/home/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
min-height: 100vh;
background-color: #fff;
.box {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 68rpx;
padding-bottom: 100rpx;
.text {
font-size: 28rpx;
font-weight: 500;
color: #3D3D3D;
}
.money {
margin-top: 64rpx;
font-size: 24rpx;
font-weight: 500;
color: #3D3D3D;
.number {
font-size: 60rpx;
font-weight: bold;
color: #3D3D3D;
}
}
.payment-fail {
margin-top: 11px;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #AAAAAA;
}
.custom-btn {
width: 220rpx;
height: 64rpx;
line-height: 64rpx;
border-radius: 32rpx;
background-color: #F1615B;
margin-top: 72rpx;
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
&::after {
border: none;
}
}
.view-order {
width: 220rpx;
height: 64rpx;
line-height: 64rpx;
border-radius: 32rpx;
background-color: #E7E7E7;
margin-top: 32rpx;
font-size: 24rpx;
font-weight: 400;
color: #767676;
&::after {
border: none;
}
}
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论