mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-06-07 02:12:25 +08:00
商品详情接口调整
This commit is contained in:
@ -454,6 +454,7 @@ Page({
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if (res.data.code == 0) {
|
||||
var spec_type = res.data.data.spec_type;
|
||||
var spec_count = spec.length;
|
||||
var index = spec_count > 0 ? spec_count : 0;
|
||||
if (index < sku_count) {
|
||||
@ -463,8 +464,8 @@ Page({
|
||||
temp_data[i]['value'][k]['is_dont'] = '';
|
||||
var temp_value = temp_data[i]['value'][k]['name'];
|
||||
var temp_status = false;
|
||||
for (var t in res.data.data) {
|
||||
if (res.data.data[t] == temp_value) {
|
||||
for (var t in spec_type) {
|
||||
if (spec_type[t] == temp_value) {
|
||||
temp_status = true;
|
||||
break;
|
||||
}
|
||||
@ -524,10 +525,11 @@ Page({
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
if (res.data.code == 0) {
|
||||
var spec_base = res.data.data.spec_base;
|
||||
this.setData({
|
||||
goods_spec_base_price: res.data.data.price,
|
||||
goods_spec_base_original_price: res.data.data.original_price,
|
||||
goods_spec_base_inventory: res.data.data.inventory
|
||||
goods_spec_base_price: spec_base.price,
|
||||
goods_spec_base_original_price: spec_base.original_price,
|
||||
goods_spec_base_inventory: spec_base.inventory
|
||||
});
|
||||
} else {
|
||||
app.showToast(res.data.msg);
|
||||
|
||||
Reference in New Issue
Block a user