@@ -484,11 +484,14 @@ | |||
break; | |||
case "TD": | |||
tdApi.connectDevice(device, function (res) { | |||
connectSuccess(res) | |||
}, function (res) { | |||
listenStatus(res); | |||
}); | |||
tdApi.connectDevice( | |||
device, | |||
function (res) { | |||
connectSuccess(res) | |||
}, function (res) { | |||
listenStatus(res); | |||
} | |||
); | |||
break; | |||
case "ZZ": |
@@ -271,68 +271,8 @@ | |||
duration: 3000, | |||
easing: "easeInOutCubic" | |||
}) | |||
console.log('输出内容==============',getItem(StorageKeys.OpenId),'==============') | |||
// uni.navigateTo({ | |||
// url: '/subpackage/service/equityList/equityList' | |||
// }) | |||
// #ifdef MP-ALIPAY | |||
my.getAuthCode({ | |||
scopes: 'auth_base', | |||
success: items => { | |||
const optionsUser = { | |||
type: 2, | |||
data: { | |||
payConfigId: '6a9a54bc01f644312543761234', | |||
code: items.authCode | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request('58760acb637245729e971597a1fb92c4', optionsUser).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
console.log('=====123',data,'======456',items,'========') | |||
// const optionsali = { | |||
// type: 2, | |||
// data: { | |||
// openId: getItem(StorageKeys.OpenId), | |||
// wxOpenId: data.openId, | |||
// cardId: state.cardId, | |||
// orderNum: state.orderNum, | |||
// payConfigId: aliPayConfigIdTwo, | |||
// body: "储值卡充值", | |||
// }, | |||
// method: "POST", | |||
// showLoading: true, | |||
// }; | |||
// request(cardCzPay, optionsali).then((res) => { | |||
// const data = stringToJson(res.bizContent); | |||
// my.tradePay({ | |||
// // 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号 trade_no | |||
// tradeNO: data.tranPackage, | |||
// success: res => { | |||
// console.log("支付成功", res); | |||
// checkOrder(); | |||
// }, | |||
// fail: res => { | |||
// confirm(res, () => { }, "支付失败", false); | |||
// }, | |||
// }); | |||
// }); | |||
}); | |||
}, | |||
fail: err => { | |||
console.log('my.getAuthCode 调用失败', err) | |||
} | |||
}); | |||
// #endif | |||
// my.navigateTo({ | |||
// url: 'plugin://lazyPlugin/hello', | |||
// }); | |||
console.log('输出内容==============', getItem(StorageKeys.OpenId), '==============') | |||
const state = reactive({ | |||
type: 0, //1客车 2货车 | |||
userType: 1, //1个人 2单位 | |||
@@ -683,7 +623,6 @@ | |||
// #ifdef MP-WEIXIN | |||
if (val == 1) { | |||
navTo('/pages/recharge/recharge-pay', true) | |||
// navTo('/pages/recharge/recharge', true) | |||
} else if (val == 2) { | |||
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | |||
} |
@@ -26,7 +26,9 @@ let tdApi = require("../etc/TDAPI/TDRObuSDK.js"); | |||
let zzApi = require("../etc/WJAPI/wjBleAPI.js"); | |||
let jtApi = require("../etc/JTAPI/BleUtil.js"); | |||
const jlQZApi = require("../etc/JLQZAPI/JLObuSDK.js"); | |||
import { login } from "../../utils/network/api"; | |||
import { | |||
login | |||
} from "../../utils/network/api"; | |||
import { | |||
getItem | |||
} from "../../utils/storage"; | |||
@@ -45,7 +47,7 @@ if (getItem('environment') == 'ZFB') { | |||
*/ | |||
function disconnectDevice() { | |||
var connectPrefixName = datas.getData("connectPrefixName"); | |||
console.log('断开蓝牙connectPrefixName',getItem('environment'),tdApi,datas.getData("connectPrefixName")) | |||
console.log('断开蓝牙connectPrefixName', getItem('environment'), tdApi, datas.getData("connectPrefixName")) | |||
switch (connectPrefixName) { | |||
case "WJ": | |||
wjApi.disconnectDevice(function(res) { | |||
@@ -104,7 +106,7 @@ function disconnectDevice() { | |||
}); | |||
break; | |||
case "TD": | |||
console.log(tdApi,'==================================') | |||
console.log(tdApi, '==================================') | |||
tdApi.disconnectDevice(function(res) { | |||
datas.setData("bluLinkStatus", false); | |||
datas.setData("connectPrefixName", ""); | |||
@@ -203,7 +205,7 @@ function transCmd(cmdArr, type, func, callBack = null) { | |||
break; | |||
case "JT": | |||
jtApi.transCmd(cmdArr, type, function(res) { | |||
console.log('指令执行结果:',res) | |||
console.log('指令执行结果:', res) | |||
if (res.code == 0) { | |||
func(res.data); | |||
} else { |
@@ -216,26 +216,34 @@ | |||
wheelCount: "", | |||
isJH: "" | |||
}); | |||
let cmdRandNum = ''; | |||
let ids = ''; | |||
onLoad((option) => { | |||
console.log('======重新激活开始======', option); | |||
ids = option.id; | |||
//请求订单详情 | |||
queryOrderDetail(option.id); | |||
// uni.$on('bluetoothLink', res => { | |||
// console.log(res,'===========123'); | |||
// if (res.status) { | |||
// // getCardRenewal() | |||
// setTimeout(()=>{ | |||
// getObuId() | |||
// }) | |||
// } | |||
// //移除监听 | |||
// console.log('======移除监听======', res) | |||
// // uni.$off('bluetoothLink') | |||
// }) | |||
if (opn.state) { | |||
getObuId() | |||
} | |||
}); | |||
onShow((option) => { | |||
uni.$on('bluetoothLink', res => { | |||
console.log(res); | |||
if (res.status) { | |||
// getCardRenewal() | |||
getObuId() | |||
} | |||
//移除监听 | |||
console.log('======移除监听======', res) | |||
// uni.$off('bluetoothLink') | |||
}) | |||
}) | |||
@@ -260,7 +268,7 @@ | |||
activationRecordQuery().then((val) => { | |||
console.log("激活次数", val) | |||
if (val.limit) { | |||
navTo("/pages/bluetooth/bluetooth?routeType=5"); | |||
navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + ids); | |||
} else { | |||
msg("一年内到达激活次数上限5次") | |||
} | |||
@@ -269,6 +277,7 @@ | |||
msg("请上传正确行驶证") | |||
} | |||
// navTo("/pages/bluetooth/bluetooth?routeType=6&id=" + ids); | |||
}; | |||
//获取订单详情 | |||
@@ -309,6 +318,7 @@ | |||
activationRecordQuery().then((val) => { | |||
console.log("jihuo", val) | |||
state.activationNum = val.num | |||
// getObuId() | |||
}); | |||
}); | |||
@@ -330,10 +340,12 @@ | |||
obu.obuId = res[1].substring(20, 36); | |||
obu.vin = res[1].substring(18, 20); | |||
obu.version = res[1].substring(18, 19) >= 4 ? "4x" : "2x"; | |||
cmdRandNum = res[2].substring(0, res[2].length - 4); | |||
console.log("obu.obuId===========", obu.obuId, res[1].substring(20, 36), cmdRandNum) | |||
getInstallApply() | |||
// cmdRandNum = res[2].substring(0, res[2].length - 4); | |||
} | |||
}); | |||
// getInstallApply() | |||
}; | |||
/** | |||
@@ -362,16 +374,7 @@ | |||
.then(() => { | |||
tools.hideLoadingAlert(); | |||
//再次获取随机数 | |||
let cmdArr = [cmd.HOME_DIRECTORY, cmd.RANDOM_NUMBER]; | |||
bluetoothUtil.transCmd(cmdArr, '20', function (res) { | |||
var str = res[1].substring(res[1].length - 4, res[1].length); | |||
if (str == "9000") { | |||
let cmdRandNum = res[1].substring(0, res[1].length - 4); | |||
getObuActivation(cmdRandNum); | |||
} else { | |||
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]); | |||
} | |||
}) | |||
getObuActivation(cmdRandNum); | |||
}) | |||
}; | |||
@@ -479,10 +482,10 @@ | |||
state.changeColor = true; | |||
state.phoneType = 0 | |||
state.isTakePhotoModeShow = false | |||
uploadFile(val.tempImagePath, imageType, IFCODE.etcCarOcrCard).then((data) => { | |||
uploadFile(val.tempImagePath, imageType, IFCODE.etcCarOcrCard).then((data : any) => { | |||
// uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => { | |||
console.log('输出内容=====================', state.choiceIndex) | |||
if (state.choiceIndex === "3") { | |||
if (state.choiceIndex == "3") { | |||
if (data.plate_a.length > 8) { | |||
state.form.vehicleIdNum = data.plate_a.substring(0, 8); | |||
} else { | |||
@@ -553,6 +556,7 @@ | |||
}) | |||
} | |||
// #endif | |||
// #ifdef MP-WEIXIN |
@@ -235,7 +235,7 @@ | |||
fileDataStrings.vehicleEngineNum = orderInfo.vehicleEngineNum; | |||
fileDataStrings.axleCount = parseInt(orderInfo.vehicleAxleCount); //轴数 | |||
fileDataStrings.engineNum = orderInfo.vehicleVin; //发动机 | |||
fileDataStrings.type = parseInt(orderInfo.type); //类型 | |||
fileDataStrings.type = parseInt(orderInfo.vehicleClass); //类型 | |||
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌 | |||
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色 | |||
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions; |
@@ -591,7 +591,7 @@ | |||
fileDataStrings.vehicleEngineNum = orderInfo.vehicleEngineNum; | |||
fileDataStrings.axleCount = parseInt(orderInfo.vehicleAxleCount); //轴数 | |||
fileDataStrings.engineNum = orderInfo.vehicleVin; //发动机 | |||
fileDataStrings.type = parseInt(orderInfo.type); //类型 | |||
fileDataStrings.type = parseInt(orderInfo.vehicleClass); //类型 | |||
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌 | |||
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色 | |||
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions; |
@@ -231,7 +231,8 @@ | |||
let str3 = res[3].substring(res[3].length - 4, res[3].length); //判断是否为9000 | |||
if (str == "9000" || str3 == "9000") { | |||
if (res[2].length > 86 || res[3] >= 12) { | |||
console.log("res[2]", res[2], res[2].substring(18, 19)) | |||
console.log("res[2]", res[2].substring(84, 86), getVehiclePlateColor(parseInt(res[2] | |||
.substring(82, 84), 16)), res[2].substring(18, 19)) | |||
card.cardNo = res[2].substring(20, 40); | |||
card.startTime = res[2].substring(40, 48); | |||
card.endTime = res[2].substring(48, 56); | |||
@@ -241,13 +242,15 @@ | |||
console.log("card.v_userType", card.v_userType) | |||
card.vehiclePlate = HexToStrig(res[2].substring(56, 80)); | |||
if (res[2].substring(18, 19) >= 4) { | |||
//4x卡 | |||
card.type = getVehicleType(parseInt(res[2].substring(84, 86), 16)); | |||
// card.vehiclePlateColor = parseInt(res[2].substring(82, 84), 16); | |||
card.color = getVehiclePlateColor(parseInt(res[2].substring(82, 84), 16)) | |||
} else { | |||
//2x卡--获取车牌颜色 | |||
card.type = "--"; | |||
// card.vehiclePlateColor = parseInt(res[2].substring(82, 84), 16); | |||
card.color = getVehiclePlateColor(parseInt(res[2].substring(82, 84), 16)) | |||
card.color = getVehiclePlateColor(parseInt(res[2].substring(82, 86), 16)) | |||
} | |||
state.vehicleId = card.vehiclePlate + "_" + parseInt(res[2].substring(82, 84), 16) | |||
console.log("card.color===========", card.vehiclePlate, parseInt(res[2].substring(82, 84), | |||
@@ -341,8 +344,8 @@ | |||
console.log("===========", obu.num, res[1].substring(0, res[1].length - 4)) | |||
decryptObuVehicleInfo(obu.num, res[1].substring(0, res[1].length - 4), | |||
function(res) { | |||
console.log("obu信息", res, res.substring(44, 48), "车轴数", res | |||
.substring(42, 44)); | |||
console.log("obu信息", '车辆类型', res, res.substring(28, 30), | |||
HexToInt(res.substring(28, 30))); | |||
obu.approvedCount = HexToInt(res.substring(48, 54)); | |||
obu.axleCount = HexToInt(res.substring(42, 44)); | |||
obu.axleDistance = HexToInt(res.substring(44, 48)); | |||
@@ -455,6 +458,7 @@ | |||
showLoading: true, | |||
}; | |||
request(searchObuInfo, options).then((res) => { | |||
tools.hideLoadingAlert(); | |||
let result = stringToJson(res.bizContent); | |||
state.obuStatus = result.data[0].obuStatus | |||
console.log("153", result) |
@@ -538,7 +538,7 @@ | |||
fileDataStrings.vehicleEngineNum = orderInfo.vehicleEngineNum; | |||
fileDataStrings.axleCount = parseInt(orderInfo.vehicleAxleCount); //轴数 | |||
fileDataStrings.engineNum = orderInfo.vehicleVin; //发动机 | |||
fileDataStrings.type = parseInt(orderInfo.type); //类型 | |||
fileDataStrings.type = parseInt(orderInfo.vehicleClass); //类型 | |||
fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌 | |||
fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色 | |||
fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions; |
@@ -100,8 +100,6 @@ | |||
<view class=""> | |||
<u-form label-width="200" :model="state.form" ref="uForm"> | |||
<u-form-item label="车牌号"> | |||
<!-- <car-number-input @numberInputResult="carNumber" | |||
:defaultStr="state.form.vehicleIdNum" ></car-number-input> --> | |||
<u-input inputAlign="right" placeholder="请输入车牌号" v-model="state.form.vehicleIdNum" disabled /> | |||
</u-form-item> | |||
@@ -143,11 +141,11 @@ | |||
</picker> | |||
</u-form-item> | |||
<u-form-item label="核定载人数"> | |||
<u-input inputAlign="right" placeholder="请输入核定载人数" v-model="state.form.approvedCountShow" | |||
<u-input inputAlign="right" placeholder="请输入核定载人数" v-model="state.form.approvedCount" | |||
:disabled="state.isEnableChangeOCRCarInfo" /> | |||
</u-form-item> | |||
<u-form-item label="整备质量"> | |||
<u-input inputAlign="right" placeholder="请输入整备质量" v-model="state.form.maintenaceMassShow" | |||
<u-input inputAlign="right" placeholder="请输入整备质量" v-model="state.form.maintenaceMass" | |||
:disabled="state.isEnableChangeOCRCarInfo" /> | |||
</u-form-item> | |||
<view class="form-item"> | |||
@@ -168,7 +166,7 @@ | |||
</view> | |||
</view> | |||
<u-form-item label="总质量"> | |||
<u-input inputAlign="right" placeholder="请输入总质量" v-model="state.form.totalMassShow" | |||
<u-input inputAlign="right" placeholder="请输入总质量" v-model="state.form.totalMass" | |||
:disabled="state.isEnableChangeOCRCarInfo" /> | |||
</u-form-item> | |||
<u-form-item label="车轴数"> | |||
@@ -721,14 +719,12 @@ | |||
.then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
// 创建工单 | |||
// creactWorkOrderRequest().then((val : any) => { | |||
msg("待审核") | |||
setTimeout(() => { | |||
uni.navigateBack({ | |||
delta: 2 | |||
}) | |||
}, 2000) | |||
// }) | |||
}) | |||
.catch((res) => { | |||
console.log(res); |
@@ -1,6 +1,5 @@ | |||
<template> | |||
<view class="container" style="background-color: #F4F6FA;"> | |||
<view class="container" style="background-color:#F4F6FA;"> | |||
<image style="width: 100%;" mode="widthFix" | |||
src="https://qtzl.etcjz.cn/default-bucket/20240322/7380a0422a1e49fdb2fefc9d_beijing.png"></image> | |||
@@ -10,29 +9,30 @@ | |||
<view style="margin-bottom: 20px;font-size: 38rpx; text-align: center;font-family: Microsoft Yahei;"> | |||
我的权益</view> | |||
<!-- <view v-if="exchangeCodes.length > 0" style="text-align: center;">暂无权益内容</view> @scrolltolower="loadMore" --> | |||
<scroll-view scroll-y="true" > | |||
<scroll-view scroll-y="true"> | |||
<view v-for="(item, index) in exchangeCodes" :key="index" class="item" @click="click"> | |||
<view style="display: flex;flex-direction: row;flex: 1;"> | |||
<view style="display: flex;flex-direction: column;margin: 10px;"> | |||
<text>权益名称:{{item.couponName}}</text> | |||
<text style="margin-top: 10rpx;">状态:{{item.getStatus}}</text> | |||
<text>权益名称:{{item.equityInfoItems[0].productName}}</text> | |||
<text style="margin-top: 10rpx;">车牌号:{{item.vehiclePlate}}</text> | |||
<text v-if="item.drawTime" style="margin-top: 10rpx;">领取时间:{{item.drawTime}}</text> | |||
<text style="margin-top: 10rpx;">领取时间:{{item.getStatus}}</text> | |||
<text style="margin-top: 10rpx;">有效期:{{item.validEndTime}}</text> | |||
<text style="margin-top: 10rpx;">有效期:{{ item.periodOfValidity }}</text> | |||
<view | |||
style="display: flex;justify-content: flex-start;flex-direction: row;width: 100%;margin-top: 10rpx;"> | |||
<text class="code">券码:{{ item.redeemCodeStr}}</text> | |||
<text v-if="item.redeemCodeStr" class="code">券码:{{ item.redeemCodeStr}}</text> | |||
</view> | |||
</view> | |||
<view | |||
style="border-radius: 0 8px 8px 0 ;justify-content: center;text-align: center; display: flex;flex-direction: column;background: white;flex: 1;"> | |||
style="margin: 10px;border-radius: 0 8px 8px 0 ;justify-content: center;text-align: center; display: flex;flex-direction: column;background: white;flex: 1;"> | |||
<text class="text-w" | |||
:style="{color: item.status == 'WAIT_ACTIVATED' ? '#023F8F' : item.status == 'WAIT_USE' ? 'orange' : item.status == 'USED' ? 'green' : 'gray'}">{{item.status == 'WAIT_ACTIVATED' ? '待激活' : item.status == 'WAIT_USE' ? '待领取' : | |||
item.status == 'USED' ? '已领取' : '已失效'}}</text> | |||
:style="item.status == 'WAIT_ACTIVATED' ? 'color: #023F8F;' : item.status == 'WAIT_USE' ? 'color: orange;' : item.status == 'USED' ? 'color: green;' : 'color: gray;'">{{item.status == 'WAIT_ACTIVATED' ? '待激活' : item.status == 'WAIT_USE' ? '待领取' : | |||
item.status == 'USED' ? '已领取' : '已失效'}}</text> | |||
<button v-if="item.status != 'EXPIRED'" | |||
:style="{backgroundColor: item.status == 'WAIT_ACTIVATED' ? '#023F8F' : item.status == 'WAIT_USE' ? 'orange' : item.status == 'USED' ? 'green' : 'gray'}" | |||
class="copy-btn" :data-code="item" @click="copyCode"> | |||
:style="item.status == 'WAIT_ACTIVATED' ? 'background-color: #023F8F;' : item.status == 'WAIT_USE' ? 'background-color: orange;' : item.status == 'USED' ? 'background-color: green;' : 'background-color: gray;'" | |||
class="copy-btn" data-code="{{item}}" @click="copyCode"> | |||
{{item.status == 'WAIT_ACTIVATED' ? '去激活' : item.status == 'WAIT_USE' ? '立即领取' : | |||
item.status == 'USED' ? '复制' : ''}}</button> | |||
item.status == 'USED' ? '复制' : ''}}</button> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -61,43 +61,72 @@ | |||
let singleEquityId = ref('') | |||
let couponAgencyType = ref('') | |||
let couponId = ref('') | |||
let exchangeCodes: any = ref('') | |||
let exchangeCodes: any = ref([]) | |||
let page = ref('') | |||
onLoad((options) => { | |||
couponId.value = options.couponId | |||
singleEquityId.value = options.singleEquityId | |||
couponAgencyType.value = options.couponAgencyType | |||
loadExchangeCodes(); | |||
}) | |||
function loadExchangeCodes() { | |||
//卡券渠道类型获取单项权益列表 | |||
request("bbce0fdfba9b41dabfcb2f19f9a35c97", { | |||
type: 2, | |||
data: { | |||
mobile: getItem('mobile'), | |||
loginSource: '69af303ba2eb4608a099163f0d2a5dbd', | |||
singleEquityId: options.singleEquityId, | |||
couponAgencyType: options.couponAgencyType, | |||
couponId: options.couponId | |||
mobile: getItem('mobile') + "", | |||
loginSource: getItem("loginSource"), | |||
singleEquityId: singleEquityId.value, | |||
equityId: singleEquityId.value, | |||
couponAgencyType: couponAgencyType.value, | |||
couponId: couponId.value | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}).then((item) => { | |||
let res = JSON.parse(item.bizContent) | |||
console.log(res, '========='); | |||
let newCodes = res.data; | |||
let newCodes = res.data.orderItems; | |||
console.log(res, '=========', newCodes); | |||
if (newCodes) { | |||
newCodes.forEach(item => { | |||
//1 不能领取 0 可以领取 1(不能领取原因 notUseCase) | |||
// WAIT_GET | |||
item.status = | |||
item.equityInfoItems[0].isUse == '0' && item.equityInfoItems[0].couponStatus == | |||
'WAIT_GET' ? 'WAIT_USE' : | |||
item.equityInfoItems[0].isUse == '1' && item.equityInfoItems[0].couponStatus == | |||
'WAIT_GET' ? 'WAIT_ACTIVATED' : | |||
item.equityInfoItems[0].couponStatus == 'USED' ? 'USED' : ''; | |||
//WAIT_ACTIVATED(待激活) WAIT_USE(待领取使用) USED(已使用) EXPIRED(已过期) OUINGSYNREE | |||
console.log(item.equityInfoItems[0].periodOfValidity, | |||
item.equityInfoItems[0].isUse, item.equityInfoItems[0].notUseCase, | |||
item.status, item.equityInfoItems[0].couponStatus, '=================', | |||
item.vehiclePlate); | |||
// item.status = item.equityInfoItems[0].couponStatus == 'WAIT_GET' ? 'WAIT_ACTIVATED' : item.equityInfoItems[0].couponStatus | |||
item.getStatus = getStatusValue(item.status) | |||
item.redeemCodeStr = desensitize(item.redeemCode) | |||
item.validEndTime = item.validEndTime.replace(/T/g, " "); | |||
item.redeemCodeStr = item.equityInfoItems[0].couponInfoItem && desensitize(item | |||
.equityInfoItems[0].couponInfoItem.redeemCode) | |||
item.periodOfValidity = item.equityInfoItems[0].periodOfValidity ? item | |||
.equityInfoItems[0].periodOfValidity.split('T')[0] : '激活领取后展示' | |||
item.redeemCode = item.equityInfoItems[0].couponInfoItem && item | |||
.equityInfoItems[0].couponInfoItem.redeemCode | |||
item.drawTime = item.equityInfoItems[0].drawTime && item.equityInfoItems[0] | |||
.drawTime.split('T')[0] | |||
// item.periodOfValidity = item.equityInfoItems[0].periodOfValidity.replace(/T/g, " "); | |||
// item.periodOfValidity = item.equityInfoItems[0].periodOfValidity.split('T')[0] | |||
}); | |||
exchangeCodes.value = exchangeCodes.value.concat(newCodes) | |||
page.value = page.value + 1 | |||
exchangeCodes.value = newCodes | |||
console.log("exchangeCodes.value", exchangeCodes.value); | |||
} | |||
}) | |||
}) | |||
} | |||
function click() { | |||
let that = this | |||
wx.navigateTo({ | |||
url: '/subpackage/service/equityInfo/equityInfo?singleEquityId=' + that.data.singleEquityId + | |||
"&couponAgencyType=" + that.data.couponAgencyType + "&couponId=" + that.data.couponId, | |||
uni.navigateTo({ | |||
url: '/subpackage/service/equityInfo/equityInfo?singleEquityId=' + singleEquityId.value + | |||
"&couponAgencyType=" + couponAgencyType.value + "&couponId=" + couponId.value, | |||
}) | |||
} | |||
@@ -107,13 +136,13 @@ | |||
// 复制兑换码到剪贴板 | |||
let code = e.currentTarget.dataset.code.redeemCode; | |||
if (item.status == 'WAIT_ACTIVATED') { //待激活 | |||
wx.showModal({ | |||
uni.showModal({ | |||
title: '温馨提示', | |||
content: "激活后,可领取卡卷", | |||
confirmText: "去激活", | |||
success: function(res) { | |||
if (res.confirm) { | |||
wx.navigateTo({ | |||
uni.navigateTo({ | |||
url: '/pages/etc/explain/index', | |||
}) | |||
} else if (res.cancel) { | |||
@@ -122,29 +151,37 @@ | |||
} | |||
}); | |||
} else if (item.status == 'WAIT_USE') { //待领取使用 | |||
wx.showModal({ | |||
uni.showModal({ | |||
title: '温馨提示', | |||
content: "自卡卷领取后,有效期截止一年后失效", | |||
content: "请在领取后120天内使用,超期失效", | |||
success: function(res) { | |||
if (res.confirm) { | |||
request("a6bd3d8c855548eb8015655ea8d9287b", { | |||
type: 2, | |||
data: { | |||
mobile: "18385442054", | |||
mobile: getItem('mobile') + "", | |||
notificationType: 'USE', | |||
cardIds: [item.id] | |||
cardIds: [item.id], | |||
couponId: couponId.value, | |||
equityId: item.equityId, | |||
orderId: item.orderId | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}).then((item) => { | |||
uni.setClipboardData({ | |||
data: code, | |||
success: function() { | |||
uni.showToast({ | |||
title: '已复制兑换码', | |||
icon: 'success', | |||
}); | |||
}, | |||
// uni.setClipboardData({ | |||
// data: code, | |||
// success: function() { | |||
// uni.showToast({ | |||
// title: '已复制兑换码', | |||
// icon: 'success', | |||
// }); | |||
// }, | |||
// }); | |||
loadExchangeCodes(); | |||
uni.showToast({ | |||
title: '领取成功', | |||
icon: 'success', | |||
}); | |||
}) | |||
} else if (res.cancel) { |
@@ -1,7 +1,7 @@ | |||
<template> | |||
<div> | |||
<view v-for="(item, index) in listData" :key="index" @click="onClick(item)" :data-code="item" class="item" | |||
style="justify-content: flex-start; display: flex; font-size: 28rpx; min-height: 20px; background-color: #023F8F; color: white; border-radius: 20rpx; padding: 20px; margin: 20px;"> | |||
style="justify-content: flex-start; display: flex; font-size: 28rpx; min-height: 20px; background-color: #22dbc8; color: white; border-radius: 20rpx; padding: 20px; margin: 20px;"> | |||
<view style="display: flex; flex-direction: column; flex: 1;"> | |||
<text>{{ item.productName }}</text> | |||
<!-- <text>记账卡</text> --> | |||
@@ -11,6 +11,9 @@ | |||
</div> | |||
</template> | |||
<script setup lang='ts'> | |||
import { | |||
getItem | |||
} from "@/utils/storage"; | |||
import { | |||
ref | |||
} from 'vue'; | |||
@@ -24,8 +27,8 @@ | |||
request("a867bb01c200466b8715f3bb98be3eb9", { | |||
type: 2, | |||
data: { | |||
couponAgencyType: ['TUHU','ZFB'], | |||
couponAgencyType: ['TUHU', 'ZFB'], | |||
mobile: getItem('mobile').toString() | |||
}, | |||
method: "POST", | |||
showLoading: true, |
@@ -70,8 +70,8 @@ export function request(code, options = {}, start = false) { | |||
} | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn' | |||
options.url = envs[process.env.NODE_ENV].baseUrl + '/dev/api/interfaceMidGroundIn' | |||
options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn' | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + '/dev/api/interfaceMidGroundIn' | |||
//默认json数据格式提交` | |||
let contentType = 'application/x-www-form-urlencoded' | |||