细节修改 个人中心加获取头像

version/0412
fanfan 9 months ago
parent c5531a1a37
commit 5af8f91886
  1. 9
      pages/goods/components/setPrice.vue
  2. 38
      pages/user/index.vue

@ -7,13 +7,8 @@
</view> </view>
<view class="priceContainer"> <view class="priceContainer">
<view class="priceCon"> <view class="priceCon">
<<<<<<< HEAD <!-- <text>秒杀价</text><input type="text" v-model="secondPrice" class="input" value=""
<text>秒杀价</text><input type="text" v-model="secondPrice" class="input" value="" placeholder="秒杀价格可低于成本价" /> -->
placeholder="秒杀价格可低于成本价" />
=======
<text>秒杀价</text>
<input type="text" v-model="secondPrice" class="input" placeholder="秒杀价格可低于成本价" />
>>>>>>> 334106d4c315bfefd82a940ba62881c49b6494af
</view> </view>
<view class="priceTime"> <view class="priceTime">
<view class="text">秒杀区间</view> <view class="text">秒杀区间</view>

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

Loading…
Cancel
Save