diff --git a/src/store/seller/index.ts b/src/store/seller/index.ts index e8be198b..3ca93278 100644 --- a/src/store/seller/index.ts +++ b/src/store/seller/index.ts @@ -5,9 +5,20 @@ import { Https } from '@/tool/https' import { ApplyStatus } from "./index.d" import store from '../index' +interface DesignerInfo { + shopName: string, + avatar: string, + brandBanner: string, + ownerName: string, + email: string, + mobile: string, + socialLinks: string, + description: string, +} interface Seller { isSeller: boolean, applyStatus: number, + designerInfo: DesignerInfo, } const seller: Module = { @@ -15,6 +26,16 @@ const seller: Module = { state: { isSeller: false, applyStatus: null, + designerInfo: { + shopName: "--", + avatar: null, + brandBanner: null, + ownerName: "--", + email: "--", + mobile: "--", + socialLinks: ["--"], + description: "--" + }, }, mutations: { set_isSeller(state: Seller, value: boolean) { @@ -26,13 +47,24 @@ const seller: Module = { state.isSeller = true } }, + set_designerInfo(state: Seller, value: DesignerInfo) { + state.designerInfo = { + ...value, + socialLinks: JSON.parse(value.socialLinks) + } + }, }, actions: { get_isSeller({ commit }) { - // Https.axiosGet(Https.httpUrls.checkSellerDesigner).then(rv => { - // commit('set_isSeller', !!rv) - // }) + Https.axiosGet(Https.httpUrls.checkSellerDesigner).then(rv => { + commit('set_isSeller', !!rv) + }) + }, + async get_designerInfo({ commit }) { + const rv = await Https.axiosGet(Https.httpUrls.getDesignerInfo) + commit('set_designerInfo', rv) + return rv }, } } diff --git a/src/tool/https.js b/src/tool/https.js index 37bd2e8a..3c734e5a 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -477,6 +477,8 @@ export const Https = { checkSellerDesigner: '/seller/designer/check', // 检查卖家是否为设计师 getSellerApplyStatus: '/seller/designer/apply/status', // 获取卖家申请状态 submitSellerApply: '/seller/designer/apply', // 提交卖家申请 + getDesignerInfo: '/seller/designer/info', // 获取设计师信息 + updateDesignerInfo: '/seller/designer/update', // 更新设计师信息 getSellerOrderSummary: '/seller/order/summary', // 获取卖家订单数据总览 getSellerOrderList: '/seller/order/page', // 获取卖家订单列表 getListingPopup: '/seller/listing/popup/check', // 获取是否勾选发布作品提示 diff --git a/src/views/SellerDashboard/BrandProfile/brand-info.vue b/src/views/SellerDashboard/BrandProfile/brand-info.vue index 1c9d8f15..709cbaea 100644 --- a/src/views/SellerDashboard/BrandProfile/brand-info.vue +++ b/src/views/SellerDashboard/BrandProfile/brand-info.vue @@ -2,20 +2,20 @@
- + {{ formData.storeName.length }}/80{{ formData.shopName.length }}/80 - + @@ -30,10 +30,10 @@ :readonly="!isEdit" /> - + @@ -43,9 +43,9 @@ @@ -82,6 +82,9 @@