Authored by wangwei

Merge branch 'gray' into test6.7

... ... @@ -58,15 +58,15 @@
<div class="form-group">
<label for="recommendText1" class="col-sm-3 control-label" style="text-align: center">推荐语:</label>
<div class="col-sm-5">
<input type="te将这个支付方式推荐到确认订单页面么xt" id="recommendText1" name="recommendText1" value="[[recommendText1]]" class="form-control" maxlength="20" />
<input type="te将这个支付方式推荐到确认订单页面么xt" id="recommendText1" name="recommendText1" value="[[recommendText1]]" class="form-control" maxlength="30" />
</div>
<div class="col-sm-4"><label style="color: #999"> * 建议10个字以内,不超过20个字</label></div>
<div class="col-sm-4"><label style="color: #999"> * 建议10个字以内,不超过30个字</label></div>
</div>
[[if payName=='Huawei Pay/Mi Pay/MeiZu Pay/SamSung Pay'||payName=='Apple Pay']]
<div class="form-group">
<label class="col-sm-3 control-label" style="text-align: center">未开通文案:</label>
<div class="col-sm-5">
<input type="text" id="noOpenText" name="noOpenText" value="[[noOpenText]]" class="form-control" maxlength="20" />
<input type="text" id="noOpenText" name="noOpenText" value="[[noOpenText]]" class="form-control" maxlength="30" />
</div>
</div>
[[/if]]
... ...
... ... @@ -47,7 +47,10 @@ webpackJsonp([18],[
display: "LOGO",
name: "brandIco",
render: function(item) {
return '<img src="' + item.brandIco + '" width="100" height="100"/>'
if (item.brandIco) {
return '<img src="' + item.brandIco + '" width="100" height="100"/>';
}
return '';
}
}, {
display: '品牌名称',
... ...
... ... @@ -48,13 +48,19 @@ webpackJsonp([21],[
display:"品牌Logo",
name:"brandIco",
render: function(item) {
return '<img src="' + item.brandIco + '" width="100" height="100" id="logo-' + item.__index + '" class="logo-image" />'
if (item.brandIco) {
return '<img src="' + item.brandIco + '" width="100" height="100" id="logo-' + item.__index + '" class="logo-image" />';
}
return '<div id="logo-' + item.__index + '"/>';
}
}, {
display:"线下店品牌Logo",
name:"offlineBrandIco",
render: function(item) {
return '<img src="' + item.offlineBrandIco + '" width="100" height="100" id="offline-logo-' + item.__index + '"/>'
if (item.offlineBrandIco) {
return '<img src="' + item.offlineBrandIco + '" width="100" height="100" id="offline-logo-' + item.__index + '"/>';
}
return '<div id="offline-logo-' + item.__index + '"/>';
}
},{
display: '品牌名称',
... ...
... ... @@ -14,31 +14,24 @@ webpackJsonp([120],[
var g = new common.grid({
el: '#payment-list',
columns: [
{display: "ID", name: "id"},
{display: '支付方式名称', render:function(item){
if(item.id=='4'){
return "Apple Pay(北京银联)";
}else if(item.id=='5'){
return "银联支付(北京银联)";
}else if(item.id=='24'){
return "Apple Pay(江苏银联)";
}else if(item.id=='26'){
return "银联支付(江苏银联)";
}else{
return item.payName;
}
}},
{display: '推荐到确认订单页', render: function (item) {
var rop = ENUM.recommendOrderPage[item.recommendOrderPage];
return item.recommendOrderPage == 1 ? rop+"("+item.recommendWords+")" : rop;
}},
{display: '前端显示', render: function (item) {
var rop = ENUM.displayFirstSight[item.displayFirstSight];
return item.displayFirstSight == 1 ? rop+"("+item.displayFirstSight+")" : rop;
{display: '支付名称', render:function(item){
return item.payName;
//if(item.id=='4'){
// return "Apple Pay(北京银联)";
//}else if(item.id=='5'){
// return "银联支付(北京银联)";
//}else if(item.id=='24'){
// return "Apple Pay(江苏银联)";
//}else if(item.id=='26'){
// return "银联支付(江苏银联)";
//}else{
// return item.payName;
//}
}},
{display: "前端排序", name: "sortNumber"},
{display: "推荐语1", name: "recommendText1"},
{display: "推荐语2", name: "recommendText2"},
{display: "前端显示排序", name: "sortNumber"},
{display: "推荐语", name: "recommendText1"},
{display:"未开通文案",name:"noOpenText"},
//{display: "推荐语2", name: "recommendText2"},
{display: '操作', render: function (item) {
var HtmArr = [];
HtmArr.push('<a href="javascript:" class="btn btn-info btn-xs edit-btn" data-index="'+item.__index+'">编辑</a>');
... ... @@ -63,8 +56,6 @@ webpackJsonp([120],[
$(document).on("click", ".edit-btn", function () {
var _index = $(this).data("index");
var data = g.rows[_index];
var recommendOrderPage_old = data.recommendOrderPage;
var displayFirstSight_old = data.displayFirstSight;
var d = new common.dialog({
title: "支付方式编辑",
... ... @@ -78,40 +69,7 @@ webpackJsonp([120],[
newData[item.name] = item.value;
});
if(checkPaymentData(newData, data)){
//更变了推荐到确认订单页情况下,需要二次确认
if(recommendOrderPage_old != newData.recommendOrderPage){
new common.dialog({
title: "温馨提示",
width: "360px",
content:newData.recommendOrderPage == 1 ? "你确认将这个支付方式<font color='#5cb85c'>推荐</font>到确认订单页面么?" : "你确认<font color='#ff0000'>取消</font>将这个支付方式推荐到确认订单页面么?",
zIndex: 52,
button:[
{value: "确认", css:"btn-primary", callback: function () {
savePaymentData(newData);
d.close();
}},
{value: "取消", css:"btn-default"}
]
});
return false;
} else if(displayFirstSight_old != newData.displayFirstSight){
new common.dialog({
title: "温馨提示",
width: "360px",
content:newData.displayFirstSight == 1 ? "你确认将这个支付方式<font color='#5cb85c'>首次显示</font>吗?" : "你确认<font color='#ff0000'>取消</font>将这个支付方式首次显示吗?",
zIndex: 52,
button:[
{value: "确认", css:"btn-primary", callback: function () {
savePaymentData(newData);
d.close();
}},
{value: "取消", css:"btn-default"}
]
});
return false;
} else{
savePaymentData(newData);
}
}else{
return false;
}
... ...
... ... @@ -27,8 +27,8 @@ module.exports= {
{name:"recommendWords", type:"String"},
{name:"sortNumber", type:"Number", default:0},
{name:"recommendText1", type:"String"},
{name:"recommendText2", type:"String"},
{name:"displayFirstSight", type:"String", default:0}
{name:"displayFirstSight", type:"String", default:0},
{name:"noOpenText", type:"String"},
]
},
... ... @@ -42,8 +42,8 @@ module.exports= {
{name:"recommendWords", type:"String"},
{name:"sortNumber", type:"Number", default:0},
{name:"recommendText1", type:"String"},
{name:"recommendText2", type:"String"},
{name:"displayFirstSight", type:"String", default:0}
{name:"displayFirstSight", type:"String", default:0},
{name:"noOpenText", type:"String"},
]
},
... ...
... ... @@ -20,33 +20,32 @@
<label class="col-sm-3 control-label" style="text-align: center">支付方式:</label>
<div class="col-sm-5" style="padding-top: 10px">[[payName]]</div>
</div>
<!--<div class="form-group">-->
<!--<label class="col-sm-3 control-label" style="text-align: center">推荐到确认订单页:</label>-->
<!--<div class="col-sm-5" style="padding-top: 3px">-->
<!--<label class="radio-inline"><input name="recommendOrderPage" type="radio" value=1></label>-->
<!--&nbsp;&nbsp;-->
<!--<label class="radio-inline"><input name="recommendOrderPage" type="radio" value=0></label>-->
<!--</div>-->
<!--<input id="recommendOrderPage" type="hidden" value="[[recommendOrderPage]]" for="radio">-->
<!--</div>-->
<div class="form-group">
<label class="col-sm-3 control-label" style="text-align: center">推荐到确认订单页:</label>
<div class="col-sm-5" style="padding-top: 3px">
<label class="radio-inline"><input name="recommendOrderPage" type="radio" value=1></label>
&nbsp;&nbsp;
<label class="radio-inline"><input name="recommendOrderPage" type="radio" value=0></label>
</div>
<input id="recommendOrderPage" type="hidden" value="[[recommendOrderPage]]" for="radio">
</div>
<!--<div class="form-group">-->
<!--<label for="recommendWords" class="col-sm-3 control-label" style="text-align: center">推荐文案:</label>-->
<!--<div class="col-sm-5">-->
<!--<input type="text" id="recommendWords" name="recommendWords" value="[[recommendWords]]" class="form-control" />-->
<!--</div>-->
<!--</div>-->
<div class="form-group">
<label for="recommendWords" class="col-sm-3 control-label" style="text-align: center">推荐文案:</label>
<div class="col-sm-5">
<input type="text" id="recommendWords" name="recommendWords" value="[[recommendWords]]" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" style="text-align: center">首页显示:</label>
<div class="col-sm-5" style="padding-top: 3px">
<label class="radio-inline"><input name="displayFirstSight" type="radio" value=1></label>
&nbsp;&nbsp;
<label class="radio-inline"><input name="displayFirstSight" type="radio" value=0></label>
</div>
<input id="displayFirstSight" type="hidden" value="[[displayFirstSight]]" for="radio">
</div>
<!--<div class="form-group">-->
<!--<label class="col-sm-3 control-label" style="text-align: center">首页显示:</label>-->
<!--<div class="col-sm-5" style="padding-top: 3px">-->
<!--<label class="radio-inline"><input name="displayFirstSight" type="radio" value=1></label>-->
<!--&nbsp;&nbsp;-->
<!--<label class="radio-inline"><input name="displayFirstSight" type="radio" value=0></label>-->
<!--</div>-->
<!--<input id="displayFirstSight" type="hidden" value="[[displayFirstSight]]" for="radio">-->
<!--</div>-->
<div class="form-group">
<label for="sortNumber" class="col-sm-3 control-label" style="text-align: center">前端排序:</label>
... ... @@ -57,13 +56,21 @@
</div>
<div class="form-group">
<label for="recommendText1" class="col-sm-3 control-label" style="text-align: center">推荐语1</label>
<label for="recommendText1" class="col-sm-3 control-label" style="text-align: center">推荐语:</label>
<div class="col-sm-5">
<input type="text" id="recommendText1" name="recommendText1" value="[[recommendText1]]" class="form-control" maxlength="20" />
<input type="te将这个支付方式推荐到确认订单页面么xt" id="recommendText1" name="recommendText1" value="[[recommendText1]]" class="form-control" maxlength="30" />
</div>
<div class="col-sm-4"><label style="color: #999"> * 建议10个字以内,不超过20个字</label></div>
<div class="col-sm-4"><label style="color: #999"> * 建议10个字以内,不超过30个字</label></div>
</div>
[[if payName=='Android Pay'||payName=="Apple Pay"]]
<div class="form-group">
<label class="col-sm-3 control-label" style="text-align: center">未开通文案:</label>
<div class="col-sm-5">
<input type="text" id="noOpenText" name="noOpenText" value="[[noOpenText]]" class="form-control" maxlength="30" />
</div>
</div>
[[/if]]
<!--
<div class="form-group">
<label for="recommendText2" class="col-sm-3 control-label" style="text-align: center">推荐语2</label>
<div class="col-sm-5">
... ... @@ -71,6 +78,7 @@
</div>
<div class="col-sm-4"><label style="color: #999"> * 建议10个字以内,不超过20个字</label></div>
</div>
-->
</form>
</script>
... ...