Commit c2b175b47e9b6a9ed9b8d2ffa828828f093e5762

Authored by tianwu
1 parent d5ff7056

样式调整

project-wl-kuaidiyuan-uniapp-vue3/src/composable/jpush.js
@@ -2,19 +2,15 @@ import { updateJpush } from '@/api/jpush' @@ -2,19 +2,15 @@ import { updateJpush } from '@/api/jpush'
2 import { platform } from '@/config/index' 2 import { platform } from '@/config/index'
3 import { ref, reactive, onMounted } from 'vue'; 3 import { ref, reactive, onMounted } from 'vue';
4 export function useJPush() { 4 export function useJPush() {
  5 + //饮用JPush
5 const JPushModule = uni.requireNativePlugin('JG-JPush') 6 const JPushModule = uni.requireNativePlugin('JG-JPush')
6 console.log('jpushModule', JPushModule) 7 console.log('jpushModule', JPushModule)
7 const isRegistrationPushed = ref(false) 8 const isRegistrationPushed = ref(false)
8 const registerID = ref(null) 9 const registerID = ref(null)
9 - const startUploadJpush = () => {  
10 - if (registerID.value) {  
11 - console.log(`推送注册成功222222${registerID.value}`)  
12 - isRegistrationPushed.value = true  
13 -  
14 - console.log(222222, registerID.value)  
15 - // JPushModule.initJPushService()  
16 - // 监听通知点击事件 - 这是关键  
17 - JPushModule.addNotificationListener(result => { 10 +
  11 + const eventRegister = () => {
  12 + if(JPushModule) {
  13 + JPushModule.addNotificationListener(result => {
18 console.log('通知事件回调:', result) 14 console.log('通知事件回调:', result)
19 15
20 // 判断事件类型 16 // 判断事件类型
@@ -44,7 +40,19 @@ export function useJPush() { @@ -44,7 +40,19 @@ export function useJPush() {
44 JPushModule.addLocalNotificationListener(result => { 40 JPushModule.addLocalNotificationListener(result => {
45 console.log('本地通知被点击:', result) 41 console.log('本地通知被点击:', result)
46 }) 42 })
  43 + }
  44 + }
  45 +
  46 +
  47 + const startUploadJpush = () => {
  48 + if (registerID.value) {
  49 + console.log(`推送注册成功222222${registerID.value}`)
  50 + isRegistrationPushed.value = true
47 51
  52 + // JPushModule.initJPushService()
  53 + // 监听通知点击事件 - 这是关键
  54 + eventRegister()
  55 +
48 updateJpush({ registrationId: registerID.value, platform: platform() }) 56 updateJpush({ registrationId: registerID.value, platform: platform() })
49 .then(() => { 57 .then(() => {
50 console.warn('推送注册成功') 58 console.warn('推送注册成功')
project-wl-kuaidiyuan-uniapp-vue3/src/pages/login/index.scss
@@ -64,6 +64,12 @@ uni-page-head, @@ -64,6 +64,12 @@ uni-page-head,
64 font-size: 32rpx; 64 font-size: 32rpx;
65 } 65 }
66 } 66 }
  67 + ::v-deep .is-input-border.is-focused {
  68 + border-bottom-color: var(--essential-color-red)!important;
  69 + .content-clear-icon {
  70 + color: rgb(192, 196, 204)!important;
  71 + }
  72 + }
67 ::v-deep .is-input-error-border { 73 ::v-deep .is-input-error-border {
68 border-bottom: 1px solid var(--essential-color-red); 74 border-bottom: 1px solid var(--essential-color-red);
69 margin-bottom: 44rpx; 75 margin-bottom: 44rpx;
project-wl-kuaidiyuan-uniapp-vue3/src/pages/login/user.vue
@@ -13,10 +13,10 @@ @@ -13,10 +13,10 @@
13 <!-- 登录表单 --> 13 <!-- 登录表单 -->
14 <view class="loginMain"> 14 <view class="loginMain">
15 <uni-forms ref="customForm" :rules="customRules" :modelValue="fromInfo"> 15 <uni-forms ref="customForm" :rules="customRules" :modelValue="fromInfo">
16 - <uni-forms-item name="account"><uni-easyinput class="item" v-model="fromInfo.account" placeholder="请输入账号" /></uni-forms-item> 16 + <uni-forms-item name="account"><uni-easyinput class="item" v-model="fromInfo.account" placeholder="请输入账号" /></uni-forms-item>
17 <uni-forms-item name="password" class="pwdBox"> 17 <uni-forms-item name="password" class="pwdBox">
18 <uni-easyinput class="item" type="password" v-model="fromInfo.password" placeholder="请输入密码" /> 18 <uni-easyinput class="item" type="password" v-model="fromInfo.password" placeholder="请输入密码" />
19 - <text class="clearIcon" v-if="fromInfo.password.length > 0" @click="handlePwd"></text> 19 + <!-- <text class="clearIcon" v-if="fromInfo.password.length > 0" @click="handlePwd"></text> -->
20 </uni-forms-item> 20 </uni-forms-item>
21 </uni-forms> 21 </uni-forms>
22 <!-- 按钮 --> 22 <!-- 按钮 -->
@@ -52,6 +52,10 @@ import { userLogins } from &#39;@/api/user.js&#39;; @@ -52,6 +52,10 @@ import { userLogins } from &#39;@/api/user.js&#39;;
52 // 导入接口 52 // 导入接口
53 import { getHomeInfo } from '@/api/index.js'; 53 import { getHomeInfo } from '@/api/index.js';
54 54
  55 +const styles = ref({
  56 + color: '#2979FF',
  57 + borderColor: 'red'
  58 + })
55 59
56 // ------定义变量------ 60 // ------定义变量------
57 const store = useStore(); //vuex获取储存数据 61 const store = useStore(); //vuex获取储存数据