From 1ea391d1132f4810313c78b2ec4b2d006d7f4642 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 10 Jul 2024 11:17:24 +0800 Subject: [PATCH] 日志~~~ --- app.js | 23 +++++++++++++++++++---- pages/goods/goodsInfo/goodsInfo.js | 3 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 0c15aa4..431eb8e 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,10 @@ var t = require("setting.js"), o = require("./utils/auth.js"), a = require("./utils/request.js"), e = require("./utils/common.js"), ut = require("./utils/util.js"); var os = t; var regeneratorRuntime = require('./utils/runtime.js'); -var api = require("./api/api.js") +var api = require("./api/api.js"); + +var wxlog = require("./utils/wxlog.js"); + //公共方法和变量 App({ @@ -146,7 +149,7 @@ App({ // }) // } // if(app.globalData.user_id){ //-- 启用默认的user_id -- - // + // app.promiseGet("/api/weshop/users/get/" + app.globalData.setting.stoid + "/" + app.globalData.user_id,{}).then(res=>{ // app.globalData.is_get_login=1; // if(res.data.code==0){ @@ -154,6 +157,13 @@ App({ // wx.setStorageSync("userinfo",app.globalData.userInfo); // //刷一下导购 // app.promiseGet("/api/weshop/users/getAndUpdateUser/" +app.globalData.setting.stoid + "/" + app.globalData.user_id, {}) + // //调用接口判断是不是会员 + // app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + res.data.data.user_id, {}).then(rs => { + // if (rs.data.code == 0) { + // app.globalData.guide_id = rs.data.data.id; + // app.globalData.guide_pick_id = rs.data.data.pickup_id + // } + // }) // } // }) // } @@ -191,8 +201,13 @@ App({ //调用接口判断是不是会员 app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => { if (res.data.code == 0) { + + wxlog.info('获取到导购:'+res.data.data.id); + app.globalData.guide_id = res.data.data.id; - app.globalData.guide_pick_id = res.data.data.pickup_id + app.globalData.guide_pick_id = res.data.data.pickup_id; + + wxlog.info('globalData中导购id:'+app.globalData.guide_id ); } }) @@ -204,9 +219,9 @@ App({ } }) //} - } + wx.getSystemInfo({ success: (res) => { // console.log(res) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 80b63db..f737df5 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -1821,6 +1821,9 @@ Page({ newd.prom_id = 0; } + + wxlog.info('商品详情,购买globalData中导购id:'+getApp().globalData.guide_id ); + //---是不是从收藏夹出来的--- if (th.data.c_guide_id) { newd['guide_id'] = th.data.c_guide_id; -- libgit2 0.21.4