diff --git a/App.vue b/App.vue index 043e271..76b2358 100644 --- a/App.vue +++ b/App.vue @@ -89,4 +89,46 @@ page { word-break: break-all; overflow: hidden; } + + + +@keyframes warn { + 0% { + transform: scale(.5); + opacity: 1 + } + + 30% { + opacity: .7 + } + + to { + transform: scale(2.5); + opacity: 0 + } +} + +.warn-state { + display: inline-block; + width: 8px; + height: 8px; + border-radius: 50%; + vertical-align: middle +} + +.warn-status-processing { + position: relative +} + +.warn-status-processing:after { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: 50%; + background: inherit; + content: ""; + animation: warn 1.2s ease-in-out infinite +} diff --git a/api/store/coupon.js b/api/store/coupon.js index 4d237d4..529d4e9 100644 --- a/api/store/coupon.js +++ b/api/store/coupon.js @@ -29,5 +29,13 @@ export default { }, + UserGetList(data) { + return request({ + url: "/admin/Coupon/UserGetList", + method: "POST", + data, + type: 'store' + }); + }, }; \ No newline at end of file diff --git a/api/store/discount.js b/api/store/discount.js new file mode 100644 index 0000000..52561b9 --- /dev/null +++ b/api/store/discount.js @@ -0,0 +1,91 @@ +import { + request +} from "@/utils/request"; + +export default { + + SalesDiscounts: { + + List(data) { + return request({ + url: "/admin/SalesDiscounts/List", + method: "GET", + data, + type: 'store' + }); + }, + GetItem(data) { + return request({ + url: "/admin/SalesDiscounts/GetItem", + method: "GET", + data, + type: 'store' + }); + }, + Create(data) { + return request({ + url: "/admin/SalesDiscounts/Create", + method: "POST", + data, + type: 'store' + }); + }, + }, + + SalesFullDiscounts: { + + List(data) { + return request({ + url: "/admin/SalesFullDiscounts/List", + method: "GET", + data, + type: 'store' + }); + }, + GetItem(data) { + return request({ + url: "/admin/SalesFullDiscounts/GetItem", + method: "GET", + data, + type: 'store' + }); + }, + Create(data) { + return request({ + url: "/admin/SalesFullDiscounts/Create", + method: "POST", + data, + type: 'store' + }); + }, + }, + + SalesFullSetRedution: { + + List(data) { + return request({ + url: "/admin/SalesFullSetRedution/List", + method: "GET", + data, + type: 'store' + }); + }, + GetItem(data) { + return request({ + url: "/admin/SalesFullSetRedution/GetItem", + method: "GET", + data, + type: 'store' + }); + }, + Create(data) { + return request({ + url: "/admin/SalesFullSetRedution/Create", + method: "POST", + data, + type: 'store' + }); + }, + } + +}; \ No newline at end of file diff --git a/api/store/recharge.js b/api/store/recharge.js new file mode 100644 index 0000000..46c1e6a --- /dev/null +++ b/api/store/recharge.js @@ -0,0 +1,52 @@ +import { + request +} from "@/utils/request"; + +export default { + List(data) { + return request({ + url: "/admin/recharge/List", + method: "GET", + data, + type: 'store' + }); + }, + + save(data) { + return request({ + url: "/admin/recharge/save", + method: "GET", + data, + type: 'store' + }); + }, + + recharge_list(data) { + return request({ + url: "/admin/recharge/recharge_list", + method: "GET", + data, + type: 'store' + }); + }, + + rechargeSet: { + list(data) { + return request({ + url: "/admin/rechargeSet/list", + method: "GET", + data, + type: 'store' + }); + }, + save(data) { + return request({ + url: "/admin/rechargeSet/save", + method: "GET", + data, + type: 'store' + }); + }, + } + +}; \ No newline at end of file diff --git a/components/yList/index.vue b/components/yList/index.vue index 8be3820..12a4829 100644 --- a/components/yList/index.vue +++ b/components/yList/index.vue @@ -5,7 +5,7 @@ - + @@ -56,6 +56,10 @@ const props = defineProps({ height: { type: String, default: "100vh" + }, + noPageSize: { + type: Boolean, + default: false } }); @@ -86,14 +90,23 @@ const getData = async () => { ...props.params }); - if (res.data.rows.length) { - query.value.pageSize = res.data.pageSize; - total.value = res.data.total; - list.value = [...list.value, ...res.data.rows]; + if (props.noPageSize) { + if (res.data?.length) { + list.value = res.data + } else { + toast.success('全部加载完了'); + } } else { - toast.success('全部加载完了'); + if (res.data.rows.length) { + query.value.pageSize = res.data.pageSize; + total.value = res.data.total; + list.value = [...list.value, ...res.data.rows]; + } else { + toast.success('全部加载完了'); + } } + loading.value = false; firstLoading.value = true; }; @@ -111,15 +124,29 @@ const upData = async (upParams = {}) => { query.value.page = 1; query.value.pageSize = 20; + list.value = [] + const res = await props.apiObj({ ...query.value, ...props.params, ...upParams }); - query.value.pageSize = res.data.pageSize; - total.value = res.data.total; - list.value = res.data.rows; + if (props.noPageSize) { + if (res.data?.length) { + list.value = res.data + } else { + toast.success('全部加载完了'); + } + } else { + if (res.data.rows.length) { + query.value.pageSize = res.data.pageSize; + total.value = res.data.total; + list.value = res.data.rows; + } else { + toast.success('全部加载完了'); + } + } loading.value = false; }; diff --git a/pages.json b/pages.json index 73d8e96..4a07f09 100644 --- a/pages.json +++ b/pages.json @@ -29,6 +29,18 @@ } } }, + { + "path": "function/index", + "style": { + "navigationBarTitleText": "应用中心", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, { "path": "goods/index", "style": { @@ -89,6 +101,138 @@ } } }, + { + "path": "coupon/userCoupon", + "style": { + "navigationBarTitleText": "领取记录", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "discount/discount/index", + "style": { + "navigationBarTitleText": "限时折扣", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "discount/discount/edit", + "style": { + "navigationBarTitleText": "限时折扣", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "discount/full_discount/index", + "style": { + "navigationBarTitleText": "梯度折扣", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "discount/full_discount/edit", + "style": { + "navigationBarTitleText": "梯度折扣", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "discount/full_set_redution/index", + "style": { + "navigationBarTitleText": "满额立减", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "discount/full_set_redution/edit", + "style": { + "navigationBarTitleText": "满额立减", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "recharge/index", + "style": { + "navigationBarTitleText": "充值管理", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "recharge/edit", + "style": { + "navigationBarTitleText": "充值方案", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "recharge/userRecharge", + "style": { + "navigationBarTitleText": "充值记录", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "recharge/setUp", + "style": { + "navigationBarTitleText": "设置", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, { "path": "inpersonPay/index", "style": { diff --git a/store/components/myTabbar/index.vue b/store/components/myTabbar/index.vue index 5f50bf1..d4a6a4f 100644 --- a/store/components/myTabbar/index.vue +++ b/store/components/myTabbar/index.vue @@ -3,7 +3,9 @@ - + + diff --git a/store/coupon/index.vue b/store/coupon/index.vue index c9474d3..1a85d8a 100644 --- a/store/coupon/index.vue +++ b/store/coupon/index.vue @@ -27,6 +27,10 @@ 新增券 + + + 领取记录 + + + + + + + {{ ["优惠券", "商品", "分类", "当面付"][item.coupon.coupon_type] }} · 可用 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/store/discount/discount/edit.vue b/store/discount/discount/edit.vue new file mode 100644 index 0000000..4b1b893 --- /dev/null +++ b/store/discount/discount/edit.vue @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + 如商品单价100,折扣比例40 (4折),仅需付40元 + + + + + + + + + + + + + + + + + + + + + + 保存 + + + + + + + + + + diff --git a/store/discount/discount/index.vue b/store/discount/discount/index.vue new file mode 100644 index 0000000..523ec4f --- /dev/null +++ b/store/discount/discount/index.vue @@ -0,0 +1,247 @@ + + + + + + + + + + + + {{ searchType }} + + + + + + + + + 新增折扣 + + + + + + + + + + + + + + + + + + + ID:{{ item?.id }} + + + + + + + + 折扣名称:{{ item.name }} + 折扣:{{ item.discount || 0 }} + + + + + + 时间: + {{ utils.dateFormat(item.start_time * 1000) }} - {{ + utils.dateFormat(item.end_time * 1000) }} + + + + + + + + + + + + {{ ["关闭", "开启", "已取消"][item.status] }} + + + + + 编辑 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/store/discount/full_discount/edit.vue b/store/discount/full_discount/edit.vue new file mode 100644 index 0000000..207eab2 --- /dev/null +++ b/store/discount/full_discount/edit.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + 如商品单价100,折扣比例40 (4折),仅需付40元 + + + + + + + + + + + + 保存 + + + + + + + + + + diff --git a/store/discount/full_discount/index.vue b/store/discount/full_discount/index.vue new file mode 100644 index 0000000..bf8e04a --- /dev/null +++ b/store/discount/full_discount/index.vue @@ -0,0 +1,237 @@ + + + + + + + + + + + + {{ searchType }} + + + + + + + + + 新增折扣 + + + + + + + + + + + + + + + + + + + ID:{{ item?.id }} + + + + + + + + 折扣名称:{{ item.name }} + 折扣:{{ item.fullDiscount || 0 }} + + + + + + + + + + {{ ["关闭", "开启", "已取消"][item.status] }} + + + + + 编辑 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/store/discount/full_set_redution/edit.vue b/store/discount/full_set_redution/edit.vue new file mode 100644 index 0000000..a8fa935 --- /dev/null +++ b/store/discount/full_set_redution/edit.vue @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 如商品单价100,折扣比例40 (4折),仅需付40元 + + + + + + + + + + + + + + + + + + + + + + 保存 + + + + + + + + + + diff --git a/store/discount/full_set_redution/index.vue b/store/discount/full_set_redution/index.vue new file mode 100644 index 0000000..1f4a273 --- /dev/null +++ b/store/discount/full_set_redution/index.vue @@ -0,0 +1,247 @@ + + + + + + + + + + + + {{ searchType }} + + + + + + + + + 新增折扣 + + + + + + + + + + + + + + + + + + + ID:{{ item?.id }} + + + + + + + + 折扣名称:{{ item.name }} + 满减金额:{{ item.full_price || 0 }} + 折扣:{{ item.discount || 0 }} + + + + + 时间: + {{ utils.dateFormat(item.start_time * 1000) }} - {{ + utils.dateFormat(item.end_time * 1000) }} + + + + + + + + + + + + {{ ["关闭", "开启", "已取消"][item.status] }} + + + + + 编辑 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/store/function/index.vue b/store/function/index.vue new file mode 100644 index 0000000..7e0e4b7 --- /dev/null +++ b/store/function/index.vue @@ -0,0 +1,187 @@ + + + + + + + + + + + + 基础功能 + + + + + + + 商品分类 + + + + 商品管理 + + + + + + + + + + + + + + + + 订单管理 + + + + + + 普通订单 + + + + 售后订单 + + + + 当面付订单 + + + + + + + + + + + + + + 折扣管理 + + + + + + 限时折扣 + + + + 梯度折扣 + + + + 满额立减 + + + + + + + + + + + + + + + + + + 更多功能 + + + + + + 优惠券 + + + + 核销记录 + + + + 会员管理 + + + + 会员等级 + + + + + + + + + + + + + + + + + + + + + diff --git a/store/index/index.vue b/store/index/index.vue index eeda778..52407dd 100644 --- a/store/index/index.vue +++ b/store/index/index.vue @@ -24,7 +24,7 @@ - 用户管理 + 会员管理 @@ -34,31 +34,6 @@ - - 等级管理 - - - - - - - - - - - 分类管理 - - - - - - - - - 商品管理 @@ -71,18 +46,6 @@ - - 商城订单 - - - - - - - - - 核销记录 @@ -90,51 +53,14 @@ - + - - 当面付 - - - - - - - - - - - 优惠券 - - - - - - - - - - - - + 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/user/list.vue b/store/user/list.vue index 488040e..4c15aef 100644 --- a/store/user/list.vue +++ b/store/user/list.vue @@ -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