diff --git a/App.vue b/App.vue index 367df18088a4d1ce06eb14ba4fc20c2e452d5fa8..180858f9e6d21f68e61864b0e22a358a5945e933 100644 --- a/App.vue +++ b/App.vue @@ -11,7 +11,11 @@ console.log('App Launch') initApp(); // #ifdef APP-PLUS - //checkIsAgree(); 暂时先用默认生成的,自定义的等待原生支持后实现。因为启动vue界面时已经,请求了部分权限这并不符合国家的法规 + //checkIsAgree(); APP端暂时先用原生默认生成的。目前,自定义方式启动vue界面时,原生层已经请求了部分权限这并不符合国家的法规 + // #endif + + // #ifdef H5 + checkIsAgree(); // #endif // #ifdef APP-PLUS diff --git a/changelog.md b/changelog.md index 922e9aec112728133f7d81f162088718831b6871..086df62492ccad9d191a6e28e53bf375599065e5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,5 @@ +## 1.0.20(2021-06-18) +1.H5端新增,强制要求用户同意隐私协议 2.兼容ios端自动设置打开下载页用户的剪切板为邀请者的inviteCode 3.成功注册用户,且请求体含邀请码inviteCode自动关联裂变关系 ## 1.0.19(2021-06-17) 1.新增获取邀请码接口getUserInviteCode 2.在邀请用户下载应用页面,自动设置被邀请用户的剪切板为邀请者的code(仅支持安卓端) 3.在注册或登陆并注册请求时自动添加剪切板中的请求参数 4.统一接口名称为驼峰法 ## 1.0.18(2021-06-15) diff --git a/package.json b/package.json index a2078b1b207a2b7b5d4d53fa8e6eda683e1a4061..858a88f9f434c4f29271364b180f8506fa20ece7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-starter", "displayName": "uni-starter", - "version": "1.0.19", + "version": "1.0.20", "description": "云端一体应用快速开发基本项目模版", "keywords": [ "uni-starter", diff --git a/pages/ucenter/invite/invite.vue b/pages/ucenter/invite/invite.vue index cf8f2bda0c94e40066e6946a7596f6436fabb9e3..0780f0a04450f590a1adb1bc19562310da564b27 100644 --- a/pages/ucenter/invite/invite.vue +++ b/pages/ucenter/invite/invite.vue @@ -1,95 +1,168 @@ - - - + if(this.isIos){ + window.location.href = this.downloadUrl.ios + }else{ + if(this.isWeixin){ + //显示浮层 + this.showMask = true + }else{ + window.location.href = this.downloadUrl.android + } + } + } + } + } + + \ No newline at end of file diff --git a/static/h5/download-app/adriod.png b/static/h5/download-app/android.png similarity index 100% rename from static/h5/download-app/adriod.png rename to static/h5/download-app/android.png diff --git a/static/h5/download-app/back.png b/static/h5/download-app/back.png deleted file mode 100755 index fb3faec87f62c00f653723105b6ff5ee3e97551a..0000000000000000000000000000000000000000 Binary files a/static/h5/download-app/back.png and /dev/null differ diff --git a/static/h5/download-app/apple.png b/static/h5/download-app/ios.png similarity index 100% rename from static/h5/download-app/apple.png rename to static/h5/download-app/ios.png diff --git a/uni-starter.config.js b/uni-starter.config.js index bec8335d3cdef32c0de2c139d4957b39926bc008..1519f3958a4b6e1dbb6fb18deac1b57232f20bf3 100644 --- a/uni-starter.config.js +++ b/uni-starter.config.js @@ -54,7 +54,13 @@ module.exports = { } ], //应用的链接,用于分享到第三方平台和生成关于我们页的二维码 - "download": "https://m3w.cn/uniapp" + "download": "https://m3w.cn/uniapp", + //version + "version":"1.0.0" //用于非app端显示,app端自动获取 + }, + "download":{ //用于生成二合一下载页面 + "ios":"https://itunes.apple.com/cn/app/hello-uni-app/id1417078253?mt=8", + "android":"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-97fca9f2-41f6-449f-a35e-3f135d4c3875/6d754387-a6c3-48ed-8ad2-e8f39b40fc01.apk" }, //用于打开应用市场评分界面 "marketId":{ diff --git a/uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js b/uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js index 45af2a6edb499707a4e9035a44136ce832740d23..88d4d52f109cd55ac2b70ae469a115c6a8efe5c3 100644 --- a/uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js +++ b/uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js @@ -21,7 +21,8 @@ exports.main = async (event, context) => { */ const { action, - uniIdToken + uniIdToken, + inviteCode } = event; const deviceInfo = event.deviceInfo || {}; let params = event.params || {}; @@ -71,7 +72,11 @@ exports.main = async (event, context) => { } //3.注册成功后创建新用户的积分表方法 - async function registerSuccess(uid) { + async function registerSuccess(uid) { + //用户接受邀请 + if(inviteCode){ + await uniID.acceptInvite({inviteCode,uid}); + } //添加当前用户设备信息 await db.collection('uni-id-device').add({ ...deviceInfo, @@ -154,7 +159,7 @@ exports.main = async (event, context) => { // console.log(res); break; case 'register': - var {username, password, nickname,inviteCode} = params + var {username, password, nickname} = params if (/^1\d{10}$/.test(username)) { return { code: 401, @@ -216,12 +221,7 @@ exports.main = async (event, context) => { res.needCaptcha = needCaptcha; break; case 'loginByWeixin': - var { - username, password, nickname - } = params - res = await uniID.loginByWeixin({ - ...params - }); + res = await uniID.loginByWeixin(params); await uniID.updateUser({ uid: res.uid, username: "微信用户" @@ -293,18 +293,6 @@ exports.main = async (event, context) => { res = await uniID.loginBySms(params) await loginLog(res) break; - case 'inviteLogin': - if (!params.code) { - return { - code: 500, - msg: '请填写验证码' - } - } - res = await uniID.loginBySms({ - ...params, - type: 'register' - }) - break; case 'resetPwdBySmsCode': if (!params.code) { return { @@ -343,10 +331,7 @@ exports.main = async (event, context) => { res = await uniID.getInvitedUser(params) break; case 'updatePwd': - res = await uniID.updatePwd({ - uid: params.uid, - ...params - }) + res = await uniID.updatePwd(params) break; case 'createCaptcha': res = await uniCaptcha.create(params) @@ -392,7 +377,7 @@ exports.main = async (event, context) => { const { userInfo } = await uniID.getUserInfo({ - uid: params.uid, + uid: params.uid }) if (userInfo.role.indexOf('admin') === -1 && params.role.indexOf('admin') > -1) { res = { diff --git a/uni_modules/uni-agree/pages/uni-agree/uni-agree.nvue b/uni_modules/uni-agree/pages/uni-agree/uni-agree.nvue index 5b6b928a28901e5f341b0d0dd96c427d0b33d187..e4a8d586ccf01c89853978833cce3d33d2e5ae67 100644 --- a/uni_modules/uni-agree/pages/uni-agree/uni-agree.nvue +++ b/uni_modules/uni-agree/pages/uni-agree/uni-agree.nvue @@ -69,7 +69,22 @@ import {about} from '@/uni-starter.config.js'; }, 100) }, disagree() { - plus.runtime.quit(); + // #ifdef APP-PLUS + plus.runtime.quit(); + // #endif + // #ifdef H5 + uni.showModal({ + content: '确定退出本应用?', + cancelText:"退出", + confirmText:"取消", + success: (e) => { + if(!e.confirm){ + window.location.href="about:blank"; + window.close(); + } + } + }); + // #endif } } }