调试刷卡失败情况

This commit is contained in:
李彪 2025-04-14 09:07:59 +08:00
parent d414e56d9c
commit 6b1413d337
3 changed files with 50 additions and 7 deletions

View File

@ -51,3 +51,7 @@ export const UploadFiles = (formData) =>
// 上传
export const UploadArea = (data) =>
request.post("/api/App/UploadArea", data);
// 获取待上传区域
export const GetAwaitUploadAreaApi = (data) =>
request.get("/api/App/GetAwaitUploadArea", data);

View File

@ -2,10 +2,12 @@ let BASE_URL
//开发环境中
if (process.env.NODE_ENV === 'development') {
// 开发环境
BASE_URL = 'http://10.30.2.228:8556' //开发环境请求地址
// BASE_URL = 'http://10.30.2.228:8556' //开发环境请求地址
BASE_URL = 'http://sl.vrgon.com:8005' //开发环境请求地址
} else {
// 生产环境
BASE_URL = 'http://10.30.2.228:8556' //生成环境请求地址
// BASE_URL = 'http://10.30.2.228:8556' //生成环境请求地址
BASE_URL = 'http://sl.vrgon.com:8005' //生成环境请求地址
}
export default BASE_URL

View File

@ -67,8 +67,8 @@
</view>
</view>
</view>
<button @click="nfcResFn(true)">刷卡成功</button>
<button @click="nfcResFn(false)">刷卡失败</button>
<!-- <button @click="nfcResFn(true)">刷卡成功</button> -->
<!-- <button @click="nfcResFn(false)">刷卡失败</button> -->
<!-- nfc刷卡成功弹窗 -->
<u-popup v-model="successShow" mode="center" :round="30">
<view class="success-box">
@ -100,7 +100,7 @@
/>
</view>
<view class="content-title">
NFC卡异常或丢失可尝试重新刷卡或提交卡片异常信息
{{errorMsg}}
</view>
<view class="btn-box">
<view class="btn-cancel" @click="errorShow = false">暂不</view>
@ -113,7 +113,7 @@
</template>
<script>
import { GetPlanInfoAreaList, GetTodayPlanList } from "@/api/apiList";
import { GetPlanInfoAreaList, GetTodayPlanList,GetAwaitUploadAreaApi } from "@/api/apiList";
import { minutesToTime } from "@/utils/utils";
@ -157,6 +157,7 @@ export default {
successShow: false,
//
errorShow: false,
errorMsg:'NFC卡异常或丢失可尝试重新刷卡或提交卡片异常信息',
dataInfo: {
planName: "",
areas: [],
@ -189,13 +190,49 @@ export default {
methods: {
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) {
console.log("%c%s", "color:red", "nfc刷卡成功");
this.successShow = true;
//
this.errorShow = false;
} else {
console.log("%c%s", "color:red", "刷卡失败");
this.errorShow = true;
//
this.successShow = false;
}
},
//