|
@@ -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,11 +283,11 @@
|
|
|
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;
|
|
|
+ const linkURL = url.indexOf("?")>-1? url + "&appI="+appKeyId+"&appS="+appKeySecret + "&code=" + securityCode+"&productId="+id : url + "?appI="+appKeyId+"&appS="+appKeySecret + "&code=" + securityCode+"&productId="+id;
|
|
|
// this.openWin(linkURL);
|
|
|
newWindow.location.href = linkURL;
|
|
|
}else{
|
|
@@ -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();
|