卖家端申请接口。人口

This commit is contained in:
李志鹏
2026-04-24 16:57:13 +08:00
parent 071930f257
commit e4fc51c574
9 changed files with 149 additions and 62 deletions

40
src/store/seller/index.ts Normal file
View File

@@ -0,0 +1,40 @@
import { Module } from 'vuex'
import { RootState } from '../index'
import i18n from "@/lang/index";
import { Https } from '@/tool/https'
import { ApplyStatus } from "./index.d"
import store from '../index'
interface Seller {
isSeller: boolean,
applyStatus: number,
}
const seller: Module<Seller, RootState> = {
namespaced: true,
state: {
isSeller: false,
applyStatus: null,
},
mutations: {
set_isSeller(state: Seller, value: boolean) {
state.isSeller = value
},
set_applyStatus(state: Seller, value: number) {
state.applyStatus = value
if (value == ApplyStatus.Approved) {
state.isSeller = true
}
},
},
actions: {
get_isSeller({ commit }) {
Https.axiosGet(Https.httpUrls.checkSellerDesigner).then(rv => {
commit('set_isSeller', !!rv)
})
},
}
}
export default seller