微信小程序接受参数去掉单引号
onLoad: function (options) {var that = this;if (options.id == '0') {console.log('无传入值,不是经过扫码进入的。)that.setData({dyProfit: options.id})}else if (options.profit.length 6) {console.log('这里有值options.id')console.log(options.id)that.setData({dyProfit: options.id.replace(/'/g, "")})}}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

