lalala 6 years ago
parent
commit
9c9cefb808

File diff suppressed because it is too large
+ 3 - 8
admin-update/src/assets/iconfont/iconfont.css


BIN
admin-update/src/assets/iconfont/iconfont.eot


File diff suppressed because it is too large
+ 0 - 0
admin-update/src/assets/iconfont/iconfont.js


+ 115 - 108
admin-update/src/assets/iconfont/iconfont.json

@@ -6,53 +6,60 @@
   "description": "",
   "glyphs": [
     {
-      "icon_id": "300727",
-      "name": "三角右",
-      "font_class": "triangle-right",
-      "unicode": "e62c",
-      "unicode_decimal": 58924
+      "icon_id": "1164943",
+      "name": "",
+      "font_class": "dian",
+      "unicode": "e62d",
+      "unicode_decimal": 58925
     },
     {
-      "icon_id": "658035",
-      "name": "",
-      "font_class": "qian",
-      "unicode": "e662",
-      "unicode_decimal": 58978
+      "icon_id": "12096682",
+      "name": "小程序",
+      "font_class": "xiaochengxu",
+      "unicode": "e747",
+      "unicode_decimal": 59207
     },
     {
-      "icon_id": "782008",
-      "name": "退款",
-      "font_class": "tuikuan",
-      "unicode": "e619",
-      "unicode_decimal": 58905
+      "icon_id": "12096683",
+      "name": "支付宝",
+      "font_class": "zhifubao",
+      "unicode": "e748",
+      "unicode_decimal": 59208
     },
     {
-      "icon_id": "1071070",
-      "name": "常见问题/相关问题2",
-      "font_class": "changjianwentixiangguanwenti2",
-      "unicode": "e679",
-      "unicode_decimal": 59001
+      "icon_id": "12096731",
+      "name": "客服",
+      "font_class": "kefu",
+      "unicode": "e749",
+      "unicode_decimal": 59209
     },
     {
-      "icon_id": "1287696",
-      "name": "打钩",
-      "font_class": "dagou",
-      "unicode": "e607",
-      "unicode_decimal": 58887
+      "icon_id": "12135232",
+      "name": "关闭",
+      "font_class": "guanbi",
+      "unicode": "e74b",
+      "unicode_decimal": 59211
     },
     {
-      "icon_id": "2154944",
-      "name": "链接",
-      "font_class": "lianjie",
-      "unicode": "e627",
-      "unicode_decimal": 58919
+      "icon_id": "12265995",
+      "name": "操作激活",
+      "font_class": "caozuojihuo",
+      "unicode": "e755",
+      "unicode_decimal": 59221
     },
     {
-      "icon_id": "6364167",
-      "name": "二维码",
-      "font_class": "ico",
-      "unicode": "e646",
-      "unicode_decimal": 58950
+      "icon_id": "12266181",
+      "name": "菜单栏",
+      "font_class": "caidanlan",
+      "unicode": "e75c",
+      "unicode_decimal": 59228
+    },
+    {
+      "icon_id": "1071070",
+      "name": "常见问题/相关问题2",
+      "font_class": "changjianwentixiangguanwenti2",
+      "unicode": "e679",
+      "unicode_decimal": 59001
     },
     {
       "icon_id": "11940320",
@@ -69,32 +76,46 @@
       "unicode_decimal": 59204
     },
     {
-      "icon_id": "12096682",
-      "name": "小程序",
-      "font_class": "xiaochengxu",
-      "unicode": "e747",
-      "unicode_decimal": 59207
+      "icon_id": "12266256",
+      "name": "图片添加",
+      "font_class": "tupiantianjia",
+      "unicode": "e75f",
+      "unicode_decimal": 59231
     },
     {
-      "icon_id": "12096683",
-      "name": "支付宝",
-      "font_class": "zhifubao",
-      "unicode": "e748",
-      "unicode_decimal": 59208
+      "icon_id": "12266447",
+      "name": "微信来源",
+      "font_class": "weixinlaiyuan",
+      "unicode": "e765",
+      "unicode_decimal": 59237
     },
     {
-      "icon_id": "12096731",
-      "name": "客服",
-      "font_class": "kefu",
-      "unicode": "e749",
-      "unicode_decimal": 59209
+      "icon_id": "12266642",
+      "name": "默认图",
+      "font_class": "morentu",
+      "unicode": "e778",
+      "unicode_decimal": 59256
     },
     {
-      "icon_id": "12135232",
-      "name": "关闭",
-      "font_class": "guanbi",
-      "unicode": "e74b",
-      "unicode_decimal": 59211
+      "icon_id": "12549593",
+      "name": "审核未通过",
+      "font_class": "shenheweitongguo",
+      "unicode": "e779",
+      "unicode_decimal": 59257
+    },
+    {
+      "icon_id": "1287696",
+      "name": "打钩",
+      "font_class": "dagou",
+      "unicode": "e607",
+      "unicode_decimal": 58887
+    },
+    {
+      "icon_id": "658035",
+      "name": "钱",
+      "font_class": "qian",
+      "unicode": "e662",
+      "unicode_decimal": 58978
     },
     {
       "icon_id": "12265828",
@@ -131,6 +152,20 @@
       "unicode": "e750",
       "unicode_decimal": 59216
     },
+    {
+      "icon_id": "12266050",
+      "name": "置顶",
+      "font_class": "zhiding",
+      "unicode": "e753",
+      "unicode_decimal": 59219
+    },
+    {
+      "icon_id": "300727",
+      "name": "三角右",
+      "font_class": "triangle-right",
+      "unicode": "e62c",
+      "unicode_decimal": 58924
+    },
     {
       "icon_id": "12265994",
       "name": "操作",
@@ -139,46 +174,39 @@
       "unicode_decimal": 59217
     },
     {
-      "icon_id": "12265995",
-      "name": "操作激活",
-      "font_class": "caozuojihuo",
-      "unicode": "e755",
-      "unicode_decimal": 59221
-    },
-    {
-      "icon_id": "12266050",
-      "name": "置顶",
-      "font_class": "zhiding",
-      "unicode": "e753",
-      "unicode_decimal": 59219
+      "icon_id": "2154944",
+      "name": "链接",
+      "font_class": "lianjie",
+      "unicode": "e627",
+      "unicode_decimal": 58919
     },
     {
-      "icon_id": "12266181",
-      "name": "菜单栏",
-      "font_class": "caidanlan",
-      "unicode": "e75c",
-      "unicode_decimal": 59228
+      "icon_id": "6364167",
+      "name": "二维码",
+      "font_class": "ico",
+      "unicode": "e646",
+      "unicode_decimal": 58950
     },
     {
-      "icon_id": "12266256",
-      "name": "图片添加",
-      "font_class": "tupiantianjia",
-      "unicode": "e75f",
-      "unicode_decimal": 59231
+      "icon_id": "782008",
+      "name": "退款",
+      "font_class": "tuikuan",
+      "unicode": "e619",
+      "unicode_decimal": 58905
     },
     {
-      "icon_id": "12266447",
-      "name": "微信来源",
-      "font_class": "weixinlaiyuan",
-      "unicode": "e765",
-      "unicode_decimal": 59237
+      "icon_id": "12322213",
+      "name": "通知未送达",
+      "font_class": "tongzhiweisongda",
+      "unicode": "e776",
+      "unicode_decimal": 59254
     },
     {
-      "icon_id": "12266642",
-      "name": "默认图",
-      "font_class": "morentu",
-      "unicode": "e778",
-      "unicode_decimal": 59256
+      "icon_id": "12322214",
+      "name": "通知送达",
+      "font_class": "tongzhisongda",
+      "unicode": "e777",
+      "unicode_decimal": 59255
     },
     {
       "icon_id": "12321926",
@@ -249,27 +277,6 @@
       "font_class": "dingdanguanli",
       "unicode": "e775",
       "unicode_decimal": 59253
-    },
-    {
-      "icon_id": "12322213",
-      "name": "通知未送达",
-      "font_class": "tongzhiweisongda",
-      "unicode": "e776",
-      "unicode_decimal": 59254
-    },
-    {
-      "icon_id": "12322214",
-      "name": "通知送达",
-      "font_class": "tongzhisongda",
-      "unicode": "e777",
-      "unicode_decimal": 59255
-    },
-    {
-      "icon_id": "12549593",
-      "name": "审核未通过",
-      "font_class": "shenheweitongguo",
-      "unicode": "e779",
-      "unicode_decimal": 59257
     }
   ]
 }

File diff suppressed because it is too large
+ 2 - 3
admin-update/src/assets/iconfont/iconfont.svg


BIN
admin-update/src/assets/iconfont/iconfont.ttf


BIN
admin-update/src/assets/iconfont/iconfont.woff


BIN
admin-update/src/assets/iconfont/iconfont.woff2


+ 63 - 29
admin-update/src/views/goods/goods-add.vue

@@ -32,35 +32,45 @@
 					</el-checkbox-group>
 					<!-- 选择款式 -->
 					<div class="style-modal-content" v-if="ruleForm.goodsStyle == 1">
-						<el-form :inline="true" :model="styleForm" class="demo-form-inline">
+						<el-form
+							:inline="true"
+							:model="styleForm"
+							class="demo-form-inline"
+							v-if="actionOption"
+						>
 							<div
 								class="flex-center-between"
 								v-for="(item, index) in styleStoreData"
 								:key="index"
 							>
-								<el-form-item label="款式名称">
-									<el-input
-										v-model="item.styleName"
-										placeholder="款式名称"
-									></el-input>
-								</el-form-item>
-								<el-form-item label="价格">
-									<el-input v-model="item.price" placeholder="价格"></el-input>
-								</el-form-item>
-								<el-form-item label="图片" class="flex-center">
-									<cl-upload
-										v-model="item.picture"
-										:props="{ multiple: true }"
-									></cl-upload>
-								</el-form-item>
-								<el-form-item>
-									<el-button
-										type="primary"
-										size="small"
-										@click="styleDelFn(index)"
-										>删除</el-button
-									>
-								</el-form-item>
+								<template v-if="item.action != 'delete'">
+									<el-form-item label="款式名称">
+										<el-input
+											v-model="item.styleName"
+											placeholder="款式名称"
+										></el-input>
+									</el-form-item>
+									<el-form-item label="价格">
+										<el-input
+											v-model="item.price"
+											placeholder="价格"
+										></el-input>
+									</el-form-item>
+									<el-form-item label="图片" class="flex-center">
+										<cl-upload
+											v-model="item.picture"
+											:props="{ multiple: true }"
+										></cl-upload>
+									</el-form-item>
+									<el-form-item>
+										<el-button
+											type="primary"
+											size="small"
+											@click="styleDelFn(index)"
+											>删除</el-button
+										>
+									</el-form-item>
+								</template>
 							</div>
 						</el-form>
 						<el-button type="primary" size="small" @click="styleFormAddFn"
@@ -290,11 +300,14 @@ export default {
 			imgStoreArr: [],
 			currentPage: 1,
 			// 款式选择
+			actionOption: true,
 			styleStoreData: [],
 			styleForm: {
+				id: 0,
 				styleName: '',
 				price: '',
-				picture: ''
+				picture: '',
+				action: 'add'
 			}
 		};
 	},
@@ -373,6 +386,7 @@ export default {
 			// 处理多款式
 			if (!this.$util.isEmpty(res.goodsStyleList)) {
 				for (let i in res.goodsStyleList) {
+					res.goodsStyleList[i].action = 'update';
 					this.styleStoreData.push(res.goodsStyleList[i]);
 				}
 			}
@@ -441,17 +455,36 @@ export default {
 		selChangeFn(e) {
 			this.imgStoreVal = e;
 		},
+		getStyleNum() {
+			let num = 0;
+			for (let i in this.styleStoreData) {
+				if (this.styleStoreData[i].action != 'delete') {
+					num++;
+				}
+			}
+			return num;
+		},
 		// 款式选择弹窗
 		styleDelFn(index) {
-			console.log('index', index);
-			if (this.styleStoreData.length == 1) {
+			this.actionOption = false;
+			let num = this.getStyleNum();
+			console.log('num', num);
+			if (num == 1) {
 				this.$message.error('最少保留一个款式!');
 				return false;
 			}
-			this.styleStoreData.splice(index, 1);
+			if (this.styleStoreData[index].action == 'update') {
+				// this.styleStoreData[index].action = 'delete';
+				this.$set(this.styleStoreData[index], 'action', 'delete');
+			} else {
+				this.styleStoreData.splice(index, 1);
+			}
+			this.actionOption = true;
+			console.log('this.styleStoreData', this.styleStoreData);
 		},
 		styleFormAddFn() {
-			if (this.styleStoreData.length > 5) {
+			let num = this.getStyleNum();
+			if (num > 5) {
 				this.$message.error('最多选择六个款式!');
 				return false;
 			}
@@ -505,6 +538,7 @@ export default {
 
 // 风格选择
 .style-modal-content {
+	width: 830px;
 	/deep/ .upload-wrap {
 		width: 60px !important;
 		height: 60px !important;

+ 4 - 0
admin-update/src/views/goods/img-store.vue

@@ -258,6 +258,10 @@ export default {
 			width: 200px;
 			height: 200px;
 			margin-bottom: 6px;
+			img {
+				width: 100%;
+				height: 100%;
+			}
 		}
 		.flex-center-between {
 			padding: 0 4px;

+ 14 - 14
admin-update/vue.config.js

@@ -13,8 +13,8 @@ function resolve(dir) {
 }
 
 // const hostUrl = `${window.location.protocol}//static.${getFirstHost()}.com`;
-const hostUrl = `https://static.huaml.com`;
-// const hostUrl = `.`;
+// const hostUrl = `https://static.huaml.com`;
+const hostUrl = ``;
 
 const cdn = {
 	dev: {
@@ -96,18 +96,18 @@ module.exports = {
 		// 移除 preload 插件
 		// config.plugins.delete('preload');
 		// svg
-		config.module.rule('svg').uses.clear();
-
-		config.module
-			.rule('svg-sprite-loader')
-			.test(/.svg$/)
-			.exclude.add(/node_modules/)
-			.end()
-			.use('svg-sprite-loader')
-			.loader('svg-sprite-loader')
-			.options({
-				symbolId: '[name]'
-			});
+		// config.module.rule('svg').uses.clear();
+
+		// config.module
+		// 	.rule('svg-sprite-loader')
+		// 	.test(/.svg$/)
+		// 	.exclude.add(/node_modules/)
+		// 	.end()
+		// 	.use('svg-sprite-loader')
+		// 	.loader('svg-sprite-loader')
+		// 	.options({
+		// 		symbolId: '[name]'
+		// 	});
 
 		// 去掉元素之间空格
 		config.module

Some files were not shown because too many files changed in this diff