Commit 9d2024a7 by 张卓

模块化分销

parent bb7b3f79
...@@ -9,9 +9,11 @@ import indexApi from './api/index' ...@@ -9,9 +9,11 @@ import indexApi from './api/index'
import cartApi from './api/cart' import cartApi from './api/cart'
import classificationApi from "./api/classification"; import classificationApi from "./api/classification";
import spokesmanApi from './api/spokesman' import spokesmanApi from './api/spokesman'
import { DFSImg } from "@/utils/index"; import { DFSImg, concatUrl } from "@/utils/index";
import fenxiaoModel from "@/utils/fenxiaoModel";
import { $themeToLink, $themeAddToCard, $themeArticleLike } from "@/utils/mayi"; import { $themeToLink, $themeAddToCard, $themeArticleLike } from "@/utils/mayi";
import shop from "./api/shop"; import shop from "./api/shop";
import spokesman from "@/api/spokesman";
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
...@@ -30,10 +32,22 @@ Vue.prototype.$mpAnalytics = mpAnalytics; ...@@ -30,10 +32,22 @@ Vue.prototype.$mpAnalytics = mpAnalytics;
const app = new Vue(App) const app = new Vue(App)
app.$mount() app.$mount()
// glob挂载到 // glob挂载到
let mpApp = getApp(); let mpApp = getApp();
Vue.prototype.mpApp = mpApp Vue.prototype.mpApp = mpApp
mpApp.fenxiaoModel = new fenxiaoModel({
query_login_spoken:spokesman.query_login_spoken,
becomepokesmanCustomer:spokesman.becomepokesmanCustomer,
saveCustomerInviterInviteeRel:spokesman.saveCustomerInviterInviteeRel,
getHomePageQuickAccess:spokesman.getHomePageQuickAccess,
query_isEntry:spokesman.query_isEntry,
getDistributorHomepage:spokesman.getDistributorHomepage,
getDistributorHomepageGoodsList: spokesman.getDistributorHomepageGoodsList,
getSpokesmanidByShare: spokesman.getSpokesmanidByShare,
oneClickShopQuickCopy: spokesman.oneClickShopQuickCopy,
apply_for_withdraw: spokesman.apply_for_withdraw
});
// 数据异步回调函数 // 数据异步回调函数
// 商城 // 商城
mpApp.shopCallBack = function () { } mpApp.shopCallBack = function () { }
...@@ -66,6 +80,7 @@ mpApp.indexApi = indexApi; ...@@ -66,6 +80,7 @@ mpApp.indexApi = indexApi;
mpApp.cartApi = cartApi; mpApp.cartApi = cartApi;
mpApp.classificationApi = classificationApi; mpApp.classificationApi = classificationApi;
mpApp.DFSImg = DFSImg; mpApp.DFSImg = DFSImg;
mpApp.concatUrl = concatUrl;
mpApp.spokesmanApi = spokesmanApi mpApp.spokesmanApi = spokesmanApi
mpApp.getThemePage = getThemePage mpApp.getThemePage = getThemePage
......
...@@ -126,8 +126,7 @@ import coupon from '@/components/activity/coupon' ...@@ -126,8 +126,7 @@ import coupon from '@/components/activity/coupon'
import integralTurntable from '@/components/activity/integralTurntable' import integralTurntable from '@/components/activity/integralTurntable'
import spellGroup from '@/components/activity/spellGroup' import spellGroup from '@/components/activity/spellGroup'
import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js"; import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js";
import { getMiniProgram, becomeRelation, getHomePageQuickAccess, query_isEntry, getDistributorHomepage } from "@/utils/mayi_fenxiao"; import { throttle, concatUrl } from "../../utils/index.js"
import { throttle } from "../../utils/index.js"
const app = getApp(); const app = getApp();
export default { export default {
...@@ -232,13 +231,12 @@ export default { ...@@ -232,13 +231,12 @@ export default {
let that = this; let that = this;
if(wx.getStorageSync("sessionid")) { if(wx.getStorageSync("sessionid")) {
//获取个人名片入口 //获取个人名片入口
getHomePageQuickAccess().then(res=>{ app.fenxiaoModel.getHomePageQuickAccess().then(res=>{
that.showMyCard = res; that.showMyCard = res;
}) })
//获取分销信息 //获取分销信息
this.getSpokesmanInit(options) this.getSpokesmanInit(options)
}else { }else {
app.globalData.spokesmanInfo = {};
let footerVal = {...app.globalData.footerVal}; let footerVal = {...app.globalData.footerVal};
footerVal.componentData.list.forEach(res=>{ footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"||res.link.name=="分销商中心") { if(res.link.name=="分销员中心"||res.link.name=="分销商中心") {
...@@ -315,10 +313,10 @@ export default { ...@@ -315,10 +313,10 @@ export default {
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
if(wx.getStorageSync("sessionid")) { if(wx.getStorageSync("sessionid")) {
query_isEntry().then((data)=>{ console.log(111222,app.fenxiaoModel)
app.fenxiaoModel.query_isEntry().then((data)=>{
//分销弹框信息 //分销弹框信息
app.globalData.applySucessEntry = data; console.log(data,3333444)
console.log(app.globalData.applySucessEntry,3333444)
if ( if (
data.applyRemind == "true" && data.applyRemind == "true" &&
data.displayEntry == "true" data.displayEntry == "true"
...@@ -347,21 +345,19 @@ export default { ...@@ -347,21 +345,19 @@ export default {
this.$mp.page.selectComponent(".custom-tab-bar").init(); this.$mp.page.selectComponent(".custom-tab-bar").init();
// that.applySucessEntry = res; // that.applySucessEntry = res;
}) })
}else {
app.globalData.applySucessEntry = {}
} }
}, },
async getSpokesmanInit(extConfig) { getSpokesmanInit(extConfig) {
//绑定上下级关系 //绑定上下级关系
await becomeRelation(extConfig) app.fenxiaoModel.becomeRelation(extConfig).then(res=>{
//获取分销基本信息 //获取分销基本信息
console.log(res,333333344444444)
this.getSpokesmanInfo(extConfig) this.getSpokesmanInfo(extConfig)
})
}, },
getSpokesmanInfo(extConfig) { getSpokesmanInfo(extConfig) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'; let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo';
getMiniProgram().then(res=>{ app.fenxiaoModel.getSpokesmanInfo(true).then(res=>{
app.globalData.spokesmanInfo = res;
if( if(
res&& res&&
res!='-1'&& res!='-1'&&
...@@ -376,7 +372,7 @@ export default { ...@@ -376,7 +372,7 @@ export default {
link:linkVal, link:linkVal,
}); });
} }
getDistributorHomepage(app.globalData.spokesmanInfo).then(ele=>{ app.fenxiaoModel.getDistributorHomepage(res).then(ele=>{
if(ele.id) { if(ele.id) {
this.getDistributorHomepageName = '我的小店'; this.getDistributorHomepageName = '我的小店';
}else { }else {
...@@ -384,15 +380,15 @@ export default { ...@@ -384,15 +380,15 @@ export default {
} }
}); });
if( if(
app.globalData.spokesmanInfo&& res&&
app.globalData.spokesmanInfo.parentSpokesmanDistributionModel == '1'&& res.parentSpokesmanDistributionModel == '1'&&
app.globalData.spokesmanInfo.distributorHomepage.id) { res.distributorHomepage.id) {
this.showSpokesManHome = true; this.showSpokesManHome = true;
}else { }else {
this.showSpokesManHome = false; this.showSpokesManHome = false;
} }
console.log(app.globalData.spokesmanInfo,555666) console.log(res,555666)
if(app.globalData.spokesmanInfo&&app.globalData.spokesmanInfo.distributionModel == '1') { if(res&&res.distributionModel == '1') {
this.showHomepage = true; this.showHomepage = true;
}else{ }else{
this.showHomepage = false; this.showHomepage = false;
...@@ -456,6 +452,39 @@ export default { ...@@ -456,6 +452,39 @@ export default {
}); });
} }
}, },
onShareAppMessage(res){
app.fenxiaoModel.getSpokesmanidByShare().then(res=>{
let newHref = '/pages/home/main';
if (res.hasInvitationStatus == 1) {
newHref = concatUrl(newHref,res)
}
let title = app.globalData.shopInfo.shopName;
console.log(newHref,3333555666,title)
return {
title: title, // 默认是小程序的名称
path: newHref, // 默认是当前页面
// imageUrl: this.shareLogoUrl,
success: function(res) {
// 转发成功之后的回调
if (res.errMsg == "shareAppMessage:ok") {
console.log(res, "分享成功");
}
},
fail: function() {
// 转发失败之后的回调
if (res.errMsg == "shareAppMessage:fail cancel") {
// 用户取消转发
console.log(res, "分享失败");
} else if (res.errMsg == "shareAppMessage:fail") {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function() {
// 转发结束之后的回调(转发成不成功都会执行)
}
};
})
},
onPullDownRefresh(){ onPullDownRefresh(){
console.log('onPullDownRefresh',this.$store.state.extConfig) console.log('onPullDownRefresh',this.$store.state.extConfig)
app.getShopInfo(this.$store.state.extConfig); app.getShopInfo(this.$store.state.extConfig);
......
class fenxiaoModel{
fenxiaoApi = {
query_login_spoken: null,//查询分销信息
becomepokesmanCustomer: null,//绑定商上级分销关系
saveCustomerInviterInviteeRel: null,//绑定商上级客户关系
getHomePageQuickAccess: null,//查询个人名片入口
query_isEntry: null,//查询成为分销弹框
getDistributorHomepage: null,//查询是否有自己的小店
getDistributorHomepageGoodsList: null,//首页分销商货架信息
getSpokesmanidByShare: null,//获取分销分享信息
oneClickShopQuickCopy: null,//一键开店快速复制
apply_for_withdraw: null,//关闭分销弹框
}
spokesmanInfo = null;//分销信息
applySucessEntry = null;//分销弹框信息
spokesmanidByShareInfo = null;//获取分享信息
distributorHomepageInfo = null;//小店详情
constructor({
query_login_spoken,
becomepokesmanCustomer,
saveCustomerInviterInviteeRel,
getHomePageQuickAccess,
query_isEntry,
getDistributorHomepage,
getDistributorHomepageGoodsList,
getSpokesmanidByShare,
oneClickShopQuickCopy,
apply_for_withdraw,
}){
this.fenxiaoApi.query_login_spoken = query_login_spoken;
this.fenxiaoApi.becomepokesmanCustomer = becomepokesmanCustomer;
this.fenxiaoApi.saveCustomerInviterInviteeRel = saveCustomerInviterInviteeRel;
this.fenxiaoApi.getHomePageQuickAccess = getHomePageQuickAccess;
this.fenxiaoApi.query_isEntry = query_isEntry;
this.fenxiaoApi.getDistributorHomepage = getDistributorHomepage;
this.fenxiaoApi.getDistributorHomepageGoodsList = getDistributorHomepageGoodsList;
this.fenxiaoApi.getSpokesmanidByShare = getSpokesmanidByShare;
this.fenxiaoApi.oneClickShopQuickCopy = oneClickShopQuickCopy;
this.fenxiaoApi.apply_for_withdraw = apply_for_withdraw;
}
//获取分销信息
getSpokesmanInfo(replace = false){
let _this = this
return new Promise(function (resolve, reject) {
if(_this.spokesmanInfo&&!replace) {
resolve(_this.spokesmanInfo)
}else {
_this.setSpokesmanInfo().then(res=>{
resolve(res)
}).catch(res=>{
reject(res)
})
}
});
}
//设置分销信息
setSpokesmanInfo() {
let _this = this
return new Promise(function (resolve, reject) {
_this.fenxiaoApi.query_login_spoken().then(res=>{
if(res.data.code == '200') {
_this.spokesmanInfo = res.data.data;
resolve(res.data.data)
}else {
reject(res)
}
});
});
}
//绑定分销关系
becomeRelation(extConfig) {
let _this = this
return new Promise(function (resolve, reject) {
if(extConfig&&extConfig.spokesmanRelId) {
_this.fenxiaoApi.becomepokesmanCustomer(extConfig.spokesmanRelId).then(res=>{
if(res.data.code == '200') {
resolve(res)
}else {
reject(res)
}
})
}else if(extConfig&&extConfig.userId) {
_this.fenxiaoApi.saveCustomerInviterInviteeRel(extConfig.userId).then(res=>{
if(res.data.code == '200') {
resolve(res)
}else {
reject(res)
}
})
}else {
resolve()
}
})
}
//查询个人名片入口
getHomePageQuickAccess() {
let _this = this
return new Promise(function (resolve, reject) {
_this.fenxiaoApi.getHomePageQuickAccess().then(res=>{
if(res.data.code == '200' && res.data.data == 'true') {
resolve(true)
}else {
reject(false)
}
})
})
}
//查询是否有自己的小店
getDistributorHomepage(spokesmanInfo,replace=false) {
let _this = this
return new Promise(function (resolve, reject) {
if(_this.distributorHomepageInfo&&!replace) {
resolve(_this.distributorHomepageInfo)
}else {
_this.fenxiaoApi.getDistributorHomepage(spokesmanInfo.id).then(res=>{
if (
res.data.code == "200" &&
res.data.data &&
res.data.data != "null" &&
res.data.data != "false"
) {
_this.distributorHomepageInfo = res.data.data
resolve(res.data.data)
}
})
}
})
}
//查询成为分销弹框
query_isEntry() {
let _this = this
return new Promise(function (resolve, reject) {
_this.fenxiaoApi.query_isEntry().then(res=>{
if (
res.data.code == "200" &&
res.data.data &&
res.data.data != "null" &&
res.data.data != "false"
) {
resolve(res.data.data)
}else{
reject(res)
}
})
})
}
//查询分销商货架
getDistributorHomepageGoodsList() {
let _this = this
return new Promise(function (resolve, reject) {
_this.fenxiaoApi.getDistributorHomepageGoodsList().then(res=>{
if(res.data.code == '200') {
resolve(res.data.data)
}else {
reject(res)
}
})
})
}
//获取分享信息
getSpokesmanidByShare(replace=false) {//replace是否更新数据
let _this = this
return new Promise(function (resolve, reject) {
if(_this.spokesmanidByShareInfo&&!replace) {
resolve(_this.spokesmanidByShareInfo)
}else {
_this.fenxiaoApi.getSpokesmanidByShare().then(res=>{
if(res.data.code == '200') {
_this.spokesmanidByShareInfo = res.data.data;
resolve(res.data.data)
}else {
reject(res)
}
})
}
})
}
//一键复制店铺
oneClickShopQuickCopy(data) {
let _this = this
return new Promise(function (resolve, reject) {
_this.fenxiaoApi.oneClickShopQuickCopy(data).then(res=>{
if(res.data.code == '200') {
resolve(res.data.data)
}else {
reject(res)
}
})
})
}
//关闭分销成功弹框
apply_for_withdraw(data) {
let _this = this
return new Promise(function (resolve, reject) {
_this.fenxiaoApi.apply_for_withdraw(data).then(res=>{
if(res.data.code == '200') {
resolve(res.data.data)
}else {
reject(res)
}
})
})
}
}
export default fenxiaoModel
\ No newline at end of file
...@@ -143,3 +143,28 @@ export function setTimes(value) { ...@@ -143,3 +143,28 @@ export function setTimes(value) {
result = `${h}:${m}:${s}` result = `${h}:${m}:${s}`
return result return result
} }
//url拼接参数
export function concatUrl(url,data) {
let setUrl = url;
if(data) {
let cludeData = true;
if(setUrl.indexOf("?") == -1) {
setUrl += "?";
cludeData = false;
}
let index = 0;
for(let key in data) {
if(!cludeData&&index===0) {
setUrl += key+"="+data[key];
}else if(!cludeData&&index!==0) {
setUrl += "&"+key+"="+data[key];
}else if(cludeData&&setUrl.indexOf(key+"=") == -1) {
setUrl += "&"+key+"="+data[key];
}
index += 1
}
return setUrl
}else {
return setUrl
}
}
\ No newline at end of file
...@@ -13,9 +13,7 @@ export function getMiniProgram(query) { ...@@ -13,9 +13,7 @@ export function getMiniProgram(query) {
} }
//绑定商上下级关系 //绑定商上下级关系
export function becomeRelation(extConfig) { export function becomeRelation(extConfig) {
spokesman.becomepokesmanCustomer(79988).then(res=>{ console.log(extConfig,44445555)
})
if(extConfig&&extConfig.spokesmanRelId) { if(extConfig&&extConfig.spokesmanRelId) {
spokesman.becomepokesmanCustomer(extConfig.spokesmanRelId).then(res=>{ spokesman.becomepokesmanCustomer(extConfig.spokesmanRelId).then(res=>{
......
...@@ -19,8 +19,8 @@ const componentOptions = { ...@@ -19,8 +19,8 @@ const componentOptions = {
lifetimes: { lifetimes: {
created() {}, created() {},
ready() { ready() {
this.setData({ nickname: app.globalData.applySucessEntry.nicknameByDistributor || app.globalData.applySucessEntry.nickname }); this.setData({ nickname: app.fenxiaoModel.applySucessEntry.nicknameByDistributor || app.fenxiaoModel.applySucessEntry.nickname });
console.log(app.globalData.applySucessEntry,222221111111) console.log(app.fenxiaoModel.applySucessEntry,222221111111)
}, },
moved() {}, moved() {},
detached() {} detached() {}
...@@ -49,19 +49,15 @@ const componentOptions = { ...@@ -49,19 +49,15 @@ const componentOptions = {
methods: { methods: {
closePopuop() { closePopuop() {
this.setData({ showPop: false }); this.setData({ showPop: false });
spokesmanApi.apply_for_withdraw({type:'applyRemindFlag'}).then(res => { app.fenxiaoModel.apply_for_withdraw({type:'applyRemindFlag'}).then(res => {
if (res.code == "200") {
console.log(res,9999)
}
}); });
}, },
toSpokesmanCenter() { toSpokesmanCenter() {
let linkVal = '/personalCenter/spokesmanCenter' let linkVal = '/personalCenter/spokesmanCenter'
this.setData({ showPop: false }); this.setData({ showPop: false });
spokesmanApi.apply_for_withdraw({type:'applyRemindFlag'}).then(res => { app.fenxiaoModel.apply_for_withdraw({type:'applyRemindFlag'}).then(res => {
if (res.code == "200") {
console.log(res,9999)
}
}); });
$themeToLink({ $themeToLink({
type: 1, type: 1,
......
...@@ -89,22 +89,22 @@ const componentOptions = { ...@@ -89,22 +89,22 @@ const componentOptions = {
// 组件方法 // 组件方法
methods: { methods: {
init() { init() {
this.setData({ spokesmanInfo: app.globalData.spokesmanInfo }); this.setData({ spokesmanInfo: app.fenxiaoModel.spokesmanInfo });
this.spokesmanInfo = app.globalData.spokesmanInfo; this.spokesmanInfo = app.fenxiaoModel.spokesmanInfo;
let parentSpokesmanHandImage = DFSImg(app.globalData.spokesmanInfo.parentSpokesmanHandImage); let parentSpokesmanHandImage = DFSImg(app.fenxiaoModel.spokesmanInfo.parentSpokesmanHandImage);
this.setData({parentSpokesmanHandImage: parentSpokesmanHandImage}); this.setData({parentSpokesmanHandImage: parentSpokesmanHandImage});
let query = { let query = {
...this.data.query, ...this.data.query,
distributorHomepageId: this.spokesmanInfo.distributorHomepage.id, distributorHomepageId: this.spokesmanInfo.distributorHomepage.id,
} }
spokesmanApi.getDistributorHomepageGoodsList(query).then(res=>{ app.fenxiaoModel.getDistributorHomepageGoodsList(query).then(res=>{
if(res.data.code == '200'&&res.data.data) { if(res) {
let lists = []; let lists = [];
let num = Math.ceil(res.data.data.length/3); let num = Math.ceil(res.length/3);
for(let i = 0; i < num; i++) { for(let i = 0; i < num; i++) {
lists.push(new Array()); lists.push(new Array());
} }
res.data.data.forEach((ele,index)=>{ res.forEach((ele,index)=>{
ele.terminalProductGoods.imgUrl = DFSImg(ele.terminalProductGoods.imgUrl) ele.terminalProductGoods.imgUrl = DFSImg(ele.terminalProductGoods.imgUrl)
ele.terminalProductGoods.discountPrice = (ele.terminalProductGoods.discountPrice-0).toFixed(2) ele.terminalProductGoods.discountPrice = (ele.terminalProductGoods.discountPrice-0).toFixed(2)
ele.terminalProductGoods.salePrice = (ele.terminalProductGoods.salePrice-0).toFixed(2) ele.terminalProductGoods.salePrice = (ele.terminalProductGoods.salePrice-0).toFixed(2)
......
...@@ -26,7 +26,7 @@ const componentOptions = { ...@@ -26,7 +26,7 @@ const componentOptions = {
lifetimes: { lifetimes: {
created() {}, created() {},
ready() { ready() {
this.setData({ spokesmanInfo: app.globalData.spokesmanInfo }); this.setData({ spokesmanInfo: app.fenxiaoModel.spokesmanInfo });
}, },
moved() {}, moved() {},
detached() {} detached() {}
...@@ -59,22 +59,23 @@ const componentOptions = { ...@@ -59,22 +59,23 @@ const componentOptions = {
}, },
setNewShop() { setNewShop() {
// window.sessionStorage.setItem(getTokenTwo()+'currentState',0) // window.sessionStorage.setItem(getTokenTwo()+'currentState',0)
spokesmanApi.getDistributorHomepage(this.data.spokesmanInfo.id).then(res=>{ app.fenxiaoModel.getDistributorHomepage().then(res=>{
console.log(res,888888888)
if(!this.data.spokesmanInfo.parentId) { if(!this.data.spokesmanInfo.parentId) {
this.initShopDetail() this.initShopDetail()
return return
} }
if(res.data.code=='200'&&!(res.data.data&&res.data.data.id)) { if(!(res&&res.id)) {
this.setData({ showPop: true }); this.setData({ showPop: true });
}else if(res.data.code=='200'&&res.data.data&&res.data.data.id){ }else if(res&&res.id){
this.initShopDetail() this.initShopDetail()
} }
}) })
}, },
copyShop() { copyShop() {
console.log(this.data.distributionPrice1,888888888)
spokesmanApi.oneClickShopQuickCopy({grossProfitMargin: parseFloat(this.data.distributionPrice1)}).then(res=>{ app.fenxiaoModel.oneClickShopQuickCopy({grossProfitMargin: parseFloat(this.data.distributionPrice1)}).then(res=>{
if(res.data.data == 'true') { if(res == 'true') {
this.initShopDetail() this.initShopDetail()
} }
}) })
......
const app = getApp(); const app = getApp();
const { $themeToLink, processEnv, globalData } = app; const { $themeToLink, processEnv, globalData, concatUrl } = app;
const componentOptions = { const componentOptions = {
// 组件选项 // 组件选项
options: { options: {
...@@ -70,9 +70,13 @@ const componentOptions = { ...@@ -70,9 +70,13 @@ const componentOptions = {
this.onClose(); this.onClose();
}, },
copyText(e) { copyText(e) {
let { text } = e.currentTarget.dataset; let pagePath = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`;
let pagePath = getCurrentPages()[0].route; let copyVal = pagePath;
let copyVal = pagePath + text; app.fenxiaoModel.getSpokesmanidByShare().then(res=>{
if (res.hasInvitationStatus == 1) {
copyVal = concatUrl(copyVal,res)
}
console.log(copyVal,11111222)
wx.setClipboardData({ wx.setClipboardData({
data: copyVal, data: copyVal,
success: function(res) { success: function(res) {
...@@ -83,16 +87,22 @@ const componentOptions = { ...@@ -83,16 +87,22 @@ const componentOptions = {
}); });
} }
}); });
})
}, },
toPosters() { toPosters() {
let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")):''; let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")):'';
let queryHref = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`; let queryHref = `${processEnv.BASE_URL}?mixid=${globalData.shopInfo.shopCode}`;
app.fenxiaoModel.getSpokesmanidByShare().then(res=>{
if (res.hasInvitationStatus == 1) {
queryHref = concatUrl(queryHref,res)
}
let linkVal = `/goods/posters?type=index&href=${queryHref}`; let linkVal = `/goods/posters?type=index&href=${queryHref}`;
if (userInfo) { if (userInfo) {
linkVal += `&nickname=${userInfo.nickName}`; linkVal += `&nickname=${userInfo.nickName}`;
} }
console.log(linkVal, "------------------linkVal"); console.log(linkVal, "------------------linkVal");
$themeToLink({ type: 1, link: linkVal }); $themeToLink({ type: 1, link: linkVal });
})
}, },
}, },
// 组件生命周期 // 组件生命周期
......
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