From 4da270f86098ea5d3e9fb071df08d70763d4cb1b Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 10 Jan 2025 10:51:21 +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/index.js | 25 +- jiuyi2/api/shop.js | 68 ++- jiuyi2/common/js/util.js | 7 - jiuyi2/components/footerMenu/footerMenu.vue | 10 +- .../regionSelection/regionSelection.vue | 231 ++++++++++ jiuyi2/pages/index/article.vue | 4 +- jiuyi2/pages/mine/mine.vue | 3 +- jiuyi2/pages/news/addFriend.vue | 3 +- jiuyi2/pages/news/group-chat/book.vue | 96 ---- jiuyi2/pages/news/group-chat/index.vue | 73 ++- jiuyi2/pages/release/commodity.vue | 41 +- jiuyi2/pages/shop/commodity/index.vue | 1 + jiuyi2/pages/shop/settle.vue | 429 +++++++++++++----- jiuyi2/readme.md | 4 +- jiuyi2/vite.config.js | 28 +- 15 files changed, 766 insertions(+), 257 deletions(-) create mode 100644 jiuyi2/components/public/regionSelection/regionSelection.vue delete mode 100644 jiuyi2/pages/news/group-chat/book.vue diff --git a/jiuyi2/api/index.js b/jiuyi2/api/index.js index 8365bcc8..da6d88eb 100644 --- a/jiuyi2/api/index.js +++ b/jiuyi2/api/index.js @@ -47,7 +47,7 @@ const api = { getArticle(param) { return util.request({ url: '/user/protocol/inquire', - path: param.path, + query: param.query, method: 'GET', }) }, @@ -62,6 +62,29 @@ const api = { method: 'GET', }) }, + + /** + * 获取省市区 + * @param {Object} param + */ + getRegion() { + return util.request({ + url: '/shopify/region/all', + method: 'GET', + }) + }, + + /** + * 获取分类字典数据 + * @param {Object} param + */ + getDict(param) { + return util.request({ + url: '/system/dict/data/type', + path: param.path, + method: 'GET', + }) + }, } export default api \ No newline at end of file diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 59a321d4..b41a3f70 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -3,6 +3,72 @@ import util from '@/common/js/util.js' // 商品 const shop = { + /** + * 商家入驻状态 + * @param {Object} param + */ + getShopStatus(param) { + return util.request({ + url: `/shopify/appDeposits/settleStatus`, + method: 'GET', + }) + }, + /** + * 商家缴纳押金 + * @param {Object} param + */ + depositsPay(param) { + return util.request({ + url: `/shopify/appDeposits/depositsPay`, + method: 'POST', + }) + }, + + /** + * 商户分类 + * @param {Object} param + */ + categoryAll(param) { + return util.request({ + url: `/shopify/merchantCategory/categoryAll`, + method: 'GET', + }) + }, + + /** + * 商家申请 + * @param {Object} param + */ + application(param) { + return util.request({ + url: `/shopify/appApplication/saveApplication`, + data: param.data, + method: 'POST', + }) + }, + + /** + * 获取商家申请信息 + * @param {Object} param + */ + getStoreDetail(param) { + return util.request({ + url: `/shopify/appApplication/getDetail`, + method: 'GET', + }) + }, + + /** + * 获取商家申请信息 + * @param {Object} param + */ + outDepositsPay(param) { + return util.request({ + url: `/shopify/appDeposits/outDepositsPay`, + method: 'POST', + }) + }, + /** * 商品列表 * @param {Object} param @@ -16,7 +82,7 @@ const shop = { }, /** - * 商品列表 + * 商品分类列表 * @param {Object} param */ getCategory(param) { diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index 87569885..078578d8 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -614,15 +614,8 @@ const util = { file: item.path, mode: 'img', success(res) { - // 上传成功 if (res.code === 200) { const result = res.data.url; - // 补全路径赋值 - if (obj.type == 2) { - obj.value.push(result); - } else if (obj.type == 1) { - obj.value = result; - } obj.success && obj.success({ value: result, }); diff --git a/jiuyi2/components/footerMenu/footerMenu.vue b/jiuyi2/components/footerMenu/footerMenu.vue index 7db30c1f..7e3cc651 100644 --- a/jiuyi2/components/footerMenu/footerMenu.vue +++ b/jiuyi2/components/footerMenu/footerMenu.vue @@ -102,13 +102,21 @@ let result = [] // 验证登录 - if (userinfo.value.userId) { + if (userinfo.value.id) { result.push({ name: '发布视频', img: '/static/footerMenu1.png', url: '/pages/release/video', }) } + // 1是商家 + if(userinfo.value.isShop == 1) { + result.push({ + name: '发布商品', + img: '/static/footerMenu1.png', + url: '/pages/release/commodity', + }) + } // 追加 // result.push({ // name: '打车', diff --git a/jiuyi2/components/public/regionSelection/regionSelection.vue b/jiuyi2/components/public/regionSelection/regionSelection.vue new file mode 100644 index 00000000..4f96395a --- /dev/null +++ b/jiuyi2/components/public/regionSelection/regionSelection.vue @@ -0,0 +1,231 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/index/article.vue b/jiuyi2/pages/index/article.vue index 3ff9662c..939d6fd0 100644 --- a/jiuyi2/pages/index/article.vue +++ b/jiuyi2/pages/index/article.vue @@ -30,7 +30,9 @@ // 获取详情 function getDetail() { api.getArticle({ - path: [wrapId.value] + query: { + agreementId: 4, + }, }).then(rs => { if (rs.code == 200) { Object.assign(wrap, rs.data) diff --git a/jiuyi2/pages/mine/mine.vue b/jiuyi2/pages/mine/mine.vue index 2777d0b2..e0a7d019 100644 --- a/jiuyi2/pages/mine/mine.vue +++ b/jiuyi2/pages/mine/mine.vue @@ -41,6 +41,7 @@ else showHeader.value = false }) + // 跳转 function link(url) { uni.navigateTo({ url, @@ -170,7 +171,7 @@ \ No newline at end of file diff --git a/jiuyi2/pages/release/commodity.vue b/jiuyi2/pages/release/commodity.vue index 4565d087..4697e20a 100644 --- a/jiuyi2/pages/release/commodity.vue +++ b/jiuyi2/pages/release/commodity.vue @@ -1,5 +1,28 @@