Compare commits
5 Commits
6ee5dee230
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd6ffe0c35 | ||
|
|
1f0d3014fe | ||
|
|
574f97331c | ||
|
|
83a3ce8283 | ||
|
|
ca1f87dc1a |
@@ -20,6 +20,10 @@ export const getLoginBySms = data => {
|
|||||||
export const getResetPassword = data => {
|
export const getResetPassword = data => {
|
||||||
return post('/api/butler/auth/forgetPassword', data)
|
return post('/api/butler/auth/forgetPassword', data)
|
||||||
}
|
}
|
||||||
|
// 忘记密码 校验短信验证码
|
||||||
|
export const verifySmsCode = (data) =>{
|
||||||
|
return post('/api/butler/auth/verifySmsCode',data)
|
||||||
|
}
|
||||||
|
|
||||||
// ======首页=====
|
// ======首页=====
|
||||||
// 获取小区列表
|
// 获取小区列表
|
||||||
|
|||||||
@@ -163,9 +163,10 @@ function handleChangeTime(event: string) {
|
|||||||
getlist()
|
getlist()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isAllowTaskStatus = ['超时完成', '已完成']
|
||||||
function handleTap(ite) {
|
function handleTap(ite) {
|
||||||
const today = parseTime(new Date(), '{m}月{d}日')
|
const today = parseTime(new Date(), '{m}月{d}日')
|
||||||
if (today !== showDate.value && ite.taskStatus !== '已完成') {
|
if (today !== showDate.value && !isAllowTaskStatus.includes(ite.taskStatus)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
>
|
>
|
||||||
<view class="housepath flex items-center flex-1">
|
<view class="housepath flex items-center flex-1">
|
||||||
<radio color="#4d5dfa" :value="item.houseId" />
|
<radio color="#4d5dfa" :value="item.houseId" />
|
||||||
<text class="address">{{ item.addressCn ?? item.addressHyphen }}</text>
|
<text class="address">{{ item.addressHyphen ?? item.addressCn }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="username">{{ item.residentName }}</view>
|
<view class="username">{{ item.residentName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -102,6 +102,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
import { getVillageList,getFeeTypes,getTableList} from '../../api/api.js'
|
import { getVillageList,getFeeTypes,getTableList} from '../../api/api.js'
|
||||||
|
|
||||||
// ============ 筛选数据 ============
|
// ============ 筛选数据 ============
|
||||||
@@ -115,8 +116,12 @@
|
|||||||
const selectedFeeType = ref('')
|
const selectedFeeType = ref('')
|
||||||
const selectedFeeTypeLabel = ref('全部收费类型')
|
const selectedFeeTypeLabel = ref('全部收费类型')
|
||||||
|
|
||||||
// 日期范围
|
// 日期范围(默认查询当天数据)
|
||||||
const datetimerange = ref([])
|
const getTodayRange = () => {
|
||||||
|
const today = dayjs().format('YYYY-MM-DD')
|
||||||
|
return [today, today]
|
||||||
|
}
|
||||||
|
const datetimerange = ref(getTodayRange())
|
||||||
|
|
||||||
// 下拉刷新触发状态
|
// 下拉刷新触发状态
|
||||||
const refresherTriggered = ref(false)
|
const refresherTriggered = ref(false)
|
||||||
@@ -298,7 +303,7 @@
|
|||||||
selectedProjectLabel.value = '全部项目'
|
selectedProjectLabel.value = '全部项目'
|
||||||
selectedFeeType.value = ''
|
selectedFeeType.value = ''
|
||||||
selectedFeeTypeLabel.value = '全部收费类型'
|
selectedFeeTypeLabel.value = '全部收费类型'
|
||||||
datetimerange.value = []
|
datetimerange.value = getTodayRange()
|
||||||
fetchTableList()
|
fetchTableList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 手机号输入框 -->
|
<!-- 手机号输入框 -->
|
||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<image src="http://wuye.ckdzkj.com/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
|
<image src="https://wuye.ckdzkj.com/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content" type="number" v-model="phoneNumber" trim="all"
|
<uni-easyinput class="input-content" type="number" v-model="phoneNumber" trim="all"
|
||||||
placeholder="请输入手机号" :inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle">
|
placeholder="请输入手机号" :inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle">
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<!-- 验证码输入 + 获取验证码按钮 -->
|
<!-- 验证码输入 + 获取验证码按钮 -->
|
||||||
<view class="input-item verify-item">
|
<view class="input-item verify-item">
|
||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<image src="http://wuye.ckdzkj.com/images/login/code.png" mode="" style="height: 100%;width: 100%;"></image>
|
<image src="https://wuye.ckdzkj.com/images/login/code.png" mode="" style="height: 100%;width: 100%;"></image>
|
||||||
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" trim="all"
|
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" trim="all"
|
||||||
@@ -29,21 +29,21 @@
|
|||||||
<!-- 下一步 -->
|
<!-- 下一步 -->
|
||||||
<button
|
<button
|
||||||
class="forget-btn"
|
class="forget-btn"
|
||||||
:disabled="!canRegister"
|
:disabled="!canRegister || submitting"
|
||||||
@click="handleNext"
|
@click="handleNext">
|
||||||
>
|
{{ submitting ? '校验中...' : '下一步' }}
|
||||||
下一步
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onUnmounted } from 'vue';
|
import { ref, computed, onUnmounted } from 'vue';
|
||||||
import {getSendCode} from '../../api/api.js'
|
import {getSendCode,verifySmsCode} from '../../api/api.js'
|
||||||
|
|
||||||
// ====响应式数据======
|
// ====响应式数据======
|
||||||
const phoneNumber = ref('')
|
const phoneNumber = ref('')
|
||||||
const verifyCode = ref('')
|
const verifyCode = ref('')
|
||||||
|
const submitting = ref(false)
|
||||||
|
|
||||||
const countDown = ref(0)
|
const countDown = ref(0)
|
||||||
let timer = null;
|
let timer = null;
|
||||||
@@ -85,6 +85,11 @@ const getVerifyCode = () => {
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}).catch((err)=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: err.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -99,18 +104,34 @@ const canRegister = computed(() => {
|
|||||||
});
|
});
|
||||||
// 下一步
|
// 下一步
|
||||||
const handleNext = () =>{
|
const handleNext = () =>{
|
||||||
// 把参数存到本地缓存
|
if(!canRegister.value){
|
||||||
uni.setStorageSync('tempChangePwdParams', {
|
uni.showToast({ title: '请输入正确的手机号和验证码',icon: 'error'});
|
||||||
phoneNumber:phoneNumber.value,
|
return
|
||||||
verifyCode: verifyCode.value
|
}
|
||||||
});
|
if(submitting.value) return
|
||||||
if(!canRegister.value){
|
submitting.value = true
|
||||||
uni.showToast({ title: '请输入',icon: 'error'});
|
// 后端验证短信
|
||||||
return
|
verifySmsCode({
|
||||||
}
|
phone: phoneNumber.value,
|
||||||
uni.navigateTo({
|
smsCode: verifyCode.value,
|
||||||
url: '/pageSubPack/loginSub/change-pwd'
|
scene: 'reset'
|
||||||
});
|
}).then(res =>{
|
||||||
|
// 把参数存到本地缓存
|
||||||
|
uni.setStorageSync('tempChangePwdParams', {
|
||||||
|
phoneNumber:phoneNumber.value,
|
||||||
|
verifyCode: verifyCode.value
|
||||||
|
});
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageSubPack/loginSub/change-pwd'
|
||||||
|
});
|
||||||
|
}).catch(err =>{
|
||||||
|
uni.showToast({
|
||||||
|
title: err.msg || '验证码错误',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}).finally(() =>{
|
||||||
|
submitting.value = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user