|
@@ -1215,8 +1215,36 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="企业理念" name="store.concept">
|
|
|
+ <el-form ref="form21" :model="form21" :rules="rules21" label-width="160px">
|
|
|
+ <el-form-item label="企业理念图片" prop="images">
|
|
|
+ <Material v-model="images" type="image" :num="10" :width="150" :height="150" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="企业理念视频" prop="videoUrl">
|
|
|
+ <div>
|
|
|
+ <el-upload
|
|
|
+ ref="upload"
|
|
|
+ class="upload-demo"
|
|
|
+ :action="uploadUrl"
|
|
|
+ :on-success="handleSuccess"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
+ :limit="1"
|
|
|
+ :accept="videoAccept"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary">点击上传视频</el-button>
|
|
|
+ </el-upload>
|
|
|
+ <video :src="form21.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="primary" @click="submitForm21">提 交</el-button>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<el-dialog :title="product.title" v-if="product.open" :visible.sync="product.open" width="1000px" append-to-body>
|
|
|
<product-attr-value-select ref="Details" @selectProduct="selectProduct" />
|
|
@@ -1237,13 +1265,17 @@ import {getAllFollowTempName } from "@/api/his/followTemp";
|
|
|
import productAttrValueSelect from "../../components/his/productGiftValueSelect.vue";
|
|
|
import productDeliveryGiftValueSelect from "../../components/his/productDeliveryGiftValueSelect.vue";
|
|
|
import { Col } from "element-ui";
|
|
|
+import Editor from '@/components/Editor/wang';
|
|
|
export default {
|
|
|
name: "Config",
|
|
|
components: {
|
|
|
- Material,productAttrValueSelect,productDeliveryGiftValueSelect
|
|
|
+ Material,productAttrValueSelect,productDeliveryGiftValueSelect,Editor
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ images:[],
|
|
|
+ uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
+ videoAccept:"video/*",
|
|
|
courseMaConfigLoading:false,
|
|
|
courseMaConfigList:[],
|
|
|
deliveryGift:{
|
|
@@ -1306,6 +1338,9 @@ export default {
|
|
|
cLevelMax: 40,
|
|
|
dLevelMin: 0,
|
|
|
dLevelMax: 10,
|
|
|
+ },
|
|
|
+ form21: {
|
|
|
+
|
|
|
},
|
|
|
photoArr:[],
|
|
|
couponList:[],
|
|
@@ -1324,6 +1359,7 @@ export default {
|
|
|
cLevelMax: [{ required: true, message: '请输入C级最大值', trigger: 'blur' }],
|
|
|
dLevelMax: [{ required: true, message: '请输入D级最大值', trigger: 'blur' }],
|
|
|
},
|
|
|
+ rules21:{}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1343,8 +1379,35 @@ export default {
|
|
|
photoArr: function(val) {
|
|
|
this.form4.certs = val.join(',')
|
|
|
},
|
|
|
+ images: function(val) {
|
|
|
+ this.form21.images = val.join(',')
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSuccess(response, file) {
|
|
|
+ // 上传成功后的回调函数
|
|
|
+ this.myloading.close();
|
|
|
+ this.form21.videoUrl = response.url;
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ },
|
|
|
+ beforeUpload(file) {
|
|
|
+ // 上传前的钩子函数,可以在这里对文件进行处理
|
|
|
+ // 返回 false 则取消上传
|
|
|
+
|
|
|
+ // 例如限制文件大小
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 200;
|
|
|
+ if (!isLt2M) {
|
|
|
+ this.$message.error('上传视频文件大小不能超过 200MB!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.myloading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '上传中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
submitCourseMaConfig() {
|
|
|
// 验证所有必填字段
|
|
|
const isValid = this.courseMaConfigList.every(item => {
|
|
@@ -1500,6 +1563,14 @@ export default {
|
|
|
}
|
|
|
this.courseMaConfigLoading = false;
|
|
|
}
|
|
|
+ else if(key=="store.concept"){
|
|
|
+ this.configId=response.data.configId;
|
|
|
+ this.configKey=response.data.configKey;
|
|
|
+ this.form21 =JSON.parse(response.data.configValue);
|
|
|
+ if(this.form21.images!=null){
|
|
|
+ this.images=this.form21.images.split(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -1683,6 +1754,14 @@ export default {
|
|
|
});
|
|
|
|
|
|
},
|
|
|
+ submitForm21(){
|
|
|
+ var param={configId:this.configId,configKey:this.configKey,configValue:JSON.stringify(this.form21)}
|
|
|
+ updateConfigByKey(param).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
submitform2(){
|
|
|
// 将对象转换为JSON字符串并保留两位小数
|
|
|
var json_data = JSON.stringify(this.form2, function(key, value) {
|