Commit 6bd68cd4 authored by 黄媛媛's avatar 黄媛媛

解决冲突

parents 6b3db713 9f1c4aba
......@@ -467,7 +467,7 @@ export default {
let msg = this.msg;
msg = JSON.parse(JSON.stringify(msg));
msg.pageSize=999;
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/product/GetProductGoodsListToExcel",
msg,
"商品列表.xls"
......
......@@ -162,7 +162,7 @@
<div class="mainLeftMenu">
<div class="leftMenu1">
<div class="F_Logo">
<div class="asideInner" @click="CommonJump('zanIndex')">{{currentUser.MallName}}
<div class="asideInner" @click="CommonJump('mallIndex')">{{currentUser.MallName}}
</div>
</div>
<ul class="FsettingUU">
......@@ -186,8 +186,8 @@
<div class="mainRightLeft">微信小程序</div>
<div class="marinRightList">
<ul>
<li>缓存</li>
<li title="教程管理">
<li style="display:none">缓存</li>
<li style="display:none"> title="教程管理">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
教程管理<i class="el-icon-arrow-down el-icon--right"></i>
......
......@@ -171,7 +171,7 @@
<div class="mainLeftMenu">
<div class="leftMenu1">
<div class="F_Logo">
<div class="asideInner" @click="CommonJump('zanIndex')">{{currentUser.MallName}}
<div class="asideInner" @click="CommonJump('mallIndex')">{{currentUser.MallName}}
</div>
</div>
<ul class="FsettingUU">
......@@ -198,8 +198,8 @@
<div class="mainRightLeft">微信小程序</div>
<div class="marinRightList">
<ul>
<li>缓存</li>
<li title="教程管理">
<li style="display:none">>缓存</li>
<li style="display:none"> title="教程管理">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
教程管理<i class="el-icon-arrow-down el-icon--right"></i>
......
......@@ -89,8 +89,8 @@
</el-table-column>
<el-table-column prop="name" label="商城名称" width="155">
<template slot-scope="scope">
<p style="color:#409EFF;cursor:pointer;"
@click="setMallBaseId(scope.row.MallBaseId,scope.row.MallName),goHomePage()">
<p style="color:#409EFF;cursor:pointer;text-decoration:underline;"
@click="setMallBaseId(scope.row.MallBaseId,scope.row.MallName),goHomePage()" title="点击进入商城">
{{scope.row.MallName}}</p>
<p>账号:{{scope.row.Account}}</p>
<p>
......@@ -98,14 +98,23 @@
</p>
</template>
</el-table-column>
<el-table-column prop="address" label="数据统计" show-overflow-tooltip :render-header="renderHeader"
width="155">
<el-table-column prop="address" label="数据统计" width="155">
<template slot-scope="scope">
<p>用户数:<span style="color:blue">{{scope.row.UserNum}}</span></p>
<p>订单数:<span style="color:red">{{scope.row.OrderNum}}</span></p>
</template>
</el-table-column>
<el-table-column prop="EffectiveDateStr" label="有效期" width="170">
</el-table-column>
<el-table-column prop="address" label="操作">
<template slot-scope="scope">
<el-button size="mini" type="info" plain @click="EditMall(scope.row)">编辑 </el-button>
<template v-if="scope.row.Is_Recycle==0">
<el-button size="mini" type="info" plain @click="UpdateRecycle(scope.row,1)">回收</el-button>
</template>
<template v-else>
<el-button size="mini" type="info" plain @click="UpdateRecycle(scope.row,0)">取消回收</el-button>
</template>
<el-button size="mini" type="info" plain @click="GetCopyRight(scope.row)">版权</el-button>
<el-button size="mini" type="info" plain @click="RemmoveMall(scope.row)">禁用</el-button>
</template>
......@@ -142,8 +151,11 @@
</p>
</template>
</el-table-column>
<el-table-column prop="address" label="数据统计" show-overflow-tooltip :render-header="renderHeader"
width="155">
<el-table-column prop="address" label="数据统计" width="155">
<template slot-scope="scope">
<p>用户数:<span style="color:blue">{{scope.row.UserNum}}</span></p>
<p>订单数:<span style="color:red">{{scope.row.OrderNum}}</span></p>
</template>
</el-table-column>
<el-table-column prop="EffectiveDateStr" label="有效期" width="170">
</el-table-column>
......@@ -484,8 +496,11 @@
methods: {
//退出登录
loginOut() {
localStorage.removeItem("mall_userInfo");
location.href = '/';
let that = this;
that.Confirm("确认要退出系统吗?", function () {
localStorage.removeItem("mall_userInfo");
location.href = '/';
});
},
init() {
this.apipost("/api/Tenant/GetTenant", {}, res => {
......@@ -555,7 +570,6 @@
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.qMsg.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
......@@ -661,6 +675,19 @@
}
})
},
//更新回收
UpdateRecycle(item, type) {
this.apipost("/api/Tenant/SetMiniProgramRecycle", {
MallBaseId: item.MallBaseId,
Is_Recycle: type
}, res => {
if (res.data.resultCode == 1) {
this.getMiniPrograme();
} else {
this.Info(res.data.message);
}
})
},
//选择图片
UploadImage(file) {
this.UploadFileToTencent(this.FileType().UserImg, file.file, res => {
......@@ -695,30 +722,18 @@
this.Info(res.data.message);
}
})
},
//修改版权
TestMall() {
this.apipost("/api/Mall/GetHome",{MiniAppId:"wxacd9f8cc3480d29e"}, res => {
console.log("res",res);
if (res.data.resultCode == 1) {
} else {
this.Info(res.data.message);
}
})
},
//跳转至首页
goHomePage(){
goHomePage() {
this.$router.push({
name: 'mall',
query: {
FIndex:1
FIndex: 1
}
});
}
},
mounted() {
this.TestMall();
this.init();
this.getMiniPrograme();
this.getRemoveMiniPrograme();
......
......@@ -74,7 +74,7 @@
<!--<div>版本号:{{Version}}</div> <div>描述:</div>-->
</div>
<div>
<img src="http://wx.weibaoge.cn/plugins/wxapp/assets/upload-tip.png" style="max-width: 100%; height: auto; border: 1px dashed rgb(53, 182, 53);">
<img :src="getIconLink('/Static/icon-close.png')" style="max-width: 100%; height: auto; border: 1px dashed rgb(53, 182, 53);">
</div>
</div>
</div>
......
......@@ -131,7 +131,7 @@
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/order/GetMembersToBuyToExcel",
msg,
"会员购买列表.xls"
......
......@@ -163,7 +163,7 @@
style="padding-bottom: 10px; border-bottom: 1px solid rgb(255, 255, 255);">
<div>
<div class="app-image"
style="background: url(https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=480194109,2955193021) center center / cover rgb(227, 227, 227); width: 60px; height: 60px; border-radius: 999px; display: inline-block; border: 2px solid rgb(255, 255, 255);">
style="width: 60px; height: 60px; border-radius: 999px; display: inline-block; border: 2px solid rgb(255, 255, 255);">
</div>
</div>
<div style="margin-left: 20px; color: rgb(255, 255, 255);">
......@@ -381,8 +381,8 @@
<div flex="dir:left cross:center"
style="margin: 10px 0px; padding: 0px 12px; height: 48px; background: rgb(255, 255, 255);">
<div>{{addMsg.UserNotesName}}</div>
<div class="app-image"
style="background-image: url(http://wx.weibaoge.cn/web/statics/img/mall/customize_jp.png;); background-size: cover; background-position: center center; width: 8px; height: 13px; border-radius: 0%; margin-left: auto;">
<div class="app-image" style="background-size: cover; background-position: center center; width: 8px; height: 13px; border-radius: 0%; margin-left: auto;"
:style="{backgroundImage: 'url('+getIconLink('/Static/customize_jp.png')+')'}" >
</div>
</div>
<div flex="main:center" style="margin: 20px auto; color: rgb(255, 255, 255);">
......@@ -548,7 +548,7 @@
<div flex="dir:left cross:center"
style="background: rgb(255, 255, 255); padding: 10px; height: 80px;">
<div class="app-image"
style="background-image: url(https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3740798461,1728086832); background-size: cover; background-position: center center; width: 50px; height: 50px; border-radius: 0%;">
style="background-size: cover; background-position: center center; width: 50px; height: 50px; border-radius: 0%;">
</div>
<div flex="dir:top main:center" style="width: 100%; margin-left: 12px;">
<div flex="dir:left cross:center">
......@@ -568,7 +568,7 @@
<div flex="dir:left cross:center"
style="background: rgb(255, 255, 255); padding: 10px; height: 80px;">
<div class="app-image"
style="background-image: url(https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3740798461); background-size: cover; background-position: center center; width: 50px; height: 50px; border-radius: 0%;">
style="background-image: url(ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3740798461); background-size: cover; background-position: center center; width: 50px; height: 50px; border-radius: 0%;">
</div>
<div flex="dir:top main:center" style="width: 100%; margin-left: 12px;">
<div flex="dir:left cross:center">
......
......@@ -255,7 +255,7 @@
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/user/GetDistributorRemitListToExcel",
msg,
"分销提现.xls"
......
......@@ -310,7 +310,7 @@ export default {
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/order/GetDistributionOrdersToExcel",
msg,
"分销订单列表.xls"
......
......@@ -633,7 +633,7 @@
if(!msg.UserId && msg.UserId==''){
msg.UserId=0;
}
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/user/GetDistributorListToExcel",
msg,
"分销商.xls"
......
......@@ -303,7 +303,7 @@
if(!msg.Id ||msg.Id==''){
msg.Id=0;
}
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/user/GetMemberUserListToExcel",
msg,
"用户管理.xls"
......
......@@ -87,7 +87,7 @@
maxHeight:'calc('+height+' - '+item.top+'px)', backgroundColor: index == key ? 'rgba(92, 179, 253, 0.2)' : ''}"
@click="select(key)" v-for="(item, key) in hotspotList" :key="key" :data-index="key">
<div class="close" @click.stop="del(key)" v-if="item.is_close">
<img style="width: 32px;height: 32px" src="http://wx.weibaoge.cn/web/statics/img/mall/icon-close.png">
<img style="width: 32px;height: 32px" :src="getIconLink('/Static/icon-close.png')">
</div>
</div>
<div class="pic-list" :style="style" v-if="picList && picList.length > 0">
......@@ -95,7 +95,7 @@
<div :style="item" :key="index">
<img :src="item.pic_url" style="width: 100%;visibility: hidden;display: block;">
</div>
<img :src="item.pic_url" style="width: 100%;visibility: hidden;display: block;">
<img :src="item.pic_url" :key="index" style="width: 100%;visibility: hidden;display: block;">
</template>
</div>
<div :style="style" flex="dir:left main:center cross:center" v-else>
......
This diff is collapsed.
......@@ -227,7 +227,6 @@
width: 110px;
height: 60px;
line-height: 62px;
/* border-bottom:2px solid #409EFF; */
text-align: center;
margin-left: 30px;
cursor: pointer;
......@@ -291,7 +290,7 @@
<div class="is-show-menu-2" v-if="isShowOne" @click="showTwo=true,isShowOne=false">>></div>
<div class="leftMenu1">
<div class="aside-logo">
<div class="asideInner" @click="CommonJump('zanIndex'),firstCked=0,showTwo=false">{{currentUser.MallName}}
<div class="asideInner" @click="CommonJump('mallIndex'),firstCked=0,showTwo=false">{{currentUser.MallName}}
</div>
</div>
<ul>
......@@ -339,8 +338,8 @@
<div class="mainRightLeft" @click="goLittlePrograme">微信小程序</div>
<div class="marinRightList">
<ul>
<li>缓存</li>
<li title="教程管理">
<li style="display:none;">缓存</li>
<li style="display:none;" title="教程管理">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
教程管理<i class="el-icon-arrow-down el-icon--right"></i>
......@@ -359,6 +358,7 @@
<el-dropdown-item disabled>{{currentUser.MallName}}</el-dropdown-item>
<el-dropdown-item disabled>{{currentUser.Account}}({{currentUser.MobilePhone}})</el-dropdown-item>
<el-dropdown-item @click.native="CommonJump('index')">返回系统</el-dropdown-item>
<el-dropdown-item @click.native="loginOut">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
......@@ -390,6 +390,14 @@
this.currentUser = this.getLocalStorage();
},
methods: {
//退出登录
loginOut() {
let that = this;
that.Confirm("确认要退出系统吗?", function () {
localStorage.removeItem("mall_userInfo");
location.href = '/';
});
},
//获取菜单列表
getMenuList() {
this.apipost("/api/Tenant/GetMenuList", {}, res => {
......@@ -459,11 +467,11 @@
}
},
//跳转微信小程序
goLittlePrograme(){
goLittlePrograme() {
let routeData = this.$router.resolve({
name: 'Fsetting',
query: {
FIndex:1
FIndex: 1
}
});
window.open(routeData.href, "_blank");
......@@ -471,8 +479,8 @@
},
mounted() {
this.getMenuList();
if(this.$route.query.FIndex){
this.CommonJump('zanIndex');
if (this.$route.query.FIndex) {
this.CommonJump('mallIndex');
}
this.Height = document.documentElement.clientHeight - 60;
//监听浏览器窗口变化 
......
<template>
<div class="BulkShipment">
<div class="head-title">
批量发货
</div>
<el-card style="margin-top:10px" class="box-card" shadow="never">
<el-form class="app-batch" :model="addMsg" :rules="rules" ref="addMsg" label-width="180px">
<el-form-item label="导入模板" prop="FilePath">
<el-input v-model="addMsg.FilePath" size="small" style="width:289px"
:disabled="true"
class="input-with-select">
</el-input>
<!-- :http-request="UploadImage" -->
<el-upload
class="upload-demo"
ref="upload"
:action="importFileUrl"
:multiple="true"
:on-success="successUpload"
:show-file-list="false"
accept=".csv, .xlsx">
<el-button size="small">选择文件</el-button>
</el-upload>
<el-button size="small" style="margin-left:20px">默认模板下载</el-button>
</el-form-item>
<el-form-item label="选择快递公司" prop="ExpressId">
<el-select size="small" v-model="addMsg.ExpressId" placeholder="请选择">
<el-option v-for="item in ExpressList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
</el-form>
</el-card>
<div style="margin-top:10px" >
<el-button @click="Save('addMsg')" size="small" type="primary">提交</el-button>
</div>
<div class="head-title">
批量发货
</div>
<el-card style="margin-top:10px" class="box-card" shadow="never">
<el-form class="app-batch" :model="addMsg" :rules="rules" ref="addMsg" label-width="180px">
<el-form-item label="导入模板" prop="FilePath">
<el-input v-model="addMsg.FilePath" size="small" style="width:289px" :disabled="true"
class="input-with-select">
</el-input>
<el-upload class="upload-demo" ref="upload" :action="importFileUrl" :multiple="true"
:on-success="successUpload" :show-file-list="false" accept=".csv, .xlsx">
<el-button size="small">选择文件</el-button>
</el-upload>
<el-button size="small" style="margin-left:20px">默认模板下载</el-button>
</el-form-item>
<el-form-item label="选择快递公司" prop="ExpressId">
<el-select size="small" v-model="addMsg.ExpressId" placeholder="请选择">
<el-option v-for="item in ExpressList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
</el-form>
</el-card>
<div style="margin-top:10px">
<el-button @click="Save('addMsg')" size="small" type="primary">提交</el-button>
</div>
</div>
</template>
<script>
export default {
export default {
data() {
return {
importFileUrl: this.domainManager().UploadFileUrl,
addMsg:{
FilePath:'',
ExpressId:'',
},
rules:{
ExpressId: [
{ required: true, message: '请选择快递公司', trigger: 'change' }
],
FilePath: [
{ required: true, message: '请选择导入模板', trigger: 'blur' }
],
},
ExpressList:[],
};
return {
importFileUrl: this.domainManager().UploadFileUrl,
addMsg: {
FilePath: '',
ExpressId: '',
},
rules: {
ExpressId: [{
required: true,
message: '请选择快递公司',
trigger: 'change'
}],
FilePath: [{
required: true,
message: '请选择导入模板',
trigger: 'blur'
}],
},
ExpressList: [],
};
},
created() {
this.getExpressInfo();
this.getExpressInfo();
},
methods: {
Save(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/order/SetOrderBatchSendGoods",this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.addMsg={
FilePath:'',
ExpressId:'',
}
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},
null
);
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/order/SetOrderBatchSendGoods", this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.addMsg = {
FilePath: '',
ExpressId: '',
}
this.Success(res.data.message);
} else {
return false;
this.Error(res.data.message);
}
});
},
successUpload(file){
this.addMsg.FilePath=file.data;
},
// 快递公司
getExpressInfo() {
this.apipost("/api/MallBase/GetExpressInfo", {}, res => {
if (res.data.resultCode == 1) {
this.ExpressList = res.data.data;
} else {
this.Info(res.data.message);
}
})
},
},
null
);
} else {
return false;
}
});
},
successUpload(file) {
this.addMsg.FilePath = file.data;
},
// 快递公司
getExpressInfo() {
this.apipost("/api/MallBase/GetExpressInfo", {}, res => {
if (res.data.resultCode == 1) {
this.ExpressList = res.data.data;
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
}
};
};
</script>
<style>
.BulkShipment .upload-demo{
.BulkShipment .upload-demo {
display: inline-block;
position: relative;
left:-5px;
}
left: -5px;
}
</style>
......@@ -692,7 +692,7 @@ export default {
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/order/GetDistributionOrdersToExcel",
msg,
"售后订单.xls"
......
This diff is collapsed.
......@@ -1022,7 +1022,7 @@
Export() {
this.msg.ExcelEnumIds = this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/order/GetMemberUserListToExcel",
msg,
"订单列表.xls"
......
......@@ -177,7 +177,7 @@
ExcelEnumIds:this.checkedCities
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/Integral/GetDistributorRemitListToExcel",
msg,
"积分记录.xls"
......
......@@ -30,11 +30,11 @@
</div>
</el-form-item>
<el-form-item label="热区">
<choiceArea ref="choiceArea" :multiple="true" :max="2" :pic-url="getIconLink(addMsg.AuthUrl)"
<choiceAreaAuth ref="choiceAreaAuth" :multiple="true" :max="2" :pic-url="getIconLink(addMsg.AuthUrl)"
mode='auth' :hotspotArray="addMsg.AuthDataList" width="650px" height="700px"
@confirm="selectHotspot" :is-link="false">
@confirm="selectHotspot" >
<el-button size="mini">划分热区</el-button>
</choiceArea>
</choiceAreaAuth>
<div>注:需要划分两个热区:一个是登录按钮热区,一个是暂不登录按钮热区</div>
</el-form-item>
</el-form>
......@@ -53,7 +53,7 @@
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import choiceArea from "../common/choiceArea.vue";
import choiceAreaAuth from "../common/choiceAreaAuth.vue";
export default {
data() {
return {
......@@ -68,7 +68,7 @@
MallBaseId: 0,
IsOpenAuth: 0, //是否开启
AuthUrl: this.domainManager().ImageUrl + '/Static/auth-default.png', //图片
AuthDataList: [] //热区
AuthDataList: [ ] //热区
},
};
},
......@@ -77,7 +77,7 @@
},
components: {
ChooseImg,
choiceArea
choiceAreaAuth
},
methods: {
GetData() {
......@@ -90,15 +90,45 @@
if (res.data.data.AuthUrl) {
this.addMsg.AuthUrl = res.data.data.AuthUrl;
}
if (res.data.data.AuthDataList && res.data.data.AuthDataList.length > 0) {
this.addMsg.AuthDataList = res.data.data.AuthDataList;
} else {
this.GetDefaultSpot();
}
} else {
this.Info(res.data.message);
}
})
},
//热区设置默认值
GetDefaultSpot() {
var objCancel = {
width: 224,
height: 80,
left: 84,
top: 566,
defaultX: 84,
defaultY: 566,
link: "",
open_type: "cancel",
IsChecked:false,
};
this.addMsg.AuthDataList.push(objCancel);
var objLogin = {
width: 224,
height: 80,
left: 340,
top: 566,
defaultX: 340,
defaultY: 566,
link: "",
open_type: "login",
IsChecked:false,
};
this.addMsg.AuthDataList.push(objLogin);
},
//保存
saveMsg() {
this.apipost("/api/Tenant/SetMiniProgramMallAuth", this.addMsg, res => {
......@@ -118,7 +148,7 @@
// 热区选择(edit)
selectHotspot(list) {
this.addMsg.AuthDataList = list;
this.$refs.choiceArea.clearAll();
this.$refs.choiceAreaAuth.clearAll();
},
},
mounted() {
......
......@@ -175,7 +175,7 @@
ExcelEnumIds:this.checkedCities
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/Recharge/GetDistributorRemitListToExcel",
msg,
"余额收支.xls"
......
......@@ -1237,7 +1237,6 @@
//点击保存
SaveData() {
this.addMsg.ComponentDataList = this.dataList;
console.log("this.addMsg",this.addMsg);
this.apipost("/api/Template/SetMiniTemplate", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.addMsg.Id = res.data.data;
......
......@@ -219,7 +219,7 @@
EndDate :this.msg.EndDate,
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/Coupon/GetCouponListToExcel",
msg,
"优惠券-发布统计.xls"
......
......@@ -179,7 +179,7 @@
EndDate :this.msg.EndDate,
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/Integral/GetIntegralListToExcel",
msg,
"积分收支.xls"
......
......@@ -168,7 +168,7 @@
Source :this.msg.Source ,
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/User/GetRankingListToExcel",
msg,
"分销排行.xls"
......
......@@ -305,7 +305,7 @@
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
this.GetLocalFile(
"/api/Statistics/GetSellExcel",
msg,
"销售统计.xls"
......
......@@ -54,11 +54,8 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = '';
//domainUrl = "http://192.168.2.214:8200"
// domainUrl = "http://192.168.2.65";
// domainUrl = "https://localhost:5001";
domainUrl = "http://mallapi.oytour.com";
domainUrl = "http://192.168.2.214:8200";
domainUrl = "https://localhost:5001";
let locationName = window.location.hostname;
if (locationName.indexOf('testmall.oytour') !== -1) {
domainUrl = "http://mallapi.oytour.com";
......@@ -71,9 +68,8 @@ export default {
//常用提交数据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',
UploadFileUrl: domainUrl + '/api/File/LocalFileUploadImport',
UploadBlob: domainUrl + '/api/File/UploadBlob',
};
return obj;
},
......@@ -115,7 +111,6 @@ export default {
}
item[filed] = value;
},
//是否是线上环境【发布时修改为true】
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
......@@ -197,57 +192,10 @@ export default {
return str;
}
}
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().DomainUrl + cmd;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
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 postData = {
"msg": msg,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"languageId": tempLanguage,
"cmd": cmd,
"MallBaseId": MallBaseId,
"TenantId": TenantId,
"EmpId":EmpId
}
var postData = this.GetPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
......@@ -266,58 +214,78 @@ export default {
}
}, faildCall)
}
Vue.prototype.JavaGetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().DomainUrl + cmd;
var timestamp = (new Date()).valueOf();
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
var MallBaseId = "0"; //小程序ID
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
}
let mall_userInfo = localStorage.mall_userInfo ? JSON.parse(localStorage.mall_userInfo) : '';
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;
//获取请求参数
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) {});
}
var postData = {
"msg": msg,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"languageId": tempLanguage,
"cmd": cmd,
"MallBaseId": MallBaseId,
}
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) {});
}
}
}
......@@ -106,9 +106,9 @@ export default new Router({
name: 'mall',
component: resolve => require(['@/components/mall'], resolve),
children: [{
path: '/zanIndex',
name: 'zanIndex',
component: resolve => require(['@/components/zanIndex'], resolve),
path: '/mallIndex',
name: 'mallIndex',
component: resolve => require(['@/components/mallIndex'], 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