feat(custom): build

This commit is contained in:
2023-11-28 17:59:45 +08:00
parent 22868fdf2c
commit d5c4651665
39 changed files with 5779 additions and 10624 deletions

View File

@@ -7,16 +7,16 @@
>
<view class="user-center-card__header__avatar">
<nut-avatar size="large">
<img :src="userInfo.avatarUrl" />
<img :src="userInfo.data?.avatarUrl" />
</nut-avatar>
</view>
<view class="user-center-card__header__info">
<view
class="user-center-card__header__info__name"
@click="toPage('/pages/users/user_setting/index')"
>{{ userInfo.nickName }}
>{{ userInfo.data?.nickName }}
</view>
<view v-if="!userInfo.phone">
<view v-if="!userInfo.data?.phone">
<nut-button
size="mini"
open-type="getPhoneNumber"
@@ -118,7 +118,10 @@
</view>
<!-- 商家管理 -->
<view class="mer-box" v-if="userInfo.bid">
<view
class="mer-box"
v-if="userInfo.data?.bid && userInfo.store_status === 1"
>
<nut-grid :gutter="10" :border="false">
<nut-grid-item
:border="false"
@@ -184,12 +187,16 @@ const isShowLogin = ref(false);
const isLogin = ref(false);
interface UserInfo {
nickName?: string;
avatarUrl?: string;
ID?: string;
bid?: string;
phone?: string;
uid?: string;
data?: {
nickName?: string;
avatarUrl?: string;
ID?: string;
bid?: string;
phone?: string;
uid?: string;
};
store_status?: number;
store_name?: string;
}
const userInfo = ref<UserInfo>({});
@@ -210,9 +217,8 @@ const getUserInfo = async () => {
title: "加载中",
});
const res = await getPersonalInfo();
userInfo.value = res.data.data;
Taro.setStorageSync("userInfo", res.data.data);
Taro.setStorageSync("mer_type", res.data.store_type);
userInfo.value = res.data;
Taro.setStorageSync("userInfo", res.data);
isLogin.value = true;
cancelLogin();
Taro.hideLoading();
@@ -220,7 +226,7 @@ const getUserInfo = async () => {
const getphonenumber = async (e: any) => {
await getPhone({
uid: userInfo.value.uid,
uid: userInfo.value.data?.uid,
code: e.detail.code,
});
await getUserInfo();