Compare commits

...

2 Commits

Author SHA1 Message Date
李彪 89b91a936d 解决冲突 2025-04-14 09:10:01 +08:00
李彪 6b1413d337 调试刷卡失败情况 2025-04-14 09:07:59 +08:00
2 changed files with 45 additions and 5 deletions

View File

@ -47,5 +47,8 @@ export const ReportingNFCDanger = (data) =>
export const UploadFiles = (fileList, params) => export const UploadFiles = (fileList, params) =>
request.upload("/api/App/UploadFiles", fileList, params); request.upload("/api/App/UploadFiles", fileList, params);
// 获取待上传区域
export const GetAwaitUploadAreaApi = (data) =>
request.get("/api/App/GetAwaitUploadArea", data);
// 修改上传接口定义 // 修改上传接口定义
export const UploadArea = (data) => request.post("/api/App/UploadArea", data); export const UploadArea = (data) => request.post("/api/App/UploadArea", data);

View File

@ -73,8 +73,8 @@
</view> </view>
</view> </view>
</view> </view>
<button @click="nfcResFn(true)">刷卡成功</button> <!-- <button @click="nfcResFn(true)">刷卡成功</button> -->
<button @click="nfcResFn(false)">刷卡失败</button> <!-- <button @click="nfcResFn(false)">刷卡失败</button> -->
<!-- nfc刷卡成功弹窗 --> <!-- nfc刷卡成功弹窗 -->
<u-popup v-model="successShow" mode="center" :round="30"> <u-popup v-model="successShow" mode="center" :round="30">
<view class="success-box"> <view class="success-box">
@ -106,7 +106,7 @@
/> />
</view> </view>
<view class="content-title"> <view class="content-title">
NFC卡异常或丢失可尝试重新刷卡或提交卡片异常信息 {{errorMsg}}
</view> </view>
<view class="btn-box"> <view class="btn-box">
<view class="btn-cancel" @click="errorShow = false">暂不</view> <view class="btn-cancel" @click="errorShow = false">暂不</view>
@ -119,7 +119,7 @@
</template> </template>
<script> <script>
import { GetPlanInfoAreaList, GetTodayPlanList } from "@/api/apiList"; import { GetPlanInfoAreaList, GetTodayPlanList,GetAwaitUploadAreaApi } from "@/api/apiList";
import { minutesToTime } from "@/utils/utils"; import { minutesToTime } from "@/utils/utils";
@ -163,6 +163,7 @@ export default {
successShow: false, successShow: false,
// //
errorShow: false, errorShow: false,
errorMsg:'NFC卡异常或丢失可尝试重新刷卡或提交卡片异常信息',
dataInfo: { dataInfo: {
planName: "", planName: "",
areas: [], areas: [],
@ -195,13 +196,49 @@ export default {
methods: { methods: {
minutesToTime, minutesToTime,
nfcResFn(data) { async nfcResFn(data) {
if (!data) {
return uni.showToast({ title: "未传入参数 initFn", icon: "none" });
}
// uni.showModal({
// title: "initFn",
// content: JSON.stringify(data) || " initFn",
// showCancel: true,
// success: function (res) {},
// });
let cardID = data.cardID;
let nimei = data.nimei;
const req = {
Nimei:nimei
// Nimei:'"78F04BC3E9A6DE4782C11A2346F39C68'
}
const res = await GetAwaitUploadAreaApi(req)
console.log(res,'res---')
//
if(!res.succeed){
console.log("%c%s", "color:red", "刷卡失败");
//
this.errorMsg = res.error || "NFC卡异常或丢失可尝试重新刷卡或提交卡片异常信息";
this.errorShow = true;
//
this.successShow = false;
return
}
//
this.successShow = true;
//
this.errorShow = false;
return
if (data) { if (data) {
console.log("%c%s", "color:red", "nfc刷卡成功"); console.log("%c%s", "color:red", "nfc刷卡成功");
this.successShow = true; this.successShow = true;
//
this.errorShow = false;
} else { } else {
console.log("%c%s", "color:red", "刷卡失败"); console.log("%c%s", "color:red", "刷卡失败");
this.errorShow = true; this.errorShow = true;
//
this.successShow = false;
} }
}, },
// //