完成商城下单功能

This commit is contained in:
gxwebsoft
2024-05-27 01:24:02 +08:00
parent dea6ae1c23
commit 4bae8599e1
26 changed files with 803 additions and 129 deletions
+1 -25
View File
@@ -326,35 +326,11 @@ export const decrypt = (encrypt) => {
// 获取商户ID
export const getMerchantId = () => {
// 读取商户账号
const merchantId = localStorage.getItem('MerchantId');
const userId = localStorage.getItem('UserId');
if (Number(userId) == 3731) {
return undefined;
}
if (merchantId) {
return Number(merchantId);
}
// const tenantStore = useTenantStore();
// console.log(tenantStore);
// tenantStore.setMerchant({
// merchantId: merchantAccount.merchantId,
// merchantName: merchantAccount.merchantName
// });
// const phone = String(localStorage.getItem('Phone'));
// listMerchantAccount({ phone }).then((list) => {
// if (list.length == 0) {
// return;
// }
// const merchantAccount = list[0];
// const tenantStore = useTenantStore();
// tenantStore.setMerchant({
// merchantId: merchantAccount.merchantId,
// merchantName: merchantAccount.merchantName
// });
// localStorage.setItem('MerchantId', merchantAccount.merchantId + '');
// });
// return Number(merchantId);
return undefined;
};
// 获取当前登录用户ID