收藏
回答

微信内嵌h5页面?

微信小程序内嵌h5页面,页面中不显示二维码,但是打开的链接中有二维码


wxml:

<web-view src="{{wxUrl}}"></web-view>

js:

data: {

wxConfigBindShopManager: {

url: "https://open.weixin.qq.com/connect/qrconnect?appid=xxxxxx&state=bind&response_type=code&scope=snsapi_login&redirect_uri=http%3A%2F%2Fsaishangfang.com%2Ffront%2Fwx%2FwxBindEpy.html",

redirectUrl: "http://saishangfang.com/front/wx/wxBindEpy.html",

appID: "xxxxxxxxxxx",

appSecret: "xxxxxxxxxxxx",

href: "https://www.saishangfang.com/static/modules/front/bms/css/login.css"

},

wxUrl: '',

},


/**

  * 生命周期函数--监听页面加载

  */

onLoad: function (options) {

console.log(options.storeId)

var config = this.data.wxConfigBindShopManager;

var url = config.url + '?storeId=' + options.storeId + "&href=" + config.href;

this.setData({

wxUrl: url

})

console.log(url)

},


回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容
问题标签