Commit 6a02560f by 李嘉林

分销流程加log

parent e772f27a
...@@ -280,18 +280,20 @@ export default { ...@@ -280,18 +280,20 @@ export default {
}, },
onLoad(options) { onLoad(options) {
console.log(options,'---------home----options') console.log(options,'---------home----options')
log.info('--------on--------------load') log.info(options,'---------home----options')
//进页面存储需要绑定的信息 //进页面存储需要绑定的信息
if(options.userId||options.spokesmanRelId) { if(options.userId||options.spokesmanRelId) {
wx.setStorage({ wx.setStorage({
key: "becomeInfo", key: "becomeInfo",
data: JSON.stringify(options) data: JSON.stringify(options)
}); });
log.info(wx.getStorageSync("becomeInfo"),'home---wx.getStorageSync("becomeInfo")')
} }
if(options.scene){ if(options.scene){
//新二维码扫码进入 //新二维码扫码进入
wx.nextTick(() => { wx.nextTick(() => {
indexApi.getShareSceneRecord(options.scene).then(res=>{ indexApi.getShareSceneRecord(options.scene).then(res=>{
log.info(res,'onLoad-getShareSceneRecord');
if(res.data.code == '200'){ if(res.data.code == '200'){
this.page = res.data.data.pageUri; this.page = res.data.data.pageUri;
let paramsObj = JSON.parse(res.data.data.scene); let paramsObj = JSON.parse(res.data.data.scene);
...@@ -306,8 +308,7 @@ export default { ...@@ -306,8 +308,7 @@ export default {
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId); wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
log.info(res.data.data,'getShareSceneRecord') log.info(res.data.data,'getShareSceneRecord')
console.log(res.data.data,'----getShareSceneRecord') console.log(res.data.data,'----getShareSceneRecord')
log.info(wx.getStorageSync("openid")) log.info(wx.getStorageSync("openid"),'onLoad-openid');
log.info(333333)
if(wx.getStorageSync("openid")) { if(wx.getStorageSync("openid")) {
indexApi.addRecord( indexApi.addRecord(
{ {
...@@ -618,8 +619,10 @@ export default { ...@@ -618,8 +619,10 @@ export default {
} }
}, },
getSpokesmanInit(extConfig) { getSpokesmanInit(extConfig) {
log.info(extConfig,'getSpokesmanInit-extConfig');
//绑定上下级关系 //绑定上下级关系
app.fenxiaoModel.becomeRelation(extConfig).then(res=>{ app.fenxiaoModel.becomeRelation(extConfig).then(res=>{
log.info(res,'getSpokesmanInit-becomeRelation');
if(res) { if(res) {
wx.removeStorage({ wx.removeStorage({
key: "becomeInfo" key: "becomeInfo"
...@@ -632,6 +635,7 @@ export default { ...@@ -632,6 +635,7 @@ export default {
getSpokesmanInfo(extConfig) { getSpokesmanInfo(extConfig) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'; let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo';
app.fenxiaoModel.getSpokesmanInfo(true).then(res=>{ app.fenxiaoModel.getSpokesmanInfo(true).then(res=>{
log.info(res,'home-getSpokesmanInfo');
if( if(
res&& res&&
res!='-1'&& res!='-1'&&
......
...@@ -376,7 +376,9 @@ export default { ...@@ -376,7 +376,9 @@ export default {
pushPageType(){ pushPageType(){
//绑定上下级关系 //绑定上下级关系
log.info(this.scene,'this.scene====',this.backPath) log.info(this.scene,'this.scene====',this.backPath)
log.info(wx.getStorageSync("becomeInfo")?JSON.parse(wx.getStorageSync("becomeInfo")):'','pushPageType-getStorageSync-becomeInfo')
app.fenxiaoModel.becomeRelation(wx.getStorageSync("becomeInfo")?JSON.parse(wx.getStorageSync("becomeInfo")):'').then(res=>{ app.fenxiaoModel.becomeRelation(wx.getStorageSync("becomeInfo")?JSON.parse(wx.getStorageSync("becomeInfo")):'').then(res=>{
log.info(res,'pushPageType-becomeRelation')
if(res) { if(res) {
wx.removeStorage({ wx.removeStorage({
key: "becomeInfo" key: "becomeInfo"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment