Commit d7ae7837 by chengzhichun

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 5de90fc3 0efd79d8
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"build:my": "node build/build.js my" "build:my": "node build/build.js my"
}, },
"dependencies": { "dependencies": {
"mayi-analytics": "^1.1.14", "mayi-analytics": "^1.1.24",
"mayi-front-tools": "^1.0.0", "mayi-front-tools": "^1.0.0",
"mpvue": "^2.0.0", "mpvue": "^2.0.0",
"mpvue-wxparse": "^0.6.5", "mpvue-wxparse": "^0.6.5",
......
...@@ -147,6 +147,12 @@ export default { ...@@ -147,6 +147,12 @@ export default {
getShopInfo({ mixid }) { getShopInfo({ mixid }) {
shop.getShopInfo({ shopMixId: mixid }).then((res) => { shop.getShopInfo({ shopMixId: mixid }).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
// 收集用户数据
this.$mpBehavior.init("mayi-moblie-shop-mp", res.data.data.id, {
mode: process.env.NODE_ENV,
gid: res.data.data.groupId
})
let mpApp = getApp(); let mpApp = getApp();
// 商城基本数据 // 商城基本数据
mpApp.shopCallBack && mpApp.shopCallBack(res.data.data); mpApp.shopCallBack && mpApp.shopCallBack(res.data.data);
......
...@@ -28,6 +28,11 @@ Vue.config.productionTip = false ...@@ -28,6 +28,11 @@ Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
Vue.prototype.$store = Store Vue.prototype.$store = Store
// 用户行为收集
console.log(Store.state,'---35')
let mpBehavior = require("../node_modules/mayi-analytics/dist/mayi.mpBehavior")
Vue.prototype.$mpBehavior = mpBehavior;
// 异常监控(行为收集) // 异常监控(行为收集)
let mpAnalytics = require("../node_modules/mayi-analytics/dist/mayi.mpAnalytics.js") let mpAnalytics = require("../node_modules/mayi-analytics/dist/mayi.mpAnalytics.js")
.default; .default;
......
<template> <template>
<div class="contact"> <div class="contact">
<div class="contact-img"> <div class="contact-img">
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/HCe2iRXHsP.png" alt=""> <img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/HCe2iRXHsP.png" alt="" />
</div> </div>
<div class="btn-wrap"> <div class="btn-wrap">
<button open-type="contact"> <button open-type="contact" show-message-card :session-from="sessionFrom">
<div class="btn-main"> <div class="btn-main">
<div class="main-img"> <div class="main-img">
<img src="../../../static/images/wx.png" alt=""> <img src="../../../static/images/wx.png" alt="" />
</div> </div>
<div class="main-text">官方微信客服</div> <div class="main-text">官方微信客服</div>
</div>
<img class="btn-next" src="../../../static/images/next.png" alt="">
</button>
</div> </div>
<img class="btn-next" src="../../../static/images/next.png" alt="" />
</button>
</div> </div>
</div>
</template> </template>
<script> <script>
import { getUserLocation } from "../../utils/wxIndex.js";
export default { export default {
data() {
} return {
sessionFrom: "",
};
},
onLoad(options) {
getUserLocation().then((res) => {
options.longitude = res.longitude;
options.latitude = res.latitude;
this.sessionFrom = JSON.stringify(options);
console.log('sessionFrom',this.sessionFrom)
});
},
};
</script> </script>
<style scoped> <style scoped>
.contact{ .contact {
padding: 10px 22px 0 22px; padding: 10px 22px 0 22px;
} }
.contact-img{ .contact-img {
width: 100%; width: 100%;
height: 154px; height: 154px;
margin-bottom: 24px; margin-bottom: 24px;
background-color: #ccc; background-color: #ccc;
border-radius: 8px; border-radius: 8px;
} }
.contact-img img{ .contact-img img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.btn-wrap{ .btn-wrap {
width: 100%; width: 100%;
height: 80px; height: 80px;
box-sizing: border-box; box-sizing: border-box;
} }
button{ button {
width: 100%; width: 100%;
height: 80px; height: 80px;
border: none; border: none;
padding: 20px 10px 20px 10px; padding: 20px 10px 20px 10px;
background-color: white; background-color: white;
box-shadow: #eee 0px 0px 5px 4px; box-shadow: #eee 0px 0px 5px 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.btn-main{ .btn-main {
display: flex; display: flex;
height: 40px; height: 40px;
} }
.main-img{ .main-img {
width: 54px; width: 54px;
height: 40px; height: 40px;
border-right: 1px solid #D7D4D4; border-right: 1px solid #d7d4d4;
padding-top: 3px; padding-top: 3px;
} }
.main-img img{ .main-img img {
width: 42px; width: 42px;
height: 34px; height: 34px;
} }
.main-text{ .main-text {
color: #1C1B1B; color: #1c1b1b;
font-size:17px; font-size: 17px;
margin-left: 10px; margin-left: 10px;
} }
.btn-next{ .btn-next {
width: 9px; width: 9px;
height: 14px; height: 14px;
} }
.btn-next img{ .btn-next img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
button::after{ button::after {
border: none; border: none;
} }
</style> </style>
\ No newline at end of file
...@@ -136,6 +136,7 @@ import couponPopup from '@/components/couponPopup.vue' ...@@ -136,6 +136,7 @@ import couponPopup from '@/components/couponPopup.vue'
import NewUser from "../../components/newCustomer/newUser"; import NewUser from "../../components/newCustomer/newUser";
import NewPolite from "../../components/newCustomer/newPolite"; import NewPolite from "../../components/newCustomer/newPolite";
import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js"; import { setTabBarActive, checkTabbarPage,themeColor } from "../../utils/mayi.js";
import indexApi from "@/api/index.js";
import { throttle, concatUrl } from "../../utils/index.js" import { throttle, concatUrl } from "../../utils/index.js"
const app = getApp(); const app = getApp();
...@@ -237,6 +238,38 @@ export default { ...@@ -237,6 +238,38 @@ export default {
data: JSON.stringify(options) data: JSON.stringify(options)
}); });
} }
if(options.scene){
//新二维码扫码进入
wx.nextTick(() => {
indexApi.getShareSceneRecord(options.scene).then(res=>{
if(res.data.code == '200'){
this.page = res.data.data.pageUri;
let paramsObj = JSON.parse(res.data.data.scene);
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
console.log(res.data.data)
console.log(wx.getStorageSync("openid"))
console.log(333333)
if(wx.getStorageSync("openid")) {
indexApi.addRecord(
{
attractingCustomersChannelId: paramsObj.attractingCustomerChannelId,
miniOpenId: wx.getStorageSync("openid"),
registerFlag: 1,
newRegisterFlag: 0,
}
).then(ele=>{
//清空引客渠道id
wx.setStorageSync('attractingCustomerChannelId','');
})
}
}
}).catch((err)=>{
})
});
}
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
if (options.from && options.from == "logout") { if (options.from && options.from == "logout") {
//来自用户登出 //来自用户登出
...@@ -331,6 +364,7 @@ export default { ...@@ -331,6 +364,7 @@ export default {
if(wx.getStorageSync("sessionid")) { if(wx.getStorageSync("sessionid")) {
//清空门店id //清空门店id
wx.setStorageSync(this.$store.state.mixid+'storeId','') wx.setStorageSync(this.$store.state.mixid+'storeId','')
wx.setStorageSync(this.$store.state.mixid+'sellerId','')
console.log(111222,app.fenxiaoModel) console.log(111222,app.fenxiaoModel)
app.fenxiaoModel.query_isEntry().then((data)=>{ app.fenxiaoModel.query_isEntry().then((data)=>{
//分销弹框信息 //分销弹框信息
......
...@@ -89,6 +89,7 @@ export default { ...@@ -89,6 +89,7 @@ export default {
if(wx.getStorageSync("sessionid")) { if(wx.getStorageSync("sessionid")) {
//清空门店id //清空门店id
wx.setStorageSync(this.$store.state.mixid+'storeId','') wx.setStorageSync(this.$store.state.mixid+'storeId','')
wx.setStorageSync(this.$store.state.mixid+'sellerId','')
} }
this.options = options; this.options = options;
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
...@@ -204,6 +205,7 @@ export default { ...@@ -204,6 +205,7 @@ export default {
let paramsObj = JSON.parse(res.data.data.scene); let paramsObj = JSON.parse(res.data.data.scene);
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId); wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId); wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
console.log(res.data.data) console.log(res.data.data)
console.log(wx.getStorageSync("openid")) console.log(wx.getStorageSync("openid"))
console.log(333333) console.log(333333)
...@@ -468,7 +470,30 @@ export default { ...@@ -468,7 +470,30 @@ export default {
} }
return params; return params;
} },
delParam(oldUrl,paramKey) {
var url = oldUrl; //页面url
var urlParam = oldUrl.split("?")[1]; //页面参数
var beforeUrl = url.substr(0, url.indexOf("?")); //页面主地址(参数之前地址)
var nextUrl = "";
var arr = new Array();
if (urlParam != "") {
var urlParamArr = urlParam.split("&"); //将参数按照&符分成数组
for (var i = 0; i < urlParamArr.length; i++) {
var paramArr = urlParamArr[i].split("="); //将参数键,值拆开
//如果键雨要删除的不一致,则加入到参数中
if (paramArr[0] != paramKey) {
arr.push(urlParamArr[i]);
}
}
}
if (arr.length > 0) {
nextUrl = "?" + arr.join("&");
}
url = beforeUrl + nextUrl;
return url;
},
}, },
onUnload() { onUnload() {
console.log("卸载----------------", this.options); console.log("卸载----------------", this.options);
...@@ -485,7 +510,9 @@ export default { ...@@ -485,7 +510,9 @@ export default {
} }
//分享页面去掉登录态 //分享页面去掉登录态
if (url.indexOf("sessionid") > -1) { if (url.indexOf("sessionid") > -1) {
url = url.split("?")[0] + "?mixid=" + this.shopId; // url = url.split("?")[0] + "?mixid=" + this.shopId;
url = this.delParam(this.newWindowHref,'sessionid')
url = this.delParam(url,'open_id')
} }
//分销员推广页面 默认分享分销员中心页面 //分销员推广页面 默认分享分销员中心页面
if (url.indexOf("/personalCenter/spokesmanCenter/mine/popularize") > -1) { if (url.indexOf("/personalCenter/spokesmanCenter/mine/popularize") > -1) {
......
...@@ -77,7 +77,8 @@ export default { ...@@ -77,7 +77,8 @@ export default {
test_isHaveUnion: "", test_isHaveUnion: "",
test_unionId: "", test_unionId: "",
fromType:'',//来源类型 mini:小程序跳转到当前登录页 fromType:'',//来源类型 mini:小程序跳转到当前登录页
scene:''//场景 scene:'',//场景
ossLink: ''//第三方点击进入链接
}; };
}, },
onShow() { onShow() {
...@@ -105,8 +106,8 @@ export default { ...@@ -105,8 +106,8 @@ export default {
}) })
}, },
onLoad(options) { onLoad(options) {
login.getShopUserProtocol().then(res => { login.getShopUserProtocol().then(res => {
console.log(res,777888999)
if(res.data.code == '200') { if(res.data.code == '200') {
this.content = res.data.data; this.content = res.data.data;
} }
...@@ -122,6 +123,9 @@ export default { ...@@ -122,6 +123,9 @@ export default {
let params = JSON.parse(options.params); let params = JSON.parse(options.params);
this.fromType = params.fromType; this.fromType = params.fromType;
} }
if(options.ossLink) {
this.ossLink = decodeURIComponent(options.ossLink)
}
this.getshop(); this.getshop();
}, },
methods: { methods: {
...@@ -331,9 +335,13 @@ export default { ...@@ -331,9 +335,13 @@ export default {
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}); });
}else if (this.scene=='sso' || this.backPath.includes('scene=sso')) { }else if (this.scene=='sso' || this.backPath.includes('scene=sso') || this.ossLink.indexOf('scene=sso')>-1) {
let backPath = this.backPath;
if(this.ossLink) {
backPath += '?'+this.ossLink
}
wx.redirectTo({ wx.redirectTo({
url: `../wxArticle/main?link=${this.backPath}`, url: `../wxArticle/main?link=${encodeURIComponent(backPath)}`,
}); });
}else{ }else{
let parseLink=decodeURIComponent(this.backPath); let parseLink=decodeURIComponent(this.backPath);
...@@ -394,6 +402,7 @@ export default { ...@@ -394,6 +402,7 @@ export default {
city: this.userInfo.city, city: this.userInfo.city,
otherPhone: 0, otherPhone: 0,
storeId: wx.getStorageSync(this.$store.state.mixid+'storeId') || '', storeId: wx.getStorageSync(this.$store.state.mixid+'storeId') || '',
sellerId: wx.getStorageSync(this.$store.state.mixid+'sellerId') || '',
articleId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '', articleId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '',
customerSourceType: wx.getStorageSync(this.$store.state.mixid+"articleId")?8:'', customerSourceType: wx.getStorageSync(this.$store.state.mixid+"articleId")?8:'',
customerSourceId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '' customerSourceId: wx.getStorageSync(this.$store.state.mixid+"articleId") || ''
...@@ -461,6 +470,10 @@ export default { ...@@ -461,6 +470,10 @@ export default {
if(wx.getStorageSync(this.$store.state.mixid+'storeId')) { if(wx.getStorageSync(this.$store.state.mixid+'storeId')) {
query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId') query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId')
} }
//埋点导购员
if(wx.getStorageSync(this.$store.state.mixid+'sellerId')) {
query.sellerId = wx.getStorageSync(this.$store.state.mixid+'sellerId')
}
//绑定手机号 //绑定手机号
wx.navigateTo({ wx.navigateTo({
url: `../index/main?from=login&backpath=/login/wxRegister&params=${encodeURIComponent( url: `../index/main?from=login&backpath=/login/wxRegister&params=${encodeURIComponent(
......
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
}; };
}, },
async onLoad(options) { async onLoad(options) {
this.link='';
console.log(options, "第三方页面"); console.log(options, "第三方页面");
/** /**
* scene=sso 第三方需要登录的页面 * scene=sso 第三方需要登录的页面
...@@ -55,7 +56,6 @@ export default { ...@@ -55,7 +56,6 @@ export default {
if(getUrlKey(decodeURIComponent(link), "getMixId") == '1') {//第三方跳转加mixid if(getUrlKey(decodeURIComponent(link), "getMixId") == '1') {//第三方跳转加mixid
link = forUrlAddKey(decodeURIComponent(link),{mixid: this.$store.state.mixid}) link = forUrlAddKey(decodeURIComponent(link),{mixid: this.$store.state.mixid})
} }
console.log(wx.getStorageSync("sessionid"),446466777777,getUrlKey(decodeURIComponent(link), "mixid"),this.$store.state.mixid)
if (getUrlKey(decodeURIComponent(link), "scene") == "sso") { if (getUrlKey(decodeURIComponent(link), "scene") == "sso") {
if (!wx.getStorageSync("sessionid")) { if (!wx.getStorageSync("sessionid")) {
wx.redirectTo({ wx.redirectTo({
...@@ -132,6 +132,7 @@ export default { ...@@ -132,6 +132,7 @@ export default {
methods: { methods: {
setLink(data) { setLink(data) {
this.link = data; this.link = data;
console.log(this.link,89999999)
}, },
getSsoBcakUrl(link) { getSsoBcakUrl(link) {
let op = { let op = {
...@@ -145,6 +146,7 @@ export default { ...@@ -145,6 +146,7 @@ export default {
}; };
login.getSsoBcakUrl(op).then((res) => { login.getSsoBcakUrl(op).then((res) => {
if (res.data.code == "200") { if (res.data.code == "200") {
console.log('14888888',res)
this.setLink(res.data.data); this.setLink(res.data.data);
} else { } else {
wx.showToast({ title: res.data.msg, icon: "none" }); wx.showToast({ title: res.data.msg, icon: "none" });
......
!function i(o,a,r){function l(t,e){if(!a[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=a[t]={exports:{}},o[t][0].call(n.exports,function(e){return l(o[t][1][e]||e)},n,n.exports,i,o,a,r)}return a[t].exports}for(var s="function"==typeof require&&require,e=0;e<r.length;e++)l(r[e]);return l}({1:[function(e,t,n){var i,o,t=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function l(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{o="function"==typeof clearTimeout?clearTimeout:r}catch(e){o=r}}();var s,u=[],p=!1,c=-1;function d(){p&&s&&(p=!1,s.length?u=s.concat(u):c=-1,u.length&&g())}function g(){if(!p){var e=l(d);p=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,p=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===r||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||p||l(g)},m.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,a){!function(o,t){!function(){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hylBannerLink=i,a.hylToLink=s;var r=void 0,m=void 0,h=void 0,f=void 0,v=void 0,l=void 0,k="",n=null;function i(e){var t,n,i,o,a,r,l,s,u,p,c,d,g;k=$nuxt.$store,console.log("hylBannerLink",e),3!=e.type?1.1==e.type&&(1==k.state.miniProgram||2==k.state.miniProgram?-1<e.link.indexOf("pages/hiberDrawEntity/hiberDrawEntity")?(t=e.link.split("?"))[1]&&t[1].split("=")[1]&&(l=JSON.parse(decodeURIComponent(t[1].split("=")[1])),u=(s=l).id,p=l.type,c=l.isOpenDraw,d=v.formatDate.format(new Date),g=(g=l.validTimeEnd).split(".").join("-"),2==l.validTimeEnd.split(" ").length||(d=d.split(" ")[0]),d=(d=new Date(g.replace(/-/g,"/")).getTime()-new Date(d.replace(/-/g,"/")).getTime())/1e3,2==c?0<=d?(1==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}),2==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}),3==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/turntable/turntable?id="+u})):2==p&&null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?perdraw=33&id="+u}):2==p&&null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):1==p?null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u}):2==p?null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u}):$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):null==s.drawRecordEntity?m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u})):-1<e.link.indexOf("type")?(t=e.link.split("?"),"[object Array]"==Object.prototype.toString.call(t)&&t.length&&(r=t[1].split("&"),n={},r.forEach(function(e){e.split("="),n[e.split("=")[0]]=e.split("=")[1]}),console.log(n),i=n.id,o=n.jumpScore,a=n.type,k.state.sessionId?f.getConsumerScoreFlag({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){0==e.code&&(1==e.object?(o&&0<o&&f.changeScore({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){e.object&&$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})}),o&&o<0&&y.showModal({title:"提示",content:"跳转扣除"+Math.abs(o)+"积分",success:function(e){e.confirm?f.changeScore({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){e.object&&$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})}):e.cancel&&console.log("用户点击取消")}}),o||$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})):$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i}))}):$mp.miniProgram.navigateTo({url:"/pages/login/login"}))):((e.link.includes("pages/draw/draw/draw")||e.link.includes("pages/question/question")||e.link.includes("pages/live/live"))&&(r=w($nuxt.$route.query.mixid+"_location")&&JSON.parse(w($nuxt.$route.query.mixid+"_location")).outId,console.log(r,"跳转id"),r&&(e.link.includes("?")?e.link=e.link+"&addressId="+r:e.link=e.link+"?addressId="+r)),$mp.miniProgram.navigateTo({url:e.link})):h("暂不支持")):1==k.state.miniProgram||2==k.state.miniProgram?$mp.miniProgram.navigateTo({url:"/pages/toMini/toMini?weappPage="+encodeURIComponent(e.link)+"&weappAppId="+e.name}):h("暂不支持")}function s(e){if(e=e.data,console.log("----工具中hyl"),n=e.type,(k=$nuxt.$store).getters["sceneModule/flushbonadingVisible"])if(null!=n&&"undefined"!=n){if(0!=n)if(1==n)"/"==e.link.substring(0,1)?$nuxt.$router.push(e.link):!e.link.startsWith("http")&&!e.link.startsWith("https")||1!=k.state.miniProgram&&2!=k.state.miniProgram?window.location.href=e.link:$mp.miniProgram.navigateTo({url:"/pages/wxArticle/main?link="+encodeURIComponent(e.link)});else if(2==n){var t=e.feature.type;"themeCouponClick"==t||0==t?this.$themeCouponClick(e.feature.value.couponCode,e.feature.value):1==t?(console.log("是分享了。。。。"),2==e.type&&1==e.feature.type&&$nuxt.$SHARE({itemList:e.feature.value})):"themeMemberCardClick"!=t&&2!=t||this.$themeMemberCardClick(e.feature.value)}else if(1.1==n||3==n)i(e);else if(1.2==n){if("outerChain:businessCenter"==e.link)return console.log(l.GUIDE_URL,"-----shopConfig.GUIDE_URL"),t=l.GUIDE_URL+"/login?mixid="+$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),void(window.location.href=t);"/"==e.link.substring(0,1)?$nuxt.$router.push(e.link):1==k.state.miniProgram||2==k.state.miniProgram?$mp.miniProgram.navigateTo({url:"/pages/wxArticle/main?link="+encodeURIComponent(e.link)}):window.location.href=e.link}else 0<e.length&&$nuxt.$router.push(e.link)}else 0<e.length&&$nuxt.$router.push(e)}function w(e){if(o.browser&&"undefined"!=typeof document)for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0].trim()==e)return decodeURIComponent(i[1])}}Object.defineProperty(a,"__esModule",{value:!0}),a.themeToLinkInit=e,a.$themeToLink=R;var u=null,p=null,c=null,r=void 0,d=void 0,l=void 0,h=void 0,s=void 0,g=void 0,y=void 0,C=void 0;function T(e,t){t=1<arguments.length&&void 0!==t?t:"";return"../index/main?from=themeLink&backpath="+encodeURIComponent(e)+"&params="+encodeURIComponent(t)}function P(){return 1==u?this.$store&&this.$store.state.sessionId&&this.$store.state.sessionId:2==u&&(y&&y.getStorageSync("sessionid"))}function $(){return 1==u&&this.$store&&this.$store.state.miniProgram}function b(){return 1==u?l.GUIDE_URL:2==u?config.GUIDE_URL:void 0}function I(e){return e.link.split("?")[0]}function x(e){return e.link.split("?")[1]||""}function D(t){var e=getApp();return e.globalData.footerVal?e.globalData.footerVal.componentData.list.findIndex(function(e){return I(e.link)==t.split("?")[0]}):-1}var L=["index","media-video","goods-goodsInfo","goods-commodityMenu","goodsSearch-goodsSearch","chooseStores","activty-receivingGift","activty","login-register","login-phoneLogin","login-authInformation","login-forgetPassWord","login-accountLogin","login-wxRegister","pay-payList","comment-evaluateList","goods-commonProblemList","article-articlePage","article-articleList","goods-posters","liveBroadcast","liveBroadcast-list","personalCenter-coupon-getCoupon","buyerShow-showDetail","goods-addGoodsList","personalCenter-CDkey-exchange","giftCards-linkReceive","giftCoupon-preview","smartForm","shopCart-shareShopCart","groupBuying-beInvite","brandTopics","personalCenter-spokesmanCenter","personalCenter-spokesmanCenter-mine-spokesmanHomePage","liveBroadcast-lived","personalCenter-spokesmanCenter-mine-getBusinessCard","changeAdr"].map(function(e){return"/index"==(e="/"+e.replace(/-/g,"/"))?"/":e});function e(e){var t=e.homeNative,n=e.wx,i=e.getCoupon,o=e.themeMemberCardClick,a=e.requireFun,e=e.extend;if(C=e,u=t,g=a,console.log(g,"-------------------------115"),d=g.createdUserJWT,g.getBcakUrl,y=n,console.log(u,"-------------themeToLinkInit"),console.log("toPage-------------"),c=1==u?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?this.$router.push(t):2==e?window.location.href=t:3==e&&y.navigateTo({url:t})}:2==u?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?y.navigateTo({url:t}):2==e&&y.reLaunch({url:t})}:void 0,1==u)try{r=g.Vue,l=g.shopConfig,r.prototype.$themeToLink=R,h=g.Toast,s=g.hylToLink}catch(e){}else 2==u&&((p=getApp()).$themeToLink=R,p.getCoupon=i,p.themeMemberCardClick=o)}function U(e){if(!(e=e.split("?")[1]))return{};for(var t,n,i=e.split("&"),o={},a=0;a<i.length;a++)t=(n=i[a].split("="))[0],n=n[1],console.log(81,this),o[t]=n;return o}async function R(t){if(console.log(t,"$themeToLink"),console.log(C,"extend======="),C.loginIntercept&&!P()){console.log("走进来了");var e="/pages/login/main?back="+I(t)+"&params="+JSON.stringify(U(t.link));return c({pagePath:e}),!1}var n,i,o,a,r;t.type&&t.link&&t.link.includes("dynamicForm")&&await d().then(function(e){t.link+="&token="+e}).catch(function(e){}),1==u&&this.$store.getters["sceneModule/flushbonadingVisible"]?s.call(this,{data:t,Vue:g.Vue,Dialog:g.Dialog,Toast:g.Toast,hyl:g.hyl,dateFilter:g.dateFilter,shopConfig:g.shopConfig}):2!=(e=t.type)&&2==u&&!function(e){var t=I(e),n=x(e);if(L.includes(t)||"/goods/"==t.substr(0,7)||t.includes("/brandTopics")||P())return!(0<=(i=D(t)))||(i=0==i?D("/"):i,t="/"==t?"/pages/home/main":"/pages/tabBar"+i+"/main",(i=getCurrentPages())[i.length-1].route!=t&&(c({pagePath:t+(n?"?"+n:""),pageType:2}),0));var i="/pages/login/main?back="+t+"&params="+JSON.stringify(U(e.link));return console.log(i,"------------------------190"),c({pagePath:i}),0}(t)||(null!=e&&"undefined"!=e?0==e||(1==e?"/"==t.link.substring(0,1)?1==u?c.call(this,{pagePath:t.link}):2==u&&(n=T(I(t),x(t)),c({pagePath:n})):t.link.startsWith("http")||t.link.startsWith("https")?1==u?c.call(this,{pagePath:t.link,pageType:2}):(n="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c({pagePath:n})):c({pagePath:t.link,pageType:2}):1.1==e?2==u?c({pagePath:t.link}):1==u&&(1==$.call(this)||2==$.call(this)?c.call(this,{pagePath:t.link,pageType:3}):h("暂不支持")):1.2==e?"outerChain:businessCenter"!=t.link?"/"==t.link.substring(0,1)?c.call(this,{pagePath:t.link}):1==u?1==this.$store.state.miniProgram||2==this.$store.state.miniProgram?(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c.call(this,{pagePath:i,pageType:3})):c.call(this,{pagePath:t.link,pageType:2}):2==u&&(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c.call(this,{pagePath:i,pageType:1})):(console.log(b(),"-----getGUIDE_URL()"),o=b()+"/login?mixid="+this.$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),c.call(this,{pagePath:o,pageType:2})):2==e?"themeCouponClick"==(o=t.feature.type)||0==o?1==u?this.$themeCouponClick(t.feature.value.couponCode,t.feature.value):2==u&&p.getCoupon(t.feature.value.couponCode,t.feature.value):1==o?2==t.type&&1==t.feature.type&&function(e){1==u?this.$nuxt.$SHARE({itemList:e.feature.value}):2==u&&p.shareInit({itemList:e.feature.value})}.call(this,t):"themeMemberCardClick"!=o&&2!=o||(1==u?this.$themeMemberCardClick(t.feature.value):2==u&&p.themeMemberCardClick(t.feature.value)):3==e?1==u?1==$.call(this)||2==$.call(this)?this.$store.getters["sceneModule/flushbonadingVisible"]?(a="/pages/toMini/toMini?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c.call(this,{pagePath:a,pageType:3})):(a="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c({pagePath:a})):h("暂不支持"):(r="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c({pagePath:r})):0<t.length&&c.call(this,{pagePath:t.link})):0<t.length&&(1==u?c.call(this,{pagePath:t}):2==u&&(r=T(I(t),x(t)),c({pagePath:r}))))}t.themeToLinkInit=e}.call(this)}.call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1}]},{},[2]); !function i(o,a,r){function l(t,e){if(!a[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=a[t]={exports:{}},o[t][0].call(n.exports,function(e){return l(o[t][1][e]||e)},n,n.exports,i,o,a,r)}return a[t].exports}for(var s="function"==typeof require&&require,e=0;e<r.length;e++)l(r[e]);return l}({1:[function(e,t,n){var i,o,t=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function l(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{o="function"==typeof clearTimeout?clearTimeout:r}catch(e){o=r}}();var s,u=[],p=!1,c=-1;function d(){p&&s&&(p=!1,s.length?u=s.concat(u):c=-1,u.length&&g())}function g(){if(!p){var e=l(d);p=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,p=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===r||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||p||l(g)},m.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,a){!function(o,t){!function(){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hylBannerLink=i,a.hylToLink=s;var r=void 0,m=void 0,h=void 0,f=void 0,v=void 0,l=void 0,k="",n=null;function i(e){var t,n,i,o,a,r,l,s,u,p,c,d,g;k=$nuxt.$store,console.log("hylBannerLink",e),3!=e.type?1.1==e.type&&(1==k.state.miniProgram||2==k.state.miniProgram?-1<e.link.indexOf("pages/hiberDrawEntity/hiberDrawEntity")?(t=e.link.split("?"))[1]&&t[1].split("=")[1]&&(l=JSON.parse(decodeURIComponent(t[1].split("=")[1])),u=(s=l).id,p=l.type,c=l.isOpenDraw,d=v.formatDate.format(new Date),g=(g=l.validTimeEnd).split(".").join("-"),2==l.validTimeEnd.split(" ").length||(d=d.split(" ")[0]),d=(d=new Date(g.replace(/-/g,"/")).getTime()-new Date(d.replace(/-/g,"/")).getTime())/1e3,2==c?0<=d?(1==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}),2==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}),3==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/turntable/turntable?id="+u})):2==p&&null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?perdraw=33&id="+u}):2==p&&null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):1==p?null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u}):2==p?null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u}):$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):null==s.drawRecordEntity?m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u})):-1<e.link.indexOf("type")?(t=e.link.split("?"),"[object Array]"==Object.prototype.toString.call(t)&&t.length&&(r=t[1].split("&"),n={},r.forEach(function(e){e.split("="),n[e.split("=")[0]]=e.split("=")[1]}),console.log(n),i=n.id,o=n.jumpScore,a=n.type,k.state.sessionId?f.getConsumerScoreFlag({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){0==e.code&&(1==e.object?(o&&0<o&&f.changeScore({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){e.object&&$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})}),o&&o<0&&y.showModal({title:"提示",content:"跳转扣除"+Math.abs(o)+"积分",success:function(e){e.confirm?f.changeScore({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){e.object&&$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})}):e.cancel&&console.log("用户点击取消")}}),o||$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})):$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i}))}):$mp.miniProgram.navigateTo({url:"/pages/login/login"}))):((e.link.includes("pages/draw/draw/draw")||e.link.includes("pages/question/question")||e.link.includes("pages/live/live"))&&(r=w($nuxt.$route.query.mixid+"_location")&&JSON.parse(w($nuxt.$route.query.mixid+"_location")).outId,console.log(r,"跳转id"),r&&(e.link.includes("?")?e.link=e.link+"&addressId="+r:e.link=e.link+"?addressId="+r)),$mp.miniProgram.navigateTo({url:e.link})):h("暂不支持")):1==k.state.miniProgram||2==k.state.miniProgram?$mp.miniProgram.navigateTo({url:"/pages/toMini/toMini?weappPage="+encodeURIComponent(e.link)+"&weappAppId="+e.name}):h("暂不支持")}function s(e){if(e=e.data,console.log("----工具中hyl"),n=e.type,(k=$nuxt.$store).getters["sceneModule/flushbonadingVisible"])if(null!=n&&"undefined"!=n){if(0!=n)if(1==n)"/"==e.link.substring(0,1)?$nuxt.$router.push(e.link):!e.link.startsWith("http")&&!e.link.startsWith("https")||1!=k.state.miniProgram&&2!=k.state.miniProgram?window.location.href=e.link:$mp.miniProgram.navigateTo({url:"/pages/wxArticle/main?link="+encodeURIComponent(e.link)});else if(2==n){var t=e.feature.type;"themeCouponClick"==t||0==t?this.$themeCouponClick(e.feature.value.couponCode,e.feature.value):1==t?(console.log("是分享了。。。。"),2==e.type&&1==e.feature.type&&$nuxt.$SHARE({itemList:e.feature.value})):"themeMemberCardClick"!=t&&2!=t||this.$themeMemberCardClick(e.feature.value)}else if(1.1==n||3==n)i(e);else if(1.2==n){if("outerChain:businessCenter"==e.link)return console.log(l.GUIDE_URL,"-----shopConfig.GUIDE_URL"),t=l.GUIDE_URL+"/login?mixid="+$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),void(window.location.href=t);"/"==e.link.substring(0,1)?$nuxt.$router.push(e.link):1==k.state.miniProgram||2==k.state.miniProgram?$mp.miniProgram.navigateTo({url:"/pages/wxArticle/main?link="+encodeURIComponent(e.link)}):window.location.href=e.link}else 0<e.length&&$nuxt.$router.push(e.link)}else 0<e.length&&$nuxt.$router.push(e)}function w(e){if(o.browser&&"undefined"!=typeof document)for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0].trim()==e)return decodeURIComponent(i[1])}}Object.defineProperty(a,"__esModule",{value:!0}),a.themeToLinkInit=e,a.$themeToLink=R;var u=null,p=null,c=null,r=void 0,d=void 0,l=void 0,h=void 0,s=void 0,g=void 0,y=void 0,C=void 0;function T(e,t){t=1<arguments.length&&void 0!==t?t:"";return"../index/main?from=themeLink&backpath="+encodeURIComponent(e)+"&params="+encodeURIComponent(t)}function P(){return 1==u?this.$store&&this.$store.state.sessionId&&this.$store.state.sessionId:2==u&&(y&&y.getStorageSync("sessionid"))}function $(){return 1==u&&this.$store&&this.$store.state.miniProgram}function b(){return 1==u?l.GUIDE_URL:2==u?config.GUIDE_URL:void 0}function I(e){return e.link.split("?")[0]}function x(e){var e=e.link.split("?"),n=[];return e.forEach(function(e,t){1<=t&&n.push(e)}),n.join("?")||""}function D(t){var e=getApp();return e.globalData.footerVal?e.globalData.footerVal.componentData.list.findIndex(function(e){return I(e.link)==t.split("?")[0]}):-1}var L=["index","media-video","goods-goodsInfo","goods-commodityMenu","goodsSearch-goodsSearch","chooseStores","activty-receivingGift","activty","login-register","login-phoneLogin","login-authInformation","login-forgetPassWord","login-accountLogin","login-wxRegister","pay-payList","comment-evaluateList","goods-commonProblemList","article-articlePage","article-articleList","goods-posters","liveBroadcast","liveBroadcast-list","personalCenter-coupon-getCoupon","buyerShow-showDetail","goods-addGoodsList","personalCenter-CDkey-exchange","giftCards-linkReceive","giftCoupon-preview","smartForm","shopCart-shareShopCart","groupBuying-beInvite","brandTopics","personalCenter-spokesmanCenter","personalCenter-spokesmanCenter-mine-spokesmanHomePage","liveBroadcast-lived","personalCenter-spokesmanCenter-mine-getBusinessCard","changeAdr"].map(function(e){return"/index"==(e="/"+e.replace(/-/g,"/"))?"/":e});function e(e){var t=e.homeNative,n=e.wx,i=e.getCoupon,o=e.themeMemberCardClick,a=e.requireFun,e=e.extend;if(C=e,u=t,g=a,console.log(g,"-------------------------115"),d=g.createdUserJWT,g.getBcakUrl,y=n,console.log(u,"-------------themeToLinkInit"),console.log("toPage-------------"),c=1==u?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?this.$router.push(t):2==e?window.location.href=t:3==e&&y.navigateTo({url:t})}:2==u?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?y.navigateTo({url:t}):2==e&&y.reLaunch({url:t})}:void 0,1==u)try{r=g.Vue,l=g.shopConfig,r.prototype.$themeToLink=R,h=g.Toast,s=g.hylToLink}catch(e){}else 2==u&&((p=getApp()).$themeToLink=R,p.getCoupon=i,p.themeMemberCardClick=o)}function U(e){if(!(e=e.split("?")[1]))return{};for(var t,n,i=e.split("&"),o={},a=0;a<i.length;a++)t=(n=i[a].split("="))[0],n=n[1],console.log(81,this),o[t]=n;return o}async function R(t){if(console.log(t,"$themeToLink"),console.log(C,"extend======="),C.loginIntercept&&!P()){console.log("走进来了");var e="/pages/login/main?back="+I(t)+"&params="+JSON.stringify(U(t.link));return c({pagePath:e}),!1}var n,i,o,a,r;t.type&&t.link&&t.link.includes("dynamicForm")&&await d().then(function(e){t.link+="&token="+e}).catch(function(e){}),1==u&&this.$store.getters["sceneModule/flushbonadingVisible"]?s.call(this,{data:t,Vue:g.Vue,Dialog:g.Dialog,Toast:g.Toast,hyl:g.hyl,dateFilter:g.dateFilter,shopConfig:g.shopConfig}):2!=(e=t.type)&&2==u&&!function(e){var t=I(e),n=x(e);if(L.includes(t)||"/goods/"==t.substr(0,7)||t.includes("/brandTopics")||P())return!(0<=(i=D(t)))||(i=0==i?D("/"):i,t="/"==t?"/pages/home/main":"/pages/tabBar"+i+"/main",(i=getCurrentPages())[i.length-1].route!=t&&(c({pagePath:t+(n?"?"+n:""),pageType:2}),0));var i="",i=-1<n.indexOf("scene=sso")?"/pages/login/main?back="+t+"&ossLink="+encodeURIComponent(n):"/pages/login/main?back="+t+"&params="+JSON.stringify(U(e.link));return console.log(i,"------------------------190"),c({pagePath:i}),0}(t)||(null!=e&&"undefined"!=e?0==e||(1==e?"/"==t.link.substring(0,1)?1==u?c.call(this,{pagePath:t.link}):2==u&&(n=T(I(t),x(t)),c({pagePath:n})):t.link.startsWith("http")||t.link.startsWith("https")?1==u?c.call(this,{pagePath:t.link,pageType:2}):(n="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c({pagePath:n})):c({pagePath:t.link,pageType:2}):1.1==e?2==u?c({pagePath:t.link}):1==u&&(1==$.call(this)||2==$.call(this)?c.call(this,{pagePath:t.link,pageType:3}):h("暂不支持")):1.2==e?"outerChain:businessCenter"!=t.link?"/"==t.link.substring(0,1)?c.call(this,{pagePath:t.link}):1==u?1==this.$store.state.miniProgram||2==this.$store.state.miniProgram?(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c.call(this,{pagePath:i,pageType:3})):c.call(this,{pagePath:t.link,pageType:2}):2==u&&(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c.call(this,{pagePath:i,pageType:1})):(console.log(b(),"-----getGUIDE_URL()"),o=b()+"/login?mixid="+this.$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),c.call(this,{pagePath:o,pageType:2})):2==e?"themeCouponClick"==(o=t.feature.type)||0==o?1==u?this.$themeCouponClick(t.feature.value.couponCode,t.feature.value):2==u&&p.getCoupon(t.feature.value.couponCode,t.feature.value):1==o?2==t.type&&1==t.feature.type&&function(e){1==u?this.$nuxt.$SHARE({itemList:e.feature.value}):2==u&&p.shareInit({itemList:e.feature.value})}.call(this,t):"themeMemberCardClick"!=o&&2!=o||(1==u?this.$themeMemberCardClick(t.feature.value):2==u&&p.themeMemberCardClick(t.feature.value)):3==e?1==u?1==$.call(this)||2==$.call(this)?this.$store.getters["sceneModule/flushbonadingVisible"]?(a="/pages/toMini/toMini?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c.call(this,{pagePath:a,pageType:3})):(a="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c({pagePath:a})):h("暂不支持"):(r="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c({pagePath:r})):0<t.length&&c.call(this,{pagePath:t.link})):0<t.length&&(1==u?c.call(this,{pagePath:t}):2==u&&(r=T(I(t),x(t)),c({pagePath:r}))))}t.themeToLinkInit=e}.call(this)}.call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1}]},{},[2]);
\ No newline at end of file \ No newline at end of file
// 微信解密 // 微信解密
export function wx_decode(appId,sessionKey,encryptedData,iv) { export function wx_decode(appId, sessionKey, encryptedData, iv) {
var WXBizDataCrypt = require('./WXBizDataCrypt'); var WXBizDataCrypt = require('./WXBizDataCrypt');
var pc = new WXBizDataCrypt(appId, sessionKey); var pc = new WXBizDataCrypt(appId, sessionKey);
var data = pc.decryptData(encryptedData, iv); var data = pc.decryptData(encryptedData, iv);
return data; return data;
}
// 定位方法
export function getUserLocation() {
return new Promise((resolve,reject)=>{
wx.getLocation({
type: 'gcj02', // type有两中类型,gcj02 是腾讯地图所能解析的
success: res => {
resolve(res)
}
})
})
} }
\ No newline at end of file
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("mpBehavior",[],e):"object"==typeof exports?exports.mpBehavior=e():t.mpBehavior=e()}(window,(function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/dist/",r(r.s=22)}([,function(t,e,r){"use strict";var o=SyntaxError,n=Function,i=TypeError,a=function(t){try{return n('"use strict"; return ('+t+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(t){c=null}var p=function(){throw new i},u=c?function(){try{return p}catch(t){try{return c(arguments,"callee").get}catch(t){return p}}}():p,f=r(11)(),l=Object.getPrototypeOf||function(t){return t.__proto__},y={},s="undefined"==typeof Uint8Array?void 0:l(Uint8Array),d={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":f?l([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":n,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?l(l([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?l((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?l((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?l(""[Symbol.iterator]()):void 0,"%Symbol%":f?Symbol:void 0,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":s,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=r(2),m=r(14),h=g.call(Function.call,Array.prototype.concat),v=g.call(Function.apply,Array.prototype.splice),S=g.call(Function.call,String.prototype.replace),j=g.call(Function.call,String.prototype.slice),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,w=function(t){var e=j(t,0,1),r=j(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return S(t,O,(function(t,e,r,o){n[n.length]=r?S(o,A,"$1"):e||t})),n},P=function(t,e){var r,n=t;if(m(b,n)&&(n="%"+(r=b[n])[0]+"%"),m(d,n)){var c=d[n];if(c===y&&(c=function t(e){var r;if("%AsyncFunction%"===e)r=a("async function () {}");else if("%GeneratorFunction%"===e)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=a("async function* () {}");else if("%AsyncGenerator%"===e){var o=t("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&(r=l(n.prototype))}return d[e]=r,r}(n)),void 0===c&&!e)throw new i("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:c}}throw new o("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new i('"allowMissing" argument must be a boolean');var r=w(t),n=r.length>0?r[0]:"",a=P("%"+n+"%",e),p=a.name,u=a.value,f=!1,l=a.alias;l&&(n=l[0],v(r,h([0,1],l)));for(var y=1,s=!0;y<r.length;y+=1){var b=r[y],g=j(b,0,1),S=j(b,-1);if(('"'===g||"'"===g||"`"===g||'"'===S||"'"===S||"`"===S)&&g!==S)throw new o("property names with quotes must have matching quotes");if("constructor"!==b&&s||(f=!0),m(d,p="%"+(n+="."+b)+"%"))u=d[p];else if(null!=u){if(!(b in u)){if(!e)throw new i("base intrinsic for "+t+" exists, but the property is not available.");return}if(c&&y+1>=r.length){var O=c(u,b);u=(s=!!O)&&"get"in O&&!("originalValue"in O.get)?O.get:u[b]}else s=m(u,b),u=u[b];s&&!f&&(d[p]=u)}}return u}},function(t,e,r){"use strict";var o=r(13);t.exports=Function.prototype.bind||o},function(t,e,r){"use strict";var o=String.prototype.replace,n=/%20/g,i="RFC1738",a="RFC3986";t.exports={default:a,formatters:{RFC1738:function(t){return o.call(t,n,"+")},RFC3986:function(t){return String(t)}},RFC1738:i,RFC3986:a}},function(t,e,r){"use strict";var o=r(3),n=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),c=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},o=0;o<t.length;++o)void 0!==t[o]&&(r[o]=t[o]);return r};t.exports={arrayToObject:c,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var n=e[o],a=n.obj[n.prop],c=Object.keys(a),p=0;p<c.length;++p){var u=c[p],f=a[u];"object"==typeof f&&null!==f&&-1===r.indexOf(f)&&(e.push({obj:a,prop:u}),r.push(f))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var o=t.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(t){return o}},encode:function(t,e,r,n,i){if(0===t.length)return t;var c=t;if("symbol"==typeof t?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var p="",u=0;u<c.length;++u){var f=c.charCodeAt(u);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===o.RFC1738&&(40===f||41===f)?p+=c.charAt(u):f<128?p+=a[f]:f<2048?p+=a[192|f>>6]+a[128|63&f]:f<55296||f>=57344?p+=a[224|f>>12]+a[128|f>>6&63]+a[128|63&f]:(u+=1,f=65536+((1023&f)<<10|1023&c.charCodeAt(u)),p+=a[240|f>>18]+a[128|f>>12&63]+a[128|f>>6&63]+a[128|63&f])}return p},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,r,o){if(!r)return e;if("object"!=typeof r){if(i(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var a=e;return i(e)&&!i(r)&&(a=c(e,o)),i(e)&&i(r)?(r.forEach((function(r,i){if(n.call(e,i)){var a=e[i];a&&"object"==typeof a&&r&&"object"==typeof r?e[i]=t(a,r,o):e.push(r)}else e[i]=r})),e):Object.keys(r).reduce((function(e,i){var a=r[i];return n.call(e,i)?e[i]=t(e[i],a,o):e[i]=a,e}),a)}}},function(t,e,r){var o=r(6),n=r(7);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||n(a)}},function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var o=new Uint8Array(16);t.exports=function(){return r(o),o}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},function(t,e){for(var r=[],o=0;o<256;++o)r[o]=(o+256).toString(16).substr(1);t.exports=function(t,e){var o=e||0,n=r;return[n[t[o++]],n[t[o++]],n[t[o++]],n[t[o++]],"-",n[t[o++]],n[t[o++]],"-",n[t[o++]],n[t[o++]],"-",n[t[o++]],n[t[o++]],"-",n[t[o++]],n[t[o++]],n[t[o++]],n[t[o++]],n[t[o++]],n[t[o++]]].join("")}},function(t,e,r){"use strict";var o=r(9),n=r(19),i=r(3);t.exports={formats:i,parse:n,stringify:o}},function(t,e,r){"use strict";var o=r(10),n=r(4),i=r(3),a=Object.prototype.hasOwnProperty,c={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},p=Array.isArray,u=Array.prototype.push,f=function(t,e){u.apply(t,p(e)?e:[e])},l=Date.prototype.toISOString,y=i.default,s={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:y,formatter:i.formatters[y],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},d=function t(e,r,i,a,c,u,l,y,d,b,g,m,h,v,S){var j,O=e;if(S.has(e))throw new RangeError("Cyclic object value");if("function"==typeof l?O=l(r,O):O instanceof Date?O=b(O):"comma"===i&&p(O)&&(O=n.maybeMap(O,(function(t){return t instanceof Date?b(t):t}))),null===O){if(a)return u&&!h?u(r,s.encoder,v,"key",g):r;O=""}if("string"==typeof(j=O)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||n.isBuffer(O))return u?[m(h?r:u(r,s.encoder,v,"key",g))+"="+m(u(O,s.encoder,v,"value",g))]:[m(r)+"="+m(String(O))];var A,w=[];if(void 0===O)return w;if("comma"===i&&p(O))A=[{value:O.length>0?O.join(",")||null:void 0}];else if(p(l))A=l;else{var P=Object.keys(O);A=y?P.sort(y):P}for(var x=0;x<A.length;++x){var E=A[x],k="object"==typeof E&&void 0!==E.value?E.value:O[E];if(!c||null!==k){var I=p(O)?"function"==typeof i?i(r,E):r:r+(d?"."+E:"["+E+"]");S.set(e,!0);var F=o();f(w,t(k,I,i,a,c,u,l,y,d,b,g,m,h,v,F))}}return w};t.exports=function(t,e){var r,n=t,u=function(t){if(!t)return s;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||s.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==t.format){if(!a.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=i.formatters[r],n=s.filter;return("function"==typeof t.filter||p(t.filter))&&(n=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:s.addQueryPrefix,allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,delimiter:void 0===t.delimiter?s.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:s.encode,encoder:"function"==typeof t.encoder?t.encoder:s.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:s.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:s.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:s.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);"function"==typeof u.filter?n=(0,u.filter)("",n):p(u.filter)&&(r=u.filter);var l,y=[];if("object"!=typeof n||null===n)return"";l=e&&e.arrayFormat in c?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var b=c[l];r||(r=Object.keys(n)),u.sort&&r.sort(u.sort);for(var g=o(),m=0;m<r.length;++m){var h=r[m];u.skipNulls&&null===n[h]||f(y,d(n[h],h,b,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,g))}var v=y.join(u.delimiter),S=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),v.length>0?S+v:""}},function(t,e,r){"use strict";var o=r(1),n=r(15),i=r(17),a=o("%TypeError%"),c=o("%WeakMap%",!0),p=o("%Map%",!0),u=n("WeakMap.prototype.get",!0),f=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),y=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),d=n("Map.prototype.has",!0),b=function(t,e){for(var r,o=t;null!==(r=o.next);o=r)if(r.key===e)return o.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,o={assert:function(t){if(!o.has(t))throw new a("Side channel does not contain "+i(t))},get:function(o){if(c&&o&&("object"==typeof o||"function"==typeof o)){if(t)return u(t,o)}else if(p){if(e)return y(e,o)}else if(r)return function(t,e){var r=b(t,e);return r&&r.value}(r,o)},has:function(o){if(c&&o&&("object"==typeof o||"function"==typeof o)){if(t)return l(t,o)}else if(p){if(e)return d(e,o)}else if(r)return function(t,e){return!!b(t,e)}(r,o);return!1},set:function(o,n){c&&o&&("object"==typeof o||"function"==typeof o)?(t||(t=new c),f(t,o,n)):p?(e||(e=new p),s(e,o,n)):(r||(r={key:{},next:null}),function(t,e,r){var o=b(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(r,o,n))}};return o}},function(t,e,r){"use strict";var o="undefined"!=typeof Symbol&&Symbol,n=r(12);t.exports=function(){return"function"==typeof o&&("function"==typeof Symbol&&("symbol"==typeof o("foo")&&("symbol"==typeof Symbol("bar")&&n())))}},function(t,e,r){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},function(t,e,r){"use strict";var o="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError(o+e);for(var r,a=n.call(arguments,1),c=function(){if(this instanceof r){var o=e.apply(this,a.concat(n.call(arguments)));return Object(o)===o?o:this}return e.apply(t,a.concat(n.call(arguments)))},p=Math.max(0,e.length-a.length),u=[],f=0;f<p;f++)u.push("$"+f);if(r=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var l=function(){};l.prototype=e.prototype,r.prototype=new l,l.prototype=null}return r}},function(t,e,r){"use strict";var o=r(2);t.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,r){"use strict";var o=r(1),n=r(16),i=n(o("String.prototype.indexOf"));t.exports=function(t,e){var r=o(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?n(r):r}},function(t,e,r){"use strict";var o=r(2),n=r(1),i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),c=n("%Reflect.apply%",!0)||o.call(a,i),p=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),f=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=c(o,a,arguments);if(p&&u){var r=p(e,"length");r.configurable&&u(e,"length",{value:1+f(0,t.length-(arguments.length-1))})}return e};var l=function(){return c(o,i,arguments)};u?u(t.exports,"apply",{value:l}):t.exports.apply=l},function(t,e,r){var o="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=o&&n&&"function"==typeof n.get?n.get:null,a=o&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,p=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=c&&p&&"function"==typeof p.get?p.get:null,f=c&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,y="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,b=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,h="function"==typeof BigInt?BigInt.prototype.valueOf:null,v=Object.getOwnPropertySymbols,S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,O=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),w=r(18).custom,P=w&&F(w)?w:null,x="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function E(t,e,r){var o="double"===(r.quoteStyle||e)?'"':"'";return o+t+o}function k(t){return String(t).replace(/"/g,"&quot;")}function I(t){return!("[object Array]"!==M(t)||x&&"object"==typeof t&&x in t)}function F(t){if(j)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!S)return!1;try{return S.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,o,n){var c=r||{};if(N(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(N(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=!N(c,"customInspect")||c.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(N(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,r){if(e.length>r.maxStringLength){var o=e.length-r.maxStringLength,n="... "+o+" more character"+(o>1?"s":"");return t(e.slice(0,r.maxStringLength),r)+n}return E(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,D),"single",r)}(e,c);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var b=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=b&&b>0&&"object"==typeof e)return I(e)?"[Array]":"[Object]";var v=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=Array(t.indent+1).join(" ")}return{base:r,prev:Array(e+1).join(r)}}(c,o);if(void 0===n)n=[];else if(_(n,e)>=0)return"[Circular]";function O(e,r,i){if(r&&(n=n.slice()).push(r),i){var a={depth:c.depth};return N(c,"quoteStyle")&&(a.quoteStyle=c.quoteStyle),t(e,a,o+1,n)}return t(e,c,o+1,n)}if("function"==typeof e){var w=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),R=W(e,O);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(R.length>0?" { "+R.join(", ")+" }":"")}if(F(e)){var L=j?String(e).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):S.call(e);return"object"!=typeof e||j?L:U(L)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var G="<"+String(e.nodeName).toLowerCase(),V=e.attributes||[],H=0;H<V.length;H++)G+=" "+V[H].name+"="+E(k(V[H].value),"double",c);return G+=">",e.childNodes&&e.childNodes.length&&(G+="..."),G+="</"+String(e.nodeName).toLowerCase()+">"}if(I(e)){if(0===e.length)return"[]";var q=W(e,O);return v&&!function(t){for(var e=0;e<t.length;e++)if(_(t[e],"\n")>=0)return!1;return!0}(q)?"["+T(q,v)+"]":"[ "+q.join(", ")+" ]"}if(function(t){return!("[object Error]"!==M(t)||x&&"object"==typeof t&&x in t)}(e)){var z=W(e,O);return 0===z.length?"["+String(e)+"]":"{ ["+String(e)+"] "+z.join(", ")+" }"}if("object"==typeof e&&p){if(P&&"function"==typeof e[P])return e[P]();if("symbol"!==p&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var $=[];return a.call(e,(function(t,r){$.push(O(r,e,!0)+" => "+O(t,e))})),B("Map",i.call(e),$,v)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var Q=[];return f.call(e,(function(t){Q.push(O(t,e))})),B("Set",u.call(e),Q,v)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{y.call(t,y)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return C("WeakMap");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{y.call(t,y);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return C("WeakSet");if(function(t){if(!s||!t||"object"!=typeof t)return!1;try{return s.call(t),!0}catch(t){}return!1}(e))return C("WeakRef");if(function(t){return!("[object Number]"!==M(t)||x&&"object"==typeof t&&x in t)}(e))return U(O(Number(e)));if(function(t){if(!t||"object"!=typeof t||!h)return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return U(O(h.call(e)));if(function(t){return!("[object Boolean]"!==M(t)||x&&"object"==typeof t&&x in t)}(e))return U(d.call(e));if(function(t){return!("[object String]"!==M(t)||x&&"object"==typeof t&&x in t)}(e))return U(O(String(e)));if(!function(t){return!("[object Date]"!==M(t)||x&&"object"==typeof t&&x in t)}(e)&&!function(t){return!("[object RegExp]"!==M(t)||x&&"object"==typeof t&&x in t)}(e)){var J=W(e,O),K=A?A(e)===Object.prototype:e instanceof Object||e.constructor===Object,X=e instanceof Object?"":"null prototype",Y=!K&&x&&Object(e)===e&&x in e?M(e).slice(8,-1):X?"Object":"",Z=(K||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(Y||X?"["+[].concat(Y||[],X||[]).join(": ")+"] ":"");return 0===J.length?Z+"{}":v?Z+"{"+T(J,v)+"}":Z+"{ "+J.join(", ")+" }"}return String(e)};var R=Object.prototype.hasOwnProperty||function(t){return t in this};function N(t,e){return R.call(t,e)}function M(t){return b.call(t)}function _(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function D(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+e.toString(16).toUpperCase()}function U(t){return"Object("+t+")"}function C(t){return t+" { ? }"}function B(t,e,r,o){return t+" ("+e+") {"+(o?T(r,o):r.join(", "))+"}"}function T(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+t.join(","+r)+"\n"+e.prev}function W(t,e){var r=I(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=N(t,n)?e(t[n],t):""}var i,a="function"==typeof v?v(t):[];if(j){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var p in t)N(t,p)&&(r&&String(Number(p))===p&&p<t.length||j&&i["$"+p]instanceof Symbol||(/[^\w$]/.test(p)?o.push(e(p,t)+": "+e(t[p],t)):o.push(p+": "+e(t[p],t))));if("function"==typeof v)for(var u=0;u<a.length;u++)O.call(t,a[u])&&o.push("["+e(a[u])+"]: "+e(t[a[u]],t));return o}},function(t,e){},function(t,e,r){"use strict";var o=r(4),n=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:o.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},p=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=c?i.slice(0,c.index):i,f=[];if(u){if(!r.plainObjects&&n.call(Object.prototype,u)&&!r.allowPrototypes)return;f.push(u)}for(var l=0;r.depth>0&&null!==(c=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&n.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(c[1])}return c&&f.push("["+i.slice(c.index)+"]"),function(t,e,r,o){for(var n=o?e:p(e,r),i=t.length-1;i>=0;--i){var a,c=t[i];if("[]"===c&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,f=parseInt(u,10);r.parseArrays||""!==u?!isNaN(f)&&c!==u&&String(f)===u&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[])[f]=n:a[u]=n:a={0:n}}n=a}return n}(f,e,r,o)}};t.exports=function(t,e){var r=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||o.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var f="string"==typeof t?function(t,e){var r,u={},f=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,l=e.parameterLimit===1/0?void 0:e.parameterLimit,y=f.split(e.delimiter,l),s=-1,d=e.charset;if(e.charsetSentinel)for(r=0;r<y.length;++r)0===y[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===y[r]?d="utf-8":"utf8=%26%2310003%3B"===y[r]&&(d="iso-8859-1"),s=r,r=y.length);for(r=0;r<y.length;++r)if(r!==s){var b,g,m=y[r],h=m.indexOf("]="),v=-1===h?m.indexOf("="):h+1;-1===v?(b=e.decoder(m,a.decoder,d,"key"),g=e.strictNullHandling?null:""):(b=e.decoder(m.slice(0,v),a.decoder,d,"key"),g=o.maybeMap(p(m.slice(v+1),e),(function(t){return e.decoder(t,a.decoder,d,"value")}))),g&&e.interpretNumericEntities&&"iso-8859-1"===d&&(g=c(g)),m.indexOf("[]=")>-1&&(g=i(g)?[g]:g),n.call(u,b)?u[b]=o.combine(u[b],g):u[b]=g}return u}(t,r):t,l=r.plainObjects?Object.create(null):{},y=Object.keys(f),s=0;s<y.length;++s){var d=y[s],b=u(d,f[d],r,"string"==typeof t);l=o.merge(l,b,r)}return!0===r.allowSparse?l:o.compact(l)}},,,function(t,e,r){function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var n=r(5),i=r(8),a="",c={mode:"development"};function p(){var t=wx.getStorageSync("_ma_uid");return t||(t=n(),console.debug("uid:",t),wx.setStorageSync("_ma_uid",t)),t}function u(){var t=n();return console.debug("sid:",t),t}var f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._fp={sid:u(),uid:p()},this.isInit=!1}var e,r,n;return e=t,n=[{key:"getInstance",value:function(){return this.instance||(this.instance=new t),this.instance}}],(r=[{key:"init",value:function(t,e,r){this._fp.pid=t,this._fp.cpid=e,this._fp.gid=r.gid,this._fp=Object.assign({},this._fp),console.log(this._fp,"--init"),this.config=Object.assign({},c,r),a="production"==this.config.mode?"https://analytics.mayi888.com/ma.gif?":"https://analytics.mayi888.cn/ma.gif?",this.isInit=!0,this._send()}},{key:"_send",value:function(t){console.log(t);var e=Object.assign({},this._fp,t);wx.request({url:a+i.stringify(e),method:"GET",success:function(t){console.log("用户行为上报成功",t)},fail:function(t){console.log("用户行为上报失败",t)}})}}])&&o(e.prototype,r),n&&o(e,n),t}().getInstance();t.exports=f}])}));
//# sourceMappingURL=mayi.mpBehavior.js.map
\ No newline at end of file
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