|
|
|
@ -9,7 +9,7 @@ |
|
|
|
|
> |
|
|
|
|
<view class="ss-flex ss-row-center ss-col-center ss-p-t-60 ss-p-b-0 bg-white"> |
|
|
|
|
<view class="header-box-content"> |
|
|
|
|
<su-image |
|
|
|
|
<!-- <su-image |
|
|
|
|
class="content-img" |
|
|
|
|
isPreview |
|
|
|
|
:current="0" |
|
|
|
@ -18,7 +18,15 @@ |
|
|
|
|
:width="160" |
|
|
|
|
:radius="80" |
|
|
|
|
mode="scaleToFill" |
|
|
|
|
></su-image> |
|
|
|
|
></su-image> --> |
|
|
|
|
<image |
|
|
|
|
:src="baseUrl+state.model.avatar" |
|
|
|
|
:height="160" |
|
|
|
|
:width="160" |
|
|
|
|
:radius="80" |
|
|
|
|
mode="scaleToFill" |
|
|
|
|
></image> |
|
|
|
|
|
|
|
|
|
<view class="avatar-action"> |
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
|
<button |
|
|
|
@ -220,7 +228,7 @@ import { mobile, password, username } from '@/sheep/validate/form'; |
|
|
|
|
import sheep from '@/sheep'; |
|
|
|
|
import { clone } from 'lodash'; |
|
|
|
|
import { showAuthModal } from '@/sheep/hooks/useModal'; |
|
|
|
|
|
|
|
|
|
import { baseUrl } from '@/sheep/config'; |
|
|
|
|
const state = reactive({ |
|
|
|
|
model: {}, |
|
|
|
|
rules: {}, |
|
|
|
@ -278,7 +286,10 @@ function onChangeAvatar() { |
|
|
|
|
async function uploadAvatar(tempUrl) { |
|
|
|
|
if (!tempUrl) return; |
|
|
|
|
let { url } = await sheep.$api.app.upload(tempUrl, 'ugc'); |
|
|
|
|
state.model.avatar = url; |
|
|
|
|
console.log(url,",,,mmm") |
|
|
|
|
// state.model.avatar = baseUrl+url.slice(1); |
|
|
|
|
// console.log(state.model.avatar) |
|
|
|
|
state.model.avatar =url; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 修改/设置密码 |
|
|
|
|