@@ -422,28 +426,39 @@ export default {
});
- $("[name='uploadBtn']").on('click', function () {
- let id = $(this).attr('id');
- let b = id.split("_");
- let imageId = b[0];
- let inputId = b[1];
- console.log(imageId)
- console.log(inputId)
+ $("#addAndroidIconPicUrl_androidUrl").on('click', function () {
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (json) {
if (json.path) {
- $("#" + inputId).val(json.path);
- $("#" + imageId).attr("src", json.path);
+ $("#addAndroidIconPicUrl").val(json.path);
+ $("#addAndroidIconPicUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
}
};
- $("#addForm").ajaxSubmit(options);
+ $("#addForm1").ajaxSubmit(options);
+ });
+ $("#addIosIconPicUrl_iosUrl").on('click', function () {
+ var options = {
+ type: 'post',
+ url: '/admin/upload/img',
+ dataType: 'json',
+ success: function (json) {
+ if (json.path) {
+ $("#addIosIconPicUrl").val(json.path);
+ $("#addIosIconPicUrl").attr("src", json.path);
+ } else {
+ $("#tipMsg").text(json.msg);
+ $("#tipModal").modal('show');
+ }
+ }
+ };
+ $("#addForm2").ajaxSubmit(options);
});
@@ -484,6 +499,8 @@ export default {
partitionFlag |= partitionFlagArray[i].value;
}
formData.partitionFlag = partitionFlag;
+ formData.androidUrl = $('#addAndroidIconPicUrl').attr('src');
+ formData.iosUrl = $('#addIosIconPicUrl').attr('src');
// 将修改后的对象转换回序列化字符串
let newSerializeStr = $.param(formData);
//做下数据校验
diff --git a/src/views/headwear/HeadwearAdminView.vue b/src/views/headwear/HeadwearAdminView.vue
index a633325..892c93a 100644
--- a/src/views/headwear/HeadwearAdminView.vue
+++ b/src/views/headwear/HeadwearAdminView.vue
@@ -448,7 +448,7 @@ export default {
{ field: 'originalPrice', title: '原价(钻石)', align: 'center', width: '5%' },
{ field: 'price', title: '购买价格(钻石)', align: 'center', width: '5%' },
{ field: 'renewPrice', title: '续费价格(钻石)', align: 'center', width: '5%' },
- { field: 'radishOriginalPrice', title: '原价(萝卜)', align: 'center', width: '5%' },
+ { field: 'radishOriginalPrice', title: '原价(萝卜1)', align: 'center', width: '5%' },
{ field: 'radishPrice', title: '购买价格(萝卜)', align: 'center', width: '5%' },
{ field: 'radishRenewPrice', title: '续费价格(萝卜)', align: 'center', width: '5%' },
{ field: 'days', title: '有效期', align: 'center', width: '5%' },