From 1d05c2d08a2e12d16bc64257d3e9dd6128f9d961 Mon Sep 17 00:00:00 2001 From: zouyanyan <254651820@qq.com> Date: Fri, 17 Jul 2026 15:49:06 +0800 Subject: [PATCH] upbug --- App.vue | 150 +++++++++++++++++++++++++-------------- im.scss | 122 +++++++++++++++---------------- manifest.json | 141 ++++++++++++++++++++++++++++++++++-- pages/login/login.vue | 7 ++ pages/login/register.vue | 7 ++ 5 files changed, 306 insertions(+), 121 deletions(-) diff --git a/App.vue b/App.vue index 053cf56..9399570 100644 --- a/App.vue +++ b/App.vue @@ -29,63 +29,105 @@ onLaunch() { // 判断版本更新 需要真机进行测试 //checkupdate(); - + + // 极光推送start------------------------------ //#ifdef APP-PLUS // 消息推送 - // jpushModule.setLoggerEnable(true); - // jpushModule.initJPushService() - // jpushModule.addConnectEventListener(result=>{ - // let connectEnable = result.connectEnable - // console.log("jpush连接", connectEnable) - // }); - - // 设置别名 (再登录时候设置) - // var user= JSON.parse(uni.getStorageSync("user")); - // if(user&&user.yhdm){ - // jpushModule.setAlias({ - // 'alias': user.yhdm, - // 'sequence': 1 - // }) - // } - - // jpushModule.addTagAliasListener(result => { - // let code = result.code - // let sequence = result.sequence - // let tags = result.tags - // let tag = result.tag - // let tagEnable = result.tagEnable - // let alias = result.alias - // console.log(alias, '别名') - // }); - - // // 通知事件回调 - // jpushModule.addNotificationListener(result => { - // let notificationEventType = result.notificationEventType - // let messageID = result.messageID - // let title = result.title - // let content = result.content - // let extras = result.extras - // console.log("通知", result) - // // 点击事件 - // if (notificationEventType == 'notificationOpened') { - // uni.reLaunch({ - // url: `/pages/message/newMsg` - // }); - // } - // }) - // jpushModule.getRegistrationID(result => { - // console.log("注册ID", result.registerID) - // if (result.registerID) { - // uni.setStorageSync("register_id", result.registerID) - // } - // }) - // jpushModule.addCustomMessageListener(result => { - // let messageID = result.messageID - // let content = result.content - // let extras = result.extras - // console.log("自定义消息", result) - // }) + jpushModule.setLoggerEnable(true); + jpushModule.initJPushService() + jpushModule.addConnectEventListener(result=>{ + let connectEnable = result.connectEnable + console.log("jpush连接", connectEnable) + }); + + jpushModule.addTagAliasListener(result => { + let code = result.code + let sequence = result.sequence + let tags = result.tags + let tag = result.tag + let tagEnable = result.tagEnable + let alias = result.alias + console.log(alias, '别名') + }); + + // 通知事件回调 + jpushModule.addNotificationListener(result => { + let notificationEventType = result.notificationEventType + let messageID = result.messageID + let title = result.title + let content = result.content + let extras = result.extras + console.log("消息通知", result); + console.log("消息通知extras", extras) + // 点击事件 + if(extras && extras.type && extras.type == 'bookCourses') { + var bookId=extras.bookId?extras.bookId:''; + if(bookId){ + // 预约课程详情 + uni.reLaunch({ + url: `/pages/book/bookinfo?id=${bookId}` + }); + } + else{ + // 预约课程列表 + uni.reLaunch({ + url: `/pages/book/booklist` + }); + } + } + if(extras && extras.type && extras.type == 'groupMessage') { + // 群聊消息 + // var pagePath=extras.pagePath; + // var groupId=extras.groupId; + // if(pagePath&&groupId){ + // uni.reLaunch({ + // url: `${pagePath}?chatIdx=${groupId}` + // }); + // } + // else{ + // uni.reLaunch({ + // url: `/pages/chatbox/chat` + // }); + // } + + uni.reLaunch({ + url: `/pages/chatbox/chat` + }); + } + if(extras && extras.type && extras.type == 'privateMessage') { + // 私信消息 + // var pagePath=extras.pagePath; + // var senderId=extras.senderId; + // if(pagePath&&senderId){ + // uni.reLaunch({ + // url: `${pagePath}?chatIdx=${senderId}` + // }); + // } + // else{ + // uni.reLaunch({ + // url: `/pages/chatbox/chat` + // }); + // } + uni.reLaunch({ + url: `/pages/chatbox/chat` + }); + } + }) + jpushModule.getRegistrationID(result => { + console.log("注册ID", result.registerID) + if (result.registerID) { + uni.setStorageSync("register_id", result.registerID) + } + }) + jpushModule.addCustomMessageListener(result => { + let messageID = result.messageID + let content = result.content + let extras = result.extras + console.log("自定义消息", result) + }) + //#endif + // 极光推送end-------------- var user = myCache('user'); this.userId = user.userid? user.userid:''; diff --git a/im.scss b/im.scss index e5aefe7..bbed8ea 100644 --- a/im.scss +++ b/im.scss @@ -1,77 +1,77 @@ /** 原生button样式 **/ uni-button { - font-size: $im-font-size !important; + font-size: $im-font-size; } uni-button[type='primary'] { - color: #fff !important; - background-color: $im-color-primary !important; + color: #fff ; + background-color: $im-color-primary ; } uni-button[type='primary'][plain] { - color: $im-color-primary !important; + color: $im-color-primary ; border: 1px solid $im-color-primary; background-color: transparent; } uni-button[type='warn'] { - color: #fff !important; - background-color: $im-color-danger !important; + color: #fff ; + background-color: $im-color-danger ; } uni-button[type='warn'][plain] { - color: $im-color-danger !important; - border: 1px solid $im-color-danger !important; - background-color: transparent !important; + color: $im-color-danger ; + border: 1px solid $im-color-danger ; + background-color: transparent ; } uni-button[size='mini'] { - font-size: $im-font-size-smaller !important; + font-size: $im-font-size-smaller ; } // #ifdef MP-WEIXIN // wx小程序只有button,没有uni-botton button { - font-size: $im-font-size !important; + font-size: $im-font-size ; } button[type='primary'] { - color: #fff !important; - background-color: $im-color-primary !important; + color: #fff ; + background-color: $im-color-primary ; } button[type='primary'][plain] { - color: $im-color-primary !important; + color: $im-color-primary ; border: 1px solid $im-color-primary; background-color: transparent; } button[type='warn'] { - color: #fff !important; - background-color: $im-color-danger !important; + color: #fff ; + background-color: $im-color-danger ; } button[type='warn'][plain] { - color: $im-color-danger !important; - border: 1px solid $im-color-danger !important; - background-color: transparent !important; + color: $im-color-danger ; + border: 1px solid $im-color-danger ; + background-color: transparent ; } button[size='mini'] { - font-size: $im-font-size-smaller !important; + font-size: $im-font-size-smaller ; } // #endif .button-hover[type='primary'] { - color: #fff !important; - background-color: $im-color-primary-dark-1 !important; + color: #fff ; + background-color: $im-color-primary-dark-1 ; } /** uni-ui input激活后边框、图标颜色 **/ .uni-easyinput__content.is-focused:not(.is-input-error-border) { - border-color: $im-color-primary-light-2 !important; + border-color: $im-color-primary-light-2 ; .content-clear-icon { - color: $im-color-primary-light-2 !important; + color: $im-color-primary-light-2 ; } } @@ -85,91 +85,91 @@ button[size='mini'] { } .segmented-control { - border-color: $im-color-primary !important; + border-color: $im-color-primary ; .segmented-control__item--button { - border-color: $im-color-primary !important; + border-color: $im-color-primary ; } .segmented-control__item--button--active { - background-color: $im-color-primary !important; + background-color: $im-color-primary ; .segmented-control__text{ - color: #fff !important; + color: #fff ; } } .segmented-control__text{ - color: $im-color-primary !important; + color: $im-color-primary ; } } .uni-radio-input svg{ - border-color: white !important; - background-color: $im-color-primary !important; + border-color: white ; + background-color: $im-color-primary ; } .uni-radio-input svg { - background-color: $im-color-primary !important; - border-color: $im-color-primary !important; - background-clip: content-box !important; + background-color: $im-color-primary ; + border-color: $im-color-primary ; + background-clip: content-box ; box-sizing: border-box; border-radius: 50%; - transform: translate(-50%, -50%) scale(0.7)!important; + transform: translate(-50%, -50%) scale(0.7); } .uni-radio-input svg path{ - fill: $im-color-primary !important; + fill: $im-color-primary ; } .uni-radio-input { - background-color: white !important; - border-color: $im-color-primary !important; + background-color: white ; + border-color: $im-color-primary ; } .uni-radio-input-disabled { - background-color: rgb(225, 225, 225) !important; - border-color: rgb(209, 209, 209) !important; + background-color: rgb(225, 225, 225) ; + border-color: rgb(209, 209, 209) ; opacity: 0.5; } .uni-section__content-title { - font-size: $im-font-size !important; + font-size: $im-font-size ; color: $im-text-color-light; } .uni-forms-item__label { color: $im-text-color; - font-size: $im-font-size !important; + font-size: $im-font-size ; } .uni-forms-item { - //margin-bottom: 8px !important; + //margin-bottom: 8px ; } .uni-easyinput__content-input { - font-size: $im-font-size !important; + font-size: $im-font-size ; } .uni-easyinput__placeholder-class { color: $im-text-color-lighter; - font-size: $im-font-size !important;; + font-size: $im-font-size ;; } .uni-easyinput__content-textarea { - font-size: $im-font-size !important;; + font-size: $im-font-size ;; } .uni-input-input:disabled { color: $im-text-color-light; } .uni-forms-item.is-direction-top .uni-forms-item__label { - padding: 0 !important; + padding: 0 ; } .uni-data-checklist .checklist-group .checklist-box .checklist-content .checklist-text { - font-size: $im-font-size !important; + font-size: $im-font-size ; } .uni-card .uni-card__content { - color: unset !important; - padding: 10px 0 !important; + color: unset ; + padding: 10px 0 ; } .uni-tag-text--small{ - font-size: 10px !important; - font-weight: bolder !important; + font-size: 10px ; + font-weight: bolder ; } .nav-bar { @@ -199,19 +199,19 @@ button[size='mini'] { } .emoji-large { - width: 64rpx !important; - height: 64rpx !important; - vertical-align: bottom !important; + width: 64rpx ; + height: 64rpx ; + vertical-align: bottom ; } .emoji-normal { - width: 54rpx !important; - height: 54rpx !important; - vertical-align: bottom !important; + width: 54rpx ; + height: 54rpx ; + vertical-align: bottom ; } .emoji-small { - width: 36rpx !important; - height: 36rpx !important; - vertical-align: bottom !important; + width: 36rpx ; + height: 36rpx ; + vertical-align: bottom ; } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 74c9da0..56aa4b1 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "瑜伽汇", "appid" : "__UNI__B6E0086", "description" : "瑜伽汇", - "versionName" : "1.0.18", - "versionCode" : 1018, + "versionName" : "1.0.19", + "versionCode" : 1019, "transformPx" : false, "app-plus" : { "flexible" : true, @@ -152,14 +152,143 @@ } }, "nativePlugins" : { + "JG-JPush" : { + "JPUSH_ADVERTISINGID_IOS" : "", + "JPUSH_DEFAULTINITJPUSH_IOS" : "", + "JPUSH_GOOGLE_API_KEY" : "", + "JPUSH_GOOGLE_APP_ID" : "", + "JPUSH_GOOGLE_PROJECT_ID" : "", + "JPUSH_GOOGLE_PROJECT_NUMBER" : "", + "JPUSH_GOOGLE_STORAGE_BUCKET" : "", + "JPUSH_HONOR_APPID" : "", + "JPUSH_HUAWEI_APPID" : "", + "JPUSH_ISPRODUCTION_IOS" : "", + "JPUSH_MEIZU_APPID" : "", + "JPUSH_MEIZU_APPKEY" : "", + "JPUSH_OPPO_APPID" : "", + "JPUSH_OPPO_APPKEY" : "", + "JPUSH_OPPO_APPSECRET" : "", + "JPUSH_VIVO_APPID" : "", + "JPUSH_VIVO_APPKEY" : "", + "JPUSH_XIAOMI_APPID" : "", + "JPUSH_XIAOMI_APPKEY" : "", + "__plugin_info__" : { + "name" : "瑜伽汇", + "description" : "瑜伽汇", + "platforms" : "Android,iOS", + "url" : "https://ext.dcloud.net.cn/plugin?id=4035", + "android_package_name" : "com.sdlyoga.app", + "ios_bundle_id" : "", + "isCloud" : true, + "bought" : 1, + "pid" : "4035", + "parameters" : { + "JPUSH_ADVERTISINGID_IOS" : { + "des" : "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填", + "key" : "JPush:ADVERTISINGID", + "value" : "" + }, + "JPUSH_DEFAULTINITJPUSH_IOS" : { + "des" : "[iOS]是否默认初始化,是填true,不是填false或者不填", + "key" : "JPush:DEFAULTINITJPUSH", + "value" : "" + }, + "JPUSH_GOOGLE_API_KEY" : { + "des" : "厂商google api_key,示例:g-12346578", + "key" : "google_api_key", + "value" : "" + }, + "JPUSH_GOOGLE_APP_ID" : { + "des" : "厂商google mobilesdk_app_id,示例:g-12346578", + "key" : "google_app_id", + "value" : "" + }, + "JPUSH_GOOGLE_PROJECT_ID" : { + "des" : "厂商google project_id ,示例:g-12346578", + "key" : "project_id", + "value" : "" + }, + "JPUSH_GOOGLE_PROJECT_NUMBER" : { + "des" : "厂商google project_number,示例:g-12346578", + "key" : "gcm_defaultSenderId", + "value" : "" + }, + "JPUSH_GOOGLE_STORAGE_BUCKET" : { + "des" : "厂商google storage_bucket,示例:g-12346578", + "key" : "google_storage_bucket", + "value" : "" + }, + "JPUSH_HONOR_APPID" : { + "des" : "厂商HONOR-appId,示例:12346578", + "key" : "com.hihonor.push.app_id", + "value" : "" + }, + "JPUSH_HUAWEI_APPID" : { + "des" : "厂商HUAWEI-appId,示例:appid=12346578", + "key" : "com.huawei.hms.client.appid", + "value" : "" + }, + "JPUSH_ISPRODUCTION_IOS" : { + "des" : "[iOS]是否是生产环境,是填true,不是填false或者不填", + "key" : "JPush:ISPRODUCTION", + "value" : "" + }, + "JPUSH_MEIZU_APPID" : { + "des" : "厂商MEIZU-appId,示例:MZ-12345678", + "key" : "MEIZU_APPID", + "value" : "" + }, + "JPUSH_MEIZU_APPKEY" : { + "des" : "厂商MEIZU-appKey,示例:MZ-12345678", + "key" : "MEIZU_APPKEY", + "value" : "" + }, + "JPUSH_OPPO_APPID" : { + "des" : "厂商OPPO-appId,示例:OP-12345678", + "key" : "OPPO_APPID", + "value" : "" + }, + "JPUSH_OPPO_APPKEY" : { + "des" : "厂商OPPO-appkey,示例:OP-12345678", + "key" : "OPPO_APPKEY", + "value" : "" + }, + "JPUSH_OPPO_APPSECRET" : { + "des" : "厂商OPPO-appSecret,示例:OP-12345678", + "key" : "OPPO_APPSECRET", + "value" : "" + }, + "JPUSH_VIVO_APPID" : { + "des" : "厂商VIVO-appId,示例:12345678", + "key" : "com.vivo.push.app_id", + "value" : "" + }, + "JPUSH_VIVO_APPKEY" : { + "des" : "厂商VIVO-appkey,示例:12345678", + "key" : "com.vivo.push.api_key", + "value" : "" + }, + "JPUSH_XIAOMI_APPID" : { + "des" : "厂商XIAOMI-appId,示例:MI-12345678", + "key" : "XIAOMI_APPID", + "value" : "" + }, + "JPUSH_XIAOMI_APPKEY" : { + "des" : "厂商XIAOMI-appKey,示例:MI-12345678", + "key" : "XIAOMI_APPKEY", + "value" : "" + } + } + } + }, "JG-JCore" : { "JPUSH_APPKEY_ANDROID" : "d5edb270e4b1cc29616e1dd5", "JPUSH_APPKEY_IOS" : "d5edb270e4b1cc29616e1dd5", - "JPUSH_CHANNEL_ANDROID" : "d5edb270e4b1cc29616e1dd5", - "JPUSH_CHANNEL_IOS" : "developer-default", + "JPUSH_CHANNEL_ANDROID" : "", + "JPUSH_CHANNEL_IOS" : "", "__plugin_info__" : { - "name" : "极光推送 JCore 官方 SDK", - "description" : "极光推送 JCore 官方 SDK HBuilder 插件版本", + "name" : "瑜伽汇", + "description" : "瑜伽汇", "platforms" : "Android,iOS", "url" : "https://ext.dcloud.net.cn/plugin?id=4028", "android_package_name" : "com.sdlyoga.app", diff --git a/pages/login/login.vue b/pages/login/login.vue index 69d188b..9eff6cf 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -299,10 +299,17 @@ }); return false; } + + if(uni.getStorageSync("register_id")){ + this.form.registerId=uni.getStorageSync("register_id"); + this.$forceUpdate(); + } + uni.setStorageSync('iftoken', "1"); uni.showLoading({ title: '正在登录...' }); + const {data: res} = await uni.$http.post('/api/login',this.form); if(res&&res.code=="200"){ uni.setStorageSync("loginindex", "1"); diff --git a/pages/login/register.vue b/pages/login/register.vue index 37b1b71..a061c15 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -55,6 +55,7 @@ passwordSecond:"", password:"", code:"", + registerId:"", uuid:"" }, iflogin:false, @@ -228,6 +229,12 @@ }); return false; } + + if(uni.getStorageSync("register_id")){ + this.form.registerId=uni.getStorageSync("register_id"); + this.$forceUpdate(); + } + uni.showLoading({ title: '正在注册...' });