|
@@ -57,7 +57,7 @@ Page({
|
|
|
url: `/pages/postageManage/postageManage?card_type=${cardtype}`,
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
@@ -81,10 +81,8 @@ Page({
|
|
|
if(res.datas && res.datas.goods){
|
|
|
const datas = res.datas
|
|
|
const { tips = '', goods = [], cards = [], } = datas
|
|
|
-
|
|
|
const sinopec = this.getValueBykey('sinopec', cards)
|
|
|
- const petrochina = this.getValueBykey('petrochina', cards)
|
|
|
-
|
|
|
+ const petrochina = this.getValueBykey('petrochina', cards)
|
|
|
this.setData({ tips, goods, cards, sinopec, petrochina, card_no: sinopec.card_no, goods_id: datas.goods[0].goods_id });
|
|
|
}
|
|
|
} else {
|
|
@@ -93,7 +91,8 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
// 通过键取值
|
|
|
- getValueBykey(key = '', data = []){
|
|
|
+ getValueBykey(key = '', data = [])
|
|
|
+ {
|
|
|
if(!data.length) {
|
|
|
return {};
|
|
|
}
|