Commit 6a28c806 by 朱继来

fix conflict

parent a27bbd7b
Showing with 32 additions and 10 deletions
......@@ -51,8 +51,8 @@ return [
'check-user-url' => 'http://member.liexin.net/list',
// 查询SKUID接口
// 'search-skuid' => 'http://footstone.liexin.net/webapi/sku_list',
'search-skuid' => 'http://www.liexin.com/v3/sku/list',
'search-skuid' => 'http://footstone.liexin.net/webapi/goods_details',
// 'search-skuid' => 'http://www.liexin.com/v3/sku/list',
// 新增SKU入口
'add-sku-url' => 'http://footstone.liexin.net/manage/addsku',
......
......@@ -220,7 +220,7 @@
$.ajax({
url: '/ajax/getSku',
type: 'post',
data: {sku_id : sku_id.trim()},
data: {sku_id : sku_id.trim(), goods_type: goods_type},
dataType: 'json',
success: function (resp) {
if (resp.errcode != 0) {
......@@ -259,25 +259,47 @@
//阶梯价格
if (data.ladder_price != null) {
var len = data.ladder_price.length;
if (data.ladder_price.constructor == String) { //如果阶梯价为字符串,则转换为数字
var price_arr = eval(data.ladder_price);
} else {
var price_arr = data.ladder_price;
}
var len = price_arr.length;
if (len > 0) {
var html = '';
var str = '';
for (var i = 0; i < len; i++) {
html += '<tr>';
if (i == 0) {
if (goods_type == 1) {
str = '<td>$<span class="goods-min-price-us">'+data.ladder_price[i]['price_us']+'</span></td>';
if (data.ac_type) {
html += '<td><span class="goods-min-num">'+price_arr[i]['purchases']+'</span></td><td>¥<span class="goods-min-price">'+price_arr[i]['price_cn']+'</span><td>¥<span>'+price_arr[i]['price_ac']+'</span></td>';
} else {
html += '<td><span class="goods-min-num">'+price_arr[i]['purchases']+'</span></td><td>¥<span class="goods-min-price">'+price_arr[i]['price_cn']+'</span></td>';
}
html += '<tr><td><span class="goods-min-num">'+data.ladder_price[i]['purchases']+'</span></td><td>¥<span class="goods-min-price">'+data.ladder_price[i]['price_cn']+'</span></td>'+str+'</tr>';
if (goods_type == 1) {
html += '<td>$<span class="goods-min-price-us">'+price_arr[i]['price_us']+'</span></td>';
}
} else {
if (data.ac_type) {
html += '<td><span>'+price_arr[i]['purchases']+'</span></td><td>¥<span>'+price_arr[i]['price_cn']+'</span></td><td>¥<span>'+price_arr[i]['price_ac']+'</span></td>';
} else {
html += '<td><span>'+price_arr[i]['purchases']+'</span></td><td>¥<span>'+price_arr[i]['price_cn']+'</span></td>';
}
if (goods_type == 1) {
str = '<td>$<span>'+data.ladder_price[i]['price_us']+'</span></td>';
html += '<td>$<span>'+price_arr[i]['price_us']+'</span></td>';
}
}
html += '<tr><td><span>'+data.ladder_price[i]['purchases']+'</span></td><td>¥<span>'+data.ladder_price[i]['price_cn']+'</span></td>'+str+'</tr>';
html += '</tr>';
}
if (data.ac_type == 1) {
$('.ladder_price_table tr:eq(0)').append('<th>活动价</th>')
}
$('.ladder_price_table tr:gt(0)').remove();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment