u
This commit is contained in:
1 parent
26721a142e
commit
840d33ef3b
32 files changed
+2068
-590
No files matched your search
@@ -1,4 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
<!-- <script setup lang="ts">
|
||||
import type { UploadFile, UploadFileItem } from 'sard-uniapp'
|
||||
import { dialog, isImageUrl, isVideoUrl, toast } from 'sard-uniapp'
|
||||
import { aliyunpluploadApi, delSubRecordApi, loaddataAttachApi } from '@/request/api'
|
||||
@@ -159,4 +159,17 @@ function onRemove(index: number, item: UploadFileItem) {
|
||||
.file {
|
||||
padding: 36rpx;
|
||||
}
|
||||
</style> -->
|
||||
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class=""></view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -56,36 +56,11 @@ async function onSubmit() {
|
||||
icon: 'success',
|
||||
})
|
||||
|
||||
uni.switchTab({
|
||||
uni.navigateTo({
|
||||
// url: '/pages-sub/upload/index',
|
||||
url: '/pages/home/index',
|
||||
})
|
||||
}
|
||||
|
||||
// if (!res?.data) {
|
||||
// toast.fail('登录失败,请检查账号密码')
|
||||
// return
|
||||
// }
|
||||
|
||||
// userStore.userInfo = {
|
||||
// ...userStore.userInfo,
|
||||
// orgid: formModel.orgid,
|
||||
// userid: formModel.userid,
|
||||
// token: res.data,
|
||||
// }
|
||||
|
||||
// userStore.userInfo = {
|
||||
// ...userStore.userInfo,
|
||||
// username,
|
||||
// }
|
||||
|
||||
// uni.showToast({
|
||||
// title: '登录成功',
|
||||
// icon: 'success',
|
||||
// })
|
||||
|
||||
// uni.switchTab({
|
||||
// url: '/pages/home/index',
|
||||
// })
|
||||
}
|
||||
catch (err: any) {
|
||||
// 表单验证错误
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import type { FieldValidateError, FormExpose, FormRules } from 'sard-uniapp'
|
||||
import { getWindowInfo, toast } from 'sard-uniapp'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { loaddataApi, saveobjtApi } from '@/request/api'
|
||||
import { loadDataApi, updatePasswordApi } from '@/request/api'
|
||||
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -33,46 +34,12 @@ async function onSubmit() {
|
||||
|
||||
submitLoading.value = true
|
||||
|
||||
const searchcondition = `b_id = '${userStore.userInfo.userid}' AND ISNULL(b_password, '') = ISNULL('${formModel.oldPassword}', '')`
|
||||
|
||||
const searchRes = await loaddataApi({
|
||||
viewname: 'v_mini_loginid',
|
||||
searchcondition: `${searchcondition}`,
|
||||
orderfield: 'b_id',
|
||||
soption: '',
|
||||
const saveobjtRes = await updatePasswordApi({
|
||||
oldPassword: formModel.oldPassword,
|
||||
newPassword: formModel.newPassword,
|
||||
})
|
||||
|
||||
if (!searchRes.data || searchRes.data.length === 0) {
|
||||
toast.fail('旧密码错误,请重新输入')
|
||||
return
|
||||
}
|
||||
|
||||
const updateObj = {
|
||||
b_id: userStore.userInfo.userid,
|
||||
b_password: formModel.newPassword,
|
||||
}
|
||||
|
||||
const tables = []
|
||||
const insertValues = []
|
||||
const updateValues = []
|
||||
const delValues = []
|
||||
const keys = []
|
||||
|
||||
tables.push('b_truck')
|
||||
insertValues.push('[]')
|
||||
updateValues.push(JSON.stringify([updateObj]))
|
||||
delValues.push('[]')
|
||||
keys.push('b_id')
|
||||
|
||||
const saveobjtRes = await saveobjtApi({
|
||||
tables,
|
||||
insertValues,
|
||||
delValues,
|
||||
updateValues,
|
||||
keys,
|
||||
})
|
||||
|
||||
if (saveobjtRes.data === 'OK') {
|
||||
if (saveobjtRes.success) {
|
||||
toast.success('密码修改成功,请重新登录')
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -210,7 +210,7 @@ async function handleConfirm() {
|
||||
b_container_no: form.value.containerNo,
|
||||
b_container_img: form.value.containerImageUrl,
|
||||
b_ocr_no: form.value.ocrNo,
|
||||
b_ocr_score: form.value.ocrScore,
|
||||
b_ocr_score: form.value.ocrScore || 0.00,
|
||||
}
|
||||
|
||||
const fileInserts = []
|
||||
|
||||
Reference in new issue
Block a user