From be6366a1abf34ed66feb9515baa61c18e8c4de2c Mon Sep 17 00:00:00 2001 From: xzx Date: Thu, 16 Jul 2020 16:41:46 +0800 Subject: [PATCH] [VersionBeta] V.1.0.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Adds] 1.统一客户端isClient设置 2.增加客户端tipMsg方法 --- config/index.js | 2 +- config/prod.env.js | 8 ++++---- src/views/login.vue | 17 ++++++++++++++++- src/views/main_web/cloud.vue | 2 +- src/views/main_web/projnotice.vue | 2 +- src/views/main_web/workspace.vue | 20 +++++++++++++------- 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/config/index.js b/config/index.js index ff9a73de..0fdc9ddb 100644 --- a/config/index.js +++ b/config/index.js @@ -20,7 +20,7 @@ module.exports = { assetsPublicPath: '/', proxyTable: { '/api/**': { - target: 'http://192.168.5.25:9003', + target: 'http://192.168.5.32:9003', changeOrigin: true, secure: false, } diff --git a/config/prod.env.js b/config/prod.env.js index 2ab23254..81cc1b0e 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -4,11 +4,11 @@ module.exports = { // OFFICE_WEB:'"https://office.tszcloud.com"' // API_HOST:'"https://api.tszcloud.com/api/"', - OFFICE_WEB:'"https://office.tszcloud.com"', - API_HOST: '"https://bapi.tszcloud.com/api/"', - + // OFFICE_WEB:'"https://office.tszcloud.com"', + // API_HOST: '"https://bapi.tszcloud.com/api/"', + IS_CLIENT: true, // OFFICE_WEB: '"https://office.tszcloud.com"' - // API_HOST:'"http://192.168.5.32:9003/api/"', + API_HOST:'"http://192.168.5.32:9003/api/"', } diff --git a/src/views/login.vue b/src/views/login.vue index 41118314..51bfbf67 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -250,7 +250,7 @@ export default { checkPwdTip: "", //检测提示 phoneCode: "", //手机验证码 isRemember: false, //记住密码 - isClient: false //是否是客户端 + isClient: process.env.IS_CLIENT //是否是客户端 }; }, beforeRouteLeave(to, from, next) { @@ -262,8 +262,23 @@ export default { }, mounted: function() { this.loadRemember(); + window["tipMsg"] = msg => { + this.tipMsg(msg); + }; }, methods: { + /** + * 提示信息 + */ + tipMsg(msg){ + this.$notify({ + title: "温馨提示", + message: msg, + type: "warning", + offset: 100, + duration: 3500 + }); + }, /** * @description: 获取记住密码 * @param {type} diff --git a/src/views/main_web/cloud.vue b/src/views/main_web/cloud.vue index 404904fd..421a8d5c 100644 --- a/src/views/main_web/cloud.vue +++ b/src/views/main_web/cloud.vue @@ -413,7 +413,7 @@ mapAddress:'北京天安门', showImage:false, imageUrl:'', - isClient:false, //是否是客户端 + isClient:process.env.IS_CLIENT, //是否是客户端 //结束 // end }; diff --git a/src/views/main_web/projnotice.vue b/src/views/main_web/projnotice.vue index d8a8103b..f0cf8120 100644 --- a/src/views/main_web/projnotice.vue +++ b/src/views/main_web/projnotice.vue @@ -85,7 +85,7 @@ showOffice: false, // 预览Office文件 officeUrl: "", // PDF URL isShowDefault:false, - isClient: false,//是否是客户端 + isClient: process.env.IS_CLIENT,//是否是客户端 }; }, mounted: function () { diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index 6d38ed49..5818fc9e 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -2133,8 +2133,7 @@ export default { dialogNewSuperMapVisible: false, newSuperMap: { showName: "", description: "" }, mapAddress: "北京天安门", - isClient: false, // 是否是客户端 - + isClient: process.env.IS_CLIENT, // 是否是客户端 /**新建文件分组 start*/ dialogNewFolderGroup: false, //新建文件分组组弹窗 //文件分组数据 @@ -2248,8 +2247,6 @@ export default { this.loadSettings(); this.listFolders(); this.updateProjUser(); - // this.listenerFrapfile(); - // window.addEventListener("scroll", this.listenBottomHeight, true); window.addEventListener("resize", this.listenBottomHeight, true); }, computed: { @@ -2280,6 +2277,10 @@ export default { } }, methods: { + downLoadStatus:function(){ + var data =back.getProgress(); + console.log(data); + }, listenBottomHeight(){ let oDivH= document.getElementById("bottomBox").offsetHeight; let oShodow= document.getElementById("bottomoShodow"); @@ -2607,7 +2608,7 @@ export default { return; } if (type == 1) { - if(thisApp.isClient && (state ==0 || state == 2)) + if(thisApp.isClient && (state == 0 || state == 2)) { // 启动客户端判断 thisApp.setFile=file; @@ -3789,6 +3790,7 @@ export default { file.downloadStatus = 1; file.isDownload = true; var archid = file.archID; + var alias = file.alias; var filename = file.archName + "." + file.extension; if (file.version > 1) { filename = file.archName + file.version + "." + file.extension; @@ -3798,7 +3800,7 @@ export default { thisApp.listUserFolders[thisApp.nowFolderIndex].folderName; var projID = file.projID; if (type == 1) { - back.downloadFile(archid, filename, folderID); + back.downloadFile(archid, filename, folderID,sessionStorage.userId,sessionStorage.companyId,alias); } else { var folderName = thisApp.listUserFolders[thisApp.nowFolderIndex].folderName; @@ -3806,8 +3808,12 @@ export default { archid, filename, folderID, + sessionStorage.userId, + sessionStorage.companyId, + alias, sessionStorage.projName, - folderName + folderName, + sessionStorage.projId ); } } else {