update
parent
04ae0ac5fb
commit
f1cbdcf48f
|
|
@ -44,7 +44,7 @@ export const cancelOrder = data =>
|
|||
* @description 申请退款
|
||||
*/
|
||||
export const orderRefund = data =>
|
||||
request.post('/refound', data)
|
||||
request.post('/refund', data)
|
||||
/**
|
||||
* @description 订单完成 & 打分
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
@change="handleChange"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<u-checkbox activeColor="#FF8CA6" name="1"></u-checkbox>
|
||||
<u-checkbox @click="handleAgreeCheck" activeColor="#FF8CA6" name="1"></u-checkbox>
|
||||
<!-- label="我已阅读并同意" -->
|
||||
</u-checkbox-group>
|
||||
<view
|
||||
|
|
|
|||
|
|
@ -300,7 +300,12 @@ onShow(() => {
|
|||
.then(() => {
|
||||
// $Router.push('/personal')
|
||||
$store.user.login().then((user) => {
|
||||
$store.user.setUserInfo(user)
|
||||
// $store.user.setUserInfo(user)
|
||||
!user.nickName
|
||||
? $Router.push({
|
||||
path: '/pages/other/edit-userinfo'
|
||||
})
|
||||
: userStore.setUserInfo(user) && dataList.value[current.value].show && paging.value[current.value]?.reload()
|
||||
})
|
||||
})
|
||||
.catch(() => '')
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ const handleLogin = async () => {
|
|||
$loading(true)
|
||||
userStore.login().then((user) => {
|
||||
$loading(false)
|
||||
!user.id
|
||||
!user.nickName
|
||||
? $Router.push({
|
||||
path: '/pages/other/edit-userinfo'
|
||||
})
|
||||
|
|
|
|||
|
|
@ -17,14 +17,15 @@
|
|||
<view
|
||||
>昵称 <text class="text-#999 text-24rpx">建议改为真实姓名</text></view
|
||||
>
|
||||
<u-input
|
||||
v-model="userInfo.nickName"
|
||||
<input
|
||||
v-model="userInfo.nickName"
|
||||
@change="handleNickName"
|
||||
type="nickname"
|
||||
placeholder=""
|
||||
inputAlign="right"
|
||||
maxlength="20"
|
||||
border="0"
|
||||
></u-input>
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
class="relative h-130rpx flex justify-between items-center border-b-#E5E5E5 border-b-1px"
|
||||
|
|
@ -75,7 +76,7 @@
|
|||
|
||||
<script setup>
|
||||
const instance = getCurrentInstance()
|
||||
const { $api, $store, $Router, $u } = instance.proxy
|
||||
const { $api, $store, $Router, $u,$toast } = instance.proxy
|
||||
const show = ref(false)
|
||||
const columns = ref([['男', '女']])
|
||||
const userInfo = ref($store.user.userInfo)
|
||||
|
|
@ -94,17 +95,17 @@ const getPhoneNumber = async (e) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
const handleNickName = (e) => {
|
||||
userInfo.value.nickName = e.detail.value
|
||||
}
|
||||
|
||||
const handleSave = async () => {
|
||||
const res = await $api.userSave(userInfo.value)
|
||||
if (res.success) {
|
||||
$u.toast('保存成功')
|
||||
$store.user.setUserInfo(userInfo.value)
|
||||
setTimeout(() => {
|
||||
$Router.push({
|
||||
path: '/personal'
|
||||
})
|
||||
}, 500)
|
||||
$store.user.setUserInfo(userInfo.value)
|
||||
$toast('保存成功').then(()=>{
|
||||
$Router.back()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -113,4 +114,8 @@ const handleSave = async () => {
|
|||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
input{
|
||||
text-align: right;
|
||||
padding-right: 6rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
inputAlign="right"
|
||||
maxlength="300"
|
||||
:placeholder="item.placeholder"
|
||||
:readonly="false"
|
||||
:readonly="model.status === 0"
|
||||
/>
|
||||
<view class="w-full" v-else-if="item.type === 'radio'">
|
||||
<u-radio-group
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
activeColor="#FF8CA6"
|
||||
shape="square"
|
||||
placement="row"
|
||||
:disabled="model.status === 0"
|
||||
>
|
||||
<u-radio name="0" label="男"></u-radio>
|
||||
<u-radio name="1" label="女" class="ml-50rpx"></u-radio>
|
||||
|
|
@ -45,11 +46,12 @@
|
|||
</u-form-item>
|
||||
</u--form>
|
||||
<u--textarea
|
||||
count
|
||||
v-model="model.intro"
|
||||
placeholder=""
|
||||
maxlength="300"
|
||||
count
|
||||
:autoHeight="false"
|
||||
:disabled="model.status === 0"
|
||||
/>
|
||||
<view class="mt-32rpx mb-20rpx text-28rpx">
|
||||
<view class=""
|
||||
|
|
@ -72,10 +74,10 @@
|
|||
</block>
|
||||
<view
|
||||
v-else
|
||||
class="absolute top-0 left-0 rounded-md overflow-hidden"
|
||||
class="absolute top-0 left-0 right-0 bottom-0 rounded-md overflow-hidden"
|
||||
>
|
||||
<u--image
|
||||
mode="cover"
|
||||
mode="aspectFit"
|
||||
width="330rpx"
|
||||
height="250rpx"
|
||||
:duration="100"
|
||||
|
|
@ -98,7 +100,7 @@
|
|||
class="absolute top-0 left-0 rounded-md overflow-hidden"
|
||||
>
|
||||
<u--image
|
||||
mode="cover"
|
||||
mode="aspectFit"
|
||||
width="330rpx"
|
||||
height="250rpx"
|
||||
:duration="100"
|
||||
|
|
@ -110,15 +112,16 @@
|
|||
<text class="text-24rpx text-#999"
|
||||
>备注:申请表提交后会有工作人员主动联系您,请耐心等待</text
|
||||
>
|
||||
<agreed-comp v-model:agreed="agreed" />
|
||||
<agreed-comp v-model:agreed="agreed" :disabled="model.status === 0" />
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="fixed bg-#fff bottom-0 pb-8 left-0 right-0 text-white pt-12rpx border-t-1px border-solid border-#E5E5E5"
|
||||
><view
|
||||
@click="$u.throttle(handleSubmit, 1000)"
|
||||
class="bg-#FF8CA6 rounded-24rpx w-660rpx h-80rpx text-center leading-80rpx hover:shadow-md mx-auto"
|
||||
>提交申请</view
|
||||
class=" rounded-24rpx w-660rpx h-80rpx text-center leading-80rpx hover:shadow-md mx-auto"
|
||||
:class="model.status === 0 ? 'bg-#ccc' : 'bg-#FF8CA6'"
|
||||
>{{model.status === 0 ? '申请中' : '提交申请'}}</view
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
|
|
@ -258,11 +261,13 @@ const init = async () => {
|
|||
const images = res.doctor.images.split(',')
|
||||
imageObj.value.ren = images[0]
|
||||
imageObj.value.fan = images[1]
|
||||
agreed.value = true
|
||||
}
|
||||
$loading(false)
|
||||
}
|
||||
|
||||
const handleChooseImage = async (key) => {
|
||||
if(model.value.status === 0) return
|
||||
let filePath = ''
|
||||
try {
|
||||
const ret = await chooseImage({
|
||||
|
|
@ -340,11 +345,8 @@ onShow(() => {
|
|||
})
|
||||
.catch(() => '')
|
||||
return
|
||||
} else {
|
||||
init()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
init()
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue