diff --git a/App.vue b/App.vue
index db2944ae47643281169d288310b9bce2c0305172..71ce47c1705edf79418a82635df409aa663c50c6 100644
--- a/App.vue
+++ b/App.vue
@@ -5,36 +5,36 @@
globalData: {
searchText: '',
appVersion: {},
- config:{}
+ config: {}
},
onLaunch: function() {
console.log('App Launch')
initApp();
// #ifdef APP-PLUS
//checkIsAgree(); APP端暂时先用原生默认生成的。目前,自定义方式启动vue界面时,原生层已经请求了部分权限这并不符合国家的法规
- // #endif
-
- // #ifdef H5
- // checkIsAgree(); 默认不开启。目前全球,仅欧盟国家有网页端同意隐私权限的需要。如果需要
// #endif
-
+
+ // #ifdef H5
+ // checkIsAgree(); 默认不开启。目前全球,仅欧盟国家有网页端同意隐私权限的需要。如果需要
+ // #endif
+
// #ifdef APP-PLUS
- //idfa有需要的用户在应用首次启动时自己获取存储到storage中
- //https://ask.dcloud.net.cn/article/36107
- /*if(~plus.storage.getItem('idfa')){
- plus.device.getInfo({//需要勾选IDFA
- success:function(e){
- console.log('idfa = '+JSON.stringify(e.idfa));
- },
- fail:function(e){
- console.log('getDeviceInfo failed: '+JSON.stringify(e));
- }
- });
- }*/
+ //idfa有需要的用户在应用首次启动时自己获取存储到storage中
+ //https://ask.dcloud.net.cn/article/36107
+ /*if(~plus.storage.getItem('idfa')){
+ plus.device.getInfo({//需要勾选IDFA
+ success:function(e){
+ console.log('idfa = '+JSON.stringify(e.idfa));
+ },
+ fail:function(e){
+ console.log('getDeviceInfo failed: '+JSON.stringify(e));
+ }
+ });
+ }*/
// #endif
},
onShow: function() {
- console.log('App Show')
+ console.log('App Show')
},
onHide: function() {
console.log('App Hide')
@@ -44,4 +44,4 @@
+
diff --git a/README.md b/README.md
index 226a9857f5bf584b4f4c279664605d7e7994ca17..ca0852854e36be8d6d8dffdf7346ed7f04002ec5 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,9 @@ uni-starter + uniCloud admin,提供了用户端和管理端的基础模板,
"login": ["username","smsCode","univerify", "weixin", "apple"],
}
```
+*** 注意:首页需要强制登陆才能访问的场景
+- 这种情况不由路由控制。而是uni-starter的callFunction拦截器,根据响应体决定是否跳转到登陆页。
+- uni-starter框架不能将登陆页面设置为首页,否则由拦截器实现的路由管理将生效。
#### 2.登录配置详解
- 使用方式:在 `uni-starter.config.js`->`router`->`login`下完全列举你需要的登录方式。这里支持用[条件编译](https://uniapp.dcloud.io/platform?id=%e6%9d%a1%e4%bb%b6%e7%bc%96%e8%af%91)因此你可以配置在不同平台下拥有的登录方式。
diff --git a/changelog.md b/changelog.md
index 9056ff7b188cc619931a1d28a45d4e759a978b3e..a41ade25c3da93c664471603422dfeaaeacbf979 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,5 @@
+## 1.0.42(2021-07-29)
+新增绑定手机号码页面前端校验
## 1.0.41(2021-07-27)
1. 支持vue3.0
2. 去掉App.vue全局样式,避免与非flex布局的页面样式冲突
diff --git a/common/appInit.js b/common/appInit.js
index cbd76ca869297c61fca8dbc72d3e6ebf24c175df..1c8ee4d957f49230509386f0575d26843db2bb7b 100644
--- a/common/appInit.js
+++ b/common/appInit.js
@@ -298,7 +298,8 @@ export default async function() {
visitor,
login
}
- } = uniStarterConfig //需要登录的页面
+ } = uniStarterConfig //需要登录的页面
+
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
list.forEach(item => { //用遍历的方式分别为,uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器
uni.addInterceptor(item, {
@@ -310,7 +311,7 @@ export default async function() {
//获取要跳转的页面路径(url去掉"?"和"?"后的参数)
url = e.url.split('?')[0],
//获取要前往的页面路径(即url去掉"?"和"?"后的参数)
- pages = getCurrentPages(),
+ pages = getCurrentPages(),
fromUrl = pages[pages.length - 1].route;
@@ -341,7 +342,7 @@ export default async function() {
}
return url != item
})
- console.log({pass})
+ // console.log({pass})
}
if (visitor&&!inLoginPage) {
pass = visitor.some((item) => {
@@ -350,7 +351,7 @@ export default async function() {
}
return url == item
})
- console.log({pass})
+ // console.log({pass})
}
if (!pass && (token == '' || tokenExpired)) {
@@ -377,7 +378,8 @@ export default async function() {
}
}
})
- })
+ })
+
// #ifdef APP-PLUS
// 监听并提示设备网络状态变化
uni.onNetworkStatusChange(res => {
diff --git a/main.js b/main.js
index 02e10ad2d087f0cf87a9f671ab8f8da99032f8d2..bf6de880dd867760a2afd7bed38be8f2af3dfffe 100644
--- a/main.js
+++ b/main.js
@@ -1,21 +1,28 @@
-import App from './App'
-import store from './store'
+import App from './App'
+import store from './store'
-// #ifndef VUE3
-import Vue from 'vue'
-Vue.config.productionTip = false
-Vue.prototype.$store = store
-App.mpType = 'app'
-const app = new Vue({
- store,
- ...App
-})
-app.$mount()
-// #endif
+
+// #ifndef VUE3
+import Vue from 'vue'
+Vue.config.productionTip = false
+Vue.prototype.$store = store
+App.mpType = 'app'
+const app = new Vue({
+ store,
+ ...App
+})
+app.$mount()
+// #endif
-// #ifdef VUE3
-import { createApp } from 'vue'
-const app = createApp(App,{})
-app.use(store)
-app.mount('#app')
-// #endif
\ No newline at end of file
+
+// #ifdef VUE3
+import {
+ createSSRApp
+} from 'vue'
+
+export function createApp() {
+ const app = createSSRApp(App)
+ app.use(store)
+ return {app}
+}
+// #endif
diff --git a/package.json b/package.json
index a77a41710baa7644399605b10c35bda1e8d371ee..3a2f077f8bc34532a00dd15c472c97103496de26 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-starter",
"displayName": "uni-starter",
- "version": "1.0.41",
+ "version": "1.0.42",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"login",
diff --git a/pages.json b/pages.json
index 5664ca2a53b402b4717b579caa8b9e0ee649ba01..3f3c0e865c733f400e2825e195d6774047998c36 100644
--- a/pages.json
+++ b/pages.json
@@ -158,8 +158,8 @@
}
}, {
"path": "pages/ucenter/invite/invite",
- "style": {
- "navigationStyle":"custom",
+ "style": {
+ "navigationStyle": "custom",
"enablePullDownRefresh": false
}
diff --git a/pages/grid/grid.vue b/pages/grid/grid.vue
index 0f3f0f6f298c21d8ebd7dfa8ece463317e34e56d..7d65de92c3166e6c7adf3dd0ccd2eff446a77b33 100644
--- a/pages/grid/grid.vue
+++ b/pages/grid/grid.vue
@@ -2,21 +2,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -67,8 +72,7 @@
/**
* banner加载后触发的回调
*/
- load(data) {
-
+ onqueryload(data) {
},
changeSwiper(e) {
this.current = e.detail.current
@@ -90,21 +94,6 @@
});
}
// 其余业务处理
- },
- /**
- * banner数据过滤
- */
- bannerFormate(bannerList, loading) {
- if (loading) return [];
- if (bannerList.length > 0) return bannerList;
- // 无数据添加默认值
- let list = [{
- "_id": -1,
- "bannerfile": "/static/grid/empty.png",
- "open_url": "https://www.dcloud.io/",
- "title": "内容 A",
- }]
- return list;
}
}
}
@@ -176,7 +165,7 @@
padding: 15px 0;
}
- .swiper-image {
+ .banner-image {
width: 750rpx;
height: 400rpx;
}
diff --git a/pages/list/list.nvue b/pages/list/list.nvue
index 5cc6f3c0208880a86261d2b4ee7ea0aa5f95fbdb..e51fe8d14da4956934a286a08bc7027ee862a0f3 100644
--- a/pages/list/list.nvue
+++ b/pages/list/list.nvue
@@ -8,7 +8,6 @@
-
diff --git a/pages/ucenter/ucenter.vue b/pages/ucenter/ucenter.vue
index f6114a7ed6894c88c6e8c386b14d95e73ed29a2a..0fd27f8af6cb51f50fe8d1fd051808f67643261a 100644
--- a/pages/ucenter/ucenter.vue
+++ b/pages/ucenter/ucenter.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue b/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
index c3975ce6c8a3ef3e1a9caff3f3c8e264f2225c12..2813bb15c89ee780aa4b999866dcbf6ec1aa7894 100644
--- a/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
+++ b/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
@@ -9,7 +9,7 @@
-
+