|
@@ -36,6 +36,7 @@
|
|
|
<el-dropdown-item command="update">检查更新</el-dropdown-item>
|
|
|
<el-dropdown-item command="help"><a href="https://www.xingyousoft.com/help2" style="color: inherit;">使用教程</a></el-dropdown-item>
|
|
|
<el-dropdown-item command="setting">软件设置</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="developer">开发者模式</el-dropdown-item>
|
|
|
<el-dropdown-item command="out" v-if="userInfo.username || userInfo.avatar">退出登录</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -139,20 +140,23 @@
|
|
|
<el-button size="mini" @click="toLogin('tb')" :loading="tbLoading">天猫/淘宝</el-button>
|
|
|
<el-button size="mini" @click="toLogin('red')" :loading="redLoading">小红书</el-button>
|
|
|
</el-row>
|
|
|
- <!-- <el-divider content-position="left">
|
|
|
- 同时下载量
|
|
|
- <el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="同时下载量过多,可能会触发平台拦截">
|
|
|
+ <el-divider content-position="left">
|
|
|
+ 页面滚动速度
|
|
|
+ <el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="默认500ms,本地网路访问速度快可选择短时间,时间越长处理任务的时间也越长">
|
|
|
<i class="el-icon-info" slot="reference" style="margin-left: 10px; color: #F56C6C;"></i>
|
|
|
</el-popover>
|
|
|
</el-divider>
|
|
|
<el-row style="text-align: center;">
|
|
|
- <el-radio-group v-model="numType">
|
|
|
- <el-radio :label="1">1个</el-radio>
|
|
|
- <el-radio :label="2">2个</el-radio>
|
|
|
- <el-radio :label="3">3个</el-radio>
|
|
|
- <el-radio :label="4">4个</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-row> -->
|
|
|
+ <el-select v-model="pageMs" placeholder="请选择时间" size="mini" style="width: 100px; margin-right: 5px;">
|
|
|
+ <el-option :value="400"></el-option>
|
|
|
+ <el-option :value="500"></el-option>
|
|
|
+ <el-option :value="600"></el-option>
|
|
|
+ <el-option :value="700"></el-option>
|
|
|
+ <el-option :value="800"></el-option>
|
|
|
+ <el-option :value="900"></el-option>
|
|
|
+ <el-option :value="1000"></el-option>
|
|
|
+ </el-select>ms
|
|
|
+ </el-row>
|
|
|
<el-divider content-position="left">
|
|
|
浏览器版本
|
|
|
<el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="win10以下版本(不含win10),请使用兼容版本的浏览器">
|
|
@@ -181,6 +185,35 @@
|
|
|
<el-button type="primary" @click="saveSetting" :loading="saveLoading">保存设置</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 开发者模式 -->
|
|
|
+ <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;">(无头模式:true|网络连接:networkidle2)</p>
|
|
|
+ <el-divider content-position="left">
|
|
|
+ 无头模式
|
|
|
+ </el-divider>
|
|
|
+ <el-row style="text-align: center;">
|
|
|
+ <el-radio-group v-model="headless">
|
|
|
+ <el-radio :label="1">true</el-radio>
|
|
|
+ <el-radio :label="2">false</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="waitUntil">
|
|
|
+ <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>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
@@ -208,8 +241,8 @@
|
|
|
boot: false, // 开机启动
|
|
|
closeModel: false,
|
|
|
closeType: 2,
|
|
|
- numType: 1,
|
|
|
versionType: 2,
|
|
|
+ pageMs: 500,
|
|
|
isRemember:true,
|
|
|
//
|
|
|
productName: pjson.softInfo.softName,
|
|
@@ -256,6 +289,11 @@
|
|
|
redLoading: false,
|
|
|
cacheLoading: false,
|
|
|
saveLoading: false,
|
|
|
+
|
|
|
+ saveDevelopLoading: false,
|
|
|
+ developerModal: false,
|
|
|
+ headless: 1,
|
|
|
+ waitUntil: 'networkidle2'
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
@@ -441,7 +479,7 @@
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.$utils.setStorage('closeType', this.closeType);
|
|
|
- // this.$utils.setStorage('numType', this.numType);
|
|
|
+ this.$utils.setStorage('pageMs', this.pageMs);
|
|
|
this.$utils.setStorage('versionType', this.versionType);
|
|
|
this.$utils.setStorage('isRemember', true)
|
|
|
ipcRenderer.send('boot', this.boot);
|
|
@@ -454,7 +492,7 @@
|
|
|
});
|
|
|
}else{
|
|
|
this.$utils.setStorage('closeType', this.closeType);
|
|
|
- // this.$utils.setStorage('numType', this.numType);
|
|
|
+ this.$utils.setStorage('pageMs', this.pageMs);
|
|
|
this.$utils.setStorage('versionType', this.versionType);
|
|
|
this.$utils.setStorage('isRemember', true)
|
|
|
ipcRenderer.send('boot', this.boot);
|
|
@@ -464,6 +502,16 @@
|
|
|
}, 800)
|
|
|
}
|
|
|
},
|
|
|
+ // 保存开发者设置
|
|
|
+ saveDevelop(){
|
|
|
+ this.saveDevelopLoading = true;
|
|
|
+ this.$utils.setStorage('headless', this.headless);
|
|
|
+ this.$utils.setStorage('waitUntil', this.waitUntil);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.saveDevelopLoading = false;
|
|
|
+ this.developerModal = false;
|
|
|
+ }, 800)
|
|
|
+ },
|
|
|
//
|
|
|
getAdv() {
|
|
|
// 非会员广告接口
|
|
@@ -754,17 +802,41 @@
|
|
|
this.saveLoading = false;
|
|
|
// 获取设置
|
|
|
let closeType = this.$utils.getStorage('closeType');
|
|
|
- // let numType = this.$utils.getStorage('numType');
|
|
|
+ let pageMs = this.$utils.getStorage('pageMs');
|
|
|
let versionType = this.$utils.getStorage('versionType');
|
|
|
if(closeType){
|
|
|
this.closeType = closeType;
|
|
|
}
|
|
|
- // if(numType){
|
|
|
- // this.numType = numType;
|
|
|
- // }
|
|
|
+ if(pageMs){
|
|
|
+ this.pageMs = pageMs;
|
|
|
+ }
|
|
|
if(versionType){
|
|
|
this.versionType = versionType;
|
|
|
}
|
|
|
+ } 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(() => {
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
},
|