diff --git a/src/api/user/index.ts b/src/api/user/index.ts index f87af33..28e6353 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -10,6 +10,7 @@ enum URL { login = '/wc/wechat/LoginByMa', loginByCode = '/wc/wechat/LoginByMaCode', register = '/wc/wechat/register', + uploadAvatar = '/wc/wechat/uploadImage', logout = '/user/logout', profile = '/user/profile', addressList = '/ext/addr/list', diff --git a/src/pages/mall/subs/search/index.vue b/src/pages/mall/subs/search/index.vue index 2a51128..e221003 100644 --- a/src/pages/mall/subs/search/index.vue +++ b/src/pages/mall/subs/search/index.vue @@ -7,10 +7,10 @@ - - + + + @click.stop='goPath(`/pages/mall/subs/goods/detail?goodsId=${item.goodsId}`)'> {{ item.goodsName }} ¥{{ item.price }} @@ -72,6 +72,7 @@ const goodsList = ref([1, 2, 3, 4, 1, 2, 2, 2]); flex-direction: column; position: relative; padding: 10rpx 10rpx; + background: #333333; flex: 1; .goods-image { diff --git a/src/pages/mine/subs/address/index.vue b/src/pages/mine/subs/address/index.vue index 7f880c5..5254e56 100644 --- a/src/pages/mine/subs/address/index.vue +++ b/src/pages/mine/subs/address/index.vue @@ -21,15 +21,7 @@ const addressList = ref<{ mobile: string, address: string, status: number -}[]>([{ - name: '黄先生', - mobile: '13xxxxxx8900', - status: 1 -}, { - name: '李先生', - mobile: '13xxxxxx8900', - status: 0 -}]); +}[]>([]); onLoad((e) => { fetchAddressList(); diff --git a/src/pages/mine/subs/profile/index.vue b/src/pages/mine/subs/profile/index.vue index bd77a16..e26e874 100644 --- a/src/pages/mine/subs/profile/index.vue +++ b/src/pages/mine/subs/profile/index.vue @@ -3,7 +3,7 @@ - {{userInfo.nickName}} + {{ userInfo.nickName }} 会员卡 @@ -12,19 +12,19 @@ 头像 - + diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index f3b693a..7daa43a 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -8,13 +8,17 @@ const useUserStore = defineStore('user', { state: (): UserState => ({ id: '', unionId: '', + openId: '', + maOpenId: '', name: '未登录', nickName: '未登录', image: '', telephone: '', + gender: 0, balance: 0, integration: 0, birthday: '', + creatorId: '', companyId: '' }), diff --git a/src/utils/common/index.ts b/src/utils/common/index.ts index 421374d..ab73a65 100644 --- a/src/utils/common/index.ts +++ b/src/utils/common/index.ts @@ -27,7 +27,7 @@ export function mpUpdate() { }); } -export function showToast(title: string, icon: 'none' | 'success' | 'loading' | 'error' | 'fail' | 'exception' | undefined, duration: number = 2000) { +export function showToast(title: string, icon: 'none' | 'success' | 'loading' | 'error' | 'fail' | 'exception' | undefined = 'none', duration: number = 2000) { uni.showToast({ title, icon,