EP-WachatApp/eaterplanet_ecommerce/components/vipPrice/vipPrice.js

24 lines
453 B
JavaScript
Raw Normal View History

2023-03-24 11:24:28 +08:00
// eaterplanet_ecommerce/components/vipPrice.js
Component({
properties: {
price: {
type: null,
value: '0',
observer: function(t){
let prePrice = t;
if(Object.prototype.toString.call(t) === '[object Array]') {
prePrice = t.join('.');
}
this.setData({ prePrice })
}
},
type: {
type: String,
value: '0' // 1等级折扣
}
},
data: {
prePrice: 0
}
})