订单相关修改提测

This commit is contained in:
GaoHao
2024-09-09 11:08:04 +08:00
parent c2ff506543
commit 2dbcdf4300
45 changed files with 1377 additions and 3506 deletions

View File

@@ -6,7 +6,12 @@
<view class="list_item">
<view class="list_item_left">头像</view>
<view class="list_item_right flex-center">
<!-- #ifdef MP-WEIXIN -->
<button class="list_item_right_head" type="default" open-type="chooseAvatar" @chooseavatar="uploadImg">
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<button class="list_item_right_head" type="default" open-type="chooseAvatar" onChooseAvatar="uploadImg">
<!-- #endif -->
<image class="list_item_right_head" :src="userHeadImg" mode="aspectFill"></image>
</button>
<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
@@ -38,7 +43,7 @@
<view class="list_item_left">性别</view>
<view class="list_item_right flex-center">
<view class="place r" @click="sexShow = true">{{sexText}}</view>
<u-picker @cancel="sexShow = false" :show="sexShow" :columns="sexList" keyName="label" @confirm="confirmSex"></u-picker>
<u-picker @cancel="sexShow = false" itemHeight="66" :show="sexShow" :columns="sexList" keyName="label" @confirm="confirmSex"></u-picker>
<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
</view>
</view>
@@ -51,7 +56,7 @@
<!-- <picker :show="calendarShow" mode="date"></picker> -->
<u-datetime-picker
mode="date"
itemHeight="66"
itemHeight="90"
visibleItemCount="5"
@cancel="calendarShow = false"
:show="calendarShow"
@@ -171,10 +176,30 @@
* 获取手机号
* @param {Object} d
*/
async getPhone(d) {
getPhone(d) {
console.log(d)
if (d.detail.iv) {
// #ifdef MP-WEIXIN
uni.login({
provider: 'weixin',
success: async (data) => {
// 微信小程序环境
console.log(data)
let res = await this.api.userwxlogins({
code: data.code,
encryptedData: d.detail.encryptedData,
iv: d.detail.iv,
})
this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
this.mobile = res.data;
}
});
// #endif
// #ifdef MP-ALIPAY
// 支付宝小程序环境
my.getAuthCode({
scopes: 'auth_user',
success: async (data) => {
console.log(data)
let res = await this.api.userwxlogins({
@@ -185,7 +210,10 @@
this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
this.mobile = res.data;
}
})
});
// #endif
}
},
@@ -217,6 +245,7 @@
* @param {Object} e
*/
uploadImg(e) {
console.log(e)
const { avatarUrl } = e.detail
// this.userHeadImg = avatarUrl
uni.uploadFile({
@@ -233,11 +262,15 @@
file: avatarUrl,
},
success: (uploadFileRes) => {
console.log(uploadFileRes)
let {
data
} = JSON.parse(uploadFileRes.data)
this.userHeadImg = data
},
fail: (res) => {
console.log(res)
}
});
},
@@ -270,6 +303,10 @@
background: #fff;
}
.container{
::v-deep .u-input input{
background-color: transparent;
}
.info_list{
display: flex;
flex-direction: column;