From eea2181418abfc3ac7301c08e33a939d9cc3b31f Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Tue, 15 Apr 2025 10:17:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(market):=20=E5=85=AC=E6=B5=B7=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在市场模块的线索页面添加领取客户的功能 - 新增 getSales 方法以调用后端接口领取客户- 在前端页面添加领取按钮,并实现点击领取的逻辑 -优化了线索列表的展示样式,移除了不必要的图片 --- api/market.js | 9 +++++++ common/util.js | 2 -- pages/market/clue/index.vue | 47 +++++++++++++++++++++++++++++++++---- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/api/market.js b/api/market.js index ed28006..32d2a71 100644 --- a/api/market.js +++ b/api/market.js @@ -92,6 +92,15 @@ export default { }, + //公海-领取客户 + getSales(data = {}) { + let url = '/member/get_sales' + return http.get(url, data).then(res => { + return res; + }) + }, + + diff --git a/common/util.js b/common/util.js index 1e045f9..c18809e 100644 --- a/common/util.js +++ b/common/util.js @@ -172,8 +172,6 @@ function formatToDateTime(dateTime, fmt = 'Y-m-d H:i:s') { //拨打电话 function callTel(tel) { - console.log('xxx',tel) - return if (!tel) { uni.showToast({ title: '电话号码为空', diff --git a/pages/market/clue/index.vue b/pages/market/clue/index.vue index c499892..26a5e24 100644 --- a/pages/market/clue/index.vue +++ b/pages/market/clue/index.vue @@ -83,7 +83,7 @@ 今日待领({{countArr.lq_count}}/{{countArr.max_count}}) - + @@ -121,10 +121,10 @@ - + - - + + @@ -333,6 +333,34 @@ export default { url: `/pages/market/clue/clue_info?id=${id}` }) }, + + //公海-领取客户 + async getSales(item){ + let param = { + sales_id:item.id + } + let res = await marketApi.getSales(param) + if(res.code != 1){ + uni.showToast({ + title: res.msg, + icon: 'none' + }) + return + } + uni.showToast({ + title: res.msg, + icon: 'success' + }) + //延迟1s执行 + setTimeout(() => { + let param = { + index:{ + id:2//2=公海客户列表 + } + } + this.segmented(param) + }, 1000) + }, } } @@ -429,4 +457,15 @@ export default { line-height: 60rpx; text-align: center; } + //领取按钮 + .ling{ + display: flex; + justify-content: center; + align-items: center; + border-radius:50%; + color: #fff; + width: 50rpx; + height: 50rpx; + background-color: #F59A23; + }