header.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. <template>
  2. <div>
  3. <div style="-webkit-app-region: drag;height:45px;line-height: 45px;">
  4. <div class="soft-head">
  5. <p class="soft-name">
  6. <img src="../assets/image/icon.png" class="soft-icon" />
  7. <span style="letter-spacing: 2px;">{{productName}}</span>
  8. </p>
  9. <div style="-webkit-app-region:no-drag">
  10. <div>
  11. <template v-if="authority.validity_type != 2">
  12. <span v-if="authority.isAuthority" class="o-member twinkle_text" @click="openVip()">
  13. <img src="../assets/image/i-vip.png" />
  14. <span>会员中心</span>
  15. </span>
  16. <span v-else class="o-member twinkle_text" @click="openVip()">
  17. <img src="../assets/image/i-vip.png" />
  18. <span>开通会员</span>
  19. </span>
  20. </template>
  21. <div class="login-cur" v-if="!userInfo.username" @click="loginModel = true">
  22. <el-avatar icon="el-icon-user-solid" size="small" class="login-icon"></el-avatar><span class="font-12">未登录</span>
  23. </div>
  24. <div class="login-cur" v-else>
  25. <img v-if="userInfo.avatar" :src="userInfo.avatar" class="login-icon" />
  26. <el-avatar v-else icon="el-icon-user-solid" size="small" class="login-icon"></el-avatar>
  27. <span v-if="userInfo.username">{{userInfo.username}}</span>
  28. <span v-else>微信用户</span>
  29. <img src="../assets/image/vip.png" v-if="authority.isAuthority" style="width: 25px;vertical-align: middle;"/>
  30. </div>
  31. <el-dropdown @command="changeMenu">
  32. <i class="el-icon-s-operation sys-icon"></i>
  33. <el-dropdown-menu slot="dropdown">
  34. <el-dropdown-item command="vip">{{authority.isAuthority ? '会员中心' : '开通会员'}}</el-dropdown-item>
  35. <el-dropdown-item command="update">检查更新</el-dropdown-item>
  36. <el-dropdown-item command="help"><a href="https://www.xingyousoft.com/help" style="color: inherit;">使用教程</a></el-dropdown-item>
  37. <el-dropdown-item command="setting">软件设置</el-dropdown-item>
  38. <el-dropdown-item command="out" v-if="userInfo.username || userInfo.avatar">退出登录</el-dropdown-item>
  39. </el-dropdown-menu>
  40. </el-dropdown>
  41. <i class="el-icon-minus sys-icon" @click="softMini()"></i>
  42. <i class="el-icon-full-screen sys-icon" @click="softMax()"></i>
  43. <i class="el-icon-close sys-icon" @click="softClose()"></i>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- 登录 -->
  49. <el-dialog title="用户注册登录" :visible.sync="loginModel" width="400px" :close-on-click-modal="false">
  50. <div class="login-model" style="position: relative;">
  51. <iframe v-if="loginModel" id="loginFrame" ref="loginFrame" style="border: none; width: 100%; height:100%;" :src="loginUrl"></iframe>
  52. <img src="../assets/image/icon-b.png" style="position: absolute; bottom: -30px; right: -20px; width: 40px;"/>
  53. </div>
  54. <span slot="title">
  55. <img src="../assets/image/logo.png" style="width: 25px; vertical-align: middle; margin-right: 4px;"/>注册用户登录
  56. </span>
  57. </el-dialog>
  58. <!-- 会员弹窗 -->
  59. <el-dialog custom-class="member-dialog member-dialog1" :visible.sync="vipModel" width="700px" :close-on-click-modal="false">
  60. <div slot="title">
  61. <p class="soft-mtitle">
  62. 会员中心
  63. </p>
  64. </div>
  65. <div style="height: 580px;">
  66. <iframe v-if="vipModel" id="vipFrame" style="border: none; width: 100%; height:100%;" :src="vipUrl"></iframe>
  67. </div>
  68. </el-dialog>
  69. <!-- 未登录弹窗 -->
  70. <el-dialog :visible.sync="memberModel" width="400px" custom-class="member-dialog member-dialog2" style="border-radius: 20px; overflow: hidden;">
  71. <div class="member-model">
  72. <div class="adv-banner" v-if="popupAdvInfo.logo">
  73. <img :src="imgUrl + popupAdvInfo.logo" style="width: 100%; height: 100%;"/>
  74. </div>
  75. <div class="font-12" style="padding: 20px; margin-bottom: 10px;">
  76. <div style="text-align: center; margin-bottom: 10px;">
  77. <p style="font-size: 16px;font-weight: 600;color: #f73131;">非VIP图片/音频限制大小为300KB,视频/文档限制大小为2MB</p>
  78. <p style="font-size: 14px; font-weight: 600; margin-top: 15px;">开通会员即享以下权益</p>
  79. </div>
  80. <el-row :gutter="20" class="micon-list">
  81. <el-col :span="6" class="micon-item">
  82. <img src="../assets/image/member1.png" style="width: 60px;"/>
  83. <p>不限功能</p>
  84. </el-col>
  85. <el-col :span="6" class="micon-item">
  86. <img src="../assets/image/member2.png" style="width: 60px;"/>
  87. <p>不限设备</p>
  88. </el-col>
  89. <el-col :span="6" class="micon-item">
  90. <img src="../assets/image/member3.png" style="width: 60px;"/>
  91. <p>不限大小</p>
  92. </el-col>
  93. <el-col :span="6" class="micon-item">
  94. <img src="../assets/image/member4.png" style="width: 60px;"/>
  95. <p>技术支持</p>
  96. </el-col>
  97. </el-row>
  98. </div>
  99. <div class="micon-btn">
  100. <el-button class="micon-btn1" style="margin:0 10px;" v-if="!isClick" @click="next()" :round="true">继续试用</el-button>
  101. <el-button class="micon-btn1" style="margin:0 10px;" v-else @click="next()" :round="true">开始转换</el-button>
  102. <el-button class="micon-btn2" type="primary" @click="openVip()" :round="true">开通会员</el-button>
  103. </div>
  104. </div>
  105. </el-dialog>
  106. <!-- 退出提示 -->
  107. <el-dialog title="关闭提示" :visible.sync="closeModel" width="400px">
  108. <div style="text-align:center">
  109. <el-radio-group v-model="closeType" style="text-align:left">
  110. <el-radio :label="1">最小化到系统托盘</el-radio>
  111. <div style="height: 20px;"> </div>
  112. <el-radio :label="2">直接退出应用程序</el-radio>
  113. </el-radio-group>
  114. </div>
  115. <span slot="footer" class="dialog-footer">
  116. <el-checkbox v-model="isRemember" style="float:left">不再提醒</el-checkbox>
  117. <el-button type="primary" size="small" @click="saveClose">确定</el-button>
  118. </span>
  119. </el-dialog>
  120. <!-- 软件设置 -->
  121. <el-dialog title="软件设置" :visible.sync="settingModal" width="400px">
  122. <div>
  123. <el-divider content-position="left">退出设置</el-divider>
  124. <el-radio-group v-model="closeType">
  125. <el-radio :label="1">最小化到系统托盘</el-radio>
  126. <el-radio :label="2">直接退出应用程序</el-radio>
  127. </el-radio-group>
  128. </div>
  129. <span slot="footer" class="dialog-footer">
  130. <el-button type="primary" @click="saveSetting">保存设置</el-button>
  131. </span>
  132. </el-dialog>
  133. </div>
  134. </template>
  135. <script>
  136. import {
  137. ipcRenderer
  138. } from 'electron';
  139. import QRCode from 'qrcodejs2'
  140. import pjson from '/package.json'
  141. import electronApi from '@/utils/electronApi';
  142. import fs from 'fs';
  143. import os from 'os';
  144. import path from 'path';
  145. const regedit = require('regedit');
  146. export default {
  147. name: "headerTop",
  148. data(){
  149. return {
  150. sysInfo: {},
  151. vipUrl: '',
  152. loginUrl: '',
  153. memberUrl: '',
  154. settingModal: false,
  155. boot: false, // 开机启动
  156. closeModel: false,
  157. closeType: 2,
  158. isRemember:true,
  159. //
  160. productName: pjson.softInfo.softName,
  161. imgUrl: this.$api.imgUrl,
  162. loginType: 1,
  163. loginModel: false, // 登录弹窗
  164. loginImg: '',
  165. loginExpire: 100,
  166. loginInterval: false, // 登录倒计时
  167. checkLoginInterval: false,
  168. isLogin: false,
  169. userInfo: {},
  170. authority: { //软件的会员权限
  171. isAuthority: false
  172. },
  173. memberModel: false,
  174. isClick: false, // 是否点击转换按钮
  175. vipModel: false, // 会员弹窗
  176. productInfo: {},
  177. productIndex: 4,
  178. payType: 1, // 支付方式 1微信 2支付宝
  179. checkPayInterval: false,
  180. order_no: '', //创建的订单号
  181. alipayUrl: '', // 支付宝
  182. payMoney: 0,
  183. clickVip: false,
  184. popupAdvInfo: [],
  185. vipAdvInfo: [],
  186. agreementInfo: [], // 会员协议
  187. agreeFlag: true,
  188. agreementModel: false,
  189. alipayDoc: '',
  190. limitModal: false, // 限时购买弹窗
  191. limitLogin: false, // 限时购买时的登录状态
  192. }
  193. },
  194. props: {
  195. },
  196. async mounted(){
  197. this.getAdv();
  198. this.checkLogin();
  199. if(this.$utils.getStorage('userInfo')){
  200. this.userInfo = this.$utils.getStorage('userInfo');
  201. }
  202. window.addEventListener('message', e => {
  203. if (e.origin === 'https://www.xingyousoft.com') {
  204. console.log(e.data)
  205. if(e.data.userInfo){ // 返回用户信息
  206. this.userInfo = e.data.userInfo;
  207. this.$utils.setStorage('userInfo', e.data.userInfo);
  208. this.loginModel = false;
  209. }
  210. if(e.data.officialToken != undefined){
  211. this.$utils.setStorage('token', e.data.officialToken);
  212. this.getUserInfo();
  213. this.loginModel = false;
  214. }
  215. if(e.data == 'paySuccess'){ // 支付成功
  216. this.vipModel = false;
  217. this.$notify({title: '成功',message: '支付成功',type: 'success'});
  218. this.getUserInfo();
  219. }
  220. if(e.data == 'next'){
  221. this.next();
  222. }
  223. if(e.data == 'openVip'){
  224. this.openVip();
  225. }
  226. }else{
  227. return;
  228. }
  229. }, false);
  230. //加载的时候会出现白屏,延迟加载解决白屏问题
  231. setTimeout(() => {
  232. ipcRenderer.send('close-loading-window', {isClose:true});
  233. }, 2000);
  234. // 接收系统托盘命令 - 软件设置
  235. ipcRenderer.on('setting', (event, message) => {
  236. this.changeMenu('setting');
  237. })
  238. // 接收系统托盘命令 - 帮助中心
  239. ipcRenderer.on('help', (event, message) => {
  240. electronApi.openExternal("https://www.xingyousoft.com/help");
  241. })
  242. },
  243. methods: {
  244. softMini() { // 软件最小化
  245. ipcRenderer.send('min');
  246. },
  247. softMax() { // 软件最大化
  248. ipcRenderer.send('max');
  249. },
  250. softClose() { // 软件关闭
  251. let isRemember = this.$utils.getStorage('isRemember');
  252. if(isRemember == true){
  253. let type = this.$utils.getStorage('closeType');
  254. if(type == 2){
  255. ipcRenderer.send('exit');
  256. }else{
  257. ipcRenderer.send('tray');
  258. }
  259. }else{
  260. this.closeModel = true;
  261. }
  262. },
  263. saveClose(){
  264. if(this.isRemember == true){
  265. this.$utils.setStorage('closeType',this.closeType);
  266. }
  267. this.$utils.setStorage('isRemember', this.isRemember);
  268. if(this.closeType == 2){
  269. ipcRenderer.send('exit');
  270. }else{
  271. this.closeModel = false;
  272. ipcRenderer.send('tray');
  273. }
  274. },
  275. // 保存设置
  276. saveSetting(){
  277. this.$utils.setStorage('closeType', this.closeType);
  278. this.$utils.setStorage('isRemember', true)
  279. ipcRenderer.send('boot', this.boot);
  280. this.settingModal = false;
  281. },
  282. //
  283. getAdv() {
  284. // 非会员广告接口
  285. this.$http.post(this.$api.target + '/api/api/m_position_list_byid', { id: pjson.softInfo.popupAdvId }).then((response) => {
  286. if (!response.data.error) {
  287. this.popupAdvInfo = response.data.result;
  288. }
  289. })
  290. electronApi.spawnExec(['cert.exe','token']).then(res => {
  291. this.sysInfo = JSON.parse(res.stdout.toString());
  292. this.$utils.setStorage('session', this.sysInfo.windows_uuid);
  293. this.loginUrl = "https://www.xingyousoft.com/soft/login2/"+pjson.softInfo.softMid+"?p_mid="+pjson.softInfo.softMid+"&agent_mid="+this.sysInfo.agentMid+"&uuid="+this.sysInfo.windows_uuid+"&soft_type="+this.sysInfo.softType;
  294. this.memberUrl = "https://www.xingyousoft.com/soft/reminder2/"+pjson.softInfo.softMid+"?p_mid="+pjson.softInfo.softMid+"&agent_mid="+this.sysInfo.agentMid+"&uuid="+this.sysInfo.windows_uuid+"&soft_type="+this.sysInfo.softType;
  295. if(process.env.NODE_ENV != "development"){ // 非开发环境运行
  296. let params = {
  297. type: 3,
  298. tag: '',
  299. product_version: pjson.version,
  300. windows_uuid: this.sysInfo.windows_uuid,
  301. os_platform: this.sysInfo.os_platform,
  302. os_version: this.sysInfo.os_version,
  303. cpu: this.sysInfo.cpu,
  304. statistics_flag: '',
  305. from: this.sysInfo.from,
  306. }
  307. // 使用日志
  308. // this.$http.post(this.$api.statistics + pjson.softInfo.softMid, params).then((response) => {
  309. // })
  310. }
  311. }).catch(err => {
  312. console.log(err);
  313. let windows_uuid = this.$utils.guid();
  314. if(this.$utils.getStorage('session')){
  315. windows_uuid = this.$utils.getStorage('session');
  316. }
  317. this.$utils.setStorage('session', windows_uuid);
  318. this.loginUrl = "https://www.xingyousoft.com/soft/login2/"+pjson.softInfo.softMid+"?p_mid="+pjson.softInfo.softMid+"&agent_mid="+this.sysInfo.agentMid+"&uuid="+windows_uuid+"&soft_type="+this.sysInfo.softType;
  319. this.memberUrl = "https://www.xingyousoft.com/soft/reminder2/"+pjson.softInfo.softMid+"?p_mid="+pjson.softInfo.softMid+"&agent_mid="+this.sysInfo.agentMid+"&uuid="+windows_uuid+"&soft_type="+this.sysInfo.softType;
  320. });
  321. },
  322. // 刷新登录二维码
  323. refreshCode() {
  324. this.clearLoginInterval();
  325. let data = {
  326. scene_str: pjson.softInfo.softMid + ':' + this.$utils.getStorage('session')
  327. };
  328. this.$http.post(this.$api.createQrcode, data).then((response) => {
  329. if (response.data.result) {
  330. this.loginImg = response.data.result.url;
  331. this.loginExpire = response.data.result.expire_seconds;
  332. this.loginInterval = setInterval(() => {
  333. this.loginExpire--;
  334. if (this.loginExpire <= 0) {
  335. this.clearLoginInterval();
  336. }
  337. }, 1000)
  338. this.checkLoginInterval = setInterval(() => {
  339. this.checkLogin();
  340. }, 3000)
  341. }
  342. });
  343. },
  344. // 继续试用 or 开始转换
  345. next() {
  346. if(this.isClick){ // 开始转换
  347. this.$emit('export-file', true);
  348. }else{ // 继续试用
  349. this.memberModel = false;
  350. }
  351. },
  352. // 开通会员
  353. openVip() {
  354. this.clickVip = true;
  355. this.memberModel = false;
  356. if (this.$utils.getStorage('token')) {
  357. this.vipModel = true;
  358. this.vipUrl = "https://www.xingyousoft.com/soft/buy2/"+pjson.softInfo.softMid+"?p_mid="+pjson.softInfo.softMid+"&agent_mid="+this.sysInfo.agentMid+"&uuid="+this.sysInfo.windows_uuid+"&token="+this.$utils.getStorage('token')+"&soft_type="+this.sysInfo.softType+"&time="+new Date().getTime();
  359. } else {
  360. this.loginModel = true;
  361. }
  362. },
  363. // 检查微信是否登录
  364. checkLogin() {
  365. let data = {
  366. scene_str: pjson.softInfo.softMid + ':' + this.$utils.getStorage('session')
  367. };
  368. this.$http.post(this.$api.checkLogin, data).then((response) => {
  369. if (response.data.error) { // 未登录
  370. this.authority.isAuthority = false;
  371. this.userInfo = {};
  372. this.$utils.setStorage('token', '');
  373. this.$utils.setStorage('userInfo', '');
  374. if(!this.loginModel && !this.limitModal) {
  375. this.memberModel = true;
  376. }
  377. }else{ // 登录成功
  378. this.$utils.setStorage('token', response.data.result);
  379. this.loginModel = false;
  380. this.getUserInfo();
  381. if(this.limitModal){ // 限时优惠 已登录
  382. this.limitLogin = true;
  383. }
  384. if (this.clickVip) { // 点击开通会员 登陆后直接展示会员购买弹窗
  385. this.vipModel = true;
  386. this.vipUrl = "https://www.xingyousoft.com/soft/buy2/"+pjson.softInfo.softMid+"?p_mid="+pjson.softInfo.softMid+"&agent_mid="+this.sysInfo.agentMid+"&uuid="+this.sysInfo.windows_uuid+"&token="+this.$utils.getStorage('token')+"&soft_type="+this.sysInfo.softType+"&time="+new Date().getTime();
  387. this.clickVip = false;
  388. }else{
  389. // this.getProductInfo();
  390. }
  391. }
  392. });
  393. },
  394. // 获取用户信息
  395. getUserInfo() {
  396. this.$http.post(this.$api.getUserInfo).then((response) => {
  397. if (!response.data.error) {
  398. this.userInfo = response.data.result;
  399. this.getAuthority();
  400. }
  401. });
  402. },
  403. // 清空登录有关定时器
  404. clearLoginInterval() {
  405. clearInterval(this.loginInterval);
  406. clearInterval(this.checkLoginInterval);
  407. },
  408. // 获取用户账单
  409. getAuthority() {
  410. this.$http.post(this.$api.userBill + pjson.softInfo.softMid).then((response) => {
  411. if (!response.data.error) {
  412. this.authority = response.data.result;
  413. let nowDate = new Date().getTime();
  414. if (nowDate <= new Date(this.authority.validity_end_time).getTime() || this.authority.validity_type == 2) {
  415. this.authority.isAuthority = true;
  416. } else {
  417. this.authority.isAuthority = false;
  418. if (!this.vipModel && !this.limitModal) {
  419. this.memberModel = true;
  420. }
  421. }
  422. this.$forceUpdate();
  423. }
  424. })
  425. },
  426. // 监听会员弹窗状态
  427. vipChange(e) {
  428. },
  429. // 监听显示购买弹窗状态
  430. limitChange(e){
  431. if (e) {
  432. if(!this.limitLogin && this.limitModal){
  433. this.refreshCode();
  434. }
  435. }else{
  436. clearInterval(this.checkPayInterval)
  437. }
  438. },
  439. // 监听登录弹窗状态
  440. loginChange(e) {
  441. if (e) {
  442. this.refreshCode();
  443. } else {
  444. this.clickVip = false;
  445. this.clearLoginInterval();
  446. }
  447. },
  448. // 选择支付方式
  449. selectPaytype(index) {
  450. this.payType = index; // 1微信支付 2支付宝支付
  451. if(this.limitModal){
  452. this.selectTerm(5);
  453. }else{
  454. this.selectTerm();
  455. }
  456. },
  457. // 生成微信支付二维码
  458. createQrcode(str) {
  459. document.getElementById('qrcode').innerHTML = ''
  460. let qrcode = new QRCode('qrcode', {
  461. width: 210,
  462. height: 210, // 高度
  463. text: str, // 二维码内容
  464. render: 'canvas', // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
  465. background: '#f0f',
  466. foreground: '#ff0'
  467. })
  468. },
  469. // 选择会员期限创建订单
  470. selectTerm(index) {
  471. if (index) {
  472. this.productIndex = index;
  473. }
  474. this.payMoney = this.productInfo['price' + this.productIndex];
  475. let params = {
  476. product_type: 1,
  477. id: this.productInfo.id,
  478. type: this.productIndex
  479. };
  480. clearInterval(this.checkPayInterval);
  481. this.$http.post(this.$api.target + '/order/createOrder', params).then((response) => {
  482. if (response.data.result) {
  483. this.order_no = response.data.data;
  484. if (this.payType == 1) { // 微信支付
  485. this.wepay();
  486. } else {
  487. this.alipay();
  488. }
  489. } else {
  490. this.$message.error(response.data.msg);
  491. }
  492. });
  493. },
  494. // 微信支付
  495. wepay() {
  496. this.$http.post(this.$api.target + '/pay/wechatPay', { order_no: this.order_no }).then((res) => {
  497. if (res.data.result) {
  498. if (JSON.stringify(res.data.data) != '[]') {
  499. this.wxPayErcode = res.data.data.code_url
  500. this.createQrcode(res.data.data.code_url)
  501. this.checkWxPay()
  502. }
  503. }
  504. });
  505. },
  506. // 支付宝支付
  507. alipay() {
  508. this.$http.post(this.$api.target + '/pay/alipay', { order_no: this.order_no }).then((res) => {
  509. var content = res.data; //内容
  510. this.alipayDoc = content;
  511. this.checkWxPay();
  512. });
  513. },
  514. // 每2秒检测一次是否支付成功
  515. checkWxPay() {
  516. clearInterval(this.checkPayInterval);
  517. this.checkPayInterval = setInterval(() => {
  518. this.$http.post(this.$api.target + '/order/checkIsWXPay', { order_no: this.order_no, product_type: 1 }).then((res) => {
  519. if (res.data.result) {
  520. if (JSON.stringify(res.data.data) != '[]') {
  521. if (res.data.code == '1001') {
  522. clearInterval(this.checkPayInterval);
  523. this.vipModel = false;
  524. this.limitModal = false;
  525. this.getAuthority();
  526. this.$notify({title: '支付通知',message: res.data.msg,type: 'success'});
  527. }
  528. }
  529. }
  530. });
  531. }, 2000)
  532. // 5分钟后关闭
  533. // setTimeout(() => {
  534. // clearInterval(this.checkPayInterval)
  535. // }, 1000 * 300)
  536. },
  537. // 选择菜单
  538. changeMenu(e) {
  539. if (e === 'out') {
  540. this.$confirm("是否退出登录该账号?", '提示', {
  541. type: 'warning'
  542. }).then(() => {
  543. this.$http.post(this.$api.loginOut).then((response) => {
  544. if (!response.data.error) {
  545. this.userInfo = {};
  546. this.authority.isAuthority = false;
  547. this.$utils.setStorage('token', '');
  548. this.$utils.setStorage('userInfo', '');
  549. this.$message({message: '账号已退出',type: 'success'});
  550. // this.$refs.loginFrame.contentWindow.postMessage('out', '*');
  551. }
  552. });
  553. }).catch(() => {
  554. });
  555. } else if (e === 'vip') {
  556. this.openVip();
  557. } else if (e === 'update') {
  558. this.$emit('update-soft', true);
  559. } else if (e === 'setting'){
  560. this.settingModal = true;
  561. }
  562. },
  563. },
  564. }
  565. </script>
  566. <style lang="scss">
  567. .vip-banner{
  568. background-color: #eee;
  569. height: 60px;
  570. width: 100%;
  571. margin-bottom: 15px;
  572. }
  573. .adv-banner{
  574. height: 150px;
  575. width: 100%;
  576. }
  577. .login-cur{
  578. margin: 0 10px;
  579. display: inline-block;
  580. cursor: pointer;
  581. }
  582. .vip-modal .ivu-icon-ios-close{
  583. color: #f8f8f8 !important;
  584. }
  585. .member-dialog{
  586. .el-dialog__header{
  587. padding: 0;
  588. }
  589. .el-dialog__body{
  590. padding: 0;
  591. }
  592. }
  593. .member-dialog1{
  594. .el-dialog__headerbtn{
  595. top: 13px;
  596. }
  597. }
  598. .member-dialog2{
  599. border-radius: 20px !important;
  600. overflow: hidden;
  601. }
  602. .micon-list{
  603. padding: 20px 10px;
  604. background: linear-gradient(to bottom, #fdd6ca69, #ffffff);
  605. border-radius: 20px;
  606. }
  607. .micon-item{
  608. text-align: center;
  609. font-size: 14px;
  610. font-weight: 600;
  611. color: #ec6b44;
  612. }
  613. .micon-btn{
  614. text-align: center;
  615. padding-bottom: 20px;
  616. }
  617. .soft-mtitle{
  618. font-size: 16px;
  619. line-height: 40px;
  620. font-weight: 600;
  621. padding: 0 15px;
  622. }
  623. </style>