Compare commits
2 Commits
b306ba4cdb
...
89b91a936d
Author | SHA1 | Date |
---|---|---|
|
89b91a936d | |
|
6b1413d337 |
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上传图片
|
// 上传图片
|
||||||
|
|
Loading…
Reference in New Issue