fix(custom): 修复若干问题

This commit is contained in:
2024-03-07 18:55:38 +08:00
parent fbbdecf2e0
commit 714b980b28
21 changed files with 292 additions and 155 deletions

View File

@@ -125,12 +125,47 @@
<nut-grid :gutter="10" :border="false">
<nut-grid-item
:border="false"
v-for="(item, index) in store_menu_list"
:key="index"
:text="item.text"
@click="toPage(item.path)"
v-if="userInfo.data.permission.dd"
text="点单"
@click="toPage('/pages/admin/add_order/index')"
>
<IconFont size="50" :name="item.icon"></IconFont>
<IconFont
size="50"
:name="require('../../static/user/1-1.png')"
></IconFont>
</nut-grid-item>
<nut-grid-item
:border="false"
v-if="userInfo.data.permission.hx"
text="订单核销"
@click="toPage('/pages/admin/verify/index')"
>
<IconFont
size="50"
:name="require('../../static/user/1-2.png')"
></IconFont>
</nut-grid-item>
<nut-grid-item
:border="false"
v-if="userInfo.data.permission.tj"
text="订单统计"
@click="toPage('/pages/admin/order_manage/index')"
>
<IconFont
size="50"
:name="require('../../static/user/1-3.png')"
></IconFont>
</nut-grid-item>
<nut-grid-item
:border="false"
v-if="userInfo.data.permission.tx"
text="收益提现"
@click="toPage('/pages/admin/withdrawal/index')"
>
<IconFont
size="50"
:name="require('../../static/user/1-4.png')"
></IconFont>
</nut-grid-item>
</nut-grid>
</view>
@@ -166,6 +201,7 @@ interface UserInfo {
bid?: string;
phone?: string;
uid?: string;
permission?: any;
};
store_status?: number;
store_name?: string;
@@ -189,8 +225,14 @@ const getUserInfo = async () => {
title: "加载中",
});
const res = await getPersonalInfo();
userInfo.value = res.data;
Taro.setStorageSync("userInfo", res.data);
userInfo.value = {
...res.data,
data: {
...res.data.data,
permission: JSON.parse(res.data.data.permission),
},
};
Taro.setStorageSync("userInfo", userInfo.value);
isLogin.value = true;
cancelLogin();
Taro.hideLoading();
@@ -218,9 +260,9 @@ const toOrderList = (e: number) => {
const userMenuList = ref([
{
id: 0,
label: "挂帐订单",
label: "后结订单",
url: "/pages/users/pending_order/index",
icon: "http://article.biliimg.com/bfs/article/131eda0add8662808d97ffb1191d19bf3e420647.png",
icon: require("../../static/user/dd.png"),
},
{
id: 1,
@@ -254,34 +296,6 @@ const userMenuList = ref([
// }
]);
const store_menu_list = ref([
{
text: "点单",
path: "/pages/admin/add_order/index",
icon: "https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png",
},
{
text: "订单核销",
path: "/pages/admin/verify/index",
icon: "https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png",
},
{
text: "订单统计",
path: "/pages/admin/order_manage/index",
icon: "https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png",
},
{
text: "收益提现",
path: "/pages/admin/withdrawal/index",
icon: "https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png",
},
// {
// text: '商品管理',
// path: '/pages/product/list/index',
// icon: 'https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png'
// },
]);
const toSetting = () => {
Taro.navigateTo({
url: "/pages/users/setting/index",