1
This commit is contained in:
@@ -2,14 +2,11 @@
|
||||
<view class="container">
|
||||
<view class="user-info-wrap">
|
||||
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
|
||||
<button open-type="chooseAvatar" @chooseavatar='onChooseAvatar'
|
||||
style="padding: 0;margin: 0; width: 108rpx; height: 108rpx;border-radius: 50%;">
|
||||
<image style="width: 108rpx; height: 108rpx;" v-if="userInfo.avatar" :src="userInfo.avatar"
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.avatar" :src="userInfo.avatar"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
<image style="width: 108rpx; height: 108rpx;" v-else src="@/static/avatar.png" mode="aspectFill">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-else src="@/static/avatar.png" mode="aspectFill">
|
||||
</image>
|
||||
</button>
|
||||
</view>
|
||||
<view class="info flex-colum-start">
|
||||
<text class="phone">{{userInfo.telephone || '无'}}</text>
|
||||
@@ -17,52 +14,73 @@
|
||||
</view>
|
||||
<view class="userinfoone">
|
||||
<view class="userinfoonebox">
|
||||
<view class="userinfooneboxitem flex-between">
|
||||
<view class="userinfooneboxitem flex-between" @click="clickinfo(item,index)"
|
||||
v-for="(item,index) in teblist" :key="index">
|
||||
<view class="userinfooneboxitemleft flex-start">
|
||||
<image src="@/static/ewm.png" mode="aspectFill"></image>
|
||||
<text>优惠券</text>
|
||||
<image :src="item.shareImg" mode="aspectFill"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<listitem></listitem>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
import listitem from "@/components/listitem.vue";
|
||||
export default {
|
||||
components: {
|
||||
listitem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shopUser: {},
|
||||
userInfo: {},
|
||||
shopInfo: {}
|
||||
shopInfo: {},
|
||||
teblist: []
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (uni.cache.get('token')) {
|
||||
this.loginwxuserInfo()
|
||||
this.tbPlatformDict()
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
blurname(e) {
|
||||
console.log(e);
|
||||
this.userlist.nickname = e.detail.value
|
||||
clickinfo(item, index) {
|
||||
switch (item.jumpType) {
|
||||
case 'scan': //拉起相机
|
||||
this.form.type = item.value
|
||||
break;
|
||||
case 'relative': //内部页面
|
||||
uni.pro.navigateTo(relUrl)
|
||||
break;
|
||||
case 'absolute': //外链url
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/webview?url=${item.menuUrl}`
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
async loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
shopId: uni.cache.get('shopUser').shopId
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('userInfo', res.data.userInfo);
|
||||
uni.cache.set('shopUser', res.data.shopUser);
|
||||
uni.cache.set('shopInfo', res.data.shopInfo);
|
||||
this.shopUser = uni.cache.get('shopUser')
|
||||
uni.cache.set('userInfo', res.data);
|
||||
this.userInfo = uni.cache.get('userInfo')
|
||||
this.shopInfo = uni.cache.get('shopInfo')
|
||||
}
|
||||
},
|
||||
async tbPlatformDict() {
|
||||
let res = await this.api.tbPlatformDict({
|
||||
type: 'ownMenu'
|
||||
})
|
||||
console.log(res)
|
||||
if (res.code == 0) {
|
||||
this.teblist = res.data
|
||||
}
|
||||
},
|
||||
// / 更换头像
|
||||
@@ -108,6 +126,7 @@
|
||||
width: 750rpx;
|
||||
background: #FFD158;
|
||||
border-radius: 0rpx 0rpx 40rpx 0rpx;
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
padding-left: $paddingSize;
|
||||
@@ -130,7 +149,7 @@
|
||||
.user-info-wrap::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
bottom:40rpx;
|
||||
bottom: 40rpx;
|
||||
right: 0;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
@@ -138,27 +157,32 @@
|
||||
text-align: center;
|
||||
background-image: radial-gradient(40rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
|
||||
}
|
||||
.userinfoone{
|
||||
|
||||
.userinfoone {
|
||||
position: relative;
|
||||
padding: 48rpx 28rpx;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
top: -40rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 40rpx 0 0rpx 0rpx;
|
||||
.userinfoonebox{
|
||||
|
||||
.userinfoonebox {
|
||||
padding: 32rpx 20rpx 32rpx 52rpx;
|
||||
border-radius: 22rpx;
|
||||
background: #FFFFFF;
|
||||
width: 100%;
|
||||
.userinfooneboxitem{
|
||||
|
||||
.userinfooneboxitem {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
.userinfooneboxitemleft{
|
||||
image{
|
||||
|
||||
.userinfooneboxitemleft {
|
||||
image {
|
||||
width: 41.33rpx;
|
||||
height:36.9rpx;
|
||||
height: 36.9rpx;
|
||||
}
|
||||
text{
|
||||
|
||||
text {
|
||||
margin-left: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
@@ -167,7 +191,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.userinfooneboxitem:nth-child(1){
|
||||
|
||||
.userinfooneboxitem:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user