修改bug
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
"Bash(sed -i '32,36s/.*//' App.vue)",
|
||||
"Bash(sed -i '32d;33d;34d;35d;36d' App.vue)",
|
||||
"Bash(perl -i -pe 's/\\\\\\\\t\\\\t\\\\t\\\\t\\\\t\"disableScroll\": true/\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\"disableScroll\": true/' pages.json)",
|
||||
"Bash(perl -i -pe 's/^t\\\\t\\\\t\\\\t\\\\t\"disableScroll\"/\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\"disableScroll\"/' pages.json)"
|
||||
"Bash(perl -i -pe 's/^t\\\\t\\\\t\\\\t\\\\t\"disableScroll\"/\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\"disableScroll\"/' pages.json)",
|
||||
"Bash(sed -i '113s|// loadRevenue\\(true\\)|loadRevenue\\(true\\)|' pageSubPack/inspection-revenue/public-revenue.vue)",
|
||||
"Bash(sed -i '120s|// loadRevenue\\(\\)|loadRevenue\\(\\)|' pageSubPack/inspection-revenue/public-revenue.vue)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup>
|
||||
import { onLaunch,onShow,onHide } from '@dcloudio/uni-app'
|
||||
import { isPublicPath } from '@/common/checkLogin.js'
|
||||
|
||||
let cidRetryTimer = null
|
||||
let cidRetryCount = 0
|
||||
@@ -29,6 +30,20 @@
|
||||
|
||||
// 所有人统一进首页
|
||||
console.log('进入首页(hasToken=' + !!token + ')')
|
||||
|
||||
// 全局 navigateTo 拦截器:未登录用户访问需登录页面时自动跳转登录页
|
||||
uni.addInterceptor('navigateTo', {
|
||||
invoke(args) {
|
||||
const t = uni.getStorageSync('token')
|
||||
if (!t && !isPublicPath(args.url)) {
|
||||
uni.showToast({ title: '请先登录', icon: 'none' })
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/login?mode=pwd' })
|
||||
}, 1000)
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
onShow((options) => {
|
||||
console.log('App Show', options)
|
||||
|
||||
55
property-uniapp-project/common/checkLogin.js
Normal file
55
property-uniapp-project/common/checkLogin.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 登录检查工具 — 统一拦截未登录用户的功能操作
|
||||
*
|
||||
* 使用方式:
|
||||
* import { requireLogin } from '@/common/checkLogin.js'
|
||||
* if (!requireLogin()) return
|
||||
*
|
||||
* 页面级调用即可,全局 navigateTo 拦截器(App.vue onLaunch 中注册)作为兜底。
|
||||
*/
|
||||
|
||||
/** 无需登录即可访问的页面路径白名单(全局拦截器使用) */
|
||||
export const PUBLIC_PATHS = [
|
||||
'/pageSubPack/loginSub/login',
|
||||
'/pageSubPack/loginSub/register-new-user',
|
||||
'/pageSubPack/loginSub/forget-pwd',
|
||||
'/pageSubPack/loginSub/change-pwd',
|
||||
'/pageSubPack/loginSub/privacy',
|
||||
'/pages/navigation/navigation'
|
||||
]
|
||||
|
||||
/**
|
||||
* 判断指定路径是否为公开页面(无需登录)
|
||||
* @param {string} url - navigateTo 的目标 url
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isPublicPath(url) {
|
||||
if (!url) return true
|
||||
// 去掉查询参数
|
||||
const path = url.split('?')[0]
|
||||
return PUBLIC_PATHS.some(p => path === p || path.startsWith(p + '?'))
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否已登录;未登录则弹出提示并跳转登录页
|
||||
* @param {object} [options]
|
||||
* @param {string} [options.message='请先登录'] - 提示文案
|
||||
* @param {boolean} [options.redirect=true] - 是否自动跳转登录页
|
||||
* @returns {boolean} 已登录返回 true,否则返回 false
|
||||
*/
|
||||
export function requireLogin(options = {}) {
|
||||
const {
|
||||
message = '请先登录',
|
||||
redirect = true
|
||||
} = options
|
||||
const token = uni.getStorageSync('token')
|
||||
if (token) return true
|
||||
|
||||
uni.showToast({ title: message, icon: 'none' })
|
||||
if (redirect) {
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/login?mode=pwd' })
|
||||
}, 1000)
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -96,7 +96,7 @@
|
||||
<!-- 活动详情 -->
|
||||
<view class="section" style="margin-bottom: 40rpx;">
|
||||
<view class="section-title">活动详情</view>
|
||||
<view class="section-content">
|
||||
<view class="section-content rich-content">
|
||||
<view v-html="activityConent.content"></view>
|
||||
<view></view>
|
||||
</view>
|
||||
@@ -584,6 +584,8 @@ const showToastMessage = (message) => {
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
text-align: right;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* 区块样式 */
|
||||
@@ -604,8 +606,11 @@ const showToastMessage = (message) => {
|
||||
|
||||
.section-content {
|
||||
font-size: 28rpx;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.section-content view {
|
||||
@@ -910,3 +915,24 @@ const showToastMessage = (message) => {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
/* 富文本(v-html)内图片自适应 — 非 scoped,否则穿透不到 v-html 内容 */
|
||||
.section-content {
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
height: auto !important;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.rich-content {
|
||||
white-space: normal !important;
|
||||
word-break: normal !important;
|
||||
overflow: hidden;
|
||||
/* 富文本内嵌的所有元素不超出容器 */
|
||||
* {
|
||||
max-width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -110,14 +110,14 @@ onShow(() =>{
|
||||
|
||||
const onRefresh = () => {
|
||||
refreshing.value = true
|
||||
// loadRevenue(true)
|
||||
loadRevenue(true)
|
||||
}
|
||||
|
||||
const loadMore = () => {
|
||||
if (noMoreData.value || loadingMore.value) return
|
||||
loadingMore.value = true
|
||||
pageNum.value++
|
||||
// loadRevenue()
|
||||
loadRevenue()
|
||||
}
|
||||
|
||||
const narBack = () => {
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/password.png" mode="" style="height: 100%;width: 100%;"></image>
|
||||
</view>
|
||||
<uni-easyinput class="input-content" type="password" v-model="password"
|
||||
@input="password = password.replace(/\s/g, '')"
|
||||
placeholder="请输入密码" :inputBorder="false" maxlength="16" :placeholderStyle="placeholderStyle">
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
@@ -237,6 +238,7 @@ const handlePwdLogin = () => {
|
||||
if (!password.value) { uni.showToast({ title: '请输入密码', icon: 'none' }); return }
|
||||
if (password.value.length < 6) { uni.showToast({ title: '密码至少输入 6 位', icon: 'none' }); return }
|
||||
if (password.value.length > 16) { uni.showToast({ title: '密码不能超过 16 位', icon: 'none' }); return }
|
||||
if (/\s/.test(password.value)) { uni.showToast({ title: '密码格式不对', icon: 'none' }); return }
|
||||
if (!agreeAgreement.value) { openPrivacyPopup('login'); return }
|
||||
doLogin()
|
||||
}
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<template>
|
||||
<view class="register-page">
|
||||
<view class="status_bar"></view>
|
||||
<!-- 顶部导航 -->
|
||||
<!-- <view class="nav-bar">
|
||||
<uni-icons type="left" size="28" color="#333" @click="goBack"></uni-icons>
|
||||
<view class="nav-title">注册</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 注册标题 -->
|
||||
<view class="register-title">注册用户</view>
|
||||
@@ -18,7 +13,6 @@
|
||||
</view>
|
||||
<uni-easyinput class="input-content" type="number" v-model="phoneNumber" @input="phoneNumber = phoneNumber.replace(/\D/g, '')" placeholder="请输入手机号"
|
||||
:inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle" />
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 验证码输入 + 获取验证码按钮 -->
|
||||
@@ -26,58 +20,53 @@
|
||||
<view class="input-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/code.png" mode="" style="height: 100%;width: 100%;">
|
||||
</image>
|
||||
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
||||
</view>
|
||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" @input="verifyCode = verifyCode.replace(/\D/g, '')" placeholder="请输入验证码"
|
||||
:inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle" />
|
||||
|
||||
|
||||
<button class="get-verify-btn" :disabled="!canGetVerify || countDown > 0" @click="getVerifyCode">
|
||||
{{ countDown > 0 ? `${countDown}s后重新获取` : '获取验证码' }}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<!-- 账号输入框 -->
|
||||
<view class="input-item-wrap">
|
||||
<view class="input-item">
|
||||
<view class="input-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/account.png" mode=""
|
||||
style="height: 100%;width: 100%;"></image>
|
||||
<!-- <uni-icons type="person" size="24" color="#999"></uni-icons> -->
|
||||
</view>
|
||||
<uni-easyinput class="input-content" type="text" v-model="account" placeholder="请输入账号(4-20位)" :inputBorder="false"
|
||||
<uni-easyinput class="input-content" type="text" v-model="account" @blur="validateAccount" @focus="clearAccountError" placeholder="请输入账号(4-20位)" :inputBorder="false"
|
||||
maxlength="20" :placeholderStyle="placeholderStyle" />
|
||||
|
||||
|
||||
</view>
|
||||
<text class="input-error" v-if="accountError">{{ accountError }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 密码输入框 -->
|
||||
<view class="input-item-wrap">
|
||||
<view class="input-item">
|
||||
<view class="input-icon">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/password.png" mode=""
|
||||
style="height: 100%;width: 100%;"></image>
|
||||
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
||||
</view>
|
||||
<uni-easyinput class="input-content" type="password" v-model="password" placeholder="请输入密码(6-16位)"
|
||||
<uni-easyinput class="input-content" type="password" v-model="password" @input="password = password.replace(/\s/g, '')" @blur="validatePassword" @focus="clearPasswordError" placeholder="请输入密码(6-16位)"
|
||||
:inputBorder="false" maxlength="16" :placeholderStyle="placeholderStyle" />
|
||||
|
||||
|
||||
</view>
|
||||
<text class="input-error" v-if="passwordError">{{ passwordError }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 协议勾选 -->
|
||||
<view class="agreement-item">
|
||||
<view @click="toggleAgreement">
|
||||
<uni-icons type="checkbox-filled" size="24" color="#007aff" v-if="agreeAgreement"></uni-icons>
|
||||
<uni-icons type="checkbox" size="24" color="#999" v-else></uni-icons>
|
||||
</view>
|
||||
<!-- <text class="agreement-text" @click.stop="goToPrivacy">我已阅读并同意<text
|
||||
class="agreePrivacy">《用户隐私政策》</text></text> -->
|
||||
|
||||
<text class="agreement-text" >我已阅读并同意
|
||||
<text class="agreePrivacy" @click.stop="goToUserAgreement">《用户协议》</text>和
|
||||
<text class="agreePrivacy" @click.stop="goToPrivacy">《隐私政策》</text>
|
||||
</text>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 立即注册按钮 -->
|
||||
<button class="register-btn" @click="handleRegister">
|
||||
立即注册
|
||||
@@ -106,34 +95,30 @@
|
||||
import PrivacyPopup from '@/components/privacy-popup/privacy-popup.vue'
|
||||
|
||||
// ========== 响应式数据 ==========
|
||||
// 表单数据
|
||||
const phoneNumber = ref('');
|
||||
const verifyCode = ref('');
|
||||
const account = ref('');
|
||||
const accountError = ref('');
|
||||
const password = ref('');
|
||||
const passwordError = ref('');
|
||||
const placeholderStyle = ref('font-size:24rpx')
|
||||
// 协议勾选
|
||||
const agreeAgreement = ref(false);
|
||||
// 隐私弹窗
|
||||
const showPrivacyPopup = ref(false)
|
||||
const pendingAction = ref('')
|
||||
// 验证码倒计时
|
||||
const countDown = ref(0);
|
||||
let timer = null;
|
||||
|
||||
// ========== 计算属性 ==========
|
||||
// 是否可获取验证码(手机号格式正确)
|
||||
const canGetVerify = computed(() => {
|
||||
const phoneReg = /^1[3-9]\d{9}$/;
|
||||
return phoneReg.test(phoneNumber.value);
|
||||
});
|
||||
|
||||
// 是否可注册(所有表单项+协议都满足)
|
||||
const canRegister = computed(() => {
|
||||
const phoneReg = /^1[3-9]\d{9}$/; // 手机号11位
|
||||
const verifyReg = /^\d{6}$/; // 验证码6位
|
||||
const accountReg = /^.{4,20}$/; // 账号4-20位
|
||||
const pwdReg = /^.{6,16}$/; // 密码6-16位
|
||||
const phoneReg = /^1[3-9]\d{9}$/;
|
||||
const verifyReg = /^\d{6}$/;
|
||||
const accountReg = /^.{4,20}$/;
|
||||
const pwdReg = /^.{6,16}$/;
|
||||
|
||||
return phoneReg.test(phoneNumber.value) &&
|
||||
verifyReg.test(verifyCode.value) &&
|
||||
@@ -143,16 +128,50 @@
|
||||
});
|
||||
|
||||
// ========== 方法 ==========
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 切换协议勾选状态
|
||||
const toggleAgreement = () => {
|
||||
agreeAgreement.value = !agreeAgreement.value;
|
||||
};
|
||||
// 打开用户协议
|
||||
|
||||
// 账号失焦校验
|
||||
const validateAccount = () => {
|
||||
const val = account.value
|
||||
if (!val) { accountError.value = ''; return }
|
||||
if (/\s/.test(val)) {
|
||||
accountError.value = '账号不能包含空格'
|
||||
} else if (val.length < 4 || val.length > 20) {
|
||||
accountError.value = '账号需 4-20 位'
|
||||
} else {
|
||||
accountError.value = ''
|
||||
}
|
||||
};
|
||||
|
||||
// 账号聚焦清除错误提示
|
||||
const clearAccountError = () => {
|
||||
accountError.value = ''
|
||||
};
|
||||
|
||||
// 密码失焦校验
|
||||
const validatePassword = () => {
|
||||
const val = password.value
|
||||
if (!val) { passwordError.value = ''; return }
|
||||
if (val.length < 6 || val.length > 16) {
|
||||
passwordError.value = '密码需 6-16 位'
|
||||
} else if (/\s/.test(val)) {
|
||||
passwordError.value = '密码不能包含空格'
|
||||
} else {
|
||||
passwordError.value = ''
|
||||
}
|
||||
};
|
||||
|
||||
// 密码聚焦清除错误提示
|
||||
const clearPasswordError = () => {
|
||||
passwordError.value = ''
|
||||
};
|
||||
|
||||
const goToUserAgreement = () => {
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL('https://wuye.ckdzkj.com/parivw/ownler_xieyi.html')
|
||||
@@ -162,7 +181,6 @@
|
||||
// #endif
|
||||
}
|
||||
|
||||
// 打开隐私政策
|
||||
const goToPrivacy = () => {
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL('https://wuye.ckdzkj.com/parivw/owner.html')
|
||||
@@ -172,16 +190,13 @@
|
||||
// #endif
|
||||
}
|
||||
|
||||
// 检查表单状态(实时更新按钮状态)
|
||||
const checkForm = () => {};
|
||||
|
||||
// 打开隐私弹窗
|
||||
const openPrivacyPopup = (action) => {
|
||||
pendingAction.value = action || ''
|
||||
showPrivacyPopup.value = true
|
||||
}
|
||||
|
||||
// 同意隐私协议
|
||||
const agreePrivacy = () => {
|
||||
showPrivacyPopup.value = false
|
||||
agreeAgreement.value = true
|
||||
@@ -191,13 +206,11 @@
|
||||
pendingAction.value = ''
|
||||
}
|
||||
|
||||
// 不同意隐私协议
|
||||
const disagreePrivacy = () => {
|
||||
showPrivacyPopup.value = false
|
||||
pendingAction.value = ''
|
||||
}
|
||||
|
||||
|
||||
// 获取验证码
|
||||
const getVerifyCode = () => {
|
||||
if (!canGetVerify.value) return;
|
||||
@@ -211,7 +224,6 @@
|
||||
title: '验证码已发送',
|
||||
icon: 'success'
|
||||
});
|
||||
// 开始60秒倒计时
|
||||
countDown.value = 60;
|
||||
timer = setInterval(() => {
|
||||
countDown.value--;
|
||||
@@ -220,7 +232,6 @@
|
||||
timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '验证码发送失败',
|
||||
@@ -233,8 +244,6 @@
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
};
|
||||
|
||||
// 处理注册逻辑
|
||||
@@ -263,6 +272,10 @@
|
||||
uni.showToast({ title: '账号长度需为 4-20 位', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (/\s/.test(account.value)) {
|
||||
uni.showToast({ title: '账号格式不对,不允许注册', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!password.value) {
|
||||
uni.showToast({ title: '请输入密码', icon: 'none' });
|
||||
return;
|
||||
@@ -275,6 +288,10 @@
|
||||
uni.showToast({ title: '密码不能超过 16 位', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (/\s/.test(password.value)) {
|
||||
uni.showToast({ title: '密码格式不对,不允许注册', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!agreeAgreement.value) {
|
||||
openPrivacyPopup('register')
|
||||
return;
|
||||
@@ -305,7 +322,6 @@
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
});
|
||||
}, 1500);
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '注册失败',
|
||||
@@ -322,7 +338,6 @@
|
||||
};
|
||||
|
||||
// ========== 生命周期 ==========
|
||||
// 页面卸载时清除定时器
|
||||
onUnmounted(() => {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
@@ -334,7 +349,6 @@
|
||||
/* 页面容器 */
|
||||
.register-page {
|
||||
padding: 20rpx 40rpx 40rpx;
|
||||
/* background-color: #f8f9fa; */
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -346,11 +360,9 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* height: 88rpx; */
|
||||
margin-bottom: 70rpx;
|
||||
}
|
||||
|
||||
@@ -363,7 +375,6 @@
|
||||
margin-right: 100rpx;
|
||||
}
|
||||
|
||||
/* 注册标题 */
|
||||
.register-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
@@ -371,6 +382,15 @@
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
/* 输入框外层包装(用于承载错误提示) */
|
||||
.input-item-wrap {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.input-item-wrap .input-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 输入框通用样式 */
|
||||
.input-item {
|
||||
display: flex;
|
||||
@@ -405,7 +425,7 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 深度覆盖 uni-easyinput 内部默认样式,解决高度偏移 */
|
||||
/* 深度覆盖 uni-easyinput 内部默认样式 */
|
||||
.input-content :deep(.uni-easyinput__content) {
|
||||
height: 100% !important;
|
||||
min-height: unset !important;
|
||||
@@ -424,6 +444,14 @@
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
/* 输入框错误提示(在输入框下方) */
|
||||
.input-error {
|
||||
color: #e74c3c;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.4;
|
||||
padding: 10rpx 30rpx 0;
|
||||
}
|
||||
|
||||
/* 获取验证码按钮 */
|
||||
.get-verify-btn {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="contentStyle">
|
||||
<view class="status-bar"></view>
|
||||
<uni-nav-bar title="设置" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar>
|
||||
|
||||
<scroll-view class="page" scroll-y>
|
||||
<view class="setting-item" v-for="(item, index) in settingList" :key="index" @click="onItemClick(item)">
|
||||
<text class="item-title">{{ item.title }}</text>
|
||||
@@ -29,21 +25,13 @@
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
reactive
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import {
|
||||
onReachBottom,
|
||||
onLoad,
|
||||
onUnload,
|
||||
onPullDownRefresh
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
authLogout, getUserProfile, getUserNotify, changeUserNotify, getAppVersion, checkAppUpdate, postUpdateLog
|
||||
} from '/pageSubPack/api/apiSub.js'
|
||||
|
||||
//
|
||||
const statusBarHeight = ref(20)
|
||||
const cacheSize = ref(0)
|
||||
const currentVersion = ref('1.0.0')
|
||||
const currentVersionCode = ref(1)
|
||||
@@ -357,11 +345,6 @@
|
||||
})
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.switchTab({
|
||||
url: '/pages/myIndex/myIndex'
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
initCurrentVersion()
|
||||
@@ -466,10 +449,6 @@
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -223,9 +223,7 @@
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
})
|
||||
uni.navigateBack();
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
uni.navigateBack();
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
// 方法
|
||||
const goBack = () => {
|
||||
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
const handlePrimaryClick = () => {
|
||||
|
||||
@@ -136,9 +136,7 @@
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
// 立即缴费 — 通过微信拉起日照银行小程序进行支付
|
||||
@@ -220,7 +218,7 @@
|
||||
|
||||
// 返回缴费列表
|
||||
const handleBackToList = () => {
|
||||
uni.navigateTo({
|
||||
uni.redirectTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -107,9 +107,7 @@
|
||||
|
||||
// 方法
|
||||
const goBack = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
// 以下为原代码保留的方法(未使用但保持功能完整)
|
||||
|
||||
@@ -248,9 +248,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -118,9 +118,7 @@
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
// 立即缴费 — 通过微信拉起日照银行小程序进行支付
|
||||
@@ -203,7 +201,7 @@
|
||||
|
||||
// 返回缴费列表
|
||||
const handleBackToList = () => {
|
||||
uni.navigateTo({
|
||||
uni.redirectTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
const onSearch = () => {}
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
uni.navigateBack();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -201,8 +201,7 @@
|
||||
"pages": [{
|
||||
"path": "settingIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
getBannarList,
|
||||
getReloadUserInfo
|
||||
} from "/pageSubPack/api/api.js"
|
||||
import { requireLogin } from '@/common/checkLogin.js'
|
||||
|
||||
|
||||
// 列表数据状态
|
||||
@@ -199,19 +200,6 @@
|
||||
const lastUserId = ref('')
|
||||
const pageReady = ref(false)
|
||||
|
||||
// =======工具方法=======
|
||||
const requireLogin = () => {
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
uni.showToast({ title: '请先登录', icon: 'none' })
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: '/pageSubPack/loginSub/login?mode=pwd' })
|
||||
}, 1000)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// =======方法=======
|
||||
const formatDate = (date) => {
|
||||
if (!date) return ''
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
} from 'vue';
|
||||
import { getUserProfile } from '../../pageSubPack/api/apiSub';
|
||||
import {onShow} from '@dcloudio/uni-app'
|
||||
import { requireLogin } from '@/common/checkLogin.js'
|
||||
|
||||
|
||||
const list = ref([{
|
||||
@@ -97,6 +98,7 @@
|
||||
|
||||
// 返回
|
||||
const onItemClick = (item) => {
|
||||
if (!requireLogin()) return
|
||||
if (item.title == '我的房屋') {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myHouseIndex',
|
||||
@@ -130,6 +132,7 @@
|
||||
}
|
||||
}
|
||||
const goSetting = () => {
|
||||
if (!requireLogin()) return
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/settingIndex',
|
||||
success: res => {},
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
import {
|
||||
ref
|
||||
} from 'vue';
|
||||
import { requireLogin } from '@/common/checkLogin.js'
|
||||
|
||||
|
||||
const commonFuncList = ref([{
|
||||
@@ -138,7 +139,7 @@
|
||||
// --方法----
|
||||
|
||||
const handleFuncClick = (item) => {
|
||||
|
||||
if (!requireLogin()) return
|
||||
uni.setStorageSync('sourcePage', 'serviceIndex')
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
@@ -147,6 +148,7 @@
|
||||
|
||||
// banner跳转
|
||||
function bannnerClick(){
|
||||
if (!requireLogin()) return
|
||||
uni.navigateTo({ url: '/pageSubPack/online-repair/onlineRepair'})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user