Просмотр исходного кода

Merge branch 'master' of http://git.huaml.com/zhh/front-end

lalala 6 лет назад
Родитель
Сommit
5accc5cf40

+ 106 - 0
admin-update/src/components/common/elx-upload.vue

@@ -0,0 +1,106 @@
+<template>
+    <div>
+        <el-upload
+                :action=action
+                list-type="picture-card"
+                :http-request="httpRequest"
+                :limit="limit"
+                :file-list="fileList"
+                :on-exceed="exceed"
+                :on-success="success"
+                :headers="{token: token}"
+                :multiple="multiple"
+                :on-preview="handlePictureCardPreview"
+                :on-remove="handleRemove">
+            <i class="el-icon-plus"></i>
+        </el-upload>
+        <el-dialog :visible.sync="dialogVisible">
+            <img width="100%" :src="dialogImageUrl" alt="">
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import {mapGetters} from 'vuex';
+
+    export default {
+        name: "elx-upload",
+        props: {
+            limit: null,
+            multiple: {
+                type: Boolean,
+                default: true
+            },
+            fileList: {
+                type: Array,
+                default: []
+            },
+            value: [Array, String]
+        },
+
+        data() {
+            const upload = this.$service.common.upload();
+
+            return {
+                action: upload.url,
+                list: [],
+                index: 0,
+                // 图片展示
+                dialogImageUrl: '',
+                dialogVisible: false,
+            };
+        },
+        computed: {
+            ...mapGetters(['token'])
+        },
+        mounted() {
+            this.init();
+        },
+        methods: {
+            init() {
+            },
+            httpRequest(params) {
+                const file = params.file
+                this.getBase64(file).then(res => {
+                    this.$service.common.uploadImg({content: res}).then(subRes => {
+                        params.onSuccess(subRes)
+                    });
+                });
+            },
+            handleRemove(file, fileList) {
+                this.$emit('handleRemove', {file, fileList})
+            },
+            handlePictureCardPreview(file) {
+                this.dialogImageUrl =file.showBBGG|| file.url;
+                this.dialogVisible = true;
+            },
+            exceed() {
+                this.$message(`不能超过${this.limit}`)
+            },
+            success(response, file, fileList) {
+                this.$emit('update:fileList', fileList)
+                this.$emit('success', {response, file, fileList})
+            },
+            getBase64(file) {
+                return new Promise(function (resolve, reject) {
+                    let reader = new FileReader();
+                    let imgResult = '';
+                    reader.readAsDataURL(file);
+                    reader.onload = function () {
+                        imgResult = reader.result;
+                    };
+                    reader.onerror = function (error) {
+                        reject(error);
+                    };
+                    reader.onloadend = function () {
+                        resolve(imgResult);
+                    };
+                });
+            }
+        },
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 31 - 1
admin-update/src/cool/components/editor/quill.vue

@@ -5,6 +5,7 @@
 		<el-upload
 			:show-file-list="false"
 			:action="uploadURL"
+			:http-request="httpRequest"
 			:headers="{
 				Authorization: token,
 				...headers
@@ -124,13 +125,38 @@ export default {
 	},
 
 	methods: {
+        httpRequest(params) {
+            const file = params.file
+            this.getBase64(file).then(res => {
+                this.$service.common.uploadImg({content: res}).then(subRes => {
+                    params.onSuccess(subRes)
+                });
+            });
+        },
+        getBase64(file) {
+            return new Promise(function (resolve, reject) {
+                let reader = new FileReader();
+                let imgResult = '';
+                reader.readAsDataURL(file);
+                reader.onload = function () {
+                    imgResult = reader.result;
+                };
+                reader.onerror = function (error) {
+                    reject(error);
+                };
+                reader.onloadend = function () {
+                    resolve(imgResult);
+                };
+            });
+        },
 		uploadImageHandler() {
 			document.getElementById('quill-upload-btn').click();
 		},
 
 		upSuccess(res) {
+            console.log(res)
 			const { index } = this.quill.getSelection();
-			this.quill.insertEmbed(index || 0, 'image', res.data, Quill.sources.USER);
+			this.quill.insertEmbed(index || 0, 'image', res.smallUrl, Quill.sources.USER);
 		},
 
 		setContent(val) {
@@ -225,5 +251,9 @@ export default {
 	.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before {
 		content: '等宽字体';
 	}
+
+	.ql-snow .ql-editor img{
+		width: auto !important;
+	}
 }
 </style>

+ 4 - 4
admin-update/src/views/goods/auto-price.vue

@@ -84,10 +84,10 @@ export default {
 		},
 		_getData() {
 			this.$service.goods.getAutoPrice().then(res => {
-				if (this.$util.isEmpty(res.data)) return;
-				res.data.festIdList = res.data.festIdList.map(e => e + '');
+				if (this.$util.isEmpty(res)) return;
+				res.festIdList = res.festIdList.map(e => e + '');
 				Object.keys(this.form).forEach((i, index) => {
-					this.form[i] = res.data[i];
+					this.form[i] = res[i];
 				});
 			});
 		},
@@ -101,7 +101,7 @@ export default {
 			// 	return false;
 			// }
 			this.$service.goods.setAutoPrice(this.form).then(res => {
-				this.$message.error('更新成功!');
+				this.$message('更新成功!');
 			});
 		},
 		submitForm(formName) {

+ 486 - 413
admin-update/src/views/goods/goods-add.vue

@@ -1,421 +1,494 @@
 <template>
-	<div class="app-content">
-		<div class="form-wrap">
-			<el-form ref="form" :model="ruleForm" :rules="rules" label-width="120px">
-				<el-form-item label="名称" prop="goodsName">
-					<el-input v-model="ruleForm.goodsName"></el-input>
-				</el-form-item>
-				<el-form-item label="已售" prop="sold">
-					<el-input v-model="ruleForm.sold"></el-input>
-				</el-form-item>
-				<el-form-item label="库存" prop="stock">
-					<el-input v-model="ruleForm.stock"></el-input>
-				</el-form-item>
-				<el-form-item label="分类">
-					<el-checkbox-group v-model="ruleForm.categoryIdList">
-						<el-checkbox
-							border
-							v-for="(item, index) in categoryData"
-							:label="item.id"
-							:key="index"
-							size="small"
-							@change="selChangeDialogFn($event, item)"
-							>{{ item.categoryName }}</el-checkbox
-						>
-					</el-checkbox-group>
-				</el-form-item>
-				<el-form-item label="款式">
-					<el-checkbox-group v-model="ruleForm.goodsStyle" @change="changeStyleFn">
-						<el-checkbox label="1" name="goodsStyle" true-label="1" false-label="0">
-							<span>多款式</span>
-						</el-checkbox>
-					</el-checkbox-group>
-				</el-form-item>
-				<el-form-item label="价格" prop="price">
-					<el-input v-model="ruleForm.price"></el-input>
-				</el-form-item>
-				<el-form-item label="图片">
-					<div class="list-wrap">
-						<cl-upload v-model="ruleForm.shopImg"></cl-upload>
-						<!-- <div>
-							<el-button type="primary" size="small">商品主图</el-button>
-							<el-button type="warning" size="small">删除</el-button>
-						</div> -->
-					</div>
-					<div>
-						<el-button type="primary" size="small" @click="imgStoreModal = true"
-							>从图库选择</el-button
-						>
-					</div>
-					<el-dialog :visible.sync="dialogVisible">
-						<img width="100%" :src="dialogImageUrl" alt />
-					</el-dialog>
-				</el-form-item>
-				<el-form-item label="商品简介">
-					<cl-editor-quill v-model="ruleForm.content" @load="editor"></cl-editor-quill>
-					<!-- <el-input type="textarea" v-model="ruleForm.desc"></el-input> -->
-				</el-form-item>
-				<el-form-item label="节假日自动涨价">
-					<el-checkbox-group v-model="ruleForm.autoRise">
-						<el-checkbox label="1" name="autoRise" true-label="1" false-label="0">
-							<span>需要</span>
-						</el-checkbox>
-						<el-popover
-							placement="top"
-							width="100"
-							trigger="hover"
-							v-model="autoPricePopover"
-						>
-							<p>特定节日商品会自动进行涨价 无需手动调价</p>
-							<div style="text-align: right; margin-top: 10px">
-								<el-button
-									size="mini"
-									type="primary"
-									@click="autoPricePopover = false"
-									>涨价设置</el-button
-								>
-							</div>
-							<el-button
-								type="text"
-								icon="el-icon-question"
-								slot="reference"
-							></el-button>
-							<!-- <el-button slot="reference">删除</el-button> -->
-						</el-popover>
-					</el-checkbox-group>
-				</el-form-item>
-				<el-form-item label="配送方式">
-					<el-checkbox-group v-model="ruleForm.needSend">
-						<el-checkbox label="1" name="type" true-label="1" false-label="0">
-							<span>到店自提</span>
-						</el-checkbox>
-					</el-checkbox-group>
-				</el-form-item>
-				<el-form-item label="运费">
-					<el-radio-group v-model="ruleForm.freightType">
-						<el-radio label="0">
-							<span>按距离收费</span>
-						</el-radio>
-						<el-popover
-							placement="top"
-							width="100"
-							trigger="hover"
-							v-model="chargePopover"
-						>
-							<p>5公里内免运费,超过5公里每增加1公里运费增加2元</p>
-							<div style="text-align: right; margin-top: 10px">
-								<el-button size="mini" type="primary" @click="chargePopover = false"
-									>修改</el-button
-								>
-							</div>
-							<el-button
-								type="text"
-								icon="el-icon-question"
-								slot="reference"
-								class="question-btn"
-							></el-button>
-							<!-- <el-button slot="reference">删除</el-button> -->
-						</el-popover>
-						<el-radio label="1">
-							<span>免运费</span>
-						</el-radio>
-					</el-radio-group>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="submitForm('ruleForm')">上架出售</el-button>
-					<el-button @click="resetForm('ruleForm')">加入仓库</el-button>
-				</el-form-item>
-			</el-form>
-		</div>
-		<!-- 从图库选择 -->
-		<el-dialog title="从图库选择" :visible.sync="imgStoreModal" width="600px">
-			<div class="store-modal-content">
-				<div class="select-wrap flex-center-start">
-					<div style="width: 80px">选择分类</div>
-					<el-select
-						v-model="imgStoreVal"
-						placeholder="选择分类"
-						size="mini"
-						:clearable="true"
-						style="width: 200px"
-						@change="selChangeFn"
-					>
-						<el-option
-							v-for="(item, index) in categoryData"
-							:key="index"
-							:label="item.id"
-							:value="item.id"
-							>{{ item.categoryName }}</el-option
-						>
-					</el-select>
-					<!-- <div style="width: 80px">选择分类</div>
-					<el-select
-						v-model="imgStoreVal"
-						size="small"
-						placeholder="请选择"
-						style="width: 200px"
-					>
-						<el-option
-							v-for="item in imgStoreOpt"
-							:key="item.value"
-							:label="item.label"
-							:value="item.value"
-						>
-						</el-option>
-					</el-select> -->
-				</div>
-				<div class="img-store-wrap">
-					<el-checkbox-group v-model="imgStoreArr" class="list-store">
-						<div
-							class="list-checkbox"
-							v-for="(item, index) in imgStoreData"
-							:label="index"
-							:key="index"
-						>
-							<el-checkbox>
-								<div class="list-img">
-									<img :src="item.imgUrl" alt="图库图片" />
-								</div>
-							</el-checkbox>
-						</div>
-					</el-checkbox-group>
-				</div>
-				<!-- <el-pagination
-					@size-change="handleSizeChange"
-					@current-change="handleCurrentChange"
-					:current-page.sync="currentPage"
-					:page-size="100"
-					layout="total, prev, pager, next"
-					:total="1000"
-				>
-				</el-pagination> -->
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button size="small" @click="imgStoreModal = false">取 消</el-button>
-				<el-button type="primary" size="small" @click="imgStoreModal = false"
-					>确 定</el-button
-				>
-			</div>
-		</el-dialog>
-		<!-- 选择款式 -->
-		<el-dialog title="选择款式" :visible.sync="styleStoreModal" width="800px">
-			<div class="style-modal-content">
-				<el-form :inline="true" :model="styleStoreData" class="demo-form-inline">
-					<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.shopImg"></cl-upload>
-						</el-form-item>
-						<el-form-item>
-							<el-button type="primary" size="small" @click="styleDelFn(index)"
-								>删除</el-button
-							>
-						</el-form-item>
-					</div>
-				</el-form>
-				<el-button type="primary" size="small" @click="styleFormAddFn">新增</el-button>
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button size="small" @click="styleStoreModal = false">取 消</el-button>
-				<el-button type="primary" size="small" @click="styleStoreModal = false"
-					>确 定</el-button
-				>
-			</div>
-		</el-dialog>
-	</div>
+    <div class="app-content">
+        <div class="form-wrap">
+            <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px">
+                <el-form-item label="名称" prop="goodsName">
+                    <el-input v-model="ruleForm.goodsName"></el-input>
+                </el-form-item>
+                <el-form-item label="已售" prop="sold">
+                    <el-input v-model="ruleForm.sold"></el-input>
+                </el-form-item>
+                <el-form-item label="库存" prop="stock">
+                    <el-input v-model="ruleForm.stock"></el-input>
+                </el-form-item>
+                <el-form-item label="分类" prop="categoryIdList">
+                    <el-checkbox-group v-model="ruleForm.categoryIdList">
+                        <el-checkbox
+                                border
+                                v-for="(item, index) in categoryData"
+                                :label="item.id"
+                                :key="index"
+                                size="small"
+                                @change="selChangeDialogFn($event, item)"
+                        >{{ item.categoryName }}
+                        </el-checkbox
+                        >
+                    </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="款式" prop="goodsStyle">
+                    <el-checkbox-group v-model="ruleForm.goodsStyle" @change="changeStyleFn">
+                        <el-checkbox label="1" name="goodsStyle" true-label="1" false-label="0">
+                            <span>多款式</span>
+                        </el-checkbox>
+                    </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="价格" prop="price">
+                    <el-input v-model="ruleForm.price"></el-input>
+                </el-form-item>
+                <el-form-item label="图片" prop="shopImg">
+                    <div class="list-wrap">
+                        <!--<cl-upload v-model="ruleForm.shopImg"  :props="{multiple:true}"></cl-upload>-->
+
+                        <elxUpload
+                                :limit="4"
+                                :fileList.sync="fileList_show"
+                                @success="fromToData"
+                                @handleRemove="fromToData"
+                        ></elxUpload>
+                    </div>
+                    <div>
+                        <el-button type="primary" size="small" @click="imgStoreModal = true"
+                        >从图库选择
+                        </el-button
+                        >
+                    </div>
+                    <el-dialog :visible.sync="dialogVisible">
+                        <img width="100%" :src="dialogImageUrl" alt/>
+                    </el-dialog>
+                </el-form-item>
+                <el-form-item label="商品简介" prop="content">
+                    <cl-editor-quill v-model="ruleForm.content" @load="editor"></cl-editor-quill>
+                    <!-- <el-input type="textarea" v-model="ruleForm.desc"></el-input> -->
+                </el-form-item>
+                <el-form-item label="节假日自动涨价 ">
+                    <el-checkbox-group v-model="ruleForm.autoRise">
+                        <el-checkbox label="1" name="autoRise" true-label="1" false-label="0">
+                            <span>需要</span>
+                        </el-checkbox>
+                        <el-popover
+                                placement="top"
+                                width="100"
+                                trigger="hover"
+                                v-model="autoPricePopover"
+                        >
+                            <p>特定节日商品会自动进行涨价 无需手动调价</p>
+                            <div style="text-align: right; margin-top: 10px">
+                                <el-button
+                                        size="mini"
+                                        type="primary"
+                                        @click="autoPricePopover = false"
+                                >涨价设置
+                                </el-button
+                                >
+                            </div>
+                            <el-button
+                                    type="text"
+                                    icon="el-icon-question"
+                                    slot="reference"
+                            ></el-button>
+                            <!-- <el-button slot="reference">删除</el-button> -->
+                        </el-popover>
+                    </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="配送方式">
+                    <el-checkbox-group v-model="ruleForm.needSend">
+                        <el-checkbox label="1" name="type" true-label="1" false-label="0">
+                            <span>到店自提</span>
+                        </el-checkbox>
+                    </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="运费">
+                    <el-radio-group v-model="ruleForm.freightType">
+                        <el-radio label="0">
+                            <span>按距离收费</span>
+                        </el-radio>
+                        <el-popover
+                                placement="top"
+                                width="100"
+                                trigger="hover"
+                                v-model="chargePopover"
+                        >
+                            <p>5公里内免运费,超过5公里每增加1公里运费增加2元</p>
+                            <div style="text-align: right; margin-top: 10px">
+                                <el-button size="mini" type="primary" @click="chargePopover = false"
+                                >修改
+                                </el-button
+                                >
+                            </div>
+                            <el-button
+                                    type="text"
+                                    icon="el-icon-question"
+                                    slot="reference"
+                                    class="question-btn"
+                            ></el-button>
+                            <!-- <el-button slot="reference">删除</el-button> -->
+                        </el-popover>
+                        <el-radio label="1">
+                            <span>免运费</span>
+                        </el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="submitForm('ruleForm',1)">上架出售</el-button>
+                    <el-button @click="submitForm('ruleForm',0)">加入仓库</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
+        <!-- 从图库选择 -->
+        <el-dialog title="从图库选择" :visible.sync="imgStoreModal" width="600px">
+            <div class="store-modal-content">
+                <div class="select-wrap flex-center-start">
+                    <div style="width: 80px">选择分类</div>
+                    <el-select
+                            v-model="imgStoreVal"
+                            placeholder="选择分类"
+                            size="mini"
+                            :clearable="true"
+                            style="width: 200px"
+                            @change="selChangeFn"
+                    >
+                        <el-option
+                                v-for="(item, index) in categoryData"
+                                :key="index"
+                                :label="item.categoryName"
+                                :value="item.id"
+                        >{{ item.categoryName }}
+                        </el-option
+                        >
+                    </el-select>
+                    <!-- <div style="width: 80px">选择分类</div>
+                    <el-select
+                        v-model="imgStoreVal"
+                        size="small"
+                        placeholder="请选择"
+                        style="width: 200px"
+                    >
+                        <el-option
+                            v-for="item in imgStoreOpt"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value"
+                        >
+                        </el-option>
+                    </el-select> -->
+                </div>
+                <div class="img-store-wrap">
+                    <el-checkbox-group v-model="imgStoreArr" class="list-store" @change="setCheckImg">
+                        <div
+                                class="list-checkbox"
+                                v-for="(item, index) in imgStoreData"
+                                :key="index">
+                            <el-checkbox :label="item.imgUrl+''">
+                                <div class="list-img">
+                                    <img :src="item.imgUrl" alt="图库图片"/>
+                                </div>
+                            </el-checkbox>
+                        </div>
+                    </el-checkbox-group>
+                </div>
+                <!-- <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page.sync="currentPage"
+                    :page-size="100"
+                    layout="total, prev, pager, next"
+                    :total="1000"
+                >
+                </el-pagination> -->
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button size="small" @click="imgStoreModal = false">取 消</el-button>
+                <el-button type="primary" size="small" @click="checkImage"
+                >确 定
+                </el-button
+                >
+            </div>
+        </el-dialog>
+        <!-- 选择款式 -->
+        <el-dialog title="选择款式" :visible.sync="styleStoreModal" width="800px">
+            <div class="style-modal-content">
+                <el-form :inline="true" :model="styleStoreData" class="demo-form-inline">
+                    <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.shopImg" :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>
+                    </div>
+                </el-form>
+                <el-button type="primary" size="small" @click="styleFormAddFn">新增</el-button>
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button size="small" @click="styleStoreModal = false">取 消</el-button>
+                <el-button type="primary" size="small" @click="styleStoreModal = false"
+                >确 定
+                </el-button
+                >
+            </div>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
-export default {
-	name: 'goods-add',
-	data() {
-		return {
-			ruleForm: {
-				goodsName: '',
-				sold: '',
-				stock: '',
-				categoryIdList: [],
-				goodsStyle: '0',
-				price: '',
-				autoRise: '1',
-				needSend: '0',
-				shopImg: '',
-				freightType: '0'
-			},
-			rules: {
-				name: [{ required: true, message: '请输入名称', trigger: 'blur' }]
-			},
-			// 图片
-			dialogImageUrl: '',
-			dialogVisible: false,
-			// 需要自动涨价
-			autoPricePopover: false,
-			// 距离收费
-			chargePopover: false,
-			// 从图库中选择
-			imgStoreData: [],
-			imgStoreModal: false,
-			imgStoreVal: '',
-			imgStoreOpt: [],
-			imgStoreArr: [],
-			currentPage: 1,
-			// 款式选择
-			styleStoreModal: false,
-			styleStoreData: [],
-			styleForm: {
-				styleName: '',
-				price: '',
-				img: ''
-			}
-		};
-	},
-	computed: {
-		...mapGetters({ categoryData: 'category' })
-	},
-	created() {
-		this.init();
-	},
-	methods: {
-		init() {
-			this.$store.dispatch('getCategory');
-			this._getImgStore();
-		},
-		_getImgStore() {
-			return this.$service.imgStore
-				.list({
-					page: 1,
-					categoryId: this.imgStoreVal
-				})
-				.then(res => {
-					this.imgStoreData = res.list;
-				});
-		},
-		// api
-		addFn() {
-			let form = JSON.parse(JSON.stringify(this.ruleForm));
-			form.shopImg = [form.shopImg];
-			this.$service.goods
-				.add({
-					...form,
-					goodsStyleList: this.styleStoreData
-				})
-				.then(res => {
-					this.resetForm();
-					this.$message.success('添加成功!');
-					this.$router.push('/goods/list');
-				});
-		},
-		// operate
-		changeStyleFn(val) {
-			console.log(val);
-			if (val) {
-				// this.styleFormAddFn()
-				this.styleStoreModal = true;
-			}
-		},
-		selChangeDialogFn(status, item) {
-			console.log(status, item);
-		},
-		submitForm(formName) {
-			this.$refs[formName].validate(valid => {
-				if (valid) {
-					this.addFn();
-				} else {
-					console.log('error submit!!');
-					return false;
-				}
-			});
-		},
-		resetForm(formName) {
-			this.$refs[formName].resetFields();
-		},
-		// 图片上传
-		handleRemove(file, fileList) {
-			console.log(file, fileList);
-		},
-		handlePictureCardPreview(file) {
-			this.dialogImageUrl = file.url;
-			this.dialogVisible = true;
-		},
-		// 编辑器
-		editor(ref) {
-			console.log(ref);
-		},
-		handleSizeChange(val) {
-			console.log(`每页 ${val} 条`);
-		},
-		handleCurrentChange(val) {
-			console.log(`当前页: ${val}`);
-		},
-		// 图库选择
-		selChangeFn(e) {
-			this.imgStoreVal = e;
-		},
-		// 款式选择弹窗
-		styleDelFn(index) {
-			this.styleStoreData.splice(index, 1);
-		},
-		styleFormAddFn() {
-			let form = JSON.parse(JSON.stringify(this.styleForm));
-			this.styleStoreData.push(form);
-		}
-	}
-};
+    import {mapGetters} from 'vuex';
+    import elxUpload from '@/components/common/elx-upload.vue';
+
+    export default {
+        name: 'goods-add',
+        data() {
+            return {
+                ruleForm: {
+                    goodsName: '',
+                    sold: '',
+                    stock: '',
+                    categoryIdList: [],
+                    goodsStyle: '0',
+                    price: '',
+                    autoRise: '1',
+                    needSend: '0',
+                    shopImg: [],
+                    freightType: '0'
+                },
+
+                rules: {
+                    goodsName: [{required: true, message: '请输入名称', trigger: 'blur'}],
+                    categoryIdList: [{required: true, message: '请选择分类', trigger: 'blur'}],
+                    stock: [{required: true, message: '必填', trigger: 'blur'}],
+                    price: [{required: true, message: '必填', trigger: 'blur'}],
+                    sold: [{required: true, message: '必填', trigger: 'blur'}],
+                    goodsStyle: [{required: true, message: '必填', trigger: 'blur'}],
+                    shopImg: [{required: true, message: '必填', trigger: 'blur'}],
+                    content: [{required: true, message: '必填', trigger: 'blur'}],
+
+                },
+                // 图片展示
+                fileList_show: [],
+                dialogImageUrl: '',
+                dialogVisible: false,
+                // 需要自动涨价
+                autoPricePopover: false,
+                // 距离收费
+                chargePopover: false,
+                // 从图库中选择
+                imgStoreData: [],
+                imgStoreModal: false,
+                imgStoreVal: '',
+                imgStoreOpt: [],
+                imgStoreArr: [],
+                currentPage: 1,
+                // 款式选择
+                styleStoreModal: false,
+                styleStoreData: [],
+                styleForm: {
+                    styleName: '',
+                    price: '',
+                    img: ''
+                }
+            };
+        },
+        components: {
+            elxUpload
+        },
+        computed: {
+            ...mapGetters({categoryData: 'category'}),
+            ...mapGetters(['token'])
+        },
+        created() {
+            this.init();
+        },
+        methods: {
+            init() {
+                this.pageParams = this.$route.query
+                if (this.pageParams.editType == '2') {
+                    this.$service.goods.detail({id: this.pageParams.id}).then(res => {
+                        this.ruleForm = res
+                        this.fliterData(res)
+                        console.log(this.ruleForm)
+                    })
+                }
+                this.$store.dispatch('getCategory');
+                this._getImgStore();
+            },
+            _getImgStore() {
+                return this.$service.imgStore
+                    .list({
+                        page: 1,
+                        categoryId: this.imgStoreVal
+                    })
+                    .then(res => {
+                        this.imgStoreData = res.list;
+                    });
+            },
+            // api
+            addFn(type) {
+                let form = JSON.parse(JSON.stringify(this.ruleForm));
+                let status = type // 0加入仓库 ,1上架
+
+                let serverType = 'add'
+                if (this.pageParams.editType  == '2') {
+                    serverType = 'update'
+                   delete form.shortImgList
+                   delete form.imgList
+                   delete form.smallImgList
+                }
+                this.$service.goods[serverType]({
+                    ...form,
+                    goodsStyleList: this.styleStoreData
+                }).then(res => {
+                    this.resetForm('ruleForm');
+                    this.$message.success('添加成功!');
+                    this.$router.push('/goods/list');
+                });
+            },
+
+            //编辑的时候初始化数据
+            fliterData(res) {
+                // 图片
+                let list=res.smallImgList
+                let list2=res.imgList
+                let list3=res.shortImgList
+                let newList = []
+                for (let i = 0; i < list.length; i++) {
+                    newList.push({url: list[i],showBBGG:list2[i]})
+                }
+                this.ruleForm.shopImg = list3
+                this.fileList_show = newList
+                console.log( this.fileList_show, this.ruleForm.shopImg)
+
+                // 商品分类
+               this.ruleForm.categoryIdList= res.categoryIdList.map(String)
+            },
+            //上传图片组件逻辑
+            fromToData({file, fileList}) {
+                let list = []
+                // console.log( file, fileList)
+                for (let i = 0; i < fileList.length; i++) {
+                    if (fileList[i].response) {
+                        list.push(fileList[i].response.shortUrl)
+                    }
+                }
+                this.$set( this.ruleForm,'shopImg',list)
+                console.log(this.ruleForm.shopImg)
+            },
+            // operate
+            changeStyleFn(val) {
+                console.log(val);
+                if (val) {
+                    // this.styleFormAddFn()
+                    this.styleStoreModal = true;
+                }
+            },
+            selChangeDialogFn(status, item) {
+                console.log(status, item);
+            },
+            submitForm(formName, type) {
+                this.$refs[formName].validate(valid => {
+                    console.log(valid)
+                    if (valid) {
+                        this.addFn(type);
+                    } else {
+                        console.log('error submit!!');
+                        return false;
+                    }
+                });
+            },
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            checkImage() {
+                this.imgStoreModal = false
+            },
+            setCheckImg(val) {
+                this.$set(this.ruleForm, 'shopImg', this.ruleForm.shopImg.concat(val))
+                console.log(this.ruleForm.shopImg, val)
+            },
+
+            // 编辑器
+            editor(ref) {
+                console.log(ref);
+            },
+            handleSizeChange(val) {
+                console.log(`每页 ${val} 条`);
+            },
+            handleCurrentChange(val) {
+                console.log(`当前页: ${val}`);
+            },
+            // 图库选择
+            selChangeFn(e) {
+                this.imgStoreVal = e;
+            },
+            // 款式选择弹窗
+            styleDelFn(index) {
+                this.styleStoreData.splice(index, 1);
+            },
+            styleFormAddFn() {
+                let form = JSON.parse(JSON.stringify(this.styleForm));
+                this.styleStoreData.push(form);
+            }
+        }
+    };
 </script>
 
 <style lang="scss" scoped>
-.form-wrap {
-	// width: 60%;
-	.question-btn {
-		position: relative;
-		right: 28px;
-	}
-}
-.cl-editor-quill {
-	/deep/ .editor {
-		height: 300px;
-	}
-}
-// 图库选择
-.store-modal-content {
-	.select-wrap {
-		margin-bottom: 20px;
-	}
-	.img-store-wrap {
-		.list-store {
-			@include disFlex(center, flex-start);
-			flex-wrap: wrap;
-			.list-checkbox {
-				position: relative;
-				margin-bottom: 10px;
-				/deep/.el-checkbox__input {
-					position: absolute;
-					top: 10px;
-					right: 10px;
-				}
-			}
-			.list-img {
-				width: 100px;
-				height: 100px;
-			}
-		}
-	}
-}
-// 风格选择
-.style-modal-content {
-	/deep/.upload-wrap {
-		width: 60px !important;
-		height: 60px !important;
-	}
-}
+    .form-wrap {
+        // width: 60%;
+        .question-btn {
+            position: relative;
+            right: 28px;
+        }
+    }
+
+    .cl-editor-quill {
+        /deep/ .editor {
+            height: 300px;
+        }
+    }
+
+    // 图库选择
+    .store-modal-content {
+        .select-wrap {
+            margin-bottom: 20px;
+        }
+        .img-store-wrap {
+            .list-store {
+                @include disFlex(center, flex-start);
+                flex-wrap: wrap;
+                .list-checkbox {
+                    position: relative;
+                    margin-bottom: 10px;
+                    /deep/ .el-checkbox__input {
+                        position: absolute;
+                        top: 10px;
+                        right: 10px;
+                    }
+                }
+                .list-img {
+                    width: 100px;
+                    height: 100px;
+                }
+            }
+        }
+    }
+
+    // 风格选择
+    .style-modal-content {
+        /deep/ .upload-wrap {
+            width: 60px !important;
+            height: 60px !important;
+        }
+    }
 </style>

+ 231 - 226
admin-update/src/views/goods/goods-list.vue

@@ -1,240 +1,245 @@
 <template>
-	<div class="app-list-content">
-		<cl-crud class="liu-crud-wrap" @load="onLoad">
-			<template #slot-tabs="{ scope }">
-				<el-tabs
-					class="liu-tabs"
-					type="border-card"
-					v-model="tabIndex"
-					@tab-click="handleClick"
-				>
-					<el-tab-pane
-						v-for="(item, index) in tabsData"
-						:key="index"
-						:label="item.text"
-						:name="item.key"
-					>
-					</el-tab-pane>
-				</el-tabs>
-			</template>
+    <div class="app-list-content">
+        <cl-crud class="liu-crud-wrap" @load="onLoad">
+            <template #slot-tabs="{ scope }">
+                <el-tabs
+                        class="liu-tabs"
+                        type="border-card"
+                        v-model="tabIndex"
+                        @tab-click="handleClick"
+                >
+                    <el-tab-pane
+                            v-for="(item, index) in tabsData"
+                            :key="index"
+                            :label="item.text"
+                            :name="item.key"
+                    >
+                    </el-tab-pane>
+                </el-tabs>
+            </template>
 
-			<template #table-column-avatarUrl="{scope}">
-				<cl-avatar
-					shape="square"
-					:size="40"
-					:src="scope.row.smallImgList[0] | default_avatar"
-					:style="{ margin: 'auto' }"
-				></cl-avatar>
-			</template>
+            <template #table-column-avatarUrl="{scope}">
+                <cl-avatar
+                        shape="square"
+                        :size="40"
+                        :src="scope.row.smallImgList[0] | default_avatar"
+                        :style="{ margin: 'auto' }"
+                ></cl-avatar>
+            </template>
 
-			<template #table-column-goodsName="{scope}">
-				<span>{{ scope.row.goodsName }}</span>
-				<!-- <span>二维码</span> -->
-				<span class="short-link" @click="openLinkFn(scope.row)">链接</span>
-			</template>
+            <template #table-column-goodsName="{scope}">
+                <span>{{ scope.row.goodsName }}</span>
+                <!-- <span>二维码</span> -->
+                <span class="short-link" @click="openLinkFn(scope.row)">链接</span>
+            </template>
 
-			<!-- 添加商品 -->
-			<template #slot-add-goods-btn="{scope}">
-				<el-button type="primary" size="mini" @click="addFn">添加</el-button>
-			</template>
+            <!-- 添加商品 -->
+            <template #slot-add-goods-btn="{scope}">
+                <el-button type="primary" size="mini" @click="addFn">添加</el-button>
+            </template>
 
-			<!-- 状态 -->
-			<template #table-column-status="{scope}">
-				<span>{{ scope.row.status == 1 ? '上架' : '下架' }}</span>
-			</template>
+            <!-- 状态 -->
+            <template #table-column-status="{scope}">
+                <span>{{ scope.row.status == 1 ? '上架' : '下架' }}</span>
+            </template>
 
-			<!-- 修改 -->
-			<template #slot-modify="{scope}">
-				<el-button type="text">修改</el-button>
-			</template>
+            <!-- 修改 -->
+            <template #slot-modify="{scope}">
+                <el-button type="text" @click="addFn(2,scope.row)">修改</el-button>
+            </template>
 
-			<!-- 下架 -->
-			<template #slot-takeOff="{scope}">
-				<el-button type="text" @click="downFn(scope.row)">下架</el-button>
-			</template>
-		</cl-crud>
-		<!-- 添加商品 -->
-		<el-dialog title="商品短链接:" :visible.sync="dialogFormVisible" width="40%">
-			<div>
-				<el-input v-model="sortLink" :disabled="true"></el-input>
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="dialogFormVisible = false">取 消</el-button>
-				<el-button type="primary" @click="sendPhoneFn">发到手机</el-button>
-			</div>
-		</el-dialog>
-	</div>
+            <!-- 下架 -->
+            <template #slot-takeOff="{scope}">
+                <el-button type="text" @click="downFn(scope.row)">下架</el-button>
+            </template>
+        </cl-crud>
+        <!-- 添加商品 -->
+        <el-dialog title="商品短链接:" :visible.sync="dialogFormVisible" width="40%">
+            <div>
+                <el-input v-model="sortLink" :disabled="true"></el-input>
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="dialogFormVisible = false">取 消</el-button>
+                <el-button type="primary" @click="sendPhoneFn">发到手机</el-button>
+            </div>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			app: null,
-			dialogFormVisible: false,
-			sortLink: '',
-			operateData: {},
-			tabIndex: '-1',
-			tabsData: [
-				{
-					text: '全部',
-					key: '-1'
-				},
-				{
-					text: '上架',
-					key: '1'
-				},
-				{
-					text: '下架',
-					key: '0'
-				}
-			]
-		};
-	},
-	methods: {
-		handleClick(tab, e) {
-			console.log(tab, e);
-			this.app.refresh({ type: this.tabIndex });
-		},
-		// 打开链接
-		openLinkFn(item) {
-			this.operateData = item;
-			this.sortLink = item.shortUrl || '';
-			this.dialogFormVisible = true;
-		},
-		sendPhoneFn() {
-			this.$service.goods.sendPhone({ id: this.operateData.id }).then(res => {
-				this.$message.success('发送成功!');
-				this.dialogFormVisible = false;
-			});
-		},
-		// 添加商品
-		addFn() {
-			this.$router.push('/goods/add');
-		},
-		downFn(item) {
-			this.$confirm('是否下架该商品?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.$service.goods
-						.changeStatus({
-							id: item.id,
-							status: item.status == 0 ? 1 : 0
-						})
-						.then(res => {
-							item.status = item.status == 0 ? 1 : 0;
-							this.$message.success('操作成功!');
-						})
-						.catch(e => {
-							this.$message.error(e);
-						});
-				})
-				.catch(() => {
-					this.$message({
-						type: 'info',
-						message: '已取消删除'
-					});
-				});
-		},
-		// cl-crud 组件
-		onLoad({ ctx, app }) {
-			this.app = app;
-			ctx.service(this.$service.goods)
-				.set('table', {
-					columns: [
-						{
-							prop: 'id',
-							label: 'ID',
-							align: 'center'
-						},
-						{
-							prop: 'avatarUrl',
-							label: '封面',
-							align: 'center'
-						},
-						{
-							prop: 'goodsName',
-							label: '标题',
-							align: 'center',
-							'min-width': 180
-						},
-						{
-							prop: 'inTurn',
-							label: '顺序',
-							align: 'center'
-						},
-						{
-							prop: 'price',
-							label: '价格',
-							align: 'center',
-							emptyText: '无',
-							'min-width': 150
-						},
-						{
-							prop: 'actualSold',
-							label: '销量',
-							align: 'center'
-						},
-						{
-							prop: 'viewNum',
-							label: '浏览量',
-							align: 'center'
-						},
-						{
-							prop: 'status',
-							label: '状态',
-							align: 'center'
-						},
-						{
-							prop: 'createDate',
-							label: '创建时间',
-							align: 'center'
-						}
-					],
-					// 操作列
-					op: {
-						visible: true, // 是否显示
-						// 同 element-ui Table-column Attributes
-						props: {
-							width: 150,
-							align: 'center',
-							fixed: 'right',
-							label: '操作'
-						},
-						// 布局,请移步 `layout`
-						layout: ['slot-modify', 'slot-takeOff']
-					}
-				})
-				.set('dict', {
-					search: {
-						keyWord: 'goodsName'
-					}
-				})
-				.set('search', {
-					key: {
-						placeholder: '商品名称'
-					}
-				})
-				.set('layout', [
-					['slot-tabs'],
-					['search-key', 'flex1', 'refresh-btn', 'slot-add-goods-btn'],
-					['data-table'],
-					['flex1', 'pagination']
-				])
-				.done();
-			app.refresh({ status: this.tabIndex });
-		}
-	}
-};
+    export default {
+        data() {
+            return {
+                app: null,
+                dialogFormVisible: false,
+                sortLink: '',
+                operateData: {},
+                tabIndex: '-1',
+                tabsData: [
+                    {
+                        text: '全部',
+                        key: '-1'
+                    },
+                    {
+                        text: '上架',
+                        key: '1'
+                    },
+                    {
+                        text: '下架',
+                        key: '0'
+                    }
+                ]
+            };
+        },
+        methods: {
+            handleClick(tab, e) {
+                console.log(tab, e);
+                this.app.refresh({type: this.tabIndex});
+            },
+            // 打开链接
+            openLinkFn(item) {
+                this.operateData = item;
+                this.sortLink = item.shortUrl || '';
+                this.dialogFormVisible = true;
+            },
+            sendPhoneFn() {
+                this.$service.goods.sendPhone({id: this.operateData.id}).then(res => {
+                    this.$message.success('发送成功!');
+                    this.dialogFormVisible = false;
+                });
+            },
+            // 添加商品
+            addFn(type, data) {
+                let query = {}
+                if (type === 2) {
+                    query.id = data.id
+                    query.editType =type
+                }
+                this.$router.push({path: `/goods/add/`,query});
+            },
+            downFn(item) {
+                this.$confirm('是否下架该商品?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                })
+                    .then(() => {
+                        this.$service.goods
+                            .changeStatus({
+                                id: item.id,
+                                status: item.status == 0 ? 1 : 0
+                            })
+                            .then(res => {
+                                item.status = item.status == 0 ? 1 : 0;
+                                this.$message.success('操作成功!');
+                            })
+                            .catch(e => {
+                                this.$message.error(e);
+                            });
+                    })
+                    .catch(() => {
+                        this.$message({
+                            type: 'info',
+                            message: '已取消删除'
+                        });
+                    });
+            },
+            // cl-crud 组件
+            onLoad({ctx, app}) {
+                this.app = app;
+                ctx.service(this.$service.goods)
+                    .set('table', {
+                        columns: [
+                            {
+                                prop: 'id',
+                                label: 'ID',
+                                align: 'center'
+                            },
+                            {
+                                prop: 'avatarUrl',
+                                label: '封面',
+                                align: 'center'
+                            },
+                            {
+                                prop: 'goodsName',
+                                label: '标题',
+                                align: 'center',
+                                'min-width': 180
+                            },
+                            {
+                                prop: 'inTurn',
+                                label: '顺序',
+                                align: 'center'
+                            },
+                            {
+                                prop: 'price',
+                                label: '价格',
+                                align: 'center',
+                                emptyText: '无',
+                                'min-width': 150
+                            },
+                            {
+                                prop: 'actualSold',
+                                label: '销量',
+                                align: 'center'
+                            },
+                            {
+                                prop: 'viewNum',
+                                label: '浏览量',
+                                align: 'center'
+                            },
+                            {
+                                prop: 'status',
+                                label: '状态',
+                                align: 'center'
+                            },
+                            {
+                                prop: 'createDate',
+                                label: '创建时间',
+                                align: 'center'
+                            }
+                        ],
+                        // 操作列
+                        op: {
+                            visible: true, // 是否显示
+                            // 同 element-ui Table-column Attributes
+                            props: {
+                                width: 150,
+                                align: 'center',
+                                fixed: 'right',
+                                label: '操作'
+                            },
+                            // 布局,请移步 `layout`
+                            layout: ['slot-modify', 'slot-takeOff']
+                        }
+                    })
+                    .set('dict', {
+                        search: {
+                            keyWord: 'goodsName'
+                        }
+                    })
+                    .set('search', {
+                        key: {
+                            placeholder: '商品名称'
+                        }
+                    })
+                    .set('layout', [
+                        ['slot-tabs'],
+                        ['search-key', 'flex1', 'refresh-btn', 'slot-add-goods-btn'],
+                        ['data-table'],
+                        ['flex1', 'pagination']
+                    ])
+                    .done();
+                app.refresh({status: this.tabIndex});
+            }
+        }
+    };
 </script>
 
 <style lang="scss" scoped>
-.short-link {
-	color: $mainColor;
-	margin-left: 10px;
-	cursor: pointer;
-}
+    .short-link {
+        color: $mainColor;
+        margin-left: 10px;
+        cursor: pointer;
+    }
 </style>

+ 3 - 1
admin-update/src/views/goods/img-store.vue

@@ -166,6 +166,7 @@ export default {
 				picIdList: '',
 				price: 0,
 				name: '',
+                shopImg: [],
 				categoryIdList: []
 			},
 			rules: {}
@@ -204,7 +205,8 @@ export default {
 			this._list();
 		},
 		// 新增图片
-		addImgFn() {
+		addImgFn(res) {
+			this.addForm.shopImg.push(res.shortUrl)
 			this.addImageModal = true;
 		},
 		selChangeDialogFn(status, item) {

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-033e28cf.62423d77.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-0cf61f29.3f94fd19.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-2e25e03e.61a10801.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-345f16c5.9443af3d.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-618b7a97.63854e61.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-c42af832.aaed9f79.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/css/chunk-dc6c95c2.dc877ffd.css


+ 1 - 1
huadian/index.html

@@ -43,4 +43,4 @@
 			.once .sub-title {
 				color: #ababab;
 				font-size: 12px;
-			}</style><link href=/css/app.dba8b30d.css rel=preload as=style><link href=/css/chunk-libs.6d5f97e5.css rel=preload as=style><link href=/js/app.25c755ef.js rel=preload as=script><link href=/js/chunk-libs.2793f647.js rel=preload as=script><link href=/css/chunk-libs.6d5f97e5.css rel=stylesheet><link href=/css/app.dba8b30d.css rel=stylesheet></head><body><noscript></noscript><div id=app><div class=once><div class=container><div class=title>正在加载资源</div><div class=sub-title>初次加载资源可能需要较多时间 请耐心等待</div></div><div class=footer><a href=https://www.baidu.com/ target=_blank>花卉宝</a></div></div></div><script src=https://cdn.bootcss.com/vue/2.6.10/vue.min.js></script><script src=https://cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js></script><script src=https://cdn.bootcss.com/vuex/3.1.1/vuex.min.js></script><script src=https://cdn.bootcss.com/clipboard.js/2.0.4/clipboard.min.js></script><script src=https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js></script><script src=https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js></script><script src=https://cdn.bootcss.com/Mock.js/1.0.1-beta3/mock-min.js></script><script src=https://cdn.bootcss.com/quill/2.0.0-dev.3/quill.min.js></script><script src=https://cdn.bootcss.com/element-ui/2.13.0/index.js></script><script src=https://cdn.bootcss.com/viewerjs/1.3.7/viewer.min.js></script><script src=https://cdn.bootcss.com/echarts/4.4.0-rc.1/echarts.min.js></script><script src=https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2></script><script src=/js/chunk-libs.2793f647.js></script><script src=/js/app.25c755ef.js></script></body></html>
+			}</style><link href=/css/app.dba8b30d.css rel=preload as=style><link href=/css/chunk-libs.6d5f97e5.css rel=preload as=style><link href=/js/app.b7284168.js rel=preload as=script><link href=/js/chunk-libs.2793f647.js rel=preload as=script><link href=/css/chunk-libs.6d5f97e5.css rel=stylesheet><link href=/css/app.dba8b30d.css rel=stylesheet></head><body><noscript></noscript><div id=app><div class=once><div class=container><div class=title>正在加载资源</div><div class=sub-title>初次加载资源可能需要较多时间 请耐心等待</div></div><div class=footer><a href=https://www.baidu.com/ target=_blank>花卉宝</a></div></div></div><script src=https://cdn.bootcss.com/vue/2.6.10/vue.min.js></script><script src=https://cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js></script><script src=https://cdn.bootcss.com/vuex/3.1.1/vuex.min.js></script><script src=https://cdn.bootcss.com/clipboard.js/2.0.4/clipboard.min.js></script><script src=https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js></script><script src=https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js></script><script src=https://cdn.bootcss.com/Mock.js/1.0.1-beta3/mock-min.js></script><script src=https://cdn.bootcss.com/quill/2.0.0-dev.3/quill.min.js></script><script src=https://cdn.bootcss.com/element-ui/2.13.0/index.js></script><script src=https://cdn.bootcss.com/viewerjs/1.3.7/viewer.min.js></script><script src=https://cdn.bootcss.com/echarts/4.4.0-rc.1/echarts.min.js></script><script src=https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2></script><script src=/js/chunk-libs.2793f647.js></script><script src=/js/app.b7284168.js></script></body></html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/app.25c755ef.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/app.b7284168.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-033e28cf.08b2aa8f.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-033e28cf.b8812f2e.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-0cf61f29.c7583a0b.js


+ 1 - 0
huadian/js/chunk-2d22e146.4a5d15dd.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22e146"],{f9da:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-upload",{attrs:{action:e.action,"list-type":"picture-card","http-request":e.httpRequest,limit:e.limit,"file-list":e.fileList,"on-exceed":e.exceed,"on-success":e.success,headers:{token:e.token},multiple:e.multiple,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove}},[i("i",{staticClass:"el-icon-plus"})]),i("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1)},l=[],s=(i("3a20"),i("b54b")),o=i("5880"),a={name:"elx-upload",props:{limit:null,multiple:{type:Boolean,default:!0},fileList:{type:Array,default:[]},value:[Array,String]},data:function(){var e=this.$service.common.upload();return{action:e.url,list:[],index:0,dialogImageUrl:"",dialogVisible:!1}},computed:Object(s["a"])({},Object(o["mapGetters"])(["token"])),mounted:function(){this.init()},methods:{init:function(){},httpRequest:function(e){var t=this,i=e.file;this.getBase64(i).then((function(i){t.$service.common.uploadImg({content:i}).then((function(t){e.onSuccess(t)}))}))},handleRemove:function(e,t){this.$emit("handleRemove",{file:e,fileList:t})},handlePictureCardPreview:function(e){this.dialogImageUrl=e.showBBGG||e.url,this.dialogVisible=!0},exceed:function(){this.$message("不能超过".concat(this.limit))},success:function(e,t,i){this.$emit("update:fileList",i),this.$emit("success",{response:e,file:t,fileList:i})},getBase64:function(e){return new Promise((function(t,i){var n=new FileReader,l="";n.readAsDataURL(e),n.onload=function(){l=n.result},n.onerror=function(e){i(e)},n.onloadend=function(){t(l)}}))}}},c=a,u=i("623f"),r=Object(u["a"])(c,n,l,!1,null,"4c462b97",null);t["default"]=r.exports}}]);

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-2e25e03e.4ff6154b.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-345f16c5.4020a56b.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-618b7a97.fc1c05c8.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-728fbe70.cf906345.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-820b2404.e2df8d6b.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-c42af832.43084e89.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-dc6c95c2.44eeba49.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
huadian/js/chunk-edbb8318.e2074088.js


Некоторые файлы не были показаны из-за большого количества измененных файлов