Ver Fonte

权限管理问题

shish há 2 meses atrás
pai
commit
4a48d3a105

+ 27 - 20
ghsApp/src/admin/home/login.vue

@@ -83,6 +83,19 @@
 						<text class="login-tip-line">使用本机号码快速登录销花宝</text>
 					</view>
 					<button class="login-btn login-btn--primary" @click="mobileLogin">本机号码一键登录</button>
+					<view class="login-agreement">
+						<checkbox-group @change="agreeItem">
+							<label class="login-agreement-label">
+								<checkbox value="1" class="login-checkbox" :checked="agree == 1" />
+								<text class="login-agreement-text">
+									我已阅读并同意
+									<text class="login-agreement-link" @click.stop="goToService">《服务协议》</text>
+									和
+									<text class="login-agreement-link" @click.stop="goToPrivacy">《隐私政策》</text>
+								</text>
+							</label>
+						</checkbox-group>
+					</view>
 				</view>
 				<!-- #endif -->
 
@@ -207,22 +220,15 @@ export default {
 		checkAgreement(callback){
 			let that = this
 			if(this.agree == 0){
-				uni.showModal({
-					title: '提示',
-					content: '请阅读并同意服务协议和隐私政策',
-					confirmText: '同意',
-					cancelText: '不同意',
-					success(res) {
-						if (res.confirm) {
-							that.agree = 1
-							that.$forceUpdate()
-							if(callback && typeof callback === 'function'){
-								callback()
-							}
-						} else if (res.cancel) {
-							// 用户选择不同意,不执行任何操作
-							console.log('用户选择不同意')
-						}
+				this.$util.confirmModal({
+					content: '登录前请阅读并同意服务协议和隐私政策',
+					okText: '同意',
+					cancelText: '不同意'
+				}, () => {
+					that.agree = 1
+					that.$forceUpdate()
+					if(callback && typeof callback === 'function'){
+						callback()
 					}
 				})
 				return false
@@ -310,7 +316,7 @@ export default {
 		},
 		mobileLogin(){
 			let that = this
-
+			this.checkAgreement(function(){
 			uni.showLoading({mask:true})
 			uni.preLogin({
 				provider: 'univerify',
@@ -384,10 +390,11 @@ export default {
 					} else {
 						uni.showToast({title: '登录失败...', duration: 3000, icon:'none'})
 					}
-					console.log(res)
-				}
+				console.log(res)
+			}
+		})
 			})
-		},
+	},
 		loginFun(){
 			let that = this
 			let mobile = this.mobile

+ 1 - 1
ghsApp/src/androidPrivacy.json

@@ -1,6 +1,6 @@
 {
     "version" : "1",
-    "prompt" : "template",
+    "prompt" : "none",
     "title" : "服务协议和隐私政策",
     "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"http://www.wixhb.com/main/xhb-register\">《服务协议》</a>和<a href=\"http://www.wixhb.com/main/xhb-privacy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
     "buttonAccept" : "同意并接受",

+ 2 - 2
ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "鲜花批发销售管理系统",
-    "versionName" : "1.2.97",
-    "versionCode" : 1297,
+    "versionName" : "1.2.98",
+    "versionCode" : 1298,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 24 - 17
hdApp/src/admin/home/login.vue

@@ -73,6 +73,19 @@
 						<text class="login-tip-line">使用本机号码快速登录花掌柜</text>
 					</view>
 					<button class="login-btn login-btn--primary" @click="mobileLogin">本机号码一键登录</button>
+					<view class="login-agreement">
+						<checkbox-group @change="agreeItem">
+							<label class="login-agreement-label">
+								<checkbox value="1" class="login-checkbox" :checked="agree == 1" />
+								<text class="login-agreement-text">
+									我已阅读并同意
+									<text class="login-agreement-link" @click.stop="goToService">《服务协议》</text>
+									和
+									<text class="login-agreement-link" @click.stop="goToPrivacy">《隐私政策》</text>
+								</text>
+							</label>
+						</checkbox-group>
+					</view>
 				</view>
 				<!-- #endif -->
 
@@ -197,22 +210,15 @@ export default {
 		checkAgreement(callback){
 			let that = this
 			if(this.agree == 0){
-				uni.showModal({
-					title: '提示',
-					content: '请阅读并同意服务协议和隐私政策',
-					confirmText: '同意',
-					cancelText: '不同意',
-					success(res) {
-						if (res.confirm) {
-							that.agree = 1
-							that.$forceUpdate()
-							if(callback && typeof callback === 'function'){
-								callback()
-							}
-						} else if (res.cancel) {
-							// 用户选择不同意,不执行任何操作
-							console.log('用户选择不同意')
-						}
+				this.$util.confirmModal({
+					content: '登录前请阅读并同意服务协议和隐私政策',
+					okText: '同意',
+					cancelText: '不同意'
+				}, () => {
+					that.agree = 1
+					that.$forceUpdate()
+					if(callback && typeof callback === 'function'){
+						callback()
 					}
 				})
 				return false
@@ -327,7 +333,7 @@ export default {
 	},
 	mobileLogin(){
 		let that = this
-
+		this.checkAgreement(function(){
 		uni.showLoading({mask:true})
 		uni.preLogin({
 			provider: 'univerify',
@@ -418,6 +424,7 @@ export default {
 				console.log(res)
 			}
 		})
+		})
 	},
 		loginFun(){
 			let that = this

+ 1 - 1
hdApp/src/androidPrivacy.json

@@ -1,6 +1,6 @@
 {
     "version" : "1",
-    "prompt" : "template",
+    "prompt" : "none",
     "title" : "服务协议和隐私政策",
     "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"http://www.wixhb.com/main/hzg-register\">《服务协议》</a>和<a href=\"http://www.wixhb.com/main/hzg-privacy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
     "buttonAccept" : "同意并接受",

+ 2 - 2
开发http/ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "鲜花批发销售管理系统",
-    "versionName" : "1.2.97",
-    "versionCode" : 1297,
+    "versionName" : "1.2.98",
+    "versionCode" : 1298,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
开发https/ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "鲜花批发销售管理系统",
-    "versionName" : "1.2.97",
-    "versionCode" : 1297,
+    "versionName" : "1.2.98",
+    "versionCode" : 1298,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
线上/ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "鲜花批发销售管理系统",
-    "versionName" : "1.2.97",
-    "versionCode" : 1297,
+    "versionName" : "1.2.98",
+    "versionCode" : 1298,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {