diff --git a/App.vue b/App.vue
index 336db1f..db2cbbd 100644
--- a/App.vue
+++ b/App.vue
@@ -53,11 +53,28 @@ export default {
uni.onPushMessage((res)=>{
console.log("收到推送消息:", res)
- uni.showModal({
+ uni.showModal({
title: res.data.title,
content: res.type,
showCancel: false
});
+
+ if(res.type === 'click' ){
+
+ }else{
+ uni.createPushMessage({
+ title: res.data.title,
+ content: res.data.content,
+ payload: res.data.payload,
+ delay: 1,
+ success: (res) => {
+ console.log("创建推送消息成功", res)
+ }
+ })
+ }
+
+
+
})
/** 设置语言 (此处为了方便demo切换语言,将其存到本地,实际需根据业务情况设置)*/
diff --git a/manifest.json b/manifest.json
index 1e19baf..dddff55 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "肝胆相照专家端",
"appid" : "__UNI__89F511F",
"description" : "",
- "versionName" : "1.0.0",
- "versionCode" : "100",
+ "versionName" : "4.1.5",
+ "versionCode" : 415,
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
@@ -59,7 +59,8 @@
"appid" : "wxbf3658f5e674667c",
"appsecret" : "c4505a04a9910c65efea8e11ffc93f92",
"UniversalLinks" : "https://doc.igandan.com/gdxzExpert/"
- }
+ },
+ "univerify" : {}
},
"payment" : {
"weixin" : {
diff --git a/pages.json b/pages.json
index ad92fae..59218c3 100644
--- a/pages.json
+++ b/pages.json
@@ -85,6 +85,13 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path" : "pages/univerify/univerify",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
}
],
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 25c6169..acbed7b 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -777,7 +777,6 @@ const switchPushPermissions = () => {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
-
}
.user-info-content {
@@ -785,6 +784,7 @@ const switchPushPermissions = () => {
flex-direction: column;
align-items: flex-start;
gap: 10rpx;
+ margin-left: 10rpx;
.username {
color: $white;
diff --git a/pages/univerify/univerify.vue b/pages/univerify/univerify.vue
new file mode 100644
index 0000000..9f85ac7
--- /dev/null
+++ b/pages/univerify/univerify.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_app/login/login.vue b/pages_app/login/login.vue
index 91491e0..a344d21 100644
--- a/pages_app/login/login.vue
+++ b/pages_app/login/login.vue
@@ -138,25 +138,6 @@
}
console.log('一键登录');
- uni.showLoading({
- title: '登录中2...'
- });
-
- // 模拟登录过程
- setTimeout(() => {
- uni.hideLoading();
- uni.showToast({
- title: '登录成功',
- icon: 'none'
- });
-
- // 跳转到首页
- setTimeout(() => {
- uni.switchTab({
- url: '/pages/index/index'
- });
- }, 1500);
- }, 2000);
};
// 短信验证码登录
@@ -342,6 +323,42 @@
// 页面加载
onLoad(() => {
console.log('登录页面加载完成');
+ // #ifdef APP
+
+ uni.getProvider({
+ service: 'oauth',
+ success: function (res) {
+ console.log(res.provider)// ['qq', 'univerify']
+ if(res.provider.indexOf('univerify') !== -1){
+ uni.preLogin({
+ provider: 'univerify',
+ success(){ //预登录成功
+ // 显示一键登录选项
+ uni.redirectTo({
+ url: '/pages/univerify/univerify'
+ });
+ },
+ fail(res){ // 预登录失败
+ // 不显示一键登录选项(或置灰)
+ // 根据错误信息判断失败原因,如有需要可将错误提交给统计服务器
+ console.log(res.errCode)
+ console.log(res.errMsg)
+ uni.redirectTo({
+ url: '/pages_app/smsLogin/smsLogin'
+ });
+ }
+ })
+ }else{
+ uni.redirectTo({
+ url: '/pages_app/smsLogin/smsLogin'
+ });
+ }
+ }
+ });
+
+
+
+ // #endif
});
// 页面显示
diff --git a/uniCloud-aliyun/cloudfunctions/oauthLogin/index.js b/uniCloud-aliyun/cloudfunctions/oauthLogin/index.js
new file mode 100644
index 0000000..937021a
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/oauthLogin/index.js
@@ -0,0 +1,8 @@
+'use strict';
+exports.main = async (event, context) => {
+ //event为客户端上传的参数
+ console.log('event : ', event)
+
+ //返回数据给客户端
+ return event
+};
diff --git a/uniCloud-aliyun/cloudfunctions/oauthLogin/package.json b/uniCloud-aliyun/cloudfunctions/oauthLogin/package.json
new file mode 100644
index 0000000..a755faf
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/oauthLogin/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "univerify",
+ "dependencies": {},
+ "extensions": {
+ "uni-cloud-verify": {}
+ }
+}
\ No newline at end of file
diff --git a/uniCloud-aliyun/cloudfunctions/testPush2/index.js b/uniCloud-aliyun/cloudfunctions/testPush2/index.js
index 8615351..7cce381 100644
--- a/uniCloud-aliyun/cloudfunctions/testPush2/index.js
+++ b/uniCloud-aliyun/cloudfunctions/testPush2/index.js
@@ -3,7 +3,7 @@
const uniPush = uniCloud.getPushManager({appId:"__UNI__89F511F"}) //注意这里需要传入你的应用appId
exports.main = async (event, context) => {
return await uniPush.sendMessage({
- "push_clientid": "a297ac02dc531b7d43ff539f3163efcb", //填写上一步在uni-app客户端获取到的客户端推送标识push_clientid
+ "push_clientid": "58614bcaadae8a6998d166a21e61772f", //填写上一步在uni-app客户端获取到的客户端推送标识push_clientid
"force_notification":true, //填写true,客户端就会对在线消息自动创建“通知栏消息”。
"title": "通知栏显示的标题",
"content": "通知栏显示的内容",
@@ -13,28 +13,6 @@ exports.main = async (event, context) => {
},
"payload": {
"text":"体验一下uni-push2.0"
- },
- "category": {
- //HarmonyOS NEXT系统(纯血鸿蒙、非安卓鸿蒙)的消息分类,要给鸿蒙设备推送时才必传
- "harmony":"MARKETING"
- },
- "options":{
- "HW": {
- // 值为int 类型。1 表示华为测试消息,华为每个应用每日可发送该测试消息500条。此 target_user_type 参数请勿发布至线上。
- "/message/android/target_user_type":1
- } ,
- "HO": {
- //值为int 类型。1 表示测试推送,不填默认为0。荣耀每个应用每日可发送该测试消息1000条。此测试参数请勿发布至线上。
- "/android/targetUserType": 1
- } ,
- "VV": {
- //值为int 类型。0 表示正式推送;1 表示测试推送,不填默认为0。此 pushMode 参数请勿发布至线上。
- "/pushMode":1
- } ,
- "XM": {
- //新小米消息分类下,私信公信id都必须要传,否则请求小米厂商接口会被拦截
- "/extra.channel_id": "填写小米平台申请的渠道id"
- }
- }
+ },
})
};
\ No newline at end of file
diff --git a/uniCloud-aliyun/cloudfunctions/univerify/index.js b/uniCloud-aliyun/cloudfunctions/univerify/index.js
new file mode 100644
index 0000000..937021a
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/univerify/index.js
@@ -0,0 +1,8 @@
+'use strict';
+exports.main = async (event, context) => {
+ //event为客户端上传的参数
+ console.log('event : ', event)
+
+ //返回数据给客户端
+ return event
+};
diff --git a/uniCloud-aliyun/cloudfunctions/univerify/package.json b/uniCloud-aliyun/cloudfunctions/univerify/package.json
new file mode 100644
index 0000000..a755faf
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/univerify/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "univerify",
+ "dependencies": {},
+ "extensions": {
+ "uni-cloud-verify": {}
+ }
+}
\ No newline at end of file