Skip to content

Commit

Permalink
【优化】根据最新的隐私政策,调整弹窗获取手机号码授权界面样式,默认不勾选同意的,同时获取授权按钮调整为灰色,并且增加用户取消授权的提醒。
Browse files Browse the repository at this point in the history
  • Loading branch information
jianweie committed Sep 12, 2023
1 parent 2c5be4f commit 8dc36ec
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 164 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
</view>
</view>
<view class="u-flex u-row-between u-padding-left-30 u-padding-right-30">
<u-button @click="closeAuth">暂不授权</u-button>
<!-- #ifdef MP-WEIXIN -->
<u-button type="success" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">确定授权</u-button>
<!-- #endif -->
<u-button @click="closeAuth">暂不授权</u-button>
<u-button type="success" :disabled="isDisabled" v-if="isDisabled">确定授权</u-button>
<u-button type="success" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-else>确定授权</u-button>
</view>
</view>
</view>
Expand All @@ -51,12 +50,15 @@
* @property {Boolean} forceOauth - 小程序端特制的全屏登录提示。
*/
import { mapMutations, mapActions, mapState } from 'vuex';
import { goods, articles, commonUse, tools } from '@/common/mixins/mixinsHelper.js'
export default {
mixins: [goods, articles, commonUse, tools],
name: 'coreshopLoginModal',
components: {},
data() {
return {
agreement: true
agreement: false,
isDisabled: true,
};
},
props: {
Expand Down Expand Up @@ -149,6 +151,12 @@
// 勾选版权协议
checkboxChange(e) {
this.agreement = e.value;
if (e.value == true) {
this.isDisabled = false;
} else {
this.isDisabled = true;
}
console.log(this.agreement);
},
// 隐藏登录弹窗
hideModal() {
Expand Down Expand Up @@ -213,9 +221,15 @@
data.invitecode = invitecode
}
_this.toGetPhoneNumber(data);
} else {
}
else if (e.mp.detail.errMsg == 'getPhoneNumber:fail user deny') {
_this.$u.toast('您已经取消了授权,将无法进行关键业务功能。');
}
else {
_this.$u.toast('如未授权,您可尝试使用手机号+短信验证码登录');
}
_this.agreement = false;
_this.isDisabled = true;
_this.showLogin = false;
},
//实际的去登陆
Expand Down
316 changes: 158 additions & 158 deletions CoreCms.Net.Uni-App/CoreShop/manifest.json
Original file line number Diff line number Diff line change
@@ -1,169 +1,169 @@
{
"name": "核心商城系统",
"appid": "__UNI__EAACF14",
"description": "核心商城系统(CoreShop)是基于uni-app框架开发的商城应用程序",
"versionName": "1.0",
"versionCode": 1,
"transformPx": false,
"app-plus": {
/* 5+App特有相关 */
"modules": {
"Payment": {},
"VideoPlayer": {}
},
/* 模块配置 */
"distribute": {
/* 应用发布信息 */
"android": {
/* android打包配置 */
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
"ios": {},
/* ios打包配置 */
"sdkConfigs": {
"payment": {
"weixin": {
"appid": "wxd56f71964a318e5d"
},
"alipay": {
"scheme": ""
}
"name" : "核心商城系统",
"appid" : "__UNI__EAACF14",
"description" : "核心商城系统(CoreShop)是基于uni-app框架开发的商城应用程序",
"versionName" : "1.0",
"versionCode" : 1,
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
"modules" : {
"Payment" : {},
"VideoPlayer" : {}
},
"ad": {},
"maps": {},
"oauth": {
"univerify": {}
}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
/* 模块配置 */
"distribute" : {
/* 应用发布信息 */
"android" : {
/* android打包配置 */
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
"ios" : {},
/* ios打包配置 */
"sdkConfigs" : {
"payment" : {
"weixin" : {
"appid" : "wxd56f71964a318e5d"
},
"alipay" : {
"scheme" : ""
}
},
"ad" : {},
"maps" : {},
"oauth" : {
"univerify" : {}
}
},
"icons" : {
"android" : {
"hdpi" : "",
"xhdpi" : "",
"xxhdpi" : "",
"xxxhdpi" : ""
},
"ios" : {
"appstore" : "",
"ipad" : {
"app" : "",
"app@2x" : "",
"notification" : "",
"notification@2x" : "",
"proapp@2x" : "",
"settings" : "",
"settings@2x" : "",
"spotlight" : "",
"spotlight@2x" : ""
},
"iphone" : {
"app@2x" : "",
"app@3x" : "",
"notification@2x" : "",
"notification@3x" : "",
"settings@2x" : "",
"settings@3x" : "",
"spotlight@2x" : "",
"spotlight@3x" : ""
}
}
}
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
"splashscreen" : {
"waiting" : true
}
}
},
"splashscreen": {
"waiting": true
}
},
/* SDK配置 */
"quickapp": {},
/* 快应用特有相关 */
"mp-weixin": {
"appid": "wx6fc139d4de0b470f",
"setting": {
"urlCheck": true,
"postcss": true,
"minified": true,
"es6": true,
"checkSiteMap": false
},
"permission": {
"scope.userFuzzyLocation": {
"desc": "你的位置信息将用于小程序定位"
}
},
"optimization": {
"subPackages": true
},
"requiredPrivateInfos": [ "getFuzzyLocation" ]
},
"h5": {
"title": "核心商城系统",
"domain": "https://h5.demo.coreshop.com.cn/",
"router": {
"base": "./",
"mode": "hash"
},
"template": "index.html",
"devServer": {
"port": 80,
"disableHostCheck": true,
"https": true
/* SDK配置 */
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
"appid" : "wx9ffab147a56e9424",
"setting" : {
"urlCheck" : true,
"postcss" : true,
"minified" : true,
"es6" : true,
"checkSiteMap" : false
},
"permission" : {
"scope.userFuzzyLocation" : {
"desc" : "你的位置信息将用于小程序定位"
}
},
"optimization" : {
"subPackages" : true
},
"requiredPrivateInfos" : [ "getFuzzyLocation" ]
},
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
"h5" : {
"title" : "核心商城系统",
"domain" : "https://h5.demo.coreshop.com.cn/",
"router" : {
"base" : "./",
"mode" : "hash"
},
"template" : "index.html",
"devServer" : {
"port" : 80,
"disableHostCheck" : true,
"https" : true
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
}
}
},
"optimization" : {
"treeShaking" : {
"enable" : false
}
}
}
},
"optimization": {
"treeShaking": {
"enable": false
}
}
},
"mp-toutiao": {
"setting": {
"es6": true,
"postcss": true,
"minified": true
"mp-toutiao" : {
"setting" : {
"es6" : true,
"postcss" : true,
"minified" : true
},
"appid" : ""
},
"appid": ""
},
"mp-qq": {
"setting": {
"es6": true,
"postcss": true,
"minified": true
"mp-qq" : {
"setting" : {
"es6" : true,
"postcss" : true,
"minified" : true
},
"optimization" : {
"subPackages" : true
}
},
"optimization": {
"subPackages": true
}
},
"mp-alipay": {},
"mp-baidu": {}
"mp-alipay" : {},
"mp-baidu" : {}
}

0 comments on commit 8dc36ec

Please sign in to comment.