79 lines
1.5 KiB
JavaScript
79 lines
1.5 KiB
JavaScript
// packageH/deposit_group/component/goodsDetail/goodsDetail.js
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
show: {
|
|
value: false,
|
|
type: Boolean,
|
|
},
|
|
|
|
goodsInfo: {
|
|
value: {},
|
|
type: Object,
|
|
},
|
|
OrderNum: {
|
|
value: 1,
|
|
type: Number
|
|
},
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
language: {},
|
|
getMarketPrice: "",
|
|
timeData: {},
|
|
goodsInfo: {
|
|
thumb_url: [
|
|
"https://img.yzcdn.cn/upload_files/2020/03/31/Fh0JRCgClmgcMRaD9elw3ZgJDN-2.jpg",
|
|
"https://img.yzcdn.cn/upload_files/2020/03/31/FhaAiL_aSqAQBkZfQa1ogFI7z3NF.jpg",
|
|
],
|
|
},
|
|
},
|
|
lifetimes: {
|
|
ready() {
|
|
try {
|
|
wx.getStorage({
|
|
key: "langIndex",
|
|
success: (res) => {
|
|
this.setData({ language: res.data.en });
|
|
},
|
|
});
|
|
wx.getStorage({
|
|
key: "yz_basic_info",
|
|
success: (res) => {
|
|
this.setData({
|
|
getMarketPrice: res.data.lang.goods.market_price,
|
|
getprice: res.data.lang.goods.price,
|
|
});
|
|
},
|
|
});
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|
|
},
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
popupSpecsbtn(evt) {
|
|
console.log(evt);
|
|
this.setData({ show: false });
|
|
},
|
|
onChangeTime(e) {
|
|
this.setData({
|
|
timeData: e.detail,
|
|
});
|
|
},
|
|
addCart(e) {
|
|
let num = e.currentTarget.dataset.num;
|
|
this.triggerEvent("addCart", num);
|
|
},
|
|
},
|
|
});
|