@@ -48,7 +48,9 @@
style="margin-right: 8px;">下架
上架
- 编辑
+ 编辑
+ 删除
@@ -65,6 +67,7 @@
+
@@ -72,8 +75,11 @@
import { ref } from 'vue'
import { useToast } from '@/uni_modules/wot-design-uni'
import yList from "/components/yList/index.vue"
-import goods from '@/api/store/goods.js'
+import goodsApi from '@/api/store/goods.js'
import utils from '@/utils/utils.js'
+import { useMessage } from '@/uni_modules/wot-design-uni';
+import { useApi } from "@/hooks/useApi.js"
+const message = useMessage();
import {
onLoad,
@@ -132,8 +138,10 @@ function changeSearchType({ item, index }) {
})
}
-const changeS = (row) => {
- goods.goodsEditAttribute({
+const changeS = async (row) => {
+ const { fetchData } = await useApi(goodsApi.goodsEditAttribute)
+
+ fetchData({
id: row.id,
value: [1, 0][row.status],
type: "status"
@@ -143,15 +151,41 @@ const changeS = (row) => {
toast.success('操作成功')
row.status = [1, 0][row.status]
} else {
- showNotify({ type: 'error', message: '出错了' })
+ toast.error('出错了')
}
})
}
+
+const delGoods = (row) => {
+ message
+ .confirm({
+ title: '删除商品',
+ })
+ .then(async (resp) => {
+ const { fetchData } = await useApi(goodsApi.goodsDel)
+
+ fetchData({
+ id: row.id,
+ }).then(res => {
+ if (res.code == 0) {
+ toast.success('操作成功')
+ search({ value: params.value.keywords })
+ } else {
+ toast.error('出错了')
+ }
+
+ })
+ })
+ .catch((error) => {
+ console.log(error);
+ });
+}
+
const classifyList = ref([])
const getClassify = () => {
- goods.classify.list().then(res => {
+ goodsApi.classify.list().then(res => {
classifyList.value = res.data
classifyList.value.unshift({
id: 0,
diff --git a/store/index/index.vue b/store/index/index.vue
index 3b3c1ce..52407dd 100644
--- a/store/index/index.vue
+++ b/store/index/index.vue
@@ -3,10 +3,20 @@
-
+
+
+
+
+
+
+ {{ store_info?.info?.name + ' [ 商城 ]' || '商城首页' }}
+
+
+
+
@@ -14,7 +24,7 @@
- 用户管理
+ 会员管理
@@ -24,31 +34,6 @@
-
-
-
- 分类管理
-
-
-
-
-
-
-
-
-
商品管理
@@ -61,18 +46,6 @@
-
- 订单管理
-
-
-
-
-
-
-
-
-
核销记录
@@ -80,45 +53,14 @@
-
-
-
-
-
-
- 当面付订单
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
@@ -214,7 +156,7 @@ const loading = ref(false);
/**
* 从本地存储中获取用户信息
*/
-const user_info = uni.getStorageSync("user_info");
+const store_info = uni.getStorageSync("store_info");
/**
* @type {Ref
-
+
diff --git a/store/recharge/edit.vue b/store/recharge/edit.vue
new file mode 100644
index 0000000..ef6a4bf
--- /dev/null
+++ b/store/recharge/edit.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
diff --git a/store/recharge/index.vue b/store/recharge/index.vue
new file mode 100644
index 0000000..cb310f4
--- /dev/null
+++ b/store/recharge/index.vue
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+ 添加充值方案
+
+
+
+
+ 充值记录
+
+
+
+
+ 设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID: {{ recharge.id }}
+
+
+
+
+
+
+
+
+
+ {{ recharge.name }}
+
+
+
+
+ 支付金额: {{ recharge.money }} 元
+
+
+
+ 赠送金额: {{ recharge.gift_money }} 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/store/recharge/setUp.vue b/store/recharge/setUp.vue
new file mode 100644
index 0000000..efea0d6
--- /dev/null
+++ b/store/recharge/setUp.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+ 开启自定义金额:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
diff --git a/store/recharge/userRecharge.vue b/store/recharge/userRecharge.vue
new file mode 100644
index 0000000..3bfde84
--- /dev/null
+++ b/store/recharge/userRecharge.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ID:{{ item.id || 0 }}
+
+
+
+ 订单号:{{ item.order_no }}
+
+
+
+
+
+ 充值用户:{{ item?.user?.nickname }}
+ 充值时间:{{ item?.create_time }}
+
+
+
+
+
+
+
+
+ 支付金额:¥ {{ item.pay_price || 0 }}
+ 赠送金额:¥ {{ item.gift_money || 0 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/store/setup/index.vue b/store/setup/index.vue
index 4c1bfde..ac9f93a 100644
--- a/store/setup/index.vue
+++ b/store/setup/index.vue
@@ -3,7 +3,7 @@
-
+
退出登录
@@ -150,7 +150,7 @@ import utils from '@/utils/utils.js'
/**
* 从本地存储中获取用户信息
*/
-const user_info = uni.getStorageSync("user_info");
+const store_info = uni.getStorageSync("store_info");
export default {
components: {
@@ -159,7 +159,7 @@ export default {
data() {
return {
utils,
- user_info,
+ store_info,
// 表单数据
storeData: {
name: '',
diff --git a/store/shop/list.vue b/store/shop/list.vue
index 83b7972..8ccc187 100644
--- a/store/shop/list.vue
+++ b/store/shop/list.vue
@@ -1,13 +1,6 @@
-
@@ -38,7 +31,12 @@
开启
编辑
+ style="margin-right: 8px;">编辑
+
+
管理
+
+
@@ -63,6 +61,7 @@
import { ref } from 'vue';
import utils from '@/utils/utils.js';
import shop from '@/api/store/shop.js';
+import system from '@/api/modules/system.js';
import myTabbar from "../components/myTabbar/index.vue";
import kevyloading from "@/components/kevy-loading/kevy-loading";
import { useMessage } from '@/uni_modules/wot-design-uni';
@@ -106,7 +105,6 @@ const changeS = async (row) => {
})
}
})
-
}
const syncGoods = (row) => {
@@ -132,7 +130,6 @@ const syncGoods = (row) => {
});
};
-
/**
* 获取数据的函数
*/
@@ -145,6 +142,33 @@ const getShopList = () => {
});
};
+const tableLogin = async (id) => {
+ console.log(system);
+ try {
+ const res = await system.loginShop({
+ shop_id: id
+ });
+
+ if (res.code === 0) {
+ uni.setStorageSync("mall_token", res.data.access_token);
+ uni.setStorageSync("mall_info", res.data.user_info);
+ // uni.showToast({
+ // icon: "none",
+ // title: "登录成功",
+ // });
+ utils.toUrl("/mall/index/index")
+ } {
+ uni.showToast({
+ title: menu.message,
+ icon: "none"
+ });
+ return false;
+ }
+ } catch (error) {
+ return false;
+ }
+}
+
// 初始化调用获取一行数据
onShow(() => {
getShopList();
diff --git a/store/shop/to.vue b/store/shop/to.vue
new file mode 100644
index 0000000..1bd68a6
--- /dev/null
+++ b/store/shop/to.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+ {{ shop.name }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/store/user/edit.vue b/store/user/edit.vue
index 9fd27b8..56adfdf 100644
--- a/store/user/edit.vue
+++ b/store/user/edit.vue
@@ -25,7 +25,8 @@
v {{ userInfo.user_merge.member_level }}
-
修改等级
+
修改等级
diff --git a/store/user/editMember.vue b/store/user/editMember.vue
index c7f8c75..41ea3f0 100644
--- a/store/user/editMember.vue
+++ b/store/user/editMember.vue
@@ -20,7 +20,7 @@
-
+
diff --git a/store/user/list.vue b/store/user/list.vue
index 06a10f3..4c15aef 100644
--- a/store/user/list.vue
+++ b/store/user/list.vue
@@ -31,7 +31,7 @@
-
+
@@ -95,10 +95,10 @@
-
+
diff --git a/uni.scss b/uni.scss
index b9249e9..883c67e 100644
--- a/uni.scss
+++ b/uni.scss
@@ -21,32 +21,32 @@ $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
-$uni-text-color:#333;//基本色
-$uni-text-color-inverse:#fff;//反色
-$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color: #333; //基本色
+$uni-text-color-inverse: #fff; //反色
+$uni-text-color-grey: #999; //辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
-$uni-text-color-disable:#c0c0c0;
+$uni-text-color-disable: #c0c0c0;
/* 背景颜色 */
-$uni-bg-color:#ffffff;
-$uni-bg-color-grey:#f8f8f8;
-$uni-bg-color-hover:#f1f1f1;//点击状态颜色
-$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+$uni-bg-color: #ffffff;
+$uni-bg-color-grey: #f8f8f8;
+$uni-bg-color-hover: #f1f1f1; //点击状态颜色
+$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
/* 边框颜色 */
-$uni-border-color:#c8c7cc;
+$uni-border-color: #c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
-$uni-font-size-sm:12px;
-$uni-font-size-base:14px;
-$uni-font-size-lg:16px;
+$uni-font-size-sm: 12px;
+$uni-font-size-base: 14px;
+$uni-font-size-lg: 16px;
/* 图片尺寸 */
-$uni-img-size-sm:20px;
-$uni-img-size-base:26px;
-$uni-img-size-lg:40px;
+$uni-img-size-sm: 20px;
+$uni-img-size-base: 26px;
+$uni-img-size-lg: 40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
@@ -69,8 +69,8 @@ $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
-$uni-font-size-title:20px;
+$uni-font-size-title: 20px;
$uni-color-subtitle: #555555; // 二级标题颜色
-$uni-font-size-subtitle:26px;
+$uni-font-size-subtitle: 26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
-$uni-font-size-paragraph:15px;
+$uni-font-size-paragraph: 15px;
\ No newline at end of file
diff --git a/uni_modules/wot-design-uni/changelog.md b/uni_modules/wot-design-uni/changelog.md
index e9fc741..ce11637 100644
--- a/uni_modules/wot-design-uni/changelog.md
+++ b/uni_modules/wot-design-uni/changelog.md
@@ -1,18 +1,33 @@
-## 0.2.11(2024-01-09)
-### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09)
+## 0.2.13(2024-01-12)
+### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12)
### Bug Fixes | Bug 修复
-* 修复 Overlay 类型声明错误的问题 ([930e59a](https://github.com/Moonofweisheng/wot-design-uni/commit/930e59a9b09aee535ec4c316e44ed3c0e31be628))
+* 修复演示文档刷新后指向localhost的问题 ([4cd8b16](https://github.com/Moonofweisheng/wot-design-uni/commit/4cd8b16bdf5ea8e93cff85396025844e9ebd031c))
+
+# 更新日志
-### Documentation | 文档
+### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12)
-* 提供托管在Giteee上的文档网站 ([6d62e9e](https://github.com/Moonofweisheng/wot-design-uni/commit/6d62e9e7ddda0bd9f51f2ad9e2893f1ed3709c63))
-# 更新日志
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复演示文档刷新后指向localhost的问题 ([4cd8b16](https://github.com/Moonofweisheng/wot-design-uni/commit/4cd8b16bdf5ea8e93cff85396025844e9ebd031c))
+
+### [0.2.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.11...v0.2.12) (2024-01-11)
+
+
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复 Tabbar 错误地抛出提示信息的问题 ([1c89ed0](https://github.com/Moonofweisheng/wot-design-uni/commit/1c89ed0a7158e79556e83c6aeb89bd1e93e4ea0d))
+
+
+### ✏️ Documentation | 文档
+* ✏️ 增加 Circle 组件使用插槽的示例 ([6341594](https://github.com/Moonofweisheng/wot-design-uni/commit/6341594295732dac951c465d95537f36addbbf9c))
+* ✏️ 增加展示gitee的star徽标 ([1abf962](https://github.com/Moonofweisheng/wot-design-uni/commit/1abf962e37e27c1c1688bed2026c66022e63ce9b))
### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09)
diff --git a/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue b/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue
index 59b7675..84f17cf 100644
--- a/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue
+++ b/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue
@@ -51,8 +51,6 @@ interface Props {
customClass?: string
// 自定义style
customStyle?: string
- // 目标进度
- rate?: number | string
// 圆环直径,默认单位为 px
size?: number
// 进度条颜色,传入对象格式可以定义渐变色
@@ -80,16 +78,12 @@ const props = withDefaults(defineProps(), {
customClass: '',
// 自定义style
customStyle: '',
- // 目标进度
- rate: 100,
// 圆环直径,默认单位为 px
size: 100,
// 进度条颜色,传入对象格式可以定义渐变色
color: '#4d80f0',
// 轨道颜色
layerColor: '#EBEEF5',
- // 填充颜色
- fill: '#ffffff',
// 动画速度(单位为 rate/s)
speed: 50,
// 进度条宽度 默认单位px
diff --git a/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue b/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue
index 91a36b8..788706c 100644
--- a/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue
+++ b/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue
@@ -24,7 +24,7 @@ export default {
}