|
|
@@ -143,7 +143,7 @@
|
|
|
</el-row>
|
|
|
<el-divider content-position="left">
|
|
|
浏览器选择
|
|
|
- <el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="用户可使用本地电脑的谷歌/Edge浏览器或软件内置的浏览器">
|
|
|
+ <el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="用户可使用本地电脑的谷歌/Edge浏览器">
|
|
|
<i class="el-icon-info" slot="reference" style="margin-left: 10px; color: #F56C6C;"></i>
|
|
|
</el-popover>
|
|
|
</el-divider>
|
|
|
@@ -154,6 +154,10 @@
|
|
|
<el-radio :label="2">内置浏览器</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-row>
|
|
|
+ <!-- <el-row style="text-align: center; margin-top: 10px;">
|
|
|
+ <el-input size="small" v-model="chromePath" placeholder="请输入本地Chrome/Edge浏览器启动地址" style="width: 75%;" clearable></el-input>
|
|
|
+ <el-link @click="chromeHelp('https://www.xingyousoft.com/news/detail/Z80IPpNVNNC1')" type="danger" style="text-decoration: underline; font-size: 12px;" :underline="false">查看如何输入</el-link>
|
|
|
+ </el-row> -->
|
|
|
<el-row style="text-align: center; margin-top: 10px;" v-if="chromeType == 1">
|
|
|
<el-input size="small" v-model="chromePath" placeholder="请输入本地Chrome/Edge浏览器启动地址" style="width: 75%;" clearable></el-input>
|
|
|
<el-link @click="chromeHelp('https://www.xingyousoft.com/news/detail/Z80IPpNVNNC1')" type="danger" style="text-decoration: underline; font-size: 12px;" :underline="false">查看如何输入</el-link>
|
|
|
@@ -238,9 +242,9 @@
|
|
|
<!-- 开发者模式 -->
|
|
|
<el-dialog title="开发者模式" :visible.sync="developerModal" width="400px" :close-on-click-modal="false" :close-on-press-escape="false">
|
|
|
<div>
|
|
|
- <p style="text-align: center; color: #F56C6C;">开发者参数设置,软件退出后会重置</p>
|
|
|
- <p style="text-align: center; color: #F56C6C;">(网络连接:networkidle2)</p>
|
|
|
- <el-divider content-position="left">网络连接模式</el-divider>
|
|
|
+ <!-- <p style="text-align: center; color: #F56C6C;">开发者参数设置,软件退出后会重置</p> -->
|
|
|
+ <p style="text-align: center; color: #F56C6C;">(默认网络连接:networkidle2)</p>
|
|
|
+ <el-divider content-position="left">淘宝网络连接模式</el-divider>
|
|
|
<el-row style="text-align: center;">
|
|
|
<el-radio-group v-model="waitUntil">
|
|
|
<el-radio style="margin-bottom: 20px;" label="load">load</el-radio>
|
|
|
@@ -249,6 +253,15 @@
|
|
|
<el-radio style="margin-bottom: 20px;" label="networkidle2">networkidle2</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-row>
|
|
|
+ <el-divider content-position="left">非淘宝网络连接模式</el-divider>
|
|
|
+ <el-row style="text-align: center;">
|
|
|
+ <el-radio-group v-model="waitUntil2">
|
|
|
+ <el-radio style="margin-bottom: 20px;" label="load">load</el-radio>
|
|
|
+ <el-radio style="margin-bottom: 20px;" label="domcontentloaded">domcontentloaded</el-radio>
|
|
|
+ <el-radio style="margin-bottom: 20px;" label="networkidle0">networkidle0</el-radio>
|
|
|
+ <el-radio style="margin-bottom: 20px;" label="networkidle2">networkidle2</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="saveDevelop" :loading="saveDevelopLoading">保存设置</el-button>
|
|
|
@@ -284,6 +297,9 @@
|
|
|
name: "headerTop",
|
|
|
data(){
|
|
|
return {
|
|
|
+ edgePath: ['C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe',
|
|
|
+ 'C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe',
|
|
|
+ 'C:\\Program Files\\Microsoft\\Edge\\msedge.exe'],
|
|
|
sysInfo: {},
|
|
|
vipUrl: '',
|
|
|
loginUrl: '',
|
|
|
@@ -293,7 +309,7 @@
|
|
|
closeModel: false,
|
|
|
closeType: 2,
|
|
|
versionType: 2,
|
|
|
- chromeType: 2,
|
|
|
+ chromeType: 1,
|
|
|
chromePath: '',
|
|
|
gap: 3,
|
|
|
gapRandom: 2,
|
|
|
@@ -351,6 +367,7 @@
|
|
|
developerModal: false,
|
|
|
headless: 1,
|
|
|
waitUntil: 'networkidle2',
|
|
|
+ waitUntil2: 'networkidle2',
|
|
|
|
|
|
isRead: false,
|
|
|
noticeValue: {},
|
|
|
@@ -368,6 +385,28 @@
|
|
|
this.userInfo = this.$utils.getStorage('userInfo');
|
|
|
}
|
|
|
|
|
|
+ if(!this.$utils.getStorage('chromePath')){ // 没有设置浏览器地址的时候判断
|
|
|
+ let flag = true;
|
|
|
+ for(let i = 0; i<this.edgePath.length; i++){
|
|
|
+ if (fs.existsSync(this.edgePath[i])) {
|
|
|
+ flag = false;
|
|
|
+ this.$utils.setStorage('chromePath', this.edgePath[i]);
|
|
|
+ this.$utils.setStorage('chromeType', 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(flag){ // 当前电脑没有找到edge浏览器
|
|
|
+ this.chromeType = 2;
|
|
|
+ this.$utils.setStorage('chromeType', 2);
|
|
|
+ // this.$notify.error({
|
|
|
+ // title: '提示',
|
|
|
+ // message: '未扫描到Microsoft Edge浏览器地址,请手动在软件设置中配置浏览器地址,否则软件将无法使用!',
|
|
|
+ // duration: 0
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
window.addEventListener('message', e => {
|
|
|
if (e.origin === 'https://www.xingyousoft.com') {
|
|
|
if(e.data.userInfo){ // 返回用户信息
|
|
|
@@ -604,6 +643,7 @@
|
|
|
this.saveDevelopLoading = true;
|
|
|
this.$utils.setStorage('headless', this.headless);
|
|
|
this.$utils.setStorage('waitUntil', this.waitUntil);
|
|
|
+ this.$utils.setStorage('waitUntil2', this.waitUntil2);
|
|
|
setTimeout(() => {
|
|
|
this.saveDevelopLoading = false;
|
|
|
this.developerModal = false;
|
|
|
@@ -944,29 +984,39 @@
|
|
|
this.chromePath = chromePath;
|
|
|
}
|
|
|
} else if (e == 'developer'){ //开发者模式
|
|
|
- let password = '9d0b17e04db20927047de3d09152db0f'; //默认密钥
|
|
|
- this.$http.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
|
|
|
- this.$http.get(pjson.softInfo.downloadPrefix + '/' + pjson.name + "/developer.json?"+Math.random()).then((response) => {
|
|
|
- let getResult = response.data || '';
|
|
|
- if(getResult && typeof(response.data) == 'string'){
|
|
|
- password = getResult;
|
|
|
- }
|
|
|
- }).catch(function(error){
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- this.$prompt('请输入开发者密钥:', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- inputPlaceholder: '请联系软件底部企业微信客服咨询使用',
|
|
|
- }).then(({ value }) => {
|
|
|
- if(value == password){
|
|
|
- this.developerModal = true;
|
|
|
- }else{
|
|
|
- this.$message.error('密钥错误,已退出');
|
|
|
- }
|
|
|
- }).catch(() => {
|
|
|
+ let waitUntil = this.$utils.getStorage('waitUntil');
|
|
|
+ if(waitUntil){
|
|
|
+ this.waitUntil = waitUntil;
|
|
|
+ }
|
|
|
|
|
|
- });
|
|
|
+ let waitUntil2 = this.$utils.getStorage('waitUntil2');
|
|
|
+ if(waitUntil2){
|
|
|
+ this.waitUntil2 = waitUntil2;
|
|
|
+ }
|
|
|
+ this.developerModal = true;
|
|
|
+ // let password = '9d0b17e04db20927047de3d09152db0f'; //默认密钥
|
|
|
+ // this.$http.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
|
|
|
+ // this.$http.get(pjson.softInfo.downloadPrefix + '/' + pjson.name + "/developer.json?"+Math.random()).then((response) => {
|
|
|
+ // let getResult = response.data || '';
|
|
|
+ // if(getResult && typeof(response.data) == 'string'){
|
|
|
+ // password = getResult;
|
|
|
+ // }
|
|
|
+ // }).catch(function(error){
|
|
|
+ // console.log(error);
|
|
|
+ // });
|
|
|
+ // this.$prompt('请输入开发者密钥:', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // inputPlaceholder: '请联系软件底部企业微信客服咨询使用',
|
|
|
+ // }).then(({ value }) => {
|
|
|
+ // if(value == password){
|
|
|
+ // this.developerModal = true;
|
|
|
+ // }else{
|
|
|
+ // this.$message.error('密钥错误,已退出');
|
|
|
+ // }
|
|
|
+ // }).catch(() => {
|
|
|
+
|
|
|
+ // });
|
|
|
}
|
|
|
},
|
|
|
},
|