Commit fdbc36ee by 王昆

gsb

parent e90137f4
...@@ -15,13 +15,10 @@ ...@@ -15,13 +15,10 @@
</div> </div>
</div> </div>
<div class="gtb-home-main"> <div class="gtb-home-main">
<div v-for="(item,key) in myapps" :key="key" class="app-child" :style="bgimg(item)"> <div v-for="(item,key) in myapps" :key="key" class="app-child" :style="bgimg(item)" @click="goapplogin(item)" >
<img :src="item.logoUrl" alt=""> <img :src="item.logoUrl" alt="">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<span @click="systemsetting(item)" v-if="currentUser && currentUser.roles.indexOf(\'common\')>=0" style="position: absolute;left:5px;top: 10px;font-size:20px;color:red;padding: 5px;cursor: pointer;"><i class="el-icon-setting"></i></span> <span @click.stop="systemsetting(item)" v-if="currentUser && currentUser.roles.indexOf(\'common\')>=0" style="position: absolute;left:5px;top: 10px;font-size:20px;color:red;padding: 5px;cursor: pointer;"><i class="el-icon-setting"></i></span>
<div class="activeColor" @click="goapplogin(item)" style="text-align:right;font-size: 0.8em;cursor: pointer;">
GO
</div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
{ {
template:'${tmpl}', template: '${tmpl}',
data:function(){ data: function () {
return { return {
apps:null, apps: null,
bubbles:['x','y','x','y','x','y','x','y','x','y'], bubbles: ['x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y'],
pxheight:"800px", pxheight: "800px",
myapps:[], myapps: [],
carisshow:false, carisshow: false,
showimgUrl:[ showimgUrl: [{
{
img: '/imgs/img1.png', img: '/imgs/img1.png',
icon: '/imgs/icon1.png', icon: '/imgs/icon1.png',
name: '个体工商宝' name: '个体工商宝'
...@@ -31,36 +30,35 @@ ...@@ -31,36 +30,35 @@
] ]
} }
}, },
mounted:function(){ mounted: function () {
this.pxheight=(this.$root.stageHeight-60)+"px"; this.pxheight = (this.$root.stageHeight - 60) + "px";
this.myapps=tocompanyinfo?tocompanyinfo.apps:[]; this.myapps = tocompanyinfo ? tocompanyinfo.apps : [];
}, },
created:function(){ created: function () {
}, },
computed: { computed: {},
}, methods: {
methods:{ async systemsetting(app) {
async systemsetting(app){ var d = await this.$root.postReq("/web/auth/userCtl/sysManageForApp?appKey=" + app.appkey + "&toKey=" + appinfo.appkey, tocompanyinfo);
var d= await this.$root.postReq("/web/auth/userCtl/sysManageForApp?appKey="+app.appkey+"&toKey="+appinfo.appkey,tocompanyinfo);
window.open(d.data.jumpUrl); window.open(d.data.jumpUrl);
}, },
async exitclick(){ async exitclick() {
var d= await this.$root.postReq("/web/auth/userCtl/exit",{}); var d = await this.$root.postReq("/web/auth/userCtl/exit", {});
this.$router.push("/tlogin"); this.$router.push("/tlogin");
}, },
bgimg(app){ bgimg(app) {
return "background:url('"+app.bkimageUrl+"') no-repeat;background-size: cover"; return "background:url('" + app.bkimageUrl + "') no-repeat;background-size: cover";
}, },
async goapplogin(app){ async goapplogin(app) {
var d= await this.$root.postReq("/web/auth/userCtl/goLoginForApp",app); var d = await this.$root.postReq("/web/auth/userCtl/goLoginForApp", app);
if(d && d.status==0 && d.data){ if (d && d.status == 0 && d.data) {
console.log(JSON.stringify(d.data)); console.log(JSON.stringify(d.data));
window.open(d.data.jumpUrl); window.open(d.data.jumpUrl);
}else{ } else {
} }
} }
}, },
vname:"gsb_gtbhome" vname: "gsb_gtbhome"
} }
\ No newline at end of file
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