diff --git a/common/appInit.js b/common/appInit.js index e4c8d06c555393dcc6e14a4a941daaf0e72dc9b0..4ab33a68d3fe5d329c73df7c7fdab49f1ca38ff4 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -4,31 +4,12 @@ import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version'; // #endif export default function() { - // 初始化appVersion(仅app生效) initAppVersion(); //自定义路由拦截 const {"router":{needLogin,login}} = baseappConfig //需要登陆的页面 - - // changeAction(["navigateTo", "redirectTo", "reLaunch", "switchTab"], { - // before_action: e => { - // let token = uni.getStorageSync('uni-id-token') - // let url = e.url.split('?')[0] - // if (needLogin.includes(url) && token == '') { - // console.log('该页面需要登陆,即将跳转到login页面'); - // uni.showToast({title:'该页面需要登陆,即将跳转到login页面',icon:'none'}) - // uni.navigateTo({ - // url:"/uni_modules/uni-login-page/pages/index/index" - // }) - // return false - // } - // return true - // } - // }) - //uni.addInterceptor的写法 - let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]; list.forEach(item=>{ uni.addInterceptor(item,{ @@ -76,35 +57,14 @@ export default function() { })// 移除拦截器API removeInterceptor('request') }) - //提示网络变化 eventListenerNetwork() - - /* 当某个权限调用失败 1.先检测手机的该模块是否打开 2.检测当前应用是否被授权了该模块对应的权限 提示,并点击跳转到设置 */ - // #ifndef H5 - // changeAction('chooseImage', { - // after_action: e => { - // console.log('changeAction', e); - // if(e.errCode === 11){ - // uni.showModal({ - // content: '无权限', - // confirmText:"前往设置", - // success(e) { - // if(e.confirm){ - // permision.gotoAppPermissionSetting() - // } - // } - // }); - // } - // } - // }) - // #endif } /** * // 初始化appVersion @@ -166,31 +126,4 @@ function eventListenerNetwork () { }); } }); -} - - -function changeAction(actions, {before_action,after_action}) { - if(typeof actions == 'string'){ - actions = [actions] - } - if (!before_action) { - before_action = () => true - } - actions.forEach(action=>{ - let old_action = uni[action] - uni[action] = e => { - if (before_action(e)) { - // console.log(after_action); - if (after_action) { - var compose = function(f, g) { - return function(x) { - return f(x,g(x)); - }; - }; - e.complete = compose(e.complete,after_action) - } - old_action(e) - } - } - }) } \ No newline at end of file diff --git a/pages.json b/pages.json index 79777c72fe160f47f1d2c8bb8995a355ed536d38..0ee9a9496f0c1a7c5c84d499df788dcaa96e8b9e 100644 --- a/pages.json +++ b/pages.json @@ -211,11 +211,7 @@ "condition": { "list": [ { - "path": "pages/list/list", - "style": { - "navigationStyle": "custom", - "enablePullDownRefresh": true - } + "path": "pages/list/list" }, { "path": "uni_modules/uni-login-page/pages/index/index" @@ -227,7 +223,7 @@ "path":"pages/ucenter/settings/settings" } ], - "current":0 + "current":1 }, "tabBar": { "color": "#7A7E83", diff --git a/template.h5.html b/template.h5.html index a9de5dbfba99b08e9696ad271ee49adb7238c8dd..49ab5da2420a933635a0ec12fccabf3be83b4d96 100644 --- a/template.h5.html +++ b/template.h5.html @@ -36,13 +36,13 @@ // document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px' // }) - setTimeout(()=>{ - document.querySelector('#gg').addEventListener('click',e=>{ - console.log(e); - alert(12) - window.location.href = "https://m3w.cn/uniapp" - }) - },1000) + // setTimeout(()=>{ + // document.querySelector('#gg').addEventListener('click',e=>{ + // console.log(e); + // alert(12) + // window.location.href = "https://m3w.cn/uniapp" + // }) + // },1000) @@ -54,8 +54,8 @@ -
下载app
+
@@ -142,5 +137,9 @@ } .login-text-sub { color: #8a8f8b; + } + .toRegister{ + margin-top: 80px; + width: 600rpx; } diff --git a/uni_modules/uni-login-page/pages/register/register.vue b/uni_modules/uni-login-page/pages/register/register.vue index 5802955d0ad5bc378e1fbae8e371411058968afe..4adc869e4afb59a4934ecc2b12785d88ff770055 100644 --- a/uni_modules/uni-login-page/pages/register/register.vue +++ b/uni_modules/uni-login-page/pages/register/register.vue @@ -1,17 +1,17 @@ -