Przeglądaj źródła

Merge remote-tracking branch 'origin/bugfix' into test

zhouna 5 lat temu
rodzic
commit
5ec5d93f10
3 zmienionych plików z 19 dodań i 4 usunięć
  1. 1 0
      src/api/config.js
  2. 4 1
      src/api/user.js
  3. 14 3
      src/components/user/Console.vue

+ 1 - 0
src/api/config.js

@@ -23,6 +23,7 @@ export default {
     'getVersionOuter':'api/knowledgeman/versionInfo/getVersionInfoOuter',  //获取外部版本信息
     'getUserEnumsData': '/api/user/getUserEnumsData',   //获取用户枚举数据
     'getDiagbotManEnumsData':'/api/diagbotman/getDiagbotManEnumsData',      //获取产品枚举类型
+    'saveUserOper':'/api/diagbotman/optInfo/save',    //保存用户记录
     /* 朗通后台相关接口 */
     'getUserAuthenticationStatus': '/api/user/userAuthentication/getUserAuthenticationStatus',         //获取用户认证状态
 		'getPersonInfo':'/api/user/user/getPersonInfo',

+ 4 - 1
src/api/user.js

@@ -131,5 +131,8 @@ export default {
   },
   intoVerify(params){//进入权限校验
     return axios.post(urls.intoVerify,params)
-  }
+  },
+  saveUserOper(params){
+  	return axios.post(urls.saveUserOper,params);
+	}
 }

+ 14 - 3
src/components/user/Console.vue

@@ -82,7 +82,7 @@
 								<button class="proBtn orgCol" v-else-if="op.renewalsStutas == 1">续费中</button>
 							</div>
 							<div v-else>
-								<button v-show="op.isInto==1" class="proBtn" @click="intoProduct(op.url,op.appKeyId,op.appKeySecret,op.isBegin,op.productId,op.openId)">进入</button>
+								<button v-show="op.isInto==1" class="proBtn" @click="intoProduct(op)">进入</button>
 								<button v-show="op.isCreateToken==1" class="proBtn" @click="tokenCheck()">生成令牌</button>
 								<button class="proBtn" @click="morePros(op.productId)" v-if="op.renewalsStutas == 0">续费</button>
 								<button class="proBtn orgCol" v-else-if="op.renewalsStutas == 1">续费中</button>
@@ -264,10 +264,12 @@
 				document.getElementById("openPro").click();
 				document.body.removeChild(abtn);
 			},
-			intoProduct(url,appKeyId,appKeySecret,isBegin,id,openId){//进入产品页
+			intoProduct(op){//进入产品页
 				/*this.setCookie("appKeyId",keyId,1);
 				this.setCookie("appKeySecret",keySecret,1);
 				window.open(url);*/
+			  	const {url,appKeyId,appKeySecret,isBegin,openId}=op;
+			  	const id = op.productId;
 				if(isBegin==0){//未到开通时间
 					this.$message({
 						message: '产品未到服务有效期',
@@ -281,9 +283,9 @@
 					let newWindow = window.open();
 					const tempTime = new Date().getTime().toString();//加密时间戳
     			const securityCode = encode(tempTime);
-
 					userApi.intoVerify(params).then((res)=>{
 						if(res.data.code == 0){
+                          this.saveUserOper(id);			//记录
 							// const linkURL = url.indexOf("?")>-1? url + "&appKeyId="+appKeyId+"&appKeySecret="+appKeySecret : url + "?appKeyId="+appKeyId+"&appKeySecret="+appKeySecret;
 							const linkURL = url.indexOf("?")>-1? url + "&appI="+appKeyId+"&appS="+appKeySecret + "&code=" + securityCode : url + "?appI="+appKeyId+"&appS="+appKeySecret + "&code=" + securityCode;
 							// this.openWin(linkURL);
@@ -300,6 +302,15 @@
 					
 				}
 			},
+		  	saveUserOper(id){		//保存操作记录
+			  const userInfo = JSON.parse(localStorage.getItem("userLoginDTO")||'{}');
+			  const param={
+                linkman:userInfo.linkman,
+                productId:id,
+                username:userInfo.username,
+			  };
+              userApi.saveUserOper(param).then((res)=>{});
+			},
 			setCookie(name,value,day){
 				var expires = day * 24 * 60 * 60 * 1000;
 			  var exp = new Date();