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>
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
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;
...@@ -64,6 +65,7 @@ ...@@ -64,6 +65,7 @@
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,8 +468,10 @@ ...@@ -467,8 +468,10 @@
} else { } else {
if (index === 0) { if (index === 0) {
this.rubData.data.height = 'auto'; this.rubData.data.height = 'auto';
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.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;
}, },
......
This diff is collapsed.
...@@ -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> </script>
<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>
...@@ -3,7 +3,7 @@ export default { ...@@ -3,7 +3,7 @@ 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,
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
}, },
//一般提示 //一般提示
Vue.prototype.Info = function (msg) { Vue.prototype.Info = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
}); });
}, },
//警告提示 //警告提示
Vue.prototype.Warning = function (msg) { Vue.prototype.Warning = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
}); });
}, },
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -52,15 +52,15 @@ export default { ...@@ -52,15 +52,15 @@ export default {
}); });
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function() {
let domainUrl = ''; let domainUrl = '';
domainUrl = "http://192.168.2.214:8200"; domainUrl = "https://mallapi.oytour.com";
domainUrl = "https://localhost:5001"; //domainUrl = "https://localhost:5001";
let locationName = window.location.hostname; let locationName = window.location.hostname;
if (locationName.indexOf('testmall.oytour') !== -1) { if (locationName.indexOf('testmall.oytour') !== -1) {
domainUrl = "http://mallapi.oytour.com"; domainUrl = "https://mallapi.oytour.com";
} else if (locationName.indexOf('oytour') !== -1) { } else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://mallapi.oytour.com"; domainUrl = "https://mallapi.oytour.com";
} }
var obj = { var obj = {
//主地址npm //主地址npm
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
return obj; return obj;
}, },
//浏览器缓存 //浏览器缓存
Vue.prototype.getLocalStorage = function () { Vue.prototype.getLocalStorage = function() {
var localStorageData = window.localStorage["mall_userInfo"]; var localStorageData = window.localStorage["mall_userInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') { if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData); return JSON.parse(localStorageData);
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
} }
}, },
//验证只能输入2位小数【负数:isMinus传true】 //验证只能输入2位小数【负数:isMinus传true】
Vue.prototype.checkPrice = function (item, filed, isMinus) { Vue.prototype.checkPrice = function(item, filed, isMinus) {
var value = "" + item[filed]; //转字符串 var value = "" + item[filed]; //转字符串
var t = value.charAt(0); var t = value.charAt(0);
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符 value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
item[filed] = value; item[filed] = value;
} }
//验证只能输入整数【负数:isMinus传true】 //验证只能输入整数【负数:isMinus传true】
Vue.prototype.checkInteger = function (item, filed, isMinus) { Vue.prototype.checkInteger = function(item, filed, isMinus) {
var value = "" + item[filed]; //转字符串 var value = "" + item[filed]; //转字符串
var t = value.charAt(0); var t = value.charAt(0);
value = value.replace(this.$commonUtils.Regex.isInteger, ""); value = value.replace(this.$commonUtils.Regex.isInteger, "");
...@@ -112,11 +112,11 @@ export default { ...@@ -112,11 +112,11 @@ export default {
item[filed] = value; item[filed] = value;
}, },
//是否是线上环境【发布时修改为true】 //是否是线上环境【发布时修改为true】
Vue.prototype.isOnline = function () { Vue.prototype.isOnline = function() {
return process.env.NODE_ENV !== 'development'; return process.env.NODE_ENV !== 'development';
}, },
//文件类型数组 //文件类型数组
Vue.prototype.FileType = function () { Vue.prototype.FileType = function() {
var fileTypeJson = { var fileTypeJson = {
//主地址npm //主地址npm
UserImg: "User", //用户相图片 UserImg: "User", //用户相图片
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
return fileTypeJson; return fileTypeJson;
}, },
//上传文件到云存储 //上传文件到云存储
Vue.prototype.UploadFileToTencent = function (path, fileObj, callback) { Vue.prototype.UploadFileToTencent = function(path, fileObj, callback) {
//获取文件扩展名 //获取文件扩展名
var filename = fileObj.name; var filename = fileObj.name;
var index = filename.lastIndexOf("."); var index = filename.lastIndexOf(".");
...@@ -156,8 +156,8 @@ export default { ...@@ -156,8 +156,8 @@ export default {
Key: newFileName, //文件名 Key: newFileName, //文件名
StorageClass: 'STANDARD', StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象 Body: fileObj, // 上传文件对象
onProgress: function (progressData) {} onProgress: function(progressData) {}
}, function (err, data) { }, function(err, data) {
if (data && data.statusCode == 200) { if (data && data.statusCode == 200) {
var uploadResult = { var uploadResult = {
resultCode: 1, resultCode: 1,
...@@ -174,14 +174,14 @@ export default { ...@@ -174,14 +174,14 @@ export default {
}); });
}, },
//公用跳转 //公用跳转
Vue.prototype.CommonJump = function (path, obj) { Vue.prototype.CommonJump = function(path, obj) {
this.$router.push({ this.$router.push({
name: path, name: path,
query: obj query: obj
}); });
} }
//公用判断图片地址 判断是否包含http //公用判断图片地址 判断是否包含http
Vue.prototype.getIconLink = function (url) { Vue.prototype.getIconLink = function(url) {
let str = '' let str = ''
if (url && url != '') { if (url && url != '') {
if (url.indexOf('http') != -1) { if (url.indexOf('http') != -1) {
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
} }
} }
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost = function(cmd, msg, successCall, faildCall, isOnline) {
var apiurl = this.domainManager().DomainUrl + cmd; var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, ""); var postData = this.GetPostData(cmd, msg, "");
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
}, faildCall) }, faildCall)
} }
//获取请求参数 //获取请求参数
Vue.prototype.GetPostData = function (cmd, msg, newCmd) { Vue.prototype.GetPostData = function(cmd, msg, newCmd) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -269,7 +269,7 @@ export default { ...@@ -269,7 +269,7 @@ export default {
return postData return postData
}, },
//文件下载 //文件下载
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, newCmd, successCall) { Vue.prototype.GetLocalFile = function(cmd, msg, fileName, newCmd, successCall) {
var apiurl = this.domainManager().DomainUrl + cmd; var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, newCmd); var postData = this.GetPostData(cmd, msg, newCmd);
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) {}); }).catch(function(res) {});
} }
} }
} }
\ No newline at end of file
...@@ -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),
}] }]
}, },
{ {
...@@ -299,35 +303,35 @@ export default new Router({ ...@@ -299,35 +303,35 @@ 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),
        }, },
//设置 基础设置 //设置 基础设置
{ {
......
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