调试刷卡失败情况
This commit is contained in:
parent
d414e56d9c
commit
6b1413d337
|
@ -51,3 +51,7 @@ export const UploadFiles = (formData) =>
|
||||||
// 上传
|
// 上传
|
||||||
export const UploadArea = (data) =>
|
export const UploadArea = (data) =>
|
||||||
request.post("/api/App/UploadArea", data);
|
request.post("/api/App/UploadArea", data);
|
||||||
|
|
||||||
|
// 获取待上传区域
|
||||||
|
export const GetAwaitUploadAreaApi = (data) =>
|
||||||
|
request.get("/api/App/GetAwaitUploadArea", data);
|
|
@ -2,10 +2,12 @@ let BASE_URL
|
||||||
//开发环境中
|
//开发环境中
|
||||||
if (process.env.NODE_ENV === 'development') {
|
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 {
|
} 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
|
export default BASE_URL
|
|
@ -67,8 +67,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">
|
||||||
|
@ -100,7 +100,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>
|
||||||
|
@ -113,7 +113,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";
|
||||||
|
|
||||||
|
@ -157,6 +157,7 @@ export default {
|
||||||
successShow: false,
|
successShow: false,
|
||||||
// 刷卡失败弹窗
|
// 刷卡失败弹窗
|
||||||
errorShow: false,
|
errorShow: false,
|
||||||
|
errorMsg:'NFC卡异常或丢失,可尝试重新刷卡或提交卡片异常信息',
|
||||||
dataInfo: {
|
dataInfo: {
|
||||||
planName: "",
|
planName: "",
|
||||||
areas: [],
|
areas: [],
|
||||||
|
@ -189,13 +190,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;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上传图片
|
// 上传图片
|
||||||
|
|
Loading…
Reference in New Issue