From 52674c2052242599f3786064942f9f13fb7cc5a8 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Tue, 14 Jan 2025 20:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/api/mine.js | 23 + jiuyi2/api/shop.js | 3 +- jiuyi2/api/video.js | 2 +- jiuyi2/common/js/config.js | 2 +- jiuyi2/pages.json | 8 + jiuyi2/pages/index/index.nvue | 2 +- jiuyi2/pages/index/videoHome.vue | 4 +- jiuyi2/pages/mine/setting/sequence.vue | 77 ++ jiuyi2/pages/mine/setting/setting.vue | 5 + jiuyi2/pages/release/commodity.vue | 192 +++- jiuyi2/uni_modules/HM-dragSorts/changelog.md | 50 ++ .../components/HM-dragSorts/HM-dragSorts.vue | 834 ++++++++++++++++++ .../components/HM-dragSorts/drag.wxs | 371 ++++++++ jiuyi2/uni_modules/HM-dragSorts/package.json | 81 ++ jiuyi2/uni_modules/HM-dragSorts/readme.md | 117 +++ jiuyi2/vite.config.js | 24 +- 16 files changed, 1743 insertions(+), 52 deletions(-) create mode 100644 jiuyi2/pages/mine/setting/sequence.vue create mode 100644 jiuyi2/uni_modules/HM-dragSorts/changelog.md create mode 100644 jiuyi2/uni_modules/HM-dragSorts/components/HM-dragSorts/HM-dragSorts.vue create mode 100644 jiuyi2/uni_modules/HM-dragSorts/components/HM-dragSorts/drag.wxs create mode 100644 jiuyi2/uni_modules/HM-dragSorts/package.json create mode 100644 jiuyi2/uni_modules/HM-dragSorts/readme.md diff --git a/jiuyi2/api/mine.js b/jiuyi2/api/mine.js index 5609e606..92211808 100644 --- a/jiuyi2/api/mine.js +++ b/jiuyi2/api/mine.js @@ -154,6 +154,29 @@ const mine = { method: 'POST', }) }, + + /** + * 查看用户支付排序 + * @param {Object} param + */ + getPaymentOrder(param) { + return util.request({ + url: '/user/paymentOrder/getPaymentOrder', + method: 'GET', + }) + }, + + /** + * 修改用户支付排序 + * @param {Object} param + */ + updatePaymentOrder(param) { + return util.request({ + url: '/user/paymentOrder/updatePaymentOrder', + data: param.data, + method: 'POST', + }) + }, } export default mine \ No newline at end of file diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 9975719c..06d257ff 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -170,13 +170,12 @@ const shop = { */ saveProduct(param) { return util.request({ - url: `/shopify//webProduct/saveProduct`, + url: `/shopify/webProduct/uploadProduct`, method: 'POST', data: param.data, }) }, - } export default shop \ No newline at end of file diff --git a/jiuyi2/api/video.js b/jiuyi2/api/video.js index 7c449055..c8d5eeb2 100644 --- a/jiuyi2/api/video.js +++ b/jiuyi2/api/video.js @@ -110,7 +110,7 @@ const video = { */ getUserInfo(param) { return util.request({ - url: `/home/getUserInfo`, + url: `/user/home/getUserInfo`, query: param.query, method: 'POST', load: true, diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index bad3fe0a..e50fef3e 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,7 +6,7 @@ const config = { // #endif // #ifndef H5 // host: 'http://1641c8e0.r22.cpolar.top', - host: 'http://192.168.0.129:8080', + host: 'http://192.168.0.189:8080', // #endif // 上传文件二级路径 uploadFilePath: "/homecommon/file/preview?fileName=", diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index 2c9e38bb..40baca21 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -725,6 +725,14 @@ "navigationBarTitleText" : "商家订单", "navigationStyle": "custom" } + }, + { + "path" : "pages/mine/setting/sequence", + "style" : + { + "navigationBarTitleText" : "支付顺序", + "navigationBarBackgroundColor": "#fff" + } } ], diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue index cdebc485..a7360571 100644 --- a/jiuyi2/pages/index/index.nvue +++ b/jiuyi2/pages/index/index.nvue @@ -429,7 +429,7 @@ // 暂停有效读秒的统计 function readSecondPause() { // 暂停唱片 - proxy.$refs.discRef.pause() + proxy.$refs.discRef && proxy.$refs.discRef.pause() clearInterval(readSecond.timer) } diff --git a/jiuyi2/pages/index/videoHome.vue b/jiuyi2/pages/index/videoHome.vue index 4fb098f1..d498a28a 100644 --- a/jiuyi2/pages/index/videoHome.vue +++ b/jiuyi2/pages/index/videoHome.vue @@ -259,12 +259,12 @@ - + {{detail.userNickname}} - 账号:{{detail.userAccount}} + 账号:{{detail.account}} diff --git a/jiuyi2/pages/mine/setting/sequence.vue b/jiuyi2/pages/mine/setting/sequence.vue new file mode 100644 index 00000000..cb5f01c4 --- /dev/null +++ b/jiuyi2/pages/mine/setting/sequence.vue @@ -0,0 +1,77 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/mine/setting/setting.vue b/jiuyi2/pages/mine/setting/setting.vue index 65f15d05..9be8605a 100644 --- a/jiuyi2/pages/mine/setting/setting.vue +++ b/jiuyi2/pages/mine/setting/setting.vue @@ -160,6 +160,11 @@ + + 支付顺序 + + + 登录密码 diff --git a/jiuyi2/pages/release/commodity.vue b/jiuyi2/pages/release/commodity.vue index 3e578c84..f2138323 100644 --- a/jiuyi2/pages/release/commodity.vue +++ b/jiuyi2/pages/release/commodity.vue @@ -14,18 +14,117 @@ import util from '@/common/js/util.js' // 表单 const form = reactive({ - // + categoryId: '', + sliderImage: [], + spec: [], }) + // 分类 + const category = reactive([]) + // 分类下标 + const categoryIndex = ref('') onLoad((options) => { - // + // 添加商品规格 + handlePushSpec() + // 获取商品分类 + getCategory() }) + // 获取商品分类 + function getCategory() { + return new Promise((resolve, reject) => { + api.shop.getCategory({ + query: { + categoryCode: '0' + }, + }).then(rs => { + if (rs.code === 200) { + category.push(...rs.data) + resolve(category) + return + } + + util.alert({ + content: rs.msg, + showCancel: false, + }) + }) + }) + } + + // 添加商品规格 + function handlePushSpec() { + form.spec.push({ + // 图片 + image: '', + // 名称 + sku: '', + // 库存 + stock: '', + }) + } + + /** + * 删除规格 + * @param {Object} index 下标 + */ + function handleRemoveSpec(index) { + form.spec.splice(index, 1) + } + + // 上传轮播图 + function uploadImage() { + util.upload_image({ + type: 1, + success: rs => { + form.sliderImage.push(rs.value) + } + }) + } + + // 上传规格图片 + function uploadSpecImage(item) { + util.upload_image({ + type: 1, + success: rs => { + item.image = rs.value + console.log('spec',form.spec) + } + }) + } + + /** + * 选择分类 + * @param {Object} ev + */ + function handleCate(ev) { + let index = ev.detail.value + if (index == categoryIndex.value) return + categoryIndex.value = index + form.categoryId = category[categoryIndex.value].id + } + // 发布商品 function handleSubmit() { const data = { ...form } + + // 轮播图 + data.sliderImage = data.sliderImage.join(',') + + // + api.shop.saveProduct({ + data, + }).then(rs => { + if (rs.code == 200) { + return + } + util.alert({ + content: rs.content, + showCancel: false, + }) + }) } @@ -36,75 +135,102 @@ 商品图片 - + + + + + + + - 商品标题 -