微信小程序实现商品属性联动选择(2)

submit: function () { var value = []; for (var i = 0; i < this.data.attrValueList.length; i++) { if (!this.data.attrValueList[i].selectedValue) { break; } value.push(this.data.attrValueList[i].selectedValue); } if (i < this.data.attrValueList.length) { wx.showToast({ title: '请选择完整!', icon: 'loading', duration: 1000 }) } else { var valueStr = ""; for(var i = 0;i < value.length;i++){ console.log(value[i]); valueStr += value[i]+","; } wx.showModal({ title: '提示', content: valueStr, success: function (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) { console.log('用户点击取消') } } }) console.log(valueStr); } }

3、commodity.wxss

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6fdbd3af2fd42d9bdc76014021c50afe.html