Commit eb2ef05ada1c95d4403e86b1f51aea08afd4379e
1 parent
90180d68
1、月包的优化
2、聊天的优化
Showing
9 changed files
with
29 additions
and
13 deletions
packageA/pages/goodsInfo/goodsInfo.js
| ... | ... | @@ -320,7 +320,7 @@ Page({ |
| 320 | 320 | }) |
| 321 | 321 | |
| 322 | 322 | var is_chat=0; |
| 323 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 323 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 324 | 324 | |
| 325 | 325 | }).then(res => { |
| 326 | 326 | if(res && res.data.code==0 && res.data.data){ | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
| ... | ... | @@ -311,7 +311,7 @@ Page({ |
| 311 | 311 | }) |
| 312 | 312 | |
| 313 | 313 | var is_chat=0; |
| 314 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 314 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 315 | 315 | |
| 316 | 316 | }).then(res => { |
| 317 | 317 | if(res && res.data.code==0 && res.data.data){ | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -460,7 +460,7 @@ Page({ |
| 460 | 460 | }) |
| 461 | 461 | |
| 462 | 462 | var is_chat=0; |
| 463 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 463 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 464 | 464 | |
| 465 | 465 | }).then(res => { |
| 466 | 466 | if(res && res.data.code==0 && res.data.data){ | ... | ... |
packageC/pages/presell/cardInfo/goodsInfo.js
| ... | ... | @@ -339,7 +339,7 @@ Page({ |
| 339 | 339 | }) |
| 340 | 340 | |
| 341 | 341 | var is_chat=0; |
| 342 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 342 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 343 | 343 | |
| 344 | 344 | }).then(res => { |
| 345 | 345 | if(res && res.data.code==0 && res.data.data){ | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.js
| ... | ... | @@ -391,7 +391,7 @@ Page({ |
| 391 | 391 | |
| 392 | 392 | |
| 393 | 393 | var is_chat=0; |
| 394 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 394 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 395 | 395 | |
| 396 | 396 | }).then(res => { |
| 397 | 397 | if(res && res.data.code==0 && res.data.data){ | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
packageG/pages/group_buy/goodsInfo/goodsInfo.js
| ... | ... | @@ -309,7 +309,7 @@ Page({ |
| 309 | 309 | }) |
| 310 | 310 | |
| 311 | 311 | var is_chat=0; |
| 312 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 312 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 313 | 313 | |
| 314 | 314 | }).then(res => { |
| 315 | 315 | if(res && res.data.code==0 && res.data.data){ | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -440,7 +440,7 @@ Page({ |
| 440 | 440 | |
| 441 | 441 | |
| 442 | 442 | var is_chat=0; |
| 443 | - await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/1", { | |
| 443 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 444 | 444 | |
| 445 | 445 | }).then(res => { |
| 446 | 446 | if(res && res.data.code==0 && res.data.data){ |
| ... | ... | @@ -9052,11 +9052,6 @@ Page({ |
| 9052 | 9052 | getApp().customer_chat(goods_id); |
| 9053 | 9053 | }, |
| 9054 | 9054 | |
| 9055 | - customer_chat:function(){ | |
| 9056 | - var gid=this.data.front_g.goods_id; | |
| 9057 | - getApp().customer_chat(gid); | |
| 9058 | - }, | |
| 9059 | - | |
| 9060 | 9055 | get_normal(gid) { |
| 9061 | 9056 | |
| 9062 | 9057 | var set_ob={}; | ... | ... |
pages/user/index/index.js
| ... | ... | @@ -206,7 +206,7 @@ Page({ |
| 206 | 206 | |
| 207 | 207 | |
| 208 | 208 | //先查看一下是不是系统会员 |
| 209 | - getApp().waitfor_login(()=> { | |
| 209 | + getApp().waitfor_login(async ()=> { | |
| 210 | 210 | if (!getApp().globalData.user_id) { |
| 211 | 211 | if(!this.data.is_show_yq){ |
| 212 | 212 | ut.new_user_go(os.stoid, getApp().globalData.first_leader); |
| ... | ... | @@ -505,11 +505,25 @@ Page({ |
| 505 | 505 | /*-- 获取 --*/ |
| 506 | 506 | th.requestRecommend(); |
| 507 | 507 | |
| 508 | + var is_chat=0; | |
| 509 | + await getApp().request.promiseGet("/api/weshop/recharge/storageRechargeDetail/get/"+os.stoid, { | |
| 510 | + }).then(res => { | |
| 511 | + if(res && res.data.code==0 && res.data.data){ | |
| 512 | + is_chat=1; | |
| 513 | + } | |
| 514 | + }) | |
| 515 | + | |
| 508 | 516 | /*-------系统是否开通等级卡,会员是等级卡-----*/ |
| 509 | 517 | getApp().getConfig2(function (e) { |
| 510 | 518 | var t_swi = e.switch_list; |
| 511 | 519 | if (t_swi) t_swi = JSON.parse(t_swi) |
| 512 | 520 | if (t_swi) { |
| 521 | + | |
| 522 | + //如果商家未开通在线客服的话 | |
| 523 | + if(t_swi.weapp_customertype==3 && !is_chat){ | |
| 524 | + json_dt_swi.weapp_customertype=0 | |
| 525 | + } | |
| 526 | + | |
| 513 | 527 | th.setData({ sys_switch: t_swi }); |
| 514 | 528 | var user_tool = []; |
| 515 | 529 | if (t_swi.usertool) user_tool = JSON.parse(t_swi.usertool); |
| ... | ... | @@ -1106,6 +1120,10 @@ Page({ |
| 1106 | 1120 | getApp().con_wx(this); |
| 1107 | 1121 | }, |
| 1108 | 1122 | |
| 1123 | + customer_chat: function () { | |
| 1124 | + getApp().customer_chat(0); | |
| 1125 | + }, | |
| 1126 | + | |
| 1109 | 1127 | //初始话按钮图标 |
| 1110 | 1128 | init_user_tool: async function () { |
| 1111 | 1129 | var d_list = null; | ... | ... |