diff --git a/pages.json b/pages.json
index 95137fd..9dec229 100644
--- a/pages.json
+++ b/pages.json
@@ -12,7 +12,7 @@
"path": "pages/index/redirect"
},
{
- "path": "pages/order/list",
+ "path": "pages/index/order",
"style": {
"navigationBarTitleText": "订单"
},
@@ -115,54 +115,70 @@
}
},
{
- "path": "wallet/withdraw",
- "style": {
- "navigationBarTitleText": "提现"
- },
- "meta": {
- "auth": true
- }
+ "path": "wallet/withdraw",
+ "style": {
+ "navigationBarTitleText": "提现"
+ },
+ "meta": {
+ "auth": true
+ }
},
{
- "path": "point/buy",
- "style": {
- "navigationBarTitleText": "购买积分"
- },
- "meta": {
- "auth": true
- }
- }, {
- "path": "point/share",
- "style": {
- "navigationBarTitleText": "分发积分"
- },
- "meta": {
- "auth": true
- }
- }, {
- "path": "point/loglist",
- "style": {
- "navigationBarTitleText": "历史积分"
- },
- "meta": {
- "auth": true
- }
+ "path": "point/buy",
+ "style": {
+ "navigationBarTitleText": "购买积分"
+ },
+ "meta": {
+ "auth": true
+ }
+ },
+ {
+ "path": "point/share",
+ "style": {
+ "navigationBarTitleText": "分发积分"
+ },
+ "meta": {
+ "auth": true
+ }
+ },
+ {
+ "path": "point/loglist",
+ "style": {
+ "navigationBarTitleText": "历史积分"
+ },
+ "meta": {
+ "auth": true
+ }
}
]
},
{
- "root": "pages/product",
- "pages": [
- {
- "path": "manageGoods",
- "style": {
- "navigationBarTitleText": "商品管理"
- },
- "meta": {
- "auth": false
- }
- }
- ]
+ "root": "pages/product",
+ "pages": [
+ {
+ "path": "manageGoods",
+ "style": {
+ "navigationBarTitleText": "商品管理"
+ },
+ "meta": {
+ "auth": false
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/order",
+ "pages": [
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "订单详情"
+ },
+ "meta": {
+ "auth": true
+ }
+ }
+ ]
}
],
"tabBar": {
@@ -174,7 +190,7 @@
"pagePath": "pages/index/product"
},
{
- "pagePath": "pages/order/list"
+ "pagePath": "pages/index/order"
},
{
"pagePath": "pages/index/my"
diff --git a/pages/index/order.vue b/pages/index/order.vue
new file mode 100644
index 0000000..15e08c1
--- /dev/null
+++ b/pages/index/order.vue
@@ -0,0 +1,372 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 共 {{ totalNumsPerOrder(order) }} 件商品,总金额:
+ ¥{{ fen2yuan(totalPricePerOrder(order)) }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/product.vue b/pages/index/product.vue
index d9422aa..ce1ec4b 100644
--- a/pages/index/product.vue
+++ b/pages/index/product.vue
@@ -1,85 +1,213 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
-
+
+
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index 0afeca7..f5f0e81 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -1,6 +1,13 @@
-
+
{{ formatOrderStatus(state.orderInfo) }}
@@ -46,7 +53,7 @@
-
+
{{ state.orderInfo.receiverName }}
@@ -62,7 +69,7 @@
-
-
+
@@ -131,13 +138,13 @@
下单时间:
- {{ sheep.$helper.timeFormat(state.orderInfo.createTime, 'yyyy-mm-dd hh:MM:ss') }}
+ {{ peach.$helper.timeFormat(state.orderInfo.createTime, 'yyyy-mm-dd hh:MM:ss') }}
支付时间:
- {{ sheep.$helper.timeFormat(state.orderInfo.payTime, 'yyyy-mm-dd hh:MM:ss') }}
+ {{ peach.$helper.timeFormat(state.orderInfo.payTime, 'yyyy-mm-dd hh:MM:ss') }}
@@ -183,8 +190,8 @@
-
-
+
+
-
-
+
+
@@ -412,7 +421,8 @@ onLoad(async (options) => {
.state-box {
color: rgba(#fff, 0.9);
width: 100%;
- background: v-bind(headerBg) no-repeat, linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
+ background: url('/static/order/order_bg.png') no-repeat,
+ linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background-size: 750rpx 100%;
box-sizing: border-box;
diff --git a/pages/order/list.vue b/pages/order/list.vue
deleted file mode 100644
index 1ae6a2a..0000000
--- a/pages/order/list.vue
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 共 {{ totalNumsPerOrder(order) }} 件商品,总金额:
- ¥{{ fen2yuan(totalPricePerOrder(order)) }}
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/product/manageGoods.vue b/pages/product/manageGoods.vue
index b4252b5..28d98ca 100644
--- a/pages/product/manageGoods.vue
+++ b/pages/product/manageGoods.vue
@@ -1,245 +1,292 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/pages/user/wallet/money.vue b/pages/user/wallet/money.vue
index 87c4ccc..d5a3420 100644
--- a/pages/user/wallet/money.vue
+++ b/pages/user/wallet/money.vue
@@ -1,49 +1,62 @@
-
-
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+ +{{ fen2yuan(item.price) }}
+ {{ fen2yuan(item.price) }}
+
+
+
+ {{ peach.$helper.timeFormat(state.createTime, 'yyyy-mm-dd hh:MM:ss') }}
+
+
+
+
+
+
diff --git a/peach/api/trade/goods.js b/peach/api/trade/goods.js
index 4de984b..212664a 100644
--- a/peach/api/trade/goods.js
+++ b/peach/api/trade/goods.js
@@ -1,30 +1,38 @@
-import request from "@/peach/request";
+import request from '@/peach/request'
const GoodsApi = {
- // 商品详情
- getProduct: (data) => {
- return request({
- url: "/trade/order/page",
- method: "GET",
- params: data,
- });
- },
- // 添加商品
- addProduct: (data) => {
- return request({
- url: "/trade/order/page",
- method: "POST",
- data,
- });
- },
- // 修改商品
- editProduct: (data) => {
- return request({
- url: "/trade/order/page",
- method: "POST",
- data,
- });
- },
-};
+ // 商品列表
+ getProductList: (data) => {
+ return request({
+ url: '/product/spu/page',
+ method: 'GET',
+ params: data,
+ })
+ },
+ // 商品详情 spuIds
+ getProduct: (data) => {
+ return request({
+ url: '/product/spu/list',
+ method: 'GET',
+ params: data,
+ })
+ },
+ // 添加商品
+ addProduct: (data) => {
+ return request({
+ url: '/trade/order/page',
+ method: 'POST',
+ data,
+ })
+ },
+ // 修改商品
+ editProduct: (data) => {
+ return request({
+ url: '/trade/order/page',
+ method: 'POST',
+ data,
+ })
+ },
+}
-export default GoodsApi;
+export default GoodsApi
diff --git a/peach/api/trade/order.js b/peach/api/trade/order.js
index 75692c7..2bc0333 100644
--- a/peach/api/trade/order.js
+++ b/peach/api/trade/order.js
@@ -1,14 +1,23 @@
-import request from "@/peach/request";
+import request from '@/peach/request'
const OrderUtil = {
- // 获取订单列表
- getOrderPage: (data) => {
- return request({
- url: "/trade/order/page",
- method: "GET",
- params: data,
- });
- },
-};
+ // 获取订单列表
+ getOrderPage: (data) => {
+ return request({
+ url: '/trade/order/page',
+ method: 'GET',
+ params: data,
+ })
+ },
-export default OrderUtil;
+ // 订单详情
+ getOrderDetail: (data) => {
+ return request({
+ url: '/trade/order/get-detail',
+ method: 'GET',
+ params: data,
+ })
+ },
+}
+
+export default OrderUtil
diff --git a/peach/components/p-goods-column/p-goods-column.vue b/peach/components/p-goods-column/p-goods-column.vue
index b34f1cc..b9ff01b 100644
--- a/peach/components/p-goods-column/p-goods-column.vue
+++ b/peach/components/p-goods-column/p-goods-column.vue
@@ -1,176 +1,210 @@
-
-
-
-
-
-
- {{ data.title || data.name }}
-
-
- {{ data.subtitle || data.introduction }}
-
-
-
-
-
- {{ priceUnit }}
- {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
+
+
+
+
+
+
+ {{ data.title || data.name }}
+
+
+ {{ data.subtitle || data.introduction }}
+
+
+
+
+
+ {{ priceUnit }}
+ {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
+
+
+ {{ priceUnit }}
+ {{ fen2yuan(data.marketPrice) }}
+
+
+
+ {{ salesAndStock }}
+
+
-
- {{ priceUnit }}
- {{ fen2yuan(data.marketPrice) }}
-
-
-
- {{ salesAndStock }}
-
-
-
-
-
-
-
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/peach/components/p-goods-item/p-goods-item.vue b/peach/components/p-goods-item/p-goods-item.vue
index f4926c9..973dca8 100644
--- a/peach/components/p-goods-item/p-goods-item.vue
+++ b/peach/components/p-goods-item/p-goods-item.vue
@@ -8,7 +8,7 @@
:style="[{ borderRadius: radius + 'rpx', marginBottom: marginBottom + 'rpx' }]"
>
-
+
{
- /**
- * @description 应用信息
- * @param string name 应用名称
- * @param string logo 应用logo
- * @param string version 应用版本
- * @param string copyright 版权信息
- * @param string copyrightTime 版权时间
- * @param string cdnurl 静态资源域名
- * @param string filesystem 文件系统
- */
- const info = ref({
- name: "",
- logo: "",
- version: "",
- copyright: "",
- copytime: "",
- cdnurl: "",
- filesystem: "",
- });
+ 'app',
+ () => {
+ /**
+ * @description 应用信息
+ * @param string name 应用名称
+ * @param string logo 应用logo
+ * @param string version 应用版本
+ * @param string copyright 版权信息
+ * @param string copyrightTime 版权时间
+ * @param string cdnurl 静态资源域名
+ * @param string filesystem 文件系统
+ */
+ const info = ref({
+ name: '',
+ logo: '',
+ version: '',
+ copyright: '',
+ copytime: '',
+ cdnurl: '',
+ filesystem: '',
+ })
- /**
- * @description 平台信息
- * @param Array share.methods 分享方式
- * @param Object share.forwardInfo 转发信息
- * @param Object share.posterInfo 海报信息
- * @param string share.linkAddress 分享链接地址
- * @param number bindMobile 绑定手机号提醒 0: 提醒 1: 不提醒
- */
- const platform = ref({
- share: {
- methods: [],
- forwardInfo: {},
- posterInfo: {},
- linkAddress: "",
- },
- bindMobile: 0,
- });
-
- const chat = ref({});
-
- /**
- * @description 模板信息
- * @param Object basic 基础模板
- * @param Object tabbar 底部导航模板
- */
- const template = ref({
- basic: {
- tabbar: {
- items: [
- {
- activeIconUrl: "/static/a-index.png",
- iconUrl: "/static/index.png",
- text: "首页",
- url: "/pages/index/index",
+ /**
+ * @description 平台信息
+ * @param Array share.methods 分享方式
+ * @param Object share.forwardInfo 转发信息
+ * @param Object share.posterInfo 海报信息
+ * @param string share.linkAddress 分享链接地址
+ * @param number bindMobile 绑定手机号提醒 0: 提醒 1: 不提醒
+ */
+ const platform = ref({
+ share: {
+ methods: [],
+ forwardInfo: {},
+ posterInfo: {},
+ linkAddress: '',
},
- {
- activeIconUrl: "/static/a-product.png",
- iconUrl: "/static/product.png",
- text: "产品",
- url: "/pages/index/product",
+ bindMobile: 0,
+ })
+
+ const chat = ref({})
+
+ /**
+ * @description 模板信息
+ * @param Object basic 基础模板
+ * @param Object tabbar 底部导航模板
+ */
+ const template = ref({
+ basic: {
+ tabbar: {
+ items: [
+ {
+ activeIconUrl: '/static/a-index.png',
+ iconUrl: '/static/index.png',
+ text: '首页',
+ url: '/pages/index/index',
+ },
+ {
+ activeIconUrl: '/static/a-product.png',
+ iconUrl: '/static/product.png',
+ text: '产品',
+ url: '/pages/index/product',
+ },
+ {
+ activeIconUrl: '/static/a-order.png',
+ iconUrl: '/static/order.png',
+ text: '订单',
+ url: '/pages/index/order',
+ },
+ {
+ activeIconUrl: '/static/a-my.png',
+ iconUrl: '/static/my.png',
+ text: '我的',
+ url: '/pages/index/my',
+ },
+ {
+ activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-002.png',
+ iconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-001.png',
+ text: 'icons',
+ url: '/pages/index/icons',
+ },
+ ],
+ style: {
+ activeColor: '#fc4141',
+ bgColor: '#fff',
+ bgType: 'color',
+ color: '#282828',
+ },
+ theme: 'red',
+ },
},
- {
- activeIconUrl: "/static/a-order.png",
- iconUrl: "/static/order.png",
- text: "订单",
- url: "/pages/order/list",
- },
- {
- activeIconUrl: "/static/a-my.png",
- iconUrl: "/static/my.png",
- text: "我的",
- url: "/pages/index/my",
- },
- {
- activeIconUrl:
- "http://mall.yudao.iocoder.cn/static/images/4-002.png",
- iconUrl: "http://mall.yudao.iocoder.cn/static/images/4-001.png",
- text: "icons",
- url: "/pages/index/icons",
- },
- ],
- style: {
- activeColor: "#fc4141",
- bgColor: "#fff",
- bgType: "color",
- color: "#282828",
- },
- theme: "red",
- },
- },
- });
+ })
- // 全局分享信息
- const shareInfo = ref({});
+ // 全局分享信息
+ const shareInfo = ref({})
- // 小程序发货信息管理 0: 没有 1:有
- const hasWechatTradeManaged = ref(0);
+ // 小程序发货信息管理 0: 没有 1:有
+ const hasWechatTradeManaged = ref(0)
- /**
- * @author Ankkaya
- * @description 小程序初始化
- * @param {Type} -
- * @returns {Type}
- */
- async function init() {
- // 检查网络
- const networkStatus = await $platform.checkNetwork();
- if (!networkStatus) {
- $router.error("NetworkError");
- }
+ /**
+ * @author Ankkaya
+ * @description 小程序初始化
+ * @param {Type} -
+ * @returns {Type}
+ */
+ async function init() {
+ // 检查网络
+ const networkStatus = await $platform.checkNetwork()
+ if (!networkStatus) {
+ $router.error('NetworkError')
+ }
- if (true) {
- this.info = {
- name: "🍑商城",
- logo: "https://static.iocoder.cn/ruoyi-vue-pro-logo.png",
- version: "1.0.0",
- copyright: "全部开源,个人与企业可 100% 免费使用",
- copytime: "Copyright© 2018-2024",
+ if (true) {
+ this.info = {
+ name: '🍑商城',
+ logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
+ version: '1.0.0',
+ copyright: '全部开源,个人与企业可 100% 免费使用',
+ copytime: 'Copyright© 2018-2024',
- cdnurl: "https://file.sheepjs.com", // 云存储域名
- filesystem: "qcloud", // 云存储平台
- };
- this.platform = {
- share: {
- methods: ["poster", "link"],
- linkAddress: "https://shopro.sheepjs.com/#/",
- posterInfo: {
- user_bg: "/static/img/shop/config/user-poster-bg.png",
- goods_bg: "/static/img/shop/config/goods-poster-bg.png",
- groupon_bg: "/static/img/shop/config/groupon-poster-bg.png",
- },
- },
- bind_mobile: 0,
- };
- this.chat = {
- chat_domain: "https://api.shopro.sheepjs.com/chat",
- room_id: "admin",
- };
- this.has_wechat_trade_managed = 0;
+ cdnurl: 'https://file.sheepjs.com', // 云存储域名
+ filesystem: 'qcloud', // 云存储平台
+ }
+ this.platform = {
+ share: {
+ methods: ['poster', 'link'],
+ linkAddress: 'https://shopro.sheepjs.com/#/',
+ posterInfo: {
+ user_bg: '/static/img/shop/config/user-poster-bg.png',
+ goods_bg: '/static/img/shop/config/goods-poster-bg.png',
+ groupon_bg: '/static/img/shop/config/groupon-poster-bg.png',
+ },
+ },
+ bind_mobile: 0,
+ }
+ this.chat = {
+ chat_domain: 'https://api.shopro.sheepjs.com/chat',
+ room_id: 'admin',
+ }
+ this.has_wechat_trade_managed = 0
- // 加载主题
- const sysStore = useSysStore();
- sysStore.setTheme();
+ // 加载主题
+ const sysStore = useSysStore()
+ sysStore.setTheme()
- return Promise.resolve(true);
- } else {
- $router.error("InitError", res.msg || "加载失败");
- }
- }
+ return Promise.resolve(true)
+ } else {
+ $router.error('InitError', res.msg || '加载失败')
+ }
+ }
- return {
- info,
- platform,
- chat,
- template,
- shareInfo,
- hasWechatTradeManaged,
- init,
- };
- },
- {
- persist: {
- enabled: true,
- strategies: [
- {
- key: "app-store",
- },
- ],
+ return {
+ info,
+ platform,
+ chat,
+ template,
+ shareInfo,
+ hasWechatTradeManaged,
+ init,
+ }
},
- }
-);
+ {
+ persist: {
+ enabled: true,
+ strategies: [
+ {
+ key: 'app-store',
+ },
+ ],
+ },
+ }
+)
-export default useAppStore;
+export default useAppStore
diff --git a/peach/utils/index.js b/peach/utils/index.js
index 7b31a2c..2ee2b1b 100644
--- a/peach/utils/index.js
+++ b/peach/utils/index.js
@@ -1,5 +1,30 @@
+import dayjs from 'dayjs'
+
export function resetPagination(pagination) {
pagination.list = []
pagination.total = 0
pagination.pageNo = 1
}
+
+/**
+ * 时间日期转换
+ * @param {dayjs.ConfigType} date 当前时间,new Date() 格式
+ * @param {string} format 需要转换的时间格式字符串
+ * @description format 字符串随意,如 `YYYY-mm、YYYY-mm-dd`
+ * @description format 季度:"YYYY-mm-dd HH:MM:SS QQQQ"
+ * @description format 星期:"YYYY-mm-dd HH:MM:SS WWW"
+ * @description format 几周:"YYYY-mm-dd HH:MM:SS ZZZ"
+ * @description format 季度 + 星期 + 几周:"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ"
+ * @returns {string} 返回拼接后的时间字符串
+ */
+export function formatDate(date, format) {
+ // 日期不存在,则返回空
+ if (!date) {
+ return ''
+ }
+ // 日期存在,则进行格式化
+ if (format === undefined) {
+ format = 'YYYY-MM-DD HH:mm:ss'
+ }
+ return dayjs(date).format(format)
+}
diff --git a/static/order/order_bg.png b/static/order/order_bg.png
new file mode 100644
index 0000000..c83c5b5
Binary files /dev/null and b/static/order/order_bg.png differ