暂时去掉登录时候client参数,会引发account唯一索引错误

This commit is contained in:
2025-05-13 14:44:56 +08:00
parent a079f9d9fe
commit 1b6971407d
34 changed files with 1980 additions and 207 deletions

View File

@ -279,7 +279,8 @@ var _default = {
id: 0,
showSpec: false,
goods: [],
spec: []
spec: [],
checkedGoods: {}
};
},
onLoad: function onLoad(options) {
@ -328,22 +329,30 @@ var _default = {
this.spec = data.spec;
this.showSpec = false;
},
// 购买商品
onBuy: function onBuy() {
// 这里需压判断选购规格
onChangeGoods: function onChangeGoods(e) {
console.log(e);
this.checkedGoods = e.detail;
},
// 选择规格
showSpecFun: function showSpecFun() {
if (!this.isLogin) return (0, _login.toLogin)();
this.$store.commit("setBuyGoods", {
id: this.id,
// 商品id
num: 1,
// 购买商品数量
spec: this.spec // 选中的商品规格
});
// console.log("this.$>>>", this.$store.state.goods.buyGoods);
this.showSpec = true;
},
// 购买商品
onBuy: function onBuy(e) {
var _e$detail = e.detail,
id = _e$detail.id,
goodsNum = _e$detail.goodsNum;
var goods = [{
item_id: id,
num: goodsNum
}];
var params = {
goods: goods
};
this.showSpec = false;
uni.navigateTo({
url: "/pages/order_now/order_now"
url: '/pages/order_now/order_now?data=' + encodeURIComponent(JSON.stringify(params))
});
}
}