提交 32c7e51a 编写于 作者: L linju

21

上级 8061d7b8
......@@ -206,17 +206,17 @@
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
// "condition": {
// "list": [
// {
// "path": "uni_modules/uni-login-page/pages/index/index"
// },
// {
// "path": "pages/test/test"
// }
// ],
// "current":0
// },
"condition": {
"list": [
{
"path": "uni_modules/uni-login-page/pages/index/index"
},
{
"path": "pages/test/test"
}
],
"current":1
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#007AFF",
......
<template>
<view>
test
<button type="default" @click="fn1">1</button>
<button type="default" @click="openMoblie">打开移动网络</button>
<!-- <button type="default" @click="fn1">1</button>
<button type="default" @click="fn2">2</button>
</view>
--> </view>
</template>
<script>
......@@ -14,9 +15,36 @@
}
},
onLoad() {
// 设备网络状态变化事件
uni.onNetworkStatusChange(function (res) {
console.log(res.isConnected);
console.log(res.networkType);
if(!res.isConnected){
uni.showModal({
content:"你未打开网络连接",
confirmText:"前往打开",
complete: (e) => {
console.log(e);
if (uni.getSystemInfoSync().platform == "ios") {
}else{
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var mIntent = new Intent('android.settings.DATA_ROAMING_SETTINGS');
main.startActivity(mIntent);
}
}
});
}
});
},
methods: {
openWifi(){
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var mIntent = new Intent('android.settings.WIFI_SETTINGS');
main.startActivity(mIntent);
},
fn1(){
let res = this.request('user-center/login_by_').then(e=>{
console.log('then--1',e);
......
{
"bsonType": "object",
"permission": {
"read": "!doc.is_reply",
"read": "doc.is_reply == false",
"create": true,
"update": false,
"delete": false
......@@ -17,9 +17,9 @@
"forceDefaultValue": {
"$env": "uid"
}
},
"title":{
"description": "反馈标题(用于列表展示)"
},
"title": {
"description": "反馈标题(用于列表展示)"
},
"ip": {
"forceDefaultValue": {
......
......@@ -38,7 +38,8 @@
</view>
</template>
<script>
<script>
const univerify_first = true
import mixin from '../../common/loginPage.mixin.js';
var currentPage;
export default {
......@@ -46,26 +47,31 @@
data() {
return {
phoneArea: ['+86'],
currenPhoneArea: '+86',
currenPhoneArea: '+86',
}
},
onLoad() {
//#ifdef APP-PLUS
let pages = getCurrentPages();
currentPage = pages[pages.length - 1];
currentPage.$getAppWebview().setStyle({
top:"1000px"
})
//#ifdef APP-PLUS
if(univerify_first){
let pages = getCurrentPages();
currentPage = pages[pages.length - 1];
currentPage.$getAppWebview().setStyle({
top:"1000px"
})
}
//#endif
},
onReady() {
this.$refs.uniQuickLogin.login('univerify')
//#ifdef APP-PLUS
setTimeout(() => {
currentPage.$getAppWebview().setStyle({
top:"0"
})
}, 1500);
if(univerify_first){
this.$refs.uniQuickLogin.login('univerify')
setTimeout(() => {
currentPage.$getAppWebview().setStyle({
top:"0"
})
}, 1500);
}
//#endif
},
computed: {
......
......@@ -59,11 +59,10 @@
mounted() {
//获取当前环境能用的快捷登陆方式
// #ifdef APP-PLUS
uni.showLoading();
uni.showLoading();
plus.oauth.getServices(oauthServices=>{
this.oauthServices = oauthServices
console.log(oauthServices);
uni.hideLoading()
},err=>{
uni.hideLoading()
uni.showModal({
......@@ -152,6 +151,7 @@
title: '登陆成功',
icon: 'none'
});
uni.hideLoading()
uni.navigateBack()
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册