Commit ed8ea7824afac63f044e6ce749f0d4d58f609864

Authored by season
2 parents 1a583ada eb2ef05a

Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa

app.json
... ... @@ -241,7 +241,8 @@
241 241 "pages/team/team_show/team_show",
242 242 "pages/user/order_detail/order_detail",
243 243 "pages/group_buy/goodsInfo/goodsInfo",
244   - "pages/user/my_beauty_consultant/my_beauty_consultant"
  244 + "pages/user/my_beauty_consultant/my_beauty_consultant",
  245 + "pages/customer_chat/customer_chat"
245 246 ]
246 247 }
247 248 ],
... ...
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
... ... @@ -422,6 +422,9 @@ Page({
422 422  
423 423 //res = res.data.data.result;
424 424 //if (!res) return false;
  425 + this.setData({
  426 + getUserID: d.user_id || 0,
  427 + });
425 428  
426 429 getApp().check_can_share(this);
427 430 getApp().is_Single_page(this, function () {
... ...
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;
... ...
setting.js
... ... @@ -2,13 +2,14 @@ module.exports = {
2 2 appName: "派派通",
3 3 versionCode: "1.0.0",
4 4 appLogo: "../../../images/logo.png",
5   - url: "https://test-weshop.xinda100.cn",
  5 + //url: "https://test-weshop.xinda100.cn",
6 6 //url:"https://weshop.yolipai.net", //外网的网址
7   - //url:"https://qa-weshop.yolipai.net", //外网的网址
8   - //url:"http://172.20.3.41:8085", //明海的网址
  7 + url:"https://qa-weshop.yolipai.net", //外网的网址
  8 + //url:"http://172.20.3.148:8085", //明海的网址
9 9 //url:"http://172.20.3.102:8085", //自己的网址
10 10 banner_err:"../../../images/del/logo.png",
11 11 imghost: "https://mshopimg.yolipai.net/",
  12 + h5_host: "https://qa-mshop.yolipai.net/", //客服聊天使用
12 13 share: {},
13 14 stoid:1
14 15  
... ...