Commit f1049b05 authored by 黄媛媛's avatar 黄媛媛

解决冲突

parents 54880c12 f2515d09
...@@ -15,10 +15,12 @@ ...@@ -15,10 +15,12 @@
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.19.2",
"cos-js-sdk-v5": "^0.5.26", "cos-js-sdk-v5": "^0.5.26",
"echarts": "^4.8.0",
"element-ui": "^2.13.1", "element-ui": "^2.13.1",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "vue-router": "^3.0.1",
"vuedraggable": "^2.23.2"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="hoindexImgdiv"> <div class="hoindexImgdiv">
<img src="../assets/img/logo.png" alt="" style="height:30px"> <img src="../assets/img/logo.png" alt="" style="height:30px">
</div> </div>
<div class="hoindexRight"> <div class="hoindexRight" style="cursor:pointer;">
<el-dropdown> <el-dropdown>
<span class="el-dropdown-link" style="color:#fff;font-size:16px"> <span class="el-dropdown-link" style="color:#fff;font-size:16px">
<i class="iconfont icon-iconzh1"></i> <i class="iconfont icon-iconzh1"></i>
......
...@@ -5,145 +5,139 @@ ...@@ -5,145 +5,139 @@
</div> </div>
<div class="content"> <div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:60%"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:60%">
<el-form-item label="分类"> <el-form-item label="分类">
<template v-if="addMsg.CategoryList && addMsg.CategoryList.length>0"> <template v-if="addMsg.CategoryList && addMsg.CategoryList.length>0">
<el-tag type="warning" style="margin-right:10px;" @close="exitCheck(item,index)" <el-tag type="warning" style="margin-right:10px;" @close="exitCheck(item,index)"
v-for="(item,index) in addMsg.CategoryList" :key="index" closable> v-for="(item,index) in addMsg.CategoryList" :key="index" closable>
{{item.CategoryName}} {{item.CategoryName}}
</el-tag> </el-tag>
</template> </template>
<el-button type="primary" @click="flDig=true,keepCategoryList=addMsg.CategoryList" <el-button type="primary" @click="flDig=true,keepCategoryList=addMsg.CategoryList" style="margin:0 10px;"
style="margin:0 10px;" size="small">选择分类</el-button> size="small">选择分类</el-button>
</el-form-item> </el-form-item>
<!-- <el-form-item label="分销名称" prop="Name"> <!-- <el-form-item label="分销名称" prop="Name">
<el-input v-model="addMsg.Name" size="small"></el-input> <el-input v-model="addMsg.Name" size="small"></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item label="等级"> <el-form-item label="等级">
<el-button @click="gradeDig=true" size="small" type="primary" style="margin-bottom:10px">选择等级</el-button> <el-button @click="gradeDig=true" size="small" type="primary" style="margin-bottom:10px">选择等级</el-button>
<el-table <el-table :data="addMsg.RatioList" border style="width: 100%">
:data="addMsg.RatioList" <el-table-column prop="GradeName" label="名称">
border </el-table-column>
style="width: 100%"> <el-table-column prop="address" label="比例">
<el-table-column <template slot-scope="scope">
prop="GradeName" <el-input @input="inputVal(scope.row)" type="number" min="1" v-model="scope.row.CommissionRatio"
label="名称"> size="small" placeholder="请输入">
</el-table-column> <el-button slot="append">%</el-button>
<el-table-column </el-input>
prop="address" </template>
label="比例"> </el-table-column>
<template slot-scope="scope"> <el-table-column width="80px" prop="address" label="操作">
<el-input @input="inputVal(scope.row)" type="number" min="1" v-model="scope.row.CommissionRatio" size="small" placeholder="请输入"> <template slot-scope="scope">
<el-button slot="append">%</el-button> <el-tooltip class="item" effect="dark" content="删除" placement="top">
</el-input> <img @click="Delete(scope.row,scope.$index)" style="width:32px;height:32px;margin:0 10px"
</template> src="../../assets/img/userman/del.png" alt="">
</el-table-column> </el-tooltip>
<el-table-column </template>
width="80px" </el-table-column>
prop="address" </el-table>
label="操作"> </el-form-item>
<template slot-scope="scope"> <el-form-item label="返佣小数类型" prop="DecimalType">
<el-tooltip class="item" effect="dark" content="删除" placement="top"> <el-radio v-model="addMsg.DecimalType" :label="1">整数</el-radio>
<img @click="Delete(scope.row,scope.$index)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt=""> <el-radio v-model="addMsg.DecimalType" :label="2">保留2位小数</el-radio>
</el-tooltip> </el-form-item>
</template> <el-form-item label="是否启用" prop="Enabled">
</el-table-column> <el-radio v-model="addMsg.Enabled" :label="1"></el-radio>
</el-table> <el-radio v-model="addMsg.Enabled" :label="2"></el-radio>
</el-form-item> </el-form-item>
<el-form-item label="返佣小数类型" prop="DecimalType">
<el-radio v-model="addMsg.DecimalType" :label="1">整数</el-radio> </el-form>
<el-radio v-model="addMsg.DecimalType" :label="2">保留2位小数</el-radio>
</el-form-item>
<el-form-item label="是否启用" prop="Enabled">
<el-radio v-model="addMsg.Enabled" :label="1"></el-radio>
<el-radio v-model="addMsg.Enabled" :label="2"></el-radio>
</el-form-item>
</el-form>
</div> </div>
<div style="margin-top:20px"> <div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button> <el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div> </div>
<!-- 选择分类 --> <!-- 选择分类 -->
<el-dialog custom-class="app-add-cat" title="选择分类" :visible.sync="flDig" width="1100px"> <el-dialog custom-class="app-add-cat" title="选择分类" :visible.sync="flDig" width="1100px">
<el-row> <el-row>
<el-col :span="8" style="padding:0 10px;box-sizing:border-box"> <el-col :span="8" style="padding:0 10px;box-sizing:border-box">
<h3 style="padding:15px 0">一级分类</h3> <h3 style="padding:15px 0">一级分类</h3>
<div class="app-goods-cat-list active"> <div class="app-goods-cat-list active">
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange"> <el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
<div v-for="(item,index) in fenleiData" :key="index" flex="dir:left box:first" class="cat-item"> <div v-for="(item,index) in fenleiData" :key="index" flex="dir:left box:first" class="cat-item">
<el-checkbox :label="item.Id"> <el-checkbox :label="item.Id">
<span style="display: none;">{{item.Name}}</span> <span style="display: none;">{{item.Name}}</span>
</el-checkbox> </el-checkbox>
<div flex="box:last cross:center"> <div flex="box:last cross:center">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
<i v-if="item.ChildList.length>0" @click="getChild2(item.ChildList)" class="el-icon-arrow-right"></i> <i v-if="item.ChildList.length>0" @click="getChild2(item.ChildList)" class="el-icon-arrow-right"></i>
</div>
</div>
</el-checkbox-group>
</div> </div>
</el-col> </div>
<el-col v-show="childList2.length>0" :span="8" style="padding:0 10px;box-sizing:border-box"> </el-checkbox-group>
<h3 style="padding:15px 0">二级分类</h3> </div>
<div class="app-goods-cat-list active"> </el-col>
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange"> <el-col v-show="childList2.length>0" :span="8" style="padding:0 10px;box-sizing:border-box">
<div v-for="(item,index) in childList2" :key="index" flex="dir:left box:first" class="cat-item"> <h3 style="padding:15px 0">二级分类</h3>
<el-checkbox :label="item.Id"> <div class="app-goods-cat-list active">
<span style="display: none;">{{item.Name}}</span> <el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
</el-checkbox> <div v-for="(item,index) in childList2" :key="index" flex="dir:left box:first" class="cat-item">
<div flex="box:last cross:center"> <el-checkbox :label="item.Id">
<span>{{item.Name}}</span> <span style="display: none;">{{item.Name}}</span>
<i v-if="item.ChildList.length>0" @click="getChild3(item.ChildList)" class="el-icon-arrow-right"></i> </el-checkbox>
</div> <div flex="box:last cross:center">
</div> <span>{{item.Name}}</span>
</el-checkbox-group> <i v-if="item.ChildList.length>0" @click="getChild3(item.ChildList)" class="el-icon-arrow-right"></i>
</div> </div>
</el-col> </div>
<el-col v-show="childList3.length>0" :span="8" style="padding:0 10px;box-sizing:border-box"> </el-checkbox-group>
<h3 style="padding:15px 0">三级分类</h3>
<div class="app-goods-cat-list active">
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
<div v-for="(item,index) in childList3" :key="index" flex="dir:left box:first" class="cat-item">
<el-checkbox :label="item.Id">
<span style="display: none;">{{item.Name}}</span>
</el-checkbox>
<div flex="box:last cross:center">
<span>{{item.Name}}</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col v-show="childList3.length>0" :span="8" style="padding:0 10px;box-sizing:border-box">
<h3 style="padding:15px 0">三级分类</h3>
<div class="app-goods-cat-list active">
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
<div v-for="(item,index) in childList3" :key="index" flex="dir:left box:first" class="cat-item">
<el-checkbox :label="item.Id">
<span style="display: none;">{{item.Name}}</span>
</el-checkbox>
<div flex="box:last cross:center">
<span>{{item.Name}}</span>
<i class="el-icon-arrow-right"></i>
</div> </div>
</el-col> </div>
</el-row> </el-checkbox-group>
<div class="tag-box">
<el-tag @close="exitCheck(item)" v-for="(item,index) in addMsg.CategoryList" :key="index" type="warning" </div>
closable style="margin-right:5px">{{item.Name}}</el-tag> </el-col>
</div> </el-row>
<span slot="footer" class="dialog-footer"> <div class="tag-box">
<el-button size="small" @click="flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()">取 消</el-button> <el-tag @close="exitCheck(item)" v-for="(item,index) in addMsg.CategoryList" :key="index" type="warning"
<el-button @click="flDig = false" size="small" type="primary">确 定</el-button> closable style="margin-right:5px">{{item.Name}}</el-tag>
</span> </div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()">取 消</el-button>
<el-button @click="flDig = false" size="small" type="primary">确 定</el-button>
</span>
</el-dialog> </el-dialog>
<!-- 选择等级 --> <!-- 选择等级 -->
<el-dialog title="选择等级" :visible.sync="gradeDig" width="510px"> <el-dialog title="选择等级" :visible.sync="gradeDig" width="510px">
<div style="box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;"> <div
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选 style="box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;">
</el-checkbox> <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
</div> </el-checkbox>
<div style="margin: 15px 0;"></div> </div>
<div style="padding: 10px 25px 20px;"> <div style="margin: 15px 0;"></div>
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange"> <div style="padding: 10px 25px 20px;">
<el-checkbox style="margin-bottom:10px;width:110px" v-for="city in cities" :label="city.Id" :key="city.GradeName"> <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
{{city.GradeName}}</el-checkbox> <el-checkbox style="margin-bottom:10px;width:110px" v-for="city in cities" :label="city.Id"
</el-checkbox-group> :key="city.GradeName">
</div> {{city.GradeName}}</el-checkbox>
<span slot="footer" class="dialog-footer"> </el-checkbox-group>
<el-button size="small" @click="gradeDig = false">取 消</el-button> </div>
<el-button size="small" type="primary" @click="chooseGrade">确 定</el-button> <span slot="footer" class="dialog-footer">
</span> <el-button size="small" @click="gradeDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="chooseGrade">确 定</el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -156,15 +150,15 @@ ...@@ -156,15 +150,15 @@
cities: [], cities: [],
cityOptions: [], cityOptions: [],
isIndeterminate: true, isIndeterminate: true,
gradeDig:false, gradeDig: false,
flDig:false, flDig: false,
addMsg: { addMsg: {
Id: 0, Id: 0,
DecimalType: 2, DecimalType: 2,
Name: '', Name: '',
Enabled:2, Enabled: 2,
RatioList:[], RatioList: [],
CategoryList:[], CategoryList: [],
}, },
rules: { rules: {
Name: [{ Name: [{
...@@ -172,233 +166,226 @@ ...@@ -172,233 +166,226 @@
message: '请输入分销名称', message: '请输入分销名称',
trigger: 'blur' trigger: 'blur'
}], }],
DecimalType: [ DecimalType: [{
{ required: true, message: '请选择类型', trigger: 'change' } required: true,
], message: '请选择类型',
Enabled: [ trigger: 'change'
{ required: true, message: '请选择是否启用', trigger: 'change' } }],
], Enabled: [{
required: true,
message: '请选择是否启用',
trigger: 'change'
}],
}, },
GradeId: '', GradeId: '',
loading: false, loading: false,
gradeList: [], gradeList: [],
fenleiData:[], fenleiData: [],
checkList: [], checkList: [],
childList2: [], childList2: [],
childList3: [], childList3: [],
keepCategoryList: [], keepCategoryList: [],
HpGradeList:[], HpGradeList: [],
NewCategoryList:[], NewCategoryList: [],
}; };
}, },
created() { created() {
this.getTree(); this.getTree();
this.getHpDistributorGrade(); this.getHpDistributorGrade();
}, },
methods: { methods: {
inputVal(row){ inputVal(row) {
if(Number(row.CommissionRatio)<0){ if (Number(row.CommissionRatio) < 0) {
row.CommissionRatio=1; row.CommissionRatio = 1;
} }
if(Number(row.CommissionRatio)>100){ if (Number(row.CommissionRatio) > 100) {
row.CommissionRatio=100; row.CommissionRatio = 100;
} }
}, },
Delete(item,index){ Delete(item, index) {
this.addMsg.RatioList.splice(index, 1); this.addMsg.RatioList.splice(index, 1);
this.checkedCities.forEach((list,k)=>{ this.checkedCities.forEach((list, k) => {
if(list==item.GradeId){ if (list == item.GradeId) {
this.checkedCities.splice(k, 1); this.checkedCities.splice(k, 1);
} }
}) })
}, },
chooseGrade(){ chooseGrade() {
let arr=[]; let arr = [];
this.addMsg.RatioList=[]; this.addMsg.RatioList = [];
this.cities.forEach(item=>{ this.cities.forEach(item => {
this.checkedCities.forEach(list=>{ this.checkedCities.forEach(list => {
if(item.Id==list){ if (item.Id == list) {
let Obj={ let Obj = {
Grade:item.Grade, Grade: item.Grade,
GradeId:item.Id, GradeId: item.Id,
CommissionRatio:'', CommissionRatio: '',
GradeName:item.GradeName, GradeName: item.GradeName,
} }
arr.push(Obj); arr.push(Obj);
}
})
})
let list=arr.sort(this.compareGrade("Grade",true));
this.addMsg.RatioList=list;
this.gradeDig=false;
},
compareGrade(property,desc) {
return function (a, b) {
var value1 = a[property];
var value2 = b[property];
if(desc==true){
// 升序排列
return value1 - value2;
}else{
// 降序排列
return value2 - value1;
}
}
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.addMsg.RatioList.length==0){
this.Error("请选择返佣等级!");
return;
}
this.apipost("/api/user/SetHpDistributorInfo", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.CommonJump('PeaceDistribution');
} else {
this.Error(res.data.message);
}
})
} else {
return false;
} }
}); })
}, })
ExitCateList(){
this.NewCategoryList=[];
this.addMsg.CategoryList.forEach(item=>{
item.Name=item.CategoryName;
this.NewCategoryList.push(item.CategoryId)
})
},
handleCheckChange() {
this.addMsg.CategoryList=[];
this.NewCategoryList.forEach(list=>{
this.fenleiData.forEach(item => {
if(list==item.Id){
item.CategoryId=item.Id;
this.addMsg.CategoryList.push(item)
}
item.ChildList.forEach(item2=>{
if(list==item2.Id){
item2.CategoryId=item2.Id;
this.addMsg.CategoryList.push(item2)
}
item2.ChildList.forEach(item3=>{
if(list==item3.Id){
item3.CategoryId=item3.Id;
this.addMsg.CategoryList.push(item3)
}
})
}) let list = arr.sort(this.compareGrade("Grade", true));
}) this.addMsg.RatioList = list;
}) this.gradeDig = false;
console.log("this.addMsg.CategoryList",this.addMsg.CategoryList) },
}, compareGrade(property, desc) {
exitCheck(item, index) { return function (a, b) {
this.addMsg.CategoryList.forEach((list, k) => { var value1 = a[property];
if (list.Id == item.Id) { var value2 = b[property];
this.addMsg.CategoryList.splice(k, 1); if (desc == true) {
// 升序排列
return value1 - value2;
} else {
// 降序排列
return value2 - value1;
}
}
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.addMsg.RatioList.length == 0) {
this.Error("请选择返佣等级!");
return;
} }
this.apipost("/api/user/SetHpDistributorInfo", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.CommonJump('PeaceDistribution');
} else {
this.Error(res.data.message);
}
}) })
this.ExitCateList(); } else {
}, return false;
getChild3(ChildList) { }
this.childList3 = ChildList; });
}, },
getChild2(ChildList) { ExitCateList() {
this.childList2 = ChildList; this.NewCategoryList = [];
}, this.addMsg.CategoryList.forEach(item => {
getTree() { item.Name = item.CategoryName;
let msg1 = { this.NewCategoryList.push(item.CategoryId)
Id: 0, })
Name: '', },
Tier: 0, handleCheckChange() {
ParentId: 0, this.addMsg.CategoryList = [];
Enabled: 1, this.NewCategoryList.forEach(list => {
IsShow: 1, this.fenleiData.forEach(item => {
} if (list == item.Id) {
this.apipost("/api/product/GetProductCategoryTreeList", msg1, res => { item.CategoryId = item.Id;
if (res.data.resultCode == 1) { this.addMsg.CategoryList.push(item)
let pageData = res.data.data;
this.fenleiData = pageData;
this.fenleiData.forEach(item => {
item.CategoryName = item.Name;
item.ChildList.forEach(item2=>{
item2.CategoryName = item2.Name;
item2.ChildList.forEach(item3=>{
item3.CategoryName = item3.Name;
})
})
})
} }
item.ChildList.forEach(item2 => {
}) if (list == item2.Id) {
}, item2.CategoryId = item2.Id;
getHpDistributorGrade() { this.addMsg.CategoryList.push(item2)
this.cityOptions = []; }
this.apipost("/api/user/GetHpDistributorGradeList", {}, res => { item2.ChildList.forEach(item3 => {
this.cities = res.data.data; if (list == item3.Id) {
let data = res.data.data; item3.CategoryId = item3.Id;
data.forEach(item => { this.addMsg.CategoryList.push(item3)
this.cityOptions.push(item.Id)
})
if (this.$route.query.UserId) {
this.GradeId = this.$route.query.UserId;
this.getData()
} }
})
}) })
}, })
getData() { })
this.loading = true; },
this.apipost("/api/user/GetHpdistributorInfo", { exitCheck(item, index) {
CommissionId: this.GradeId this.addMsg.CategoryList.forEach((list, k) => {
}, res => { if (list.Id == item.Id) {
this.loading = false; this.addMsg.CategoryList.splice(k, 1);
this.addMsg = res.data.data; }
this.NewCategoryList=[]; })
this.addMsg.CategoryList.forEach(item=>{ this.ExitCateList();
item.Name=item.CategoryName; },
this.NewCategoryList.push(item.CategoryId) getChild3(ChildList) {
this.childList3 = ChildList;
},
getChild2(ChildList) {
this.childList2 = ChildList;
},
getTree() {
let msg1 = {
Id: 0,
Name: '',
Tier: 0,
ParentId: 0,
Enabled: 1,
IsShow: 1,
}
this.apipost("/api/product/GetProductCategoryTreeList", msg1, res => {
if (res.data.resultCode == 1) {
let pageData = res.data.data;
this.fenleiData = pageData;
this.fenleiData.forEach(item => {
item.CategoryName = item.Name;
item.ChildList.forEach(item2 => {
item2.CategoryName = item2.Name;
item2.ChildList.forEach(item3 => {
item3.CategoryName = item3.Name;
}) })
this.checkedCities=[]; })
this.addMsg.RatioList.forEach(item=>{
this.cities.forEach(list=>{
if(item.GradeId==list.Id){
this.checkedCities.push(list.Id);
}
})
})
//
}) })
}, }
})
},
getHpDistributorGrade() {
this.cityOptions = [];
this.apipost("/api/user/GetHpDistributorGradeList", {}, res => {
this.cities = res.data.data;
let data = res.data.data;
data.forEach(item => {
this.cityOptions.push(item.Id)
})
if (this.$route.query.UserId) {
this.GradeId = this.$route.query.UserId;
this.getData()
}
})
},
getData() {
this.loading = true;
this.apipost("/api/user/GetHpdistributorInfo", {
CommissionId: this.GradeId
}, res => {
this.loading = false;
this.addMsg = res.data.data;
this.NewCategoryList = [];
this.addMsg.CategoryList.forEach(item => {
item.Name = item.CategoryName;
this.NewCategoryList.push(item.CategoryId)
})
this.checkedCities = [];
this.addMsg.RatioList.forEach(item => {
this.cities.forEach(list => {
if (item.GradeId == list.Id) {
this.checkedCities.push(list.Id);
}
})
})
})
},
}, },
mounted() { mounted() {
} }
}; };
</script> </script>
<style> <style>
.app-add-cat .el-checkbox-group { .app-add-cat .el-checkbox-group {
font-size: 14px !important; font-size: 14px !important;
} }
...@@ -435,6 +422,7 @@ ...@@ -435,6 +422,7 @@
overflow: scroll; overflow: scroll;
height: 400px; height: 400px;
} }
.usersListEdit .tip { .usersListEdit .tip {
margin-left: 10px; margin-left: 10px;
display: inline-block; display: inline-block;
......
...@@ -57,13 +57,15 @@ ...@@ -57,13 +57,15 @@
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
} }
.diy-rubik .layout .rubik .delete { .diy-rubik .layout .rubik .delete {
position: absolute; position: absolute;
right: -16px; right: -16px;
top: -16px; top: -16px;
padding: 8px; padding: 8px;
z-index: 14; z-index: 14;
} }
</style> </style>
<template> <template>
<div :class="{'active':rubData.isCked}"> <div :class="{'active':rubData.isCked}">
...@@ -89,13 +91,12 @@ ...@@ -89,13 +91,12 @@
icon="el-icon-close" circle @click.stop="deleteRubik(index)"></el-button> icon="el-icon-close" circle @click.stop="deleteRubik(index)"></el-button>
</template> </template>
<span v-if="!rubData.data.list[index].pic_url">{{rubikSize(index)}}</span> <span v-if="!rubData.data.list[index].pic_url">{{rubikSize(index)}}</span>
<img v-else :src="getIconLink(rubData.data.list[index].pic_url)" <img v-else :src="getIconLink(rubData.data.list[index].pic_url)" style="width: 100%;visibility: hidden;">
style="width: 100%;visibility: hidden;">
</div> </div>
<div class="rubik" :style="emptyStyle(index)" v-if="rubData.data.style == 8" :key="index"></div> <div class="rubik" :style="emptyStyle(index)" v-if="rubData.data.style == 8" :key="index"></div>
<img v-if="rubData.data.list[index].pic_url && rubData.data.style == 0" <img v-if="rubData.data.list[index].pic_url && rubData.data.style == 0"
:src="getIconLink(rubData.data.list[index].pic_url)" :src="getIconLink(rubData.data.list[index].pic_url)" :key="index"
:key="index" style="width: 100%;visibility: hidden;display: block"> style="width: 100%;visibility: hidden;display: block">
</template> </template>
</div> </div>
</div> </div>
...@@ -131,7 +132,7 @@ ...@@ -131,7 +132,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</template> </template>
<template v-if="!rubData.data.list[rubik]"> <template v-if="rubData.data.list&&!rubData.data.list[rubik]">
<el-form-item label="图片上传"> <el-form-item label="图片上传">
<span>请先在左边选择图片位置</span> <span>请先在左边选择图片位置</span>
</el-form-item> </el-form-item>
...@@ -140,17 +141,17 @@ ...@@ -140,17 +141,17 @@
<el-card shadow="never"> <el-card shadow="never">
<el-form-item label="图片上传"> <el-form-item label="图片上传">
<el-button size="mini" @click="choicImg=true">选择图片</el-button> <el-button size="mini" @click="choicImg=true">选择图片</el-button>
<div flex style="flex-wrap: wrap;" v-if="rubData.data.list[rubik].pic_url"> <div flex style="flex-wrap: wrap;" v-if="rubData.data.list&&rubData.data.list[rubik].pic_url">
<div flex="main:center cross:center" class="app-gallery-item" <div flex="main:center cross:center" class="app-gallery-item"
style="height: 100px; width: 100px;"> style="height: 100px; width: 100px;">
<img <img :src="getIconLink(rubData.data.list[rubik].pic_url)" style="width:100%;height:100%;">
:src="getIconLink(rubData.data.list[rubik].pic_url)"
style="width:100%;height:100%;">
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="选择链接"> <el-form-item label="选择链接">
<el-input size="small" v-model="rubData.data.list[rubik].link.name" :disabled="true"> <el-input size="small" v-if="rubData.data.list&&rubData.data.list.length>0
&& rubData.data.list[rubik].link && rubData.data.list[rubik].link.length>0" v-model="
rubData.data.list[rubik].link[0].PageName" :disabled="true">
<template slot="append"> <template slot="append">
<el-button @click="isShowLink=true">选择链接</el-button> <el-button @click="isShowLink=true">选择链接</el-button>
</template> </template>
...@@ -210,7 +211,7 @@ ...@@ -210,7 +211,7 @@
x: 0, x: 0,
y: 0, y: 0,
}, ], }, ],
icon: this.domainManager().ImageUrl+'/Static/rubik-0.png', icon: this.domainManager().ImageUrl + '/Static/rubik-0.png',
}, },
{ {
name: '2张图', name: '2张图',
...@@ -230,7 +231,7 @@ ...@@ -230,7 +231,7 @@
y: 0, y: 0,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-1.png', icon: this.domainManager().ImageUrl + '/Static/rubik-1.png',
}, },
{ {
name: '3张图', name: '3张图',
...@@ -256,7 +257,7 @@ ...@@ -256,7 +257,7 @@
y: 6, y: 6,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-2.png', icon: this.domainManager().ImageUrl + '/Static/rubik-2.png',
}, },
{ {
name: '4张图', name: '4张图',
...@@ -288,7 +289,7 @@ ...@@ -288,7 +289,7 @@
y: 12, y: 12,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-3.png', icon: this.domainManager().ImageUrl + '/Static/rubik-3.png',
}, },
{ {
name: '2张图平分', name: '2张图平分',
...@@ -308,7 +309,7 @@ ...@@ -308,7 +309,7 @@
y: 0, y: 0,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-4.png', icon: this.domainManager().ImageUrl + '/Static/rubik-4.png',
}, },
{ {
name: '3张图平分', name: '3张图平分',
...@@ -334,7 +335,7 @@ ...@@ -334,7 +335,7 @@
y: 0, y: 0,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-5.png', icon: this.domainManager().ImageUrl + '/Static/rubik-5.png',
}, },
{ {
name: '4张图左右平分', name: '4张图左右平分',
...@@ -366,7 +367,7 @@ ...@@ -366,7 +367,7 @@
y: 0, y: 0,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-6.png', icon: this.domainManager().ImageUrl + '/Static/rubik-6.png',
}, },
{ {
name: '4张图上下平分', name: '4张图上下平分',
...@@ -398,7 +399,7 @@ ...@@ -398,7 +399,7 @@
y: 62, y: 62,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-7.png', icon: this.domainManager().ImageUrl + '/Static/rubik-7.png',
}, },
{ {
name: '自定义魔方', name: '自定义魔方',
...@@ -437,7 +438,7 @@ ...@@ -437,7 +438,7 @@
y: 93, y: 93,
}, },
], ],
icon: this.domainManager().ImageUrl+'/Static/rubik-8.png', icon: this.domainManager().ImageUrl + '/Static/rubik-8.png',
}, },
] ]
}; };
...@@ -467,7 +468,9 @@ ...@@ -467,7 +468,9 @@
} else { } else {
if (index === 0) { if (index === 0) {
this.rubData.data.height = 'auto'; this.rubData.data.height = 'auto';
return `height: ${this.rubData.data.list[0].pic_url ? 'auto' : '360px'}`; if (this.rubData.data.list && this.rubData.data.list.length > 0) {
return `height: ${this.rubData.data.list[0].pic_url ? 'auto' : '360px'}`;
}
} }
return `height: ${this.style_list[index] ? this.style_list[index].height : 360}px`; return `height: ${this.style_list[index] ? this.style_list[index].height : 360}px`;
} }
...@@ -525,7 +528,12 @@ ...@@ -525,7 +528,12 @@
} }
let style = JSON.parse(JSON.stringify(this.style_list[index])); let style = JSON.parse(JSON.stringify(this.style_list[index]));
for (let i in style.list) { for (let i in style.list) {
style.list[i].link = {}; style.list[i].link = [{
PageUrl: '',
IsParameter: 0,
ParameterValue: '',
PageName: ''
}];
} }
this.rubData.data.height = style.height; this.rubData.data.height = style.height;
this.rubData.data.w = style.w; this.rubData.data.w = style.w;
...@@ -706,7 +714,10 @@ ...@@ -706,7 +714,10 @@
if (this.rubData.data.list.length <= 0) { if (this.rubData.data.list.length <= 0) {
return ''; return '';
} }
this.rubData.data.list[this.rubik].link.name = obj.PageName; this.rubData.data.list[this.rubik].link[0].PageUrl = obj.PageUrl;
this.rubData.data.list[this.rubik].link[0].IsParameter = obj.IsParameter;
this.rubData.data.list[this.rubik].link[0].ParameterValue = obj.ParameterValue;
this.rubData.data.list[this.rubik].link[0].PageName = obj.PageName;
this.isShowLink = false; this.isShowLink = false;
}, },
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
position: absolute; position: absolute;
margin-left: 0!important; margin-left: 0 !important;
} }
.diy-search>div { .diy-search>div {
...@@ -159,17 +159,20 @@ ...@@ -159,17 +159,20 @@
justify-content: center; justify-content: center;
background: #fff; background: #fff;
} }
.bgMsg_Div div{
.bgMsg_Div div {
height: 50px; height: 50px;
width: 50px; width: 50px;
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer; cursor: pointer;
background-color: #F5F7F9; background-color: #F5F7F9;
} }
.bgMsg_Div .active{
.bgMsg_Div .active {
background-color: #E6F4FF; background-color: #E6F4FF;
border: 2px dashed #5CB3FD; border: 2px dashed #5CB3FD;
} }
</style> </style>
<template> <template>
<div class="templateEdit"> <div class="templateEdit">
...@@ -203,7 +206,7 @@ ...@@ -203,7 +206,7 @@
<div class="mobile-framework" style="height:705px;"> <div class="mobile-framework" style="height:705px;">
<div class="mobile-framework-header"></div> <div class="mobile-framework-header"></div>
<div class="mobile-framework-body" <div class="mobile-framework-body"
:style="'background-color:'+ bgMsg.data.backgroundColor+';background-image:url('+getIconLink(bgMsg.data.backgroundPicUrl)+');background-size:'+bgMsg.data.backgroundWidth+'% '+bgMsg.data.backgroundHeight+'%;background-repeat:'+repeat+';background-position:'+position"> :style="'background-color:'+ bgMsg.data.backgroundColor+';background-image:url('+getIconLink(bgMsg.data.backgroundPicUrl)+');background-size:'+bgMsg.data.backgroundWidth+'% '+bgMsg.data.backgroundHeight+'%;background-repeat:'+repeat+';background-position:'+position">
<!-- 为空的样式开始 --> <!-- 为空的样式开始 -->
<div v-if="dataList.length==0" flex="main:center cross:center" <div v-if="dataList.length==0" flex="main:center cross:center"
style="height: 200px; color: rgb(173, 177, 184); text-align: center;"> style="height: 200px; color: rgb(173, 177, 184); text-align: center;">
...@@ -288,54 +291,57 @@ ...@@ -288,54 +291,57 @@
</div> </div>
<!-- 背景设置 --> <!-- 背景设置 -->
<el-dialog title="背景设置" :visible.sync="bgVisible" width="950px"> <el-dialog title="背景设置" :visible.sync="bgVisible" width="950px">
<el-form label-width="100px"> <el-form label-width="100px">
<el-form-item label="背景颜色"> <el-form-item label="背景颜色">
<div flex="dir:left cross:center"> <div flex="dir:left cross:center">
<el-color-picker size="small" v-model="bgMsg.data.backgroundColor"></el-color-picker> <el-color-picker size="small" v-model="bgMsg.data.backgroundColor"></el-color-picker>
<el-input size="small" style="width: 80px;margin-right: 25px;" v-model="bgMsg.data.backgroundColor"></el-input> <el-input size="small" style="width: 80px;margin-right: 25px;" v-model="bgMsg.data.backgroundColor">
</div> </el-input>
</el-form-item> </div>
<el-form-item label="背景图片"> </el-form-item>
<el-switch v-model="bgMsg.data.showImg" @change="showBackground"></el-switch> <el-form-item label="背景图片">
<slot name="about"></slot> <el-switch v-model="bgMsg.data.showImg" @change="showBackground"></el-switch>
</el-form-item> <slot name="about"></slot>
<el-form-item v-if="bgMsg.data.showImg" label="上传背景"> </el-form-item>
<div class="zk_pic_box" @click="choicImg=true" flex="main:center cross:center" <el-form-item v-if="bgMsg.data.showImg" label="上传背景">
:style="{backgroundImage:'url(' + getIconLink(bgMsg.data.backgroundPicUrl) + ')'}"> <div class="zk_pic_box" @click="choicImg=true" flex="main:center cross:center"
<i v-if="bgMsg.data.backgroundPicUrl==''" class="el-icon-picture-outline"></i> :style="{backgroundImage:'url(' + getIconLink(bgMsg.data.backgroundPicUrl) + ')'}">
<el-button type="danger" v-if="bgMsg.data.backgroundPicUrl!=''" class="image-delete" size="mini" <i v-if="bgMsg.data.backgroundPicUrl==''" class="el-icon-picture-outline"></i>
icon="el-icon-close" @click.stop="bgMsg.data.backgroundPicUrl=''" circle></el-button> <el-button type="danger" v-if="bgMsg.data.backgroundPicUrl!=''" class="image-delete" size="mini"
</div> icon="el-icon-close" @click.stop="bgMsg.data.backgroundPicUrl=''" circle></el-button>
</el-form-item> </div>
<el-form-item v-if="bgMsg.data.showImg" label="图片位置"> </el-form-item>
<div class="bgMsg_Div" flex="main:justify wrap:wrap" style="width:170px;height:180px;"> <el-form-item v-if="bgMsg.data.showImg" label="图片位置">
<div @click="choose(1,'top left')" :class="bgMsg.data.position==1?'active':''"></div> <div class="bgMsg_Div" flex="main:justify wrap:wrap" style="width:170px;height:180px;">
<div @click="choose(2,'top center')" :class="bgMsg.data.position==2?'active':''"></div> <div @click="choose(1,'top left')" :class="bgMsg.data.position==1?'active':''"></div>
<div @click="choose(3,'top right')" :class="bgMsg.data.position==3?'active':''"></div> <div @click="choose(2,'top center')" :class="bgMsg.data.position==2?'active':''"></div>
<div @click="choose(4,'center left')" :class="bgMsg.data.position==4?'active':''"></div> <div @click="choose(3,'top right')" :class="bgMsg.data.position==3?'active':''"></div>
<div @click="choose(5,'center center')" :class="bgMsg.data.position==5?'active':''"></div> <div @click="choose(4,'center left')" :class="bgMsg.data.position==4?'active':''"></div>
<div @click="choose(6,'center right')" :class="bgMsg.data.position==6?'active':''"></div> <div @click="choose(5,'center center')" :class="bgMsg.data.position==5?'active':''"></div>
<div @click="choose(7,'bottom left')" :class="bgMsg.data.position==7?'active':''"></div> <div @click="choose(6,'center right')" :class="bgMsg.data.position==6?'active':''"></div>
<div @click="choose(8,'bottom center')" :class="bgMsg.data.position==8?'active':''"></div> <div @click="choose(7,'bottom left')" :class="bgMsg.data.position==7?'active':''"></div>
<div @click="choose(9,'bottom right')" :class="bgMsg.data.position==9?'active':''"></div> <div @click="choose(8,'bottom center')" :class="bgMsg.data.position==8?'active':''"></div>
</div> <div @click="choose(9,'bottom right')" :class="bgMsg.data.position==9?'active':''"></div>
</el-form-item> </div>
<el-form-item v-if="bgMsg.data.showImg" label="填充方式"> </el-form-item>
<el-radio-group v-model="bgMsg.data.mode" @change="changeMode"> <el-form-item v-if="bgMsg.data.showImg" label="填充方式">
<el-radio :label="1">充满</el-radio> <el-radio-group v-model="bgMsg.data.mode" @change="changeMode">
<el-radio :label="2">左右平铺</el-radio> <el-radio :label="1">充满</el-radio>
<el-radio :label="3">上下平铺</el-radio> <el-radio :label="2">左右平铺</el-radio>
<el-radio :label="4">平铺满</el-radio> <el-radio :label="3">上下平铺</el-radio>
</el-radio-group> <el-radio :label="4">平铺满</el-radio>
</el-form-item> </el-radio-group>
<el-form-item v-if="bgMsg.data.showImg && bgMsg.data.mode != 1" label="背景图宽"> </el-form-item>
<el-slider v-model="bgMsg.data.backgroundWidth" :show-input-controls="false" style="float: left;width: 95%" :max="100" show-input></el-slider> <el-form-item v-if="bgMsg.data.showImg && bgMsg.data.mode != 1" label="背景图宽">
<div style="float: right">%</div> <el-slider v-model="bgMsg.data.backgroundWidth" :show-input-controls="false" style="float: left;width: 95%"
</el-form-item> :max="100" show-input></el-slider>
<el-form-item v-if="bgMsg.data.showImg && bgMsg.data.mode != 1" label="背景图高"> <div style="float: right">%</div>
<el-slider v-model="bgMsg.data.backgroundHeight" :show-input-controls="false" style="float: left;width: 95%" :max="100" show-input></el-slider> </el-form-item>
<div style="float: right">%</div> <el-form-item v-if="bgMsg.data.showImg && bgMsg.data.mode != 1" label="背景图高">
</el-form-item> <el-slider v-model="bgMsg.data.backgroundHeight" :show-input-controls="false" style="float: left;width: 95%"
:max="100" show-input></el-slider>
<div style="float: right">%</div>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="bgVisible = false">取 消</el-button> <el-button @click="bgVisible = false">取 消</el-button>
...@@ -407,7 +413,7 @@ ...@@ -407,7 +413,7 @@
repeat: 'no-repeat', repeat: 'no-repeat',
choicImg: false, choicImg: false,
//左侧组件列表 //左侧组件列表
bgVisible:false, bgVisible: false,
allComponents: [], allComponents: [],
dataList: [], dataList: [],
}; };
...@@ -455,44 +461,44 @@ ...@@ -455,44 +461,44 @@
this.bgMsg.data.backgroundPicUrl = msg.url; this.bgMsg.data.backgroundPicUrl = msg.url;
this.choicImg = false; this.choicImg = false;
}, },
choose(num,position) { choose(num, position) {
this.bgMsg.data.position = num; this.bgMsg.data.position = num;
this.position = position; this.position = position;
}, },
//点击设置背景 //点击设置背景
SetBgInfo(){ SetBgInfo() {
this.dataList.push(this.bgMsg); this.dataList.push(this.bgMsg);
this.bgVisible=false; this.bgVisible = false;
}, },
showBackground(e) { showBackground(e) {
if(!e) { if (!e) {
this.bgMsg.data.backgroundPicUrl += '临时放置' this.bgMsg.data.backgroundPicUrl += '临时放置'
}else { } else {
this.bgMsg.data.backgroundPicUrl = this.bgMsg.data.backgroundPicUrl.replace('临时放置','') this.bgMsg.data.backgroundPicUrl = this.bgMsg.data.backgroundPicUrl.replace('临时放置', '')
} }
if(this.bgMsg.data.mode == 2) { if (this.bgMsg.data.mode == 2) {
this.repeat = 'repeat-x' this.repeat = 'repeat-x'
}else if(this.bgMsg.data.mode == 3) { } else if (this.bgMsg.data.mode == 3) {
this.repeat = 'repeat-y' this.repeat = 'repeat-y'
}else if(this.bgMsg.data.mode == 4) { } else if (this.bgMsg.data.mode == 4) {
this.repeat = 'repeat' this.repeat = 'repeat'
}else if(this.bgMsg.data.mode == 1) { } else if (this.bgMsg.data.mode == 1) {
this.repeat = 'no-repeat'; this.repeat = 'no-repeat';
this.bgMsg.data.backgroundHeight = 100; this.bgMsg.data.backgroundHeight = 100;
this.bgMsg.data.backgroundWidth = 100; this.bgMsg.data.backgroundWidth = 100;
} }
}, },
changeMode(e){ changeMode(e) {
if(e == 2) { if (e == 2) {
this.repeat = 'repeat-x' this.repeat = 'repeat-x'
}else if(e == 3) { } else if (e == 3) {
this.repeat = 'repeat-y' this.repeat = 'repeat-y'
}else if(e == 4) { } else if (e == 4) {
this.repeat = 'repeat' this.repeat = 'repeat'
}else if(e == 1) { } else if (e == 1) {
this.repeat = 'no-repeat'; this.repeat = 'no-repeat';
this.bgMsg.data.backgroundHeight = 100; this.bgMsg.data.backgroundHeight = 100;
this.bgMsg.data.backgroundWidth = 100; this.bgMsg.data.backgroundWidth = 100;
} }
}, },
//获取左侧菜单 //获取左侧菜单
...@@ -569,10 +575,10 @@ ...@@ -569,10 +575,10 @@
data: { data: {
name: '公告', //公告名称 name: '公告', //公告名称
content: '', //公告内容 content: '', //公告内容
icon: this.domainManager().ImageUrl+'/Static/icon-notice.png', //公告图标 icon: this.domainManager().ImageUrl + '/Static/icon-notice.png', //公告图标
textColor: '#ffffff', //文字颜色 textColor: '#ffffff', //文字颜色
background: '#f67f79', //背景颜色 background: '#f67f79', //背景颜色
headerUrl: this.domainManager().ImageUrl+'/Static/icon-notice-title.png', //头部图片 headerUrl: this.domainManager().ImageUrl + '/Static/icon-notice-title.png', //头部图片
btnColor: '#ff4544', //按钮颜色 btnColor: '#ff4544', //按钮颜色
btnWidth: 500, //按钮宽度 btnWidth: 500, //按钮宽度
btnHeight: 80, //按钮高度 btnHeight: 80, //按钮高度
...@@ -589,13 +595,13 @@ ...@@ -589,13 +595,13 @@
Id: 'topic', Id: 'topic',
isCked: false, isCked: false,
data: { data: {
style: 'normal',//专题样式 style: 'normal', //专题样式
count: 1,//显示行数 count: 1, //显示行数
logo_1: this.domainManager().ImageUrl+'/Static/icon-topic-1.png',//logo(1行) logo_1: this.domainManager().ImageUrl + '/Static/icon-topic-1.png', //logo(1行)
logo_2: this.domainManager().ImageUrl+'/Static/icon-topic-2.png',//logo(2行) logo_2: this.domainManager().ImageUrl + '/Static/icon-topic-2.png', //logo(2行)
icon: this.domainManager().ImageUrl+'/Static/icon-topic-r.png',//专题标签 icon: this.domainManager().ImageUrl + '/Static/icon-topic-r.png', //专题标签
list: [], list: [],
cat_show: false,//是否显示分类 cat_show: false, //是否显示分类
topic_list: [] topic_list: []
} }
} }
...@@ -696,8 +702,8 @@ ...@@ -696,8 +702,8 @@
Id: 'store', Id: 'store',
isCked: false, isCked: false,
data: { data: {
navPicUrl: this.domainManager().ImageUrl+'/Static/nav-icon.png', //导航图标 navPicUrl: this.domainManager().ImageUrl + '/Static/nav-icon.png', //导航图标
scorePicUrl: this.domainManager().ImageUrl+'/Static/score-icon.png', //评分图标 scorePicUrl: this.domainManager().ImageUrl + '/Static/score-icon.png', //评分图标
showName: true, //显示门店名称 showName: true, //显示门店名称
showScore: true, //显示评分 showScore: true, //显示评分
showTel: true, //显示电话 showTel: true, //显示电话
...@@ -726,7 +732,7 @@ ...@@ -726,7 +732,7 @@
Id: 'check-in', Id: 'check-in',
isCked: false, isCked: false,
data: { data: {
backgroundPicUrl: this.domainManager().ImageUrl+'/Static/check-in-default-bg.png', //背景图 backgroundPicUrl: this.domainManager().ImageUrl + '/Static/check-in-default-bg.png', //背景图
showText: true, //显示文字 showText: true, //显示文字
textPosition: 'left', //文字位置 textPosition: 'left', //文字位置
textColor: '#ffffff', //文本颜色 textColor: '#ffffff', //文本颜色
...@@ -757,31 +763,31 @@ ...@@ -757,31 +763,31 @@
navs: [{ navs: [{
url: '', url: '',
openType: 'navigate', openType: 'navigate',
picUrl: this.domainManager().ImageUrl+'/Static/user-order-dfk.png', picUrl: this.domainManager().ImageUrl + '/Static/user-order-dfk.png',
text: '待付款', text: '待付款',
}, },
{ {
url: '', url: '',
openType: 'navigate', openType: 'navigate',
picUrl: this.domainManager().ImageUrl+'/Static/user-order-dfh.png', picUrl: this.domainManager().ImageUrl + '/Static/user-order-dfh.png',
text: '待发货', text: '待发货',
}, },
{ {
url: '', url: '',
openType: 'navigate', openType: 'navigate',
picUrl: this.domainManager().ImageUrl+'/Static/user-order-dsh.png', picUrl: this.domainManager().ImageUrl + '/Static/user-order-dsh.png',
text: '待收货', text: '待收货',
}, },
{ {
url: '', url: '',
openType: 'navigate', openType: 'navigate',
picUrl: this.domainManager().ImageUrl+'/Static/user-order-ywc.png', picUrl: this.domainManager().ImageUrl + '/Static/user-order-ywc.png',
text: '待评价', text: '待评价',
}, },
{ {
url: '', url: '',
openType: 'navigate', openType: 'navigate',
picUrl: this.domainManager().ImageUrl+'/Static/user-order-sh.png', picUrl: this.domainManager().ImageUrl + '/Static/user-order-sh.png',
text: '售后', text: '售后',
}, },
], ],
...@@ -839,8 +845,8 @@ ...@@ -839,8 +845,8 @@
isCked: false, isCked: false,
data: { data: {
textColor: '#ffffff', //字体颜色 textColor: '#ffffff', //字体颜色
receiveBg: this.domainManager().ImageUrl+'/Static/icon-coupon-no.png', //不可领取 receiveBg: this.domainManager().ImageUrl + '/Static/icon-coupon-no.png', //不可领取
unclaimedBg: this.domainManager().ImageUrl+'/Static/icon-coupon-index.png', //可领取 unclaimedBg: this.domainManager().ImageUrl + '/Static/icon-coupon-index.png', //可领取
showImg: false, showImg: false,
backgroundColor: '#fff', //背景颜色 backgroundColor: '#fff', //背景颜色
backgroundPicUrl: '', backgroundPicUrl: '',
...@@ -971,7 +977,7 @@ ...@@ -971,7 +977,7 @@
showCoupon: true, showCoupon: true,
showGoods: true, showGoods: true,
couponColor: '#ffffff', couponColor: '#ffffff',
couponPicUrl: this.domainManager().ImageUrl+'/Static/coupon-background.png', couponPicUrl: this.domainManager().ImageUrl + '/Static/coupon-background.png',
buttonColor: '#ff4544', buttonColor: '#ff4544',
list: [], list: [],
listStyle: 1, listStyle: 1,
...@@ -1065,8 +1071,8 @@ ...@@ -1065,8 +1071,8 @@
background: '#FFFFFF', //背景色 background: '#FFFFFF', //背景色
usePluginConfig: true, //使用插件配置 usePluginConfig: true, //使用插件配置
top_bottom_padding: 0, //上下间距 top_bottom_padding: 0, //上下间距
buy_bg: this.domainManager().ImageUrl+'/Static/buy_bg.png', //未购买用户默认背景图 buy_bg: this.domainManager().ImageUrl + '/Static/buy_bg.png', //未购买用户默认背景图
renew_bg: this.domainManager().ImageUrl+'/Static/buy_bg.png', //未购买用户背景图 renew_bg: this.domainManager().ImageUrl + '/Static/buy_bg.png', //未购买用户背景图
buy_big_color: '', //未购买用户-大标题字体颜色 buy_big_color: '', //未购买用户-大标题字体颜色
buy_small_color: '', //未购买用户-小标题背景颜色 buy_small_color: '', //未购买用户-小标题背景颜色
buy_btn_color: '', //未购买用户-按钮文字颜色 buy_btn_color: '', //未购买用户-按钮文字颜色
...@@ -1231,7 +1237,22 @@ ...@@ -1231,7 +1237,22 @@
getItem(item) { getItem(item) {
this.dataList.forEach(x => { this.dataList.forEach(x => {
x.isCked = false; x.isCked = false;
}) })
if (item.Id == "rubik") {
if (item.data.list && item.data.list.length > 0) {
item.data.list.forEach(subItem => {
if (subItem.link && subItem.link.length == 0) {
subItem.link.push({
PageUrl: '',
IsParameter: 0,
ParameterValue: '',
PageName: ''
})
}
})
}
}
item.isCked = true; item.isCked = true;
}, },
//点击保存 //点击保存
...@@ -1263,10 +1284,10 @@ ...@@ -1263,10 +1284,10 @@
if (jsonData.ComponentDataList) { if (jsonData.ComponentDataList) {
this.dataList = jsonData.ComponentDataList; this.dataList = jsonData.ComponentDataList;
} }
if(jsonData.ComponentDataList){ if (jsonData.ComponentDataList) {
jsonData.ComponentDataList.forEach(x=>{ jsonData.ComponentDataList.forEach(x => {
if(x.Id=='background'){ if (x.Id == 'background') {
this.bgMsg=x; this.bgMsg = x;
} }
}) })
} }
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="qMsg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div> </div>
</div> </div>
</template> </template>
...@@ -60,7 +63,7 @@ ...@@ -60,7 +63,7 @@
dataList: [], dataList: [],
qMsg: { qMsg: {
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 15,
}, },
total: 0 total: 0
}; };
...@@ -69,6 +72,10 @@ ...@@ -69,6 +72,10 @@
}, },
methods: { methods: {
handleCurrentChange(val) {
this.qMsg.pageIndex = val;
this.getList();
},
getList() { getList() {
this.apipost("/api/Template/GetMiniTemplatePageList", this.qMsg, res => { this.apipost("/api/Template/GetMiniTemplatePageList", this.qMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -106,4 +113,5 @@ ...@@ -106,4 +113,5 @@
this.getList(); this.getList();
} }
}; };
</script>
\ No newline at end of file </script>
<template> <template>
<div class="templateMarket"> <div class="templateMarket">
<template> <div class="template_comheader">
<div class="head-title"> <div>
模板市场 <span>模板市场</span>
<el-button type="primary" size="small" @click="CommonJump('templateMarketManage',{})">模板市场管理</el-button>
</div> </div>
<div class="content"> </div>
<div style="padding:0 20px;margin-bottom:20px;"> <div class="content">
<el-select size="small" style="width:150px;"> <div class="template_MarketList">
<el-option label="全部模板" :value="1"> </el-option> <div class="Market_List" v-for="(item,index) in dataList" :key="index">
<el-option label="已拥有模板" :value="2"> </el-option> <div class="MarketInner">
<el-option label="未拥有模板" :value="3"> </el-option> <div flex="dir:top cross:center main:center" class="dialog-img">
</el-select> <div class="choose-btn market_useBtn" @click="LoadTemplate(item)">加载模板</div>
</div> <div class="choose-btn" @click="getImgSrc(item)">预览模板</div>
<div class="template_MarketList"> </div>
<div class="Market_List" v-for="(item,index) in dataList" :key="index"> <div class="show-img" :style="{backgroundImage:'url('+item.Pics+')'}">
<div class="MarketInner"> </div>
<div flex="dir:top cross:center main:center" class="dialog-img"> <div class="Market_Info">
<div class="choose-btn market_useBtn">加载模板</div> <div flex="dir:top main:center">
<div class="choose-btn" @click="getImgSrc(item)">预览模板</div> <div flex="main:justify">
</div> <div class="item-name">{{item.Name}}</div>
<div class="show-img" :style="{backgroundImage:'url('+item.pics[0]+')'}"> </div>
</div> <div>
<div class="Market_Info"> <div flex="cross:center main:justify">
<div flex="dir:top main:center"> <div class="price">
<div flex="main:justify"> {{item.Price}}
<div class="item-name">{{item.name}}</div>
</div>
<div>
<div flex="cross:center main:justify">
<div class="price">
{{item.price}}
</div>
<button type="button" class="el-button el-button--primary el-button--mini">
<span>加载</span>
</button>
</div> </div>
<button type="button" class="el-button el-button--primary el-button--mini">
<span @click="LoadTemplate(item)">加载</span>
</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -42,8 +36,7 @@ ...@@ -42,8 +36,7 @@
</div> </div>
</div> </div>
</div> </div>
</template> </div>
<el-dialog title="手机端预览" :visible.sync="viewDialog" width="600px"> <el-dialog title="手机端预览" :visible.sync="viewDialog" width="600px">
<div class="MarketView" ref="MarketView"> <div class="MarketView" ref="MarketView">
<img :src="imgUrl" alt="" style="width: 375px;"> <img :src="imgUrl" alt="" style="width: 375px;">
...@@ -53,7 +46,6 @@ ...@@ -53,7 +46,6 @@
<el-button type="primary" @click="viewDialog = false" size="small">确 定</el-button> <el-button type="primary" @click="viewDialog = false" size="small">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -63,582 +55,14 @@ ...@@ -63,582 +55,14 @@
//预览弹窗 //预览弹窗
viewDialog: false, viewDialog: false,
imgUrl: '', imgUrl: '',
dataList: [{ dataList: [],
"id": 40, qMsg: {
"name": "618年中盛典-2", pageIndex: 1,
"pics": [ pageSize: 15,
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/35120f94cf467eb8874aa67afe0b12c4.png" IsUse: 1,
], IsShow: 1,
"price": "0.00", },
"user_id": 8, total: 0,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "618年中盛典-2",
"cloud_price": "0.00"
},
{
"id": 39,
"name": "618年中盛典",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/3dec44461189a8c99b157e426ec98aa4.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "618年中盛典",
"cloud_price": "0.00"
},
{
"id": 38,
"name": "51劳动节-2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/a65509e5cee18c6dda134cde50009892.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "51劳动节-2",
"cloud_price": "0.00"
},
{
"id": 37,
"name": "51劳动节",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/fdce3d73af8165e0f5652187213950e3.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "51劳动节",
"cloud_price": "0.00"
},
{
"id": 36,
"name": "妇女节2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/df3307934c25cfbf1ae2c1046037d8bc.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "妇女节2",
"cloud_price": "0.00"
},
{
"id": 35,
"name": "妇女节",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/be4f913235be3ca1b7a4b4d34bb45216.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "妇女节",
"cloud_price": "0.00"
},
{
"id": 34,
"name": "情人节模板2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/a0dadedd1a511bfa59fa63497a8c974d.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "情人节模板2",
"cloud_price": "0.00"
},
{
"id": 33,
"name": "春节模板2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/2022fc32d157bbdacae989174c75d583.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "春节模板2",
"cloud_price": "0.00"
},
{
"id": 31,
"name": "元宵节模板2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/5f8c2f51b4a9160decb00bed2277952f.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "元宵节模板2",
"cloud_price": "0.00"
},
{
"id": 30,
"name": "情人节模板",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/615112ec2dc3e3b0b8aaa9b0b93bd4f0.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "情人节模板",
"cloud_price": "0.00"
},
{
"id": 29,
"name": "元宵节模板",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/a5c397ade39f0e76c784d46078f0ea20.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "元宵节模板",
"cloud_price": "0.00"
},
{
"id": 28,
"name": "春节模板",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/2be7b8bd21b5b89c1008bcbfbd6fc876.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "春节模板",
"cloud_price": "0.00"
},
{
"id": 19,
"name": "超市3",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/63f989c9f7b9663e6ab9de13c03056b6.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "超市3",
"cloud_price": "0.00"
},
{
"id": 18,
"name": "超市2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/81ecb3a4ec8e8248da0e7f7a027bafd2.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "超市2",
"cloud_price": "0.00"
},
{
"id": 17,
"name": "超市1",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/3bddad82d6c63870596334e318777fa5.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "超市1",
"cloud_price": "0.00"
},
{
"id": 16,
"name": "美妆2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/dc9370e6666b5cb588d81c1b22c72151.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "美妆2",
"cloud_price": "0.00"
},
{
"id": 15,
"name": "美妆1",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/9d24aec77b45951b50343f3bc9708cd9.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "美妆1",
"cloud_price": "0.00"
},
{
"id": 14,
"name": "生鲜2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/7b516ba8fce669badea52aa2452dc3db.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.2",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "生鲜2",
"cloud_price": "0.00"
},
{
"id": 13,
"name": "生鲜1",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/3d6b77eb7d512537c8e03e86c1e052f5.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "生鲜1",
"cloud_price": "0.00"
},
{
"id": 10,
"name": "服饰3",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/2e86a1ad42ac8ea8b5f9c8e1131e2cc2.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "服饰3",
"cloud_price": "0.00"
},
{
"id": 9,
"name": "服饰2",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/7e96634708ed70371f9fbcd3dcba0bb4.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "服饰2",
"cloud_price": "0.00"
},
{
"id": 8,
"name": "服饰1",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/42d68cee10e3fa8af2c23ab81241e14e.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "服饰1",
"cloud_price": "0.00"
},
{
"id": 7,
"name": "双十二",
"pics": [
"http://auth-zjhejiang-com.oss-cn-hangzhou.aliyuncs.com/uploads/versions/d66b72d485ceed26d358e8f142dec60f.png"
],
"price": "0.00",
"user_id": 8,
"type": "diy",
"version": "0.0.1",
"is_buy": 0,
"user": {
"id": 8,
"name": "程基恩"
},
"order": "",
"is_use": true,
"is_show": 0,
"use": true,
"template": {
"data": true
},
"cloud_name": "双十二",
"cloud_price": "0.00"
}
],
}; };
}, },
components: { components: {
...@@ -650,15 +74,48 @@ ...@@ -650,15 +74,48 @@
methods: { methods: {
getImgSrc(item) { getImgSrc(item) {
this.viewDialog = true; this.viewDialog = true;
this.imgUrl = item.pics[0]; this.imgUrl = item.Pics;
}, },
//关闭 //关闭
closeDialog() { closeDialog() {
this.viewDialog = false; this.viewDialog = false;
this.$refs.MarketView.scrollTop = 0; this.$refs.MarketView.scrollTop = 0;
},
handleCurrentChange(val) {
this.qMsg.pageIndex = val;
this.getList();
},
getList() {
this.apipost("/api/Template/GetTemplateMarketPageListModule", this.qMsg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//加载模板
LoadTemplate(item) {
var that = this;
that.apipost("/api/Template/LoadTemplateMarket", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
that.Confirm("是否前往编辑新模板?", function () {
that.CommonJump('templateEdit', {
Id: res.data.data.Id
});
});
} else {
that.Info(res.data.message);
}
})
} }
}, },
mounted() {} mounted() {
this.getList();
}
}; };
</script> </script>
...@@ -670,6 +127,13 @@ ...@@ -670,6 +127,13 @@
box-sizing: border-box; box-sizing: border-box;
} }
.templateMarket .template_comheader>div {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
}
.templateMarket .template_MarketList { .templateMarket .template_MarketList {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
<style>
.templateMarketManage .template_comheader {
padding: 13px 20px;
border-bottom: 1px solid #EBEEF5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
}
.templateMarketManage .template_comheader>div {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
}
.templateMarketManage .temp_content {
margin-top: 10px;
background: #fff;
padding: 20px;
}
.templateMarketManage .temp_imgStyle {
display: inline-block;
margin-right: 10px;
}
</style>
<template>
<div class="templateMarketManage">
<div class="template_comheader">
<div>
<span>模板市场管理</span>
<el-button type="primary" size="small" @click="CommonJump('templateMarket',{})">模板市场</el-button>
<el-button type="primary" size="small" @click="isShow=true,clearMsg()">新增</el-button>
</div>
</div>
<div class="temp_content">
<el-table :data="dataList" border style="width: 100%">
<el-table-column prop="Id" label="编号" width="100"></el-table-column>
<el-table-column prop="Name" label="模板名称"></el-table-column>
<el-table-column label="封面图" width="200">
<template slot-scope="scope">
<img :src="scope.row.Pics" style="width:180px;height:150px;">
</template>
</el-table-column>
<el-table-column label="启用/禁用" width="100">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsUse" active-color="#409EFF" :active-value="1" :inactive-value="0"
@change="updateIsUse(scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column label="显示/隐藏" width="100">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsShow" active-color="#409EFF" :active-value="1" :inactive-value="0"
@change="updateIsShow(scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="SortNum" label="排序" width="180"></el-table-column>
<el-table-column prop="CreateByName" label="操作人" width="150"></el-table-column>
<el-table-column prop="CreateDateStr" label="创建时间" width="180"></el-table-column>
<el-table-column label="操作" width="180">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img src="../../assets/img/setup/edit.png" alt="" class="temp_imgStyle" @click="EditeMarket(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="temp_imgStyle" @click="DeleteMarket(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange"
:page-size="qMsg.pageSize" layout="prev, pager, next" :total="total">
</el-pagination>
</div>
<!-- 新增修改模板市场 -->
<el-dialog title="模板市场" :visible.sync="isShow" width="700px">
<div class="content">
<el-form label-width="120px" style="padding:0 20px;">
<el-form-item label="模板名称">
<el-input v-model="PostMsg.Name" class="w400" size="small" maxlength="20" placeholder="请输入模板名称" />
</el-form-item>
<el-form-item label="封面图">
<el-input type="text" v-model="PostMsg.Pics" size="small" class="w400" placeholder="请输入选择封面图" />
</el-form-item>
<el-form-item label="价格">
<el-input type="text" v-model="PostMsg.Price" size="small" class="w400"
@keyup.native="checkPrice(PostMsg,'Price')" placeholder="请输入价格" />
</el-form-item>
<el-form-item label="启用/禁用">
<el-switch v-model="PostMsg.IsUse" active-color="#409EFF" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<el-form-item label="显示/隐藏">
<el-switch v-model="PostMsg.IsShow" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="排序">
<el-input type="text" v-model="PostMsg.SortNum" size="small" class="w400"
@keyup.native="checkInteger(PostMsg,'SortNum')" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="模板内容">
<el-input type="textarea" :rows="5" v-model="PostMsg.TemplateData" size="small" class="w400"
placeholder="请输入模板内容" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShow = false,clearMsg()">取消</el-button>
<el-button size="small" type="primary" @click="SaveMarket()">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
isShow: false,
dataList: [],
qMsg: {
pageIndex: 1,
pageSize: 15,
IsUse:-1,
IsShow:-1,
},
total: 0,
//添加修改
PostMsg: {
Id: 0, //编号
Name: "", //模板名称
Pics: "", //封面图
Price: 0.00, //价格
IsUse: 1, //是否使用(0-禁用,1-使用)
IsShow: 1, //是否显示(0-不显示,1-显示)
TemplateData: "", //模板数据
SortNum: 0, //排序
}
};
},
created() {
},
methods: {
handleCurrentChange(val) {
this.qMsg.pageIndex = val;
this.getList();
},
//清空数据
clearMsg() {
this.PostMsg.Id = 0;
this.PostMsg.Name = "";
this.PostMsg.Pics = "";
this.PostMsg.Price = 0;
this.PostMsg.IsUse = 1;
this.PostMsg.IsShow = 1;
this.PostMsg.TemplateData = "";
this.PostMsg.SortNum = 0;
},
getList() {
this.apipost("/api/Template/GetTemplateMarketPageListModule", this.qMsg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//保存模板市场数据
SaveMarket() {
this.apipost("/api/Template/SetTemplateMarket", this.PostMsg, res => {
if (res.data.resultCode == 1) {
this.isShow=false;
this.Success(res.data.message);
this.getList();
this.clearMsg();
} else {
this.Info(res.data.message);
}
})
},
//修改模板市场
EditeMarket(item) {
this.apipost("/api/Template/GetTemplateMarket", {
Id: item.Id,
}, res => {
if (res.data.resultCode == 1) {
this.PostMsg = res.data.data;
this.isShow = true;
} else {
this.Info(res.data.message);
}
})
},
//删除模板市场
DeleteMarket(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost("/api/Template/RemoveTemplateMarket", {
Id: item.Id,
}, res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Info(res.data.message);
}
})
});
},
//更新是否使用
updateIsUse(item) {
this.apipost("/api/Template/UpdateTemplateMarketIsUse", {
Id: item.Id,
IsUse: item.IsUse
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Info(res.data.message);
}
})
},
//更新是否显示
updateIsShow(item) {
this.apipost("/api/Template/UpdateTemplateMarketIsShow", {
Id: item.Id,
IsShow: item.IsShow
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
this.getList();
}
};
</script>
import md5 from 'js-md5' import md5 from 'js-md5'
export default { export default {
install(Vue, options) { install(Vue, options) {
Vue.prototype.md5 = md5; Vue.prototype.md5 = md5;
//消息成功提示 //消息成功提示
Vue.prototype.Success = function (msg) { Vue.prototype.Success = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
type: "success" type: "success"
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
type: "error" type: "error"
}); });
}, },
//一般提示 //一般提示
Vue.prototype.Info = function (msg) { Vue.prototype.Info = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
type: "info" type: "info"
}); });
}, },
//警告提示 //警告提示
Vue.prototype.Warning = function (msg) { Vue.prototype.Warning = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
type: "warning" type: "warning"
}); });
}, },
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
if (typeof callback === 'function') { if (typeof callback === 'function') {
callback(); callback();
}
})
.catch(() => {
this.Info("已取消操作");
});
},
//域名管理对象
Vue.prototype.domainManager = function() {
let domainUrl = '';
domainUrl = "https://mallapi.oytour.com";
//domainUrl = "https://localhost:5001";
let locationName = window.location.hostname;
if (locationName.indexOf('testmall.oytour') !== -1) {
domainUrl = "https://mallapi.oytour.com";
} else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "https://mallapi.oytour.com";
}
var obj = {
//主地址npm
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
ImageUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com',
UploadFileUrl: domainUrl + '/api/File/LocalFileUploadImport',
UploadBlob: domainUrl + '/api/File/UploadBlob',
};
return obj;
},
//浏览器缓存
Vue.prototype.getLocalStorage = function() {
var localStorageData = window.localStorage["mall_userInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData);
} else {
return null;
}
},
//验证只能输入2位小数【负数:isMinus传true】
Vue.prototype.checkPrice = function(item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
var t = value.charAt(0);
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
//如果第一位是负号,则允许添加 如果不允许添加负号 可以把这块注释掉
//是否允许负数
if (isMinus && t == '-') {
value = '-' + value;
}
item[filed] = value;
} }
}) //验证只能输入整数【负数:isMinus传true】
.catch(() => { Vue.prototype.checkInteger = function(item, filed, isMinus) {
this.Info("已取消操作"); var value = "" + item[filed]; //转字符串
}); var t = value.charAt(0);
}, value = value.replace(this.$commonUtils.Regex.isInteger, "");
//域名管理对象 //是否允许负数
Vue.prototype.domainManager = function () { if (isMinus && t == '-') {
let domainUrl = ''; value = '-' + value;
domainUrl = "http://192.168.2.214:8200"; }
domainUrl = "https://localhost:5001"; item[filed] = value;
let locationName = window.location.hostname; },
if (locationName.indexOf('testmall.oytour') !== -1) { //是否是线上环境【发布时修改为true】
domainUrl = "http://mallapi.oytour.com"; Vue.prototype.isOnline = function() {
} else if (locationName.indexOf('oytour') !== -1) { return process.env.NODE_ENV !== 'development';
domainUrl = "http://mallapi.oytour.com"; },
} //文件类型数组
var obj = { Vue.prototype.FileType = function() {
//主地址npm var fileTypeJson = {
DomainUrl: domainUrl, //主地址npm
//常用提交数据URL UserImg: "User", //用户相图片
PostUrl: domainUrl + "/api/common/post", //常用提交数据URL
ImageUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com', GoodsImg: "Goods", //素材相关文件
UploadFileUrl: domainUrl + '/api/File/LocalFileUploadImport', SetImg: "Set", //用户相图片
UploadBlob: domainUrl + '/api/File/UploadBlob', };
}; return fileTypeJson;
return obj; },
}, //上传文件到云存储
//浏览器缓存 Vue.prototype.UploadFileToTencent = function(path, fileObj, callback) {
Vue.prototype.getLocalStorage = function () { //获取文件扩展名
var localStorageData = window.localStorage["mall_userInfo"]; var filename = fileObj.name;
if (localStorageData !== undefined && localStorageData != 'undefined') { var index = filename.lastIndexOf(".");
return JSON.parse(localStorageData); var suffix = filename.substr(index);
} else { var timestamp1 = Date.parse(new Date());
return null; let str = '';
} if (this.isOnline()) {
}, str = "/Test"
//验证只能输入2位小数【负数:isMinus传true】 }
Vue.prototype.checkPrice = function (item, filed, isMinus) { var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
var value = "" + item[filed]; //转字符串 var uploadMsg = {
var t = value.charAt(0); Bucket: "viitto-1301420277",
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符 Region: "ap-chengdu",
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的 /* 存储桶所在地域,必须字段 */
value = value SecretId: "AKIDDPnbIzi8C1eqEOPP8dw6MNAg9H9ldDKd",
.replace(".", "$#$") SecretKey: "PdcLtOjslUzNFYdU4OSI1fKtdHpFT2Ob",
.replace(/\./g, "") };
.replace("$#$", "."); var COS = require('cos-js-sdk-v5');
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数 var cos = new COS({
//如果第一位是负号,则允许添加 如果不允许添加负号 可以把这块注释掉 SecretId: uploadMsg.SecretId,
//是否允许负数 SecretKey: uploadMsg.SecretKey,
if (isMinus && t == '-') { });
value = '-' + value; cos.putObject({
} Bucket: uploadMsg.Bucket,
item[filed] = value; Region: uploadMsg.Region, //存储桶所在地域,必须字段
} Key: newFileName, //文件名
//验证只能输入整数【负数:isMinus传true】 StorageClass: 'STANDARD',
Vue.prototype.checkInteger = function (item, filed, isMinus) { Body: fileObj, // 上传文件对象
var value = "" + item[filed]; //转字符串 onProgress: function(progressData) {}
var t = value.charAt(0); }, function(err, data) {
value = value.replace(this.$commonUtils.Regex.isInteger, ""); if (data && data.statusCode == 200) {
//是否允许负数 var uploadResult = {
if (isMinus && t == '-') { resultCode: 1,
value = '-' + value; FileName: fileObj.name,
} FileUrl: "http://" + data.Location
item[filed] = value; }
}, if (callback) {
//是否是线上环境【发布时修改为true】 callback(uploadResult);
Vue.prototype.isOnline = function () { }
return process.env.NODE_ENV !== 'development'; } else {
}, /*上传文件异常*/
//文件类型数组 console.log(err || data);
Vue.prototype.FileType = function () { }
var fileTypeJson = { });
//主地址npm },
UserImg: "User", //用户相图片 //公用跳转
//常用提交数据URL Vue.prototype.CommonJump = function(path, obj) {
GoodsImg: "Goods", //素材相关文件 this.$router.push({
SetImg: "Set", //用户相图片 name: path,
}; query: obj
return fileTypeJson; });
},
//上传文件到云存储
Vue.prototype.UploadFileToTencent = function (path, fileObj, callback) {
//获取文件扩展名
var filename = fileObj.name;
var index = filename.lastIndexOf(".");
var suffix = filename.substr(index);
var timestamp1 = Date.parse(new Date());
let str = '';
if (this.isOnline()) {
str = "/Test"
}
var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
var uploadMsg = {
Bucket: "viitto-1301420277",
Region: "ap-chengdu",
/* 存储桶所在地域,必须字段 */
SecretId: "AKIDDPnbIzi8C1eqEOPP8dw6MNAg9H9ldDKd",
SecretKey: "PdcLtOjslUzNFYdU4OSI1fKtdHpFT2Ob",
};
var COS = require('cos-js-sdk-v5');
var cos = new COS({
SecretId: uploadMsg.SecretId,
SecretKey: uploadMsg.SecretKey,
});
cos.putObject({
Bucket: uploadMsg.Bucket,
Region: uploadMsg.Region, //存储桶所在地域,必须字段
Key: newFileName, //文件名
StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象
onProgress: function (progressData) {}
}, function (err, data) {
if (data && data.statusCode == 200) {
var uploadResult = {
resultCode: 1,
FileName: fileObj.name,
FileUrl: "http://" + data.Location
} }
if (callback) { //公用判断图片地址 判断是否包含http
callback(uploadResult); Vue.prototype.getIconLink = function(url) {
let str = ''
if (url && url != '') {
if (url.indexOf('http') != -1) {
str = url
} else {
str = this.domainManager().ImageUrl + url;
}
return str;
}
}
//HTTP提交数据
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall, isOnline) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
}
//获取请求参数
Vue.prototype.GetPostData = function(cmd, msg, newCmd) {
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" &&
this.$route.path.toLowerCase() != "/login" &&
this.$route.path.toLowerCase() != "/register" &&
this.$route.path.toLowerCase() != "/forgetpassword"
) {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
var MallBaseId = "0"; //小程序ID
var TenantId = "0"; //商户Id
var EmpId = 0; //员工编号【员工登录时使用】
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
TenantId = this.getLocalStorage().TenantId;
EmpId = this.getLocalStorage().EmpId;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage = 0;
if (localStorage.language && localStorage.language != '') {
if (localStorage.language == "zh-TW") {
tempLanguage = 1;
} else if (localStorage.language == "Japanese") {
tempLanguage = 2;
}
}
var cmdStr = "";
if (newCmd) {
cmdStr = newCmd;
}
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: md5Str,
languageId: tempLanguage,
cmd: cmdStr,
MallBaseId: MallBaseId,
TenantId: TenantId,
EmpId: EmpId,
}
return postData
},
//文件下载
Vue.prototype.GetLocalFile = function(cmd, msg, fileName, newCmd, successCall) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, newCmd);
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function(res) {});
} }
} else {
/*上传文件异常*/
console.log(err || data);
}
});
},
//公用跳转
Vue.prototype.CommonJump = function (path, obj) {
this.$router.push({
name: path,
query: obj
});
}
//公用判断图片地址 判断是否包含http
Vue.prototype.getIconLink = function (url) {
let str = ''
if (url && url != '') {
if (url.indexOf('http') != -1) {
str = url
} else {
str = this.domainManager().ImageUrl + url;
}
return str;
}
}
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
} }
//获取请求参数 }
Vue.prototype.GetPostData = function (cmd, msg, newCmd) { \ No newline at end of file
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" &&
this.$route.path.toLowerCase() != "/login" &&
this.$route.path.toLowerCase() != "/register" &&
this.$route.path.toLowerCase() != "/forgetpassword"
) {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
var MallBaseId = "0"; //小程序ID
var TenantId = "0"; //商户Id
var EmpId = 0; //员工编号【员工登录时使用】
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
TenantId = this.getLocalStorage().TenantId;
EmpId = this.getLocalStorage().EmpId;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage = 0;
if (localStorage.language && localStorage.language != '') {
if (localStorage.language == "zh-TW") {
tempLanguage = 1;
} else if (localStorage.language == "Japanese") {
tempLanguage = 2;
}
}
var cmdStr = "";
if (newCmd) {
cmdStr = newCmd;
}
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: md5Str,
languageId: tempLanguage,
cmd: cmdStr,
MallBaseId: MallBaseId,
TenantId: TenantId,
EmpId: EmpId,
}
return postData
},
//文件下载
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, newCmd, successCall) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, newCmd);
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
}
}
}
...@@ -91,14 +91,18 @@ export default new Router({ ...@@ -91,14 +91,18 @@ export default new Router({
path: '/CustomPage', path: '/CustomPage',
name: 'CustomPage', name: 'CustomPage',
component: resolve => require(['@/components/sallCenter/CustomPage'], resolve), component: resolve => require(['@/components/sallCenter/CustomPage'], resolve),
},{ //授权页面 }, { //授权页面
path: '/authorization', path: '/authorization',
name: 'authorization', name: 'authorization',
component: resolve => require(['@/components/sallCenter/authorization'], resolve), component: resolve => require(['@/components/sallCenter/authorization'], resolve),
},{ //模板市场 }, { //模板市场
path: '/templateMarket', path: '/templateMarket',
name: 'templateMarket', name: 'templateMarket',
component: resolve => require(['@/components/sallCenter/templateMarket'], resolve), component: resolve => require(['@/components/sallCenter/templateMarket'], resolve),
}, { //模板市场管理页面
path: '/templateMarketManage',
name: 'templateMarketManage',
component: resolve => require(['@/components/sallCenter/templateMarketManage'], resolve),
}] }]
}, },
{ {
...@@ -273,7 +277,7 @@ export default new Router({ ...@@ -273,7 +277,7 @@ export default new Router({
name: 'bulkImport', name: 'bulkImport',
component: resolve => require(['@/components/CommodityMan/bulkImport'], resolve), component: resolve => require(['@/components/CommodityMan/bulkImport'], resolve),
}, },
// 商品管理 淘宝CSV // 商品管理 淘宝CSV
{ {
path: '/taoBaoCSV', path: '/taoBaoCSV',
...@@ -299,36 +303,36 @@ export default new Router({ ...@@ -299,36 +303,36 @@ export default new Router({
component: resolve => require(['@/components/orderMan/afterSalesOrder'], resolve), component: resolve => require(['@/components/orderMan/afterSalesOrder'], resolve),
}, },
// 订单管理 售后订单详情 // 订单管理 售后订单详情
        { {
          path: '/salesOrderDetails', path: '/salesOrderDetails',
          name: 'salesOrderDetails', name: 'salesOrderDetails',
          component: resolve => require(['@/components/orderMan/salesOrderDetails'], resolve), component: resolve => require(['@/components/orderMan/salesOrderDetails'], resolve),
        }, },
        // 订单管理 评价模板 // 订单管理 评价模板
        { {
          path: '/evaluationTemplate', path: '/evaluationTemplate',
          name: 'evaluationTemplate', name: 'evaluationTemplate',
          component: resolve => require(['@/components/orderMan/evaluationTemplate'], resolve), component: resolve => require(['@/components/orderMan/evaluationTemplate'], resolve),
        }, },
        // 订单管理 评价管理 // 订单管理 评价管理
        { {
          path: '/evaluationMan', path: '/evaluationMan',
          name: 'evaluationMan', name: 'evaluationMan',
          component: resolve => require(['@/components/orderMan/evaluationMan'], resolve), component: resolve => require(['@/components/orderMan/evaluationMan'], resolve),
        }, },
// 订单管理 客户评价 // 订单管理 客户评价
        { {
          path: '/customerEvaluation', path: '/customerEvaluation',
          name: 'customerEvaluation', name: 'customerEvaluation',
          component: resolve => require(['@/components/orderMan/customerEvaluation'], resolve), component: resolve => require(['@/components/orderMan/customerEvaluation'], resolve),
        }, },
// 订单管理 批量发货 // 订单管理 批量发货
        { {
          path: '/BulkShipment', path: '/BulkShipment',
          name: 'BulkShipment', name: 'BulkShipment',
          component: resolve => require(['@/components/orderMan/BulkShipment'], resolve), component: resolve => require(['@/components/orderMan/BulkShipment'], resolve),
        }, },
//设置 基础设置 //设置 基础设置
{ {
path: '/basicSetUp', path: '/basicSetUp',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment