订单状态参数

parent 18f3a031
<script setup> <script setup>
import { getTokenUser } from './api/index'; import { getTokenUser } from './api/index';
import { sgyOrderGetStatus } from './api/order';
import testJson from './static/json/test.json'; import testJson from './static/json/test.json';
import { getToken } from './utils/auth'; import { getToken } from './utils/auth';
import { setOrderDic } from './utils/orderDic';
onLaunch(() => { onLaunch(() => {
if (!getToken()) signIn(); if (!getToken()) signIn();
console.log('App Launch'); sgyOrderGetStatus().then((res) => {
if (res.code === 0) {
setOrderDic(res.data.store);
}
});
}); });
onShow(() => { onShow(() => {
......
...@@ -278,7 +278,7 @@ const getMerchantList = () => { ...@@ -278,7 +278,7 @@ const getMerchantList = () => {
}); });
xma.showLoading({ xma.showLoading({
title: '加载中...', title: '加载中...',
mask: false, mask: true,
}); });
return merchantList(params.value).then((res) => { return merchantList(params.value).then((res) => {
if (res.data.content.length < params.value.size) { if (res.data.content.length < params.value.size) {
......
const TokenKey = 'ORDER_DICT';
export function getOrderDic() {
return xma.getStorageSync(TokenKey);
}
export function setOrderDic(token) {
return xma.setStorageSync(TokenKey, token);
}
export function removeOrderDic() {
return xma.removeStorageSync(TokenKey);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment