|
|
|
@ -12,9 +12,10 @@ |
|
|
|
|
<view class="image-text_1" v-if="!isLogin" @click="goLogin()"> |
|
|
|
|
未登录 |
|
|
|
|
</view> |
|
|
|
|
<button class="avatar-wrapper" v-else type="primary" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> |
|
|
|
|
<button class="avatar-wrapper" v-else type="primary" open-type="chooseAvatar" |
|
|
|
|
@chooseavatar="onChooseAvatar"> |
|
|
|
|
<!-- <button class="avatar-wrapper" v-else @click="onChooseAvatar"> --> |
|
|
|
|
<text lines="1" class="text-group_1">{{userInfo.nick_name}}</text> |
|
|
|
|
<text lines="1" class="text-group_1">{{userInfo.nick_name}}3</text> |
|
|
|
|
<image :src="$picUrl+'/static/user/weChat.png'" class="thumbnail_1"></image> |
|
|
|
|
</button> |
|
|
|
|
<view class="text-wrapper_1" v-if="isLogin" @click="wechatLogin"> |
|
|
|
@ -570,6 +571,7 @@ |
|
|
|
|
} from '@/core/app' |
|
|
|
|
import * as UserApi from '@/api/user'; |
|
|
|
|
import * as Api from '@/api/goods' |
|
|
|
|
import * as UploadApi from '@/api/upload' |
|
|
|
|
import { |
|
|
|
|
createQrCodeImg |
|
|
|
|
} from '@/utils/qrcode' |
|
|
|
@ -616,7 +618,7 @@ |
|
|
|
|
let that = this |
|
|
|
|
that.headImgUpload(e.detail.avatarUrl) |
|
|
|
|
}, |
|
|
|
|
nickSubmit(avatar_id, nick_name) { |
|
|
|
|
nickSubmit(avatar_id) { |
|
|
|
|
UserApi.editUser({ |
|
|
|
|
avatar_id: avatar_id |
|
|
|
|
}) |
|
|
|
@ -639,14 +641,21 @@ |
|
|
|
|
.finally() |
|
|
|
|
}, |
|
|
|
|
headImgUpload(avatarUrl) { |
|
|
|
|
// 获取推荐商品 |
|
|
|
|
const that = this |
|
|
|
|
UserApi.wxHeadImgUpload({ |
|
|
|
|
headImg: avatarUrl, |
|
|
|
|
checkLogin: 1 |
|
|
|
|
const app = this |
|
|
|
|
const imageList=[{path: avatarUrl}] |
|
|
|
|
// 批量上传 |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
if (imageList.length > 0) { |
|
|
|
|
UploadApi.image(imageList) |
|
|
|
|
.then(fileIds => { |
|
|
|
|
console.log(fileIds) |
|
|
|
|
app.nickSubmit(fileIds.join(',')) |
|
|
|
|
resolve(fileIds) |
|
|
|
|
}) |
|
|
|
|
.then(res => { |
|
|
|
|
that.nickSubmit(res.data.fileInfo.file_id) |
|
|
|
|
.catch(reject) |
|
|
|
|
} else { |
|
|
|
|
resolve() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goShopOrderList() { |
|
|
|
@ -939,6 +948,7 @@ |
|
|
|
|
flex-direction: column; |
|
|
|
|
justify-content: flex-end; |
|
|
|
|
padding-bottom: 30rpx; |
|
|
|
|
|
|
|
|
|
.toTop { |
|
|
|
|
position: fixed; |
|
|
|
|
bottom: 30rpx; |
|
|
|
@ -1127,10 +1137,12 @@ |
|
|
|
|
padding: 0; |
|
|
|
|
margin: 0; |
|
|
|
|
border: none; |
|
|
|
|
|
|
|
|
|
::v-ddep uni-button:after { |
|
|
|
|
border: none !important; |
|
|
|
|
} |
|
|
|
|
button[type=primary][plain]{ |
|
|
|
|
|
|
|
|
|
button[type=primary][plain] { |
|
|
|
|
border: none !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|