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