Commit 5852b173 authored by zhangsan's avatar zhangsan

1

parent 156a7225
This diff is collapsed.
......@@ -48,10 +48,6 @@ const scanResult = ref('')
const isScanning = ref(false)
const lastResult = ref('')
showFailToast({
message:"请加入人民结算党员后进行扫码付款",
duration:3000
})
// 解密函数
function decrypt(encryptedText, key) {
try {
......
......@@ -18,7 +18,13 @@ function getUserInfo() {
})
}
getUserInfo()
function saoyisao(){
if(userInfo.value.dy != 1){
showScanner.value = true
}else{
showFailToast('请加入人民结算党员后进行扫码付款')
}
}
// 加密函数
function encrypt(text, key) {
try {
......@@ -81,11 +87,6 @@ function handleReceive() {
// 处理扫码成功
function handleScanSuccess(result) {
showFailToast({
message:"请加入人民结算党员后进行扫码付款",
duration:3000
})
return false
showScanner.value = false
router.push('/transfer' + result)
}
......@@ -137,7 +138,7 @@ function saveQrCode() {
<img src="@/static/pages/home/kf2.png" alt="">
<span>在线客服</span>
</div>
<div class="item" @click="showScanner = true">
<div class="item" @click="saoyisao">
<img src="@/static/pages/home/sys2.png" alt="">
<span>扫一扫</span>
</div>
......
......@@ -2,14 +2,33 @@
<div class="container">
<img src="@/static/pages/news/newsbg.png" alt="">
<div class="btn1" @click="handleClick">
立即宣誓,并加入财政结算党员
{{userInfo.dy == 1 ? '立即宣誓,并加入财政结算党员' : '已加入财政结算党员'}}
</div>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import request from '@/utils/request'
const userInfo = ref({})
const getuserInfo = () => {
request.get('/system/user/').then(res => {
userInfo.value = res
})
}
onMounted(() => {
getuserInfo()
})
function handleClick(){
showFailToast('暂未开放,请等待官方通知')
if(userInfo.value.dy == 1){
if(userInfo.value.smCount == 3){
showFailToast('请邀请3位好友加入财政结算才能完成宣誓仪式')
}else{
request.get('/system/user/dysq').then(res => {
showFailToast('宣誓成功')
getuserInfo()
})
}
}
}
</script>
<style lang="scss" scoped>
......
......@@ -67,14 +67,14 @@ const onLoginSubmit = async () => {
type: 'app'
})
if (res.code == 200) {
showToast(res.message)
showToast(res.msg)
sessionStorage.setItem('token', res.token)
router.replace('/')
} else {
showToast(res.message || '登录失败')
showToast(res.msg || '登录失败')
}
} catch (error: any) {
showToast(error.message || '登录失败')
showToast(error.msg || '登录失败')
} finally {
loginLoading.value = false
}
......
......@@ -23,12 +23,6 @@ async function getUserInfo() {
}
}
// 验证手机号格式
function isValidPhone(phone) {
const phoneRegex = /^1[3-9]\d{9}$/
return phoneRegex.test(phone)
}
// 验证金额格式
function isValidAmount(amount) {
// 金额必须大于0且最多两位小数
......@@ -36,13 +30,6 @@ function isValidAmount(amount) {
return amountRegex.test(amount) && Number(amount) > 0
}
// 处理手机号输入
function handlePhoneInput(value) {
phone.value = value.replace(/\D/g, '')
if (phone.value.length > 11) {
phone.value = phone.value.slice(0, 11)
}
}
// 处理金额输入
function handleAmountInput(value) {
......@@ -169,7 +156,6 @@ onMounted(() => {
type="tel"
placeholder="请输入收款人银行卡号"
class="phone-input"
@input="handlePhoneInput"
/>
</div>
......
......@@ -34,14 +34,13 @@ const signIn = async () => {
showSuccessToast('恭喜您签到成功')
await Promise.all([
getSignInInfo(),
getUserInfo() // 假设这个方法在父组件中定义
])
} else {
showFailToast(res.msg || '签到失败')
}
} catch (error) {
console.error('签到失败:', error)
showFailToast('签到失败,请稍后重试')
showFailToast(error.msg || '签到失败,请稍后重试')
} finally {
loading.value = false
}
......
......@@ -96,7 +96,8 @@ export default defineConfig({
open: true,
proxy: {
'/api': {
target: 'https://vip.cnrmjs20.com/api',
// target: 'https://vip.cnrmjs20.com/api',
target: 'http://27.124.5.14:9013',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment