Commit 2806e4ad authored by zhangyanni's avatar zhangyanni

ceshi

parent 100abb00
globals: { wx: true }, globals: { wx: true }
\ No newline at end of file \ No newline at end of file
...@@ -236,6 +236,16 @@ ...@@ -236,6 +236,16 @@
this.detailInfo.shareTitle = this.detailInfo.channelTitle; this.detailInfo.shareTitle = this.detailInfo.channelTitle;
this.detailInfo.url = document.location.href; this.detailInfo.url = document.location.href;
this.config = res.result; this.config = res.result;
wx.miniProgram.getEnv(function(res) {
if(res.miniprogram){
wx.miniProgram.postMessage({
data: that.detailInfo
})
// true代表在小程序里
}else{
wx.config({ wx.config({
debug:true,// 是否开启调试模式 debug:true,// 是否开启调试模式
appId:res.result.appId,//appid appId:res.result.appId,//appid
...@@ -310,16 +320,6 @@ ...@@ -310,16 +320,6 @@
}) })
}); });
wx.miniProgram.getEnv(function(res) {
if(res.miniprogram){
wx.miniProgram.postMessage({
data: that.detailInfo
})
// true代表在小程序里
}else{
that.dialogVisible = true; that.dialogVisible = true;
that.popupVisible = false; that.popupVisible = false;
//false代表在公众号里 //false代表在公众号里
......
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