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,7 +320,7 @@ Page({ | ||
| 320 | }) | 320 | }) |
| 321 | 321 | ||
| 322 | var is_chat=0; | 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 | }).then(res => { | 325 | }).then(res => { |
| 326 | if(res && res.data.code==0 && res.data.data){ | 326 | if(res && res.data.code==0 && res.data.data){ |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
| @@ -311,7 +311,7 @@ Page({ | @@ -311,7 +311,7 @@ Page({ | ||
| 311 | }) | 311 | }) |
| 312 | 312 | ||
| 313 | var is_chat=0; | 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 | }).then(res => { | 316 | }).then(res => { |
| 317 | if(res && res.data.code==0 && res.data.data){ | 317 | if(res && res.data.code==0 && res.data.data){ |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| @@ -460,7 +460,7 @@ Page({ | @@ -460,7 +460,7 @@ Page({ | ||
| 460 | }) | 460 | }) |
| 461 | 461 | ||
| 462 | var is_chat=0; | 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 | }).then(res => { | 465 | }).then(res => { |
| 466 | if(res && res.data.code==0 && res.data.data){ | 466 | if(res && res.data.code==0 && res.data.data){ |
packageC/pages/presell/cardInfo/goodsInfo.js
| @@ -339,7 +339,7 @@ Page({ | @@ -339,7 +339,7 @@ Page({ | ||
| 339 | }) | 339 | }) |
| 340 | 340 | ||
| 341 | var is_chat=0; | 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 | }).then(res => { | 344 | }).then(res => { |
| 345 | if(res && res.data.code==0 && res.data.data){ | 345 | if(res && res.data.code==0 && res.data.data){ |
packageC/pages/presell/goodsInfo/goodsInfo.js
| @@ -391,7 +391,7 @@ Page({ | @@ -391,7 +391,7 @@ Page({ | ||
| 391 | 391 | ||
| 392 | 392 | ||
| 393 | var is_chat=0; | 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 | }).then(res => { | 396 | }).then(res => { |
| 397 | if(res && res.data.code==0 && res.data.data){ | 397 | if(res && res.data.code==0 && res.data.data){ |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
| @@ -422,6 +422,9 @@ Page({ | @@ -422,6 +422,9 @@ Page({ | ||
| 422 | 422 | ||
| 423 | //res = res.data.data.result; | 423 | //res = res.data.data.result; |
| 424 | //if (!res) return false; | 424 | //if (!res) return false; |
| 425 | + this.setData({ | ||
| 426 | + getUserID: d.user_id || 0, | ||
| 427 | + }); | ||
| 425 | 428 | ||
| 426 | getApp().check_can_share(this); | 429 | getApp().check_can_share(this); |
| 427 | getApp().is_Single_page(this, function () { | 430 | getApp().is_Single_page(this, function () { |
packageG/pages/group_buy/goodsInfo/goodsInfo.js
| @@ -309,7 +309,7 @@ Page({ | @@ -309,7 +309,7 @@ Page({ | ||
| 309 | }) | 309 | }) |
| 310 | 310 | ||
| 311 | var is_chat=0; | 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 | }).then(res => { | 314 | }).then(res => { |
| 315 | if(res && res.data.code==0 && res.data.data){ | 315 | if(res && res.data.code==0 && res.data.data){ |
pages/goods/goodsInfo/goodsInfo.js
| @@ -440,7 +440,7 @@ Page({ | @@ -440,7 +440,7 @@ Page({ | ||
| 440 | 440 | ||
| 441 | 441 | ||
| 442 | var is_chat=0; | 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 | }).then(res => { | 445 | }).then(res => { |
| 446 | if(res && res.data.code==0 && res.data.data){ | 446 | if(res && res.data.code==0 && res.data.data){ |
| @@ -9052,11 +9052,6 @@ Page({ | @@ -9052,11 +9052,6 @@ Page({ | ||
| 9052 | getApp().customer_chat(goods_id); | 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 | get_normal(gid) { | 9055 | get_normal(gid) { |
| 9061 | 9056 | ||
| 9062 | var set_ob={}; | 9057 | var set_ob={}; |
pages/user/index/index.js
| @@ -206,7 +206,7 @@ Page({ | @@ -206,7 +206,7 @@ Page({ | ||
| 206 | 206 | ||
| 207 | 207 | ||
| 208 | //先查看一下是不是系统会员 | 208 | //先查看一下是不是系统会员 |
| 209 | - getApp().waitfor_login(()=> { | 209 | + getApp().waitfor_login(async ()=> { |
| 210 | if (!getApp().globalData.user_id) { | 210 | if (!getApp().globalData.user_id) { |
| 211 | if(!this.data.is_show_yq){ | 211 | if(!this.data.is_show_yq){ |
| 212 | ut.new_user_go(os.stoid, getApp().globalData.first_leader); | 212 | ut.new_user_go(os.stoid, getApp().globalData.first_leader); |
| @@ -505,11 +505,25 @@ Page({ | @@ -505,11 +505,25 @@ Page({ | ||
| 505 | /*-- 获取 --*/ | 505 | /*-- 获取 --*/ |
| 506 | th.requestRecommend(); | 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 | getApp().getConfig2(function (e) { | 517 | getApp().getConfig2(function (e) { |
| 510 | var t_swi = e.switch_list; | 518 | var t_swi = e.switch_list; |
| 511 | if (t_swi) t_swi = JSON.parse(t_swi) | 519 | if (t_swi) t_swi = JSON.parse(t_swi) |
| 512 | if (t_swi) { | 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 | th.setData({ sys_switch: t_swi }); | 527 | th.setData({ sys_switch: t_swi }); |
| 514 | var user_tool = []; | 528 | var user_tool = []; |
| 515 | if (t_swi.usertool) user_tool = JSON.parse(t_swi.usertool); | 529 | if (t_swi.usertool) user_tool = JSON.parse(t_swi.usertool); |
| @@ -1106,6 +1120,10 @@ Page({ | @@ -1106,6 +1120,10 @@ Page({ | ||
| 1106 | getApp().con_wx(this); | 1120 | getApp().con_wx(this); |
| 1107 | }, | 1121 | }, |
| 1108 | 1122 | ||
| 1123 | + customer_chat: function () { | ||
| 1124 | + getApp().customer_chat(0); | ||
| 1125 | + }, | ||
| 1126 | + | ||
| 1109 | //初始话按钮图标 | 1127 | //初始话按钮图标 |
| 1110 | init_user_tool: async function () { | 1128 | init_user_tool: async function () { |
| 1111 | var d_list = null; | 1129 | var d_list = null; |