html52.com
我爱小程序-开发者交流社区

小程序分享白屏?

小程序生成海报分享都是成功的 但是分享链接就失败了 点链接进入小程序直接白屏
if (!uni.getStorageSync('shareData')) {
				const scene = decodeURIComponent(options.scene) //拿到扫码进入小程序得参数
				const sceneData = options.sceneData //分享微信好友
				if (scene != 'undefined') { //扫码
					let data = await this.$Request.get('/share/shareGet/' + scene.split(',')[0]) //获取分享参数
					if (data.code == 200) {
						//console.log(data, '扫码')
						let goods = JSON.parse(data.object)
						uni.setStorageSync('goodsData', {
							goodsId: goods.goodsId,
							goodsType: goods.goodsType
						})
						uni.setStorageSync('invitePeoplePhone', goods.invitePeoplePhone)
					}
					this.$showToast("none", 2000, scene.split(',')[0])
				}
				if (options.sceneData) { //分享链接
					this.$showToast("none", 2000, options.sceneData + '分享链接2')
					console.log(options.sceneData + '分享链接2')
					let data = await this.$Request.get('/share/shareGet/' + options.sceneData)
					if (data.code == 200) {
						let goods = JSON.parse(data.object)
						uni.setStorageSync('goodsData', {
							goodsId: goods.goodsId,
							goodsType: goods.goodsType
						})
						uni.setStorageSync('invitePeoplePhone', goods.invitePeoplePhone)
					}
				}
				this.goodsDetails = uni.getStorageSync('goodsData')
				if (uni.getStorageSync('invitePeoplePhone')) {
					this.createOrderData.invitePeoplePhone = uni.getStorageSync('invitePeoplePhone')
				}
				this.getInfo()
				this.getSearchForBuyerInfo()
				this.getSpecifications()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付