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

21

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