@@ -136,6 +136,7 @@ | |||
success() { | |||
console.log("扫描蓝牙中"); | |||
tools.showLoadingAlert("扫描蓝牙中"); | |||
console.log("11111111") | |||
openBluetooth(); | |||
}, | |||
fail() { | |||
@@ -157,6 +158,7 @@ | |||
success(authData) { | |||
if (authData.authSetting["scope.bluetooth"] == true) { | |||
tools.showLoadingAlert("扫描蓝牙中"); | |||
console.log("2222222") | |||
openBluetooth(); | |||
} else { | |||
uni.closeBluetoothAdapter(); | |||
@@ -193,6 +195,7 @@ | |||
* 打开蓝牙 | |||
*/ | |||
const openBluetooth = () => { | |||
console.log("进来了") | |||
let foundDevices = []; //扫描到的蓝牙列表 | |||
uni.closeBluetoothAdapter(); //先关闭蓝牙 | |||
//打开蓝牙 | |||
@@ -245,7 +248,7 @@ | |||
device.deviceId = deviceId; | |||
device.prefixName = prefixName; | |||
device.selected = false; //防止重复点击 | |||
console.log("device._prefixName", prefixName) | |||
let _name = ""; | |||
switch (prefixName) { | |||
case "WJ": | |||
@@ -283,9 +286,18 @@ | |||
break; | |||
} | |||
device._name = _name; | |||
console.log("device._name11111", device._name) | |||
if (deviceList.value.length == 0) { | |||
// #ifdef MP-ALIPAY | |||
if (device._name == '聚利' || device._name == '万集' || device._name == '天地融') { | |||
foundDevices.push(device); | |||
console.log("device._name", device._name) | |||
} | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
foundDevices.push(device); | |||
// #endif | |||
} else { | |||
let isHave = false; | |||
for (let j = 0; j < foundDevices.length; j++) { | |||
@@ -298,7 +310,8 @@ | |||
foundDevices.push(device); | |||
} | |||
} | |||
deviceList.value = foundDevices; | |||
console.log("deviceList.value", foundDevices) | |||
// deviceList.value = foundDevices; | |||
foundDevices = []; | |||
// console.log(foundDevices); | |||
} | |||
@@ -328,7 +341,7 @@ | |||
console.info("停止扫描蓝牙"); | |||
uni.stopBluetoothDevicesDiscovery({ | |||
success: function (res) { | |||
console.log(device,item); | |||
console.log(device, item); | |||
if (item.selected == false) { | |||
console.log("第一次点击了"); | |||
item.selected = true; | |||
@@ -362,7 +375,7 @@ | |||
// delete device._name | |||
console.log(item); | |||
datas.setData("deviceId", device,device.deviceId); | |||
datas.setData("deviceId", device, device.deviceId); | |||
tools.showLoadingAlert("蓝牙连接中"); | |||
console.info("连接的是" + prefixName); | |||
switch (prefixName) { |
@@ -80,47 +80,45 @@ | |||
<view v-if="item.mode === 'custom'" :class="item[item.value] ? 'text' : 'text-hint'" | |||
style="flex: 1" @click="emit('pickerCustom', item)"> | |||
{{ | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
</view> | |||
<template v-else-if="item.mode === 'search'"> | |||
<template v-else-if="item.mode === 'search' && state.sysType == 'WECHAT'"> | |||
<view :disabled="item.disabled" :class="item[item.value] ? 'text' : 'text-hint'" | |||
style="flex: 1" @click="item.searchPickerVisible = true"> | |||
{{ | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
</view> | |||
<search-picker :visible="item.searchPickerVisible" :dataSource="item.itemData" | |||
v-model="item[item.value]" | |||
@hidePicker="item.searchPickerVisible = false"></search-picker> | |||
</template> | |||
<picker v-else :disabled="item.disabled" :range-key="item.itemKey" | |||
:mode="item.mode ? item.mode : 'selector'" @change="bindPickerChange($event, item)" | |||
:range="item.itemData" style="flex: 1"> | |||
<picker v-else mode="selector" :range="item.itemData" | |||
@change="bindPickerChange($event, item)"> | |||
<view :class="item[item.value] ? 'text' : 'text-hint'"> | |||
{{ | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
</view> | |||
</picker> | |||
@@ -137,11 +135,6 @@ | |||
placeholder-class="text-hint" style="width: 100%" :maxlength="item.maxlength" | |||
:placeholder="item.hint ? item.hint : '请输入' + item.title"> | |||
</textarea> | |||
<!-- <view v-if="item.maxlength" class="as-gravity-center-end" | |||
style="display: flex;flex-direction: row;margin-top:120rpx;"> | |||
<view class="text-hint">{{!item.num ? '0' : item.num}}</view> | |||
<view class="text-hint">/{{item.maxlength ? item.maxlength : 100}}</view> | |||
</view> --> | |||
</view> | |||
</view> | |||
@@ -210,28 +203,14 @@ | |||
<!-- 省市区选择 --> | |||
<view v-if="item.type === 10" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'"> | |||
<view class="as-layout-horizontal" style="align-items: center"> | |||
<!-- <pick-regions :defaultRegionCode="defaultRegionCode" | |||
@getRegion="handleGetRegion($event, item)" style="flex: 1"> | |||
<view :class="item[item.value] ? 'text' : 'text-hint'"> | |||
{{ | |||
item[item.value] | |||
? item.itemKey | |||
? item[item.value][item.itemKey] | |||
: item[item.value] | |||
: item.hint | |||
? item.hint | |||
: "请选择" + item.title | |||
}} | |||
</view> | |||
</pick-regions> --> | |||
<picker mode="region" @change="handleGetRegion($event, item)" :value="item.region"> | |||
<view class="uni-input"> | |||
{{item.region?item.region[0]+item.region[1]+item.region[2]:""}} | |||
</view> | |||
</picker> | |||
<image class="arror" :src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"> | |||
<image class="arror" v-if="state.sysType == 'WECHAT'" | |||
:src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"> | |||
</image> | |||
</view> | |||
</view> | |||
@@ -261,9 +240,11 @@ | |||
<submit-button :title="config ? config.submitName : '提交'" form-type="submit" | |||
@submit="formSubmit"></submit-button> | |||
</view> | |||
</form> | |||
</template> | |||
<script setup lang="ts"> | |||
import { onLoad, onShow } from "@dcloudio/uni-app"; | |||
import { TypeData, ImgData } from "./tools"; | |||
import { request } from "@/utils/network/request.js"; | |||
import carNumBerInput from "@/components/car-number-input/car-number-input"; | |||
@@ -271,6 +252,14 @@ | |||
import pickRegions from "@/login/pick-regions/pick-regions.vue"; | |||
import { onMounted, ref } from "vue"; | |||
import { reactive } from "vue"; | |||
onShow((option : any) => { | |||
// #ifdef MP-ALIPAY | |||
state.sysType = 'ALI'; | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
state.sysType = 'WECHAT'; | |||
// #endif | |||
}); | |||
const defaultRegionCode = "520115"; | |||
const props = defineProps({ | |||
formData: { | |||
@@ -288,7 +277,8 @@ | |||
}, | |||
}); | |||
const state = reactive({ | |||
multiIndex: [0, 0, 0] | |||
multiIndex: [0, 0, 0], | |||
sysType: "" | |||
}) | |||
//defineEmits | |||
const emit = defineEmits<{ | |||
@@ -315,6 +305,7 @@ | |||
/* 普通选择器*/ | |||
item[item.value] = item.itemData[select]; | |||
} | |||
console.log("111111", item.mode, item[item.value]) | |||
} | |||
//输入框后按钮点击 | |||
@@ -350,11 +341,9 @@ | |||
// 获取选择的地区 | |||
function handleGetRegion(e : any, item : TypeData) { | |||
console.log("获取选择的地区", e) | |||
// item[item.value] = e[0].name + "/" + e[1].name + "/" + e[2].name; | |||
console.log("获取选择的地区", e, item) | |||
item[item.value] = e.detail.value; | |||
emit("handleGetRegion", e, item); | |||
console.log("获取选择的地区", item) | |||
} | |||
//多项选择器 |
@@ -200,7 +200,7 @@ | |||
let name = res.devices[i]["name"]; | |||
let prefixName = ""; | |||
let deviceId = res.devices[i]["deviceId"]; | |||
console.log(res.devices[i]["name"]); | |||
console.log("res.devices[i]", res.devices[i]["name"]); | |||
if (name != "" && name != undefined && name != "undefined") { | |||
if ( | |||
name.indexOf("G-WJ") != -1 || | |||
@@ -237,7 +237,7 @@ | |||
device.deviceId = deviceId; | |||
device.prefixName = prefixName; | |||
device.selected = false; //防止重复点击 | |||
console.log("device._prefixName", prefixName) | |||
let _name = ""; | |||
switch (prefixName) { | |||
case "WJ": | |||
@@ -277,7 +277,16 @@ | |||
device._name = _name; | |||
if (deviceList.value.length == 0) { | |||
// #ifdef MP-ALIPAY | |||
if (device._name == '聚利' || device._name == '万集' || device._name == '天地融') { | |||
foundDevices.push(device); | |||
console.log("device._name", device._name) | |||
} | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
foundDevices.push(device); | |||
// #endif | |||
} else { | |||
let isHave = false; | |||
for (let j = 0; j < foundDevices.length; j++) { | |||
@@ -354,7 +363,7 @@ | |||
// //断开蓝牙 | |||
// bluetoothUtil.disconnectDevice(); | |||
tools.showLoadingAlert("蓝牙连接中"); | |||
console.info("连接的是" + prefixName , device); | |||
console.info("连接的是" + prefixName, device); | |||
switch (prefixName) { | |||
case "WJ": | |||
wjApi.connectDevice( | |||
@@ -508,8 +517,8 @@ | |||
alertF(res.msg); | |||
} | |||
}; | |||
function oks(){ | |||
function oks() { | |||
//routeType 1.激活(订单来) 2.圈存 (/pages/recharge/recharge来)3.信息重写 4.信息读取 5从哪里来回哪里去监听bluetoothLink | |||
if (routeType.value == "1") { | |||
uni.navigateTo({ | |||
@@ -520,7 +529,7 @@ | |||
url: `/pages/recharge/recharge?connectSuccess=1&&cardId=${state.cardId}&&fee=${state.fee}`, | |||
}); | |||
} else if (routeType.value == "3") { | |||
} else if (routeType.value == "4") { | |||
uni.navigateTo({ | |||
url: "/subpackage/after-sale/deviceInfo/deviceInfo", | |||
@@ -569,12 +578,12 @@ | |||
tools.showToastAlert("蓝牙已断开"); | |||
// #ifdef MP-ALIPAY | |||
my.closeBluetoothAdapter({ | |||
success(res) { | |||
// 关闭蓝牙适配器成功 | |||
}, | |||
fail(err) { | |||
// 处理关闭蓝牙适配器失败的情况 | |||
} | |||
success(res) { | |||
// 关闭蓝牙适配器成功 | |||
}, | |||
fail(err) { | |||
// 处理关闭蓝牙适配器失败的情况 | |||
} | |||
}) | |||
// #endif | |||
} |
@@ -35,17 +35,17 @@ | |||
<!-- 按钮导航 --> | |||
<view class="nav"> | |||
<view class="item-box" @click="$util.navTo('/pages/recharge/select-car',true)"> | |||
<view class="item-box" @click="cardRecharge(1)"> | |||
<view class="item item-1"> | |||
<image :src="fileURL + 'image/index/item-1.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">储值卡充值</view> | |||
</view> | |||
<view class="item-box" @click="$util.navTo('/subpackage/personal-center/search/select-car',true)"> | |||
<view class="item-box" @click="cardRecharge(2)"> | |||
<view class="item item-2"> | |||
<image :src="fileURL + 'image/index/item-2.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">账单查询</view> | |||
<view class="text">卡签信息查询</view> | |||
</view> | |||
<!-- <view class="item-box" @click="$util.navTo('/subpackage/orders/Invoice-mannager',true)"> | |||
<view class="item item-3"> | |||
@@ -76,8 +76,7 @@ | |||
<view class="text">设备遗失</view> | |||
</view> | |||
<!-- <view class="item-box" @click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> --> | |||
<view class="item-box" | |||
@click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> | |||
<view class="item-box" @click="cardRecharge(3)"> | |||
<view class="item item-6"> | |||
<image :src="fileURL + 'image/index/item-6.png'" mode="aspectFill" /> | |||
</view> | |||
@@ -268,7 +267,8 @@ | |||
} from "@/datas/fileURL.js"; | |||
import { | |||
navTo, | |||
confirm | |||
confirm, | |||
msg | |||
} from "@/utils/utils"; | |||
import { | |||
getCodeName | |||
@@ -634,6 +634,20 @@ | |||
url: `../order/order?index=${index}` | |||
}) | |||
} | |||
const cardRecharge = (val) => { | |||
// #ifdef MP-ALIPAY | |||
msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787") | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
if (val == 1) { | |||
navTo('/pages/recharge/select-car', true) | |||
} else if (val == 2) { | |||
navTo('/subpackage/personal-center/search/select-car', true) | |||
} else if (val == 3) { | |||
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | |||
} | |||
// #endif | |||
} | |||
</script> | |||
<style> |
@@ -178,6 +178,10 @@ | |||
</view> | |||
<view class="btn-unbind" @click="del(item.vehicleId)">解除绑定</view> | |||
</view> | |||
<view> | |||
<view class="loading-more" v-if="state.carNumber>5" | |||
@click="$util.navTo('/subpackage/personal-center/vehicle-information', true)">加载更多~</view> | |||
</view> | |||
<view class="sub-bind"> | |||
<view class="item-tit"> | |||
<image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image> | |||
@@ -324,8 +328,8 @@ | |||
} | |||
} | |||
} | |||
state.list = data; | |||
state.carNumber = data.length | |||
state.list = data.slice(0, 5); | |||
console.log("state.list", state.list) | |||
}) | |||
.catch((err) => { | |||
@@ -858,4 +862,11 @@ | |||
margin-left: 20rpx; | |||
font-size: 24rpx; | |||
} | |||
.loading-more { | |||
text-align: center; | |||
font-size: 28rpx; | |||
margin-bottom: 20rpx; | |||
color: #999; | |||
} | |||
</style> |
@@ -33,7 +33,7 @@ | |||
<u-form-item prop="code"> | |||
<view class="from_item"> | |||
<text><text style="color: red"></text>验证码:</text> | |||
<u-input v-model="form.code" placeholder="请输入验证码" class="input" /> | |||
<u-input v-model="form.code" placeholder="请输入验证码" class="input" type="number" /> | |||
<view class="hint2"> | |||
<view class="green">{{ codeDuration === 0 ? "" : codeDuration }}</view> | |||
<view class="grey" @click="getCode">{{ |
@@ -92,16 +92,9 @@ | |||
import { | |||
onLoad, onShow | |||
} from '@dcloudio/uni-app' | |||
// import { | |||
// getItem | |||
// } from "../../utils/storage"; | |||
import { | |||
request | |||
} from "@/utils/network/request.js"; | |||
// import { | |||
// IntegerToHexString, | |||
// AsciToHexString, | |||
// } from "../../utils/util/fileData.js"; | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption.js"; | |||
@@ -359,11 +352,6 @@ | |||
.then(() => { | |||
tools.hideLoadingAlert(); | |||
state.showPopup = true; | |||
// setTimeout(() => { | |||
// uni.navigateBack({ | |||
// delta: 1, | |||
// }) | |||
// }, 1000) | |||
}); | |||
}; |
@@ -305,6 +305,7 @@ | |||
}; | |||
request(outletList, options).then((res) => { | |||
state.outlets = stringToJson(res.bizContent); | |||
let nameList = []; | |||
state.outlets.map((item) => { | |||
nameList.push(item.name); | |||
@@ -312,6 +313,7 @@ | |||
state.formData[7].itemData = nameList; | |||
state.formData[14].itemData = nameList; | |||
console.log("获取退货网点", state.outlets, nameList) | |||
}); | |||
}; | |||
@@ -355,25 +357,35 @@ | |||
} | |||
console.log("全部数据", state.formData) | |||
}; | |||
const handleGetRegion = (e : any, item : any) => { | |||
console.log("dizhi") | |||
} | |||
// const handleGetRegion = (e : any, item : any) => { | |||
// console.log("dizhi") | |||
// } | |||
//地址改变 | |||
const addressInfo = (content : any) => { | |||
console.log("content", `${content.provinceName}${content.cityName}${content.countyName}`) | |||
// #ifdef MP-ALIPAY | |||
state.formData[9][state.formData[9].value] = content.fullname; | |||
state.formData[10][state.formData[10].value] = content.mobilePhone; | |||
state.formData[11][state.formData[11].value] = `${content.prov}/${content.city}/${content.area}`; | |||
let arr = []; | |||
arr.push(content.prov) | |||
arr.push(content.city) | |||
arr.push(content.area) | |||
state.formData[11][ | |||
state.formData[11].value | |||
] = arr; | |||
const addressArr = content.address.split("-") | |||
state.formData[12][state.formData[12].value] = addressArr[3]; | |||
// state.formData[13][state.formData[13].value] = ""; | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
state.formData[9][state.formData[9].value] = content.userName; | |||
state.formData[10][state.formData[10].value] = content.telNumber; | |||
let arr = []; | |||
arr.push(content.provinceName) | |||
arr.push(content.cityName) | |||
arr.push(content.countyName) | |||
state.formData[11][ | |||
state.formData[11].value | |||
] = `${content.provinceName}/${content.cityName}/${content.countyName}`; | |||
] = arr; | |||
state.formData[12][state.formData[12].value] = content.detailInfo; | |||
state.formData[13][state.formData[13].value] = content.postalCode; | |||
// #endif | |||
@@ -381,6 +393,13 @@ | |||
//提交换货申请 | |||
const submit = (e : any) => { | |||
for (var k = 0; k < state.outlets.length; k++) { | |||
if (e.exchangeRgNetworkName == state.outlets[k]['name']) { | |||
e['exchangeRgNetworkId'] = state.outlets[k]['servicehallId'] | |||
break; | |||
} | |||
} | |||
console.log("是否确认换货", e) | |||
confirm( | |||
"是否确认换货?", | |||
() => { | |||
@@ -389,7 +408,6 @@ | |||
? e.exchangeRgNetworkName | |||
: e.exchangeNetworkName; | |||
const curOutlet = state.outlets.find((out) => out.name === curOutletName); | |||
// const curRegin = e.region == null ? null : e.region.split("/"); | |||
const curRegin = e.region == null ? null : e.region; | |||
const options = { | |||
type: 2, | |||
@@ -401,7 +419,7 @@ | |||
exchangeNetworkName: e.exchangeNetworkName, | |||
exchangeRgMode: e.exchangeRgMode, | |||
// exchangeRgNetworkId: curOutlet == null ? "" : curOutlet.servicehallId, | |||
exchangeRgNetworkId: e.exchangeNetworkName, | |||
exchangeRgNetworkId: e.exchangeRgNetworkId, | |||
exchangeRgNetworkName: e.exchangeRgNetworkName, | |||
exchangeLogisticsCompany: e.exchangeLogisticsCompany, | |||
exchangeLogisticsNumber: e.exchangeLogisticsNumber, | |||
@@ -416,7 +434,7 @@ | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log("提交数据", options) | |||
console.log("提交数据", options); | |||
request(orderExchange, options).then((res) => { | |||
confirm( | |||
"您申办的ETC订单已申请换货", |
@@ -300,7 +300,7 @@ | |||
<text class="d-label">业务类型:</text> | |||
<text class="d-value">换货</text> | |||
</view> | |||
<view class="d-row"> | |||
<view class="d-row" v-if="state.orderInfo.XXX"> | |||
<text class="d-label">创建时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.XXXX)}}</text> | |||
</view> |
@@ -11,10 +11,6 @@ | |||
<view class="title"> | |||
{{ item.payName }} | |||
</view> | |||
<!-- 1记账卡2储值卡3记存卡 --> | |||
<!-- <view style="margin-top: 15rpx" class="tip" v-if="item.cardType=='1'"> | |||
记账卡 | |||
</view> --> | |||
<view style="margin-top: 15rpx" class="tip"> | |||
{{ item.payStatusName }} | |||
</view> | |||
@@ -183,12 +179,6 @@ | |||
provider: "weixin", | |||
success: function (e) { | |||
getOpenid(e.code); | |||
// uni.request({ | |||
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | |||
// success: (res: any) => { | |||
// state.openid = res.data.openid; | |||
// }, | |||
// }); | |||
}, | |||
}); | |||
}; | |||
@@ -386,7 +376,7 @@ | |||
scrollTop.value = e.scrollTop; | |||
}); | |||
// isValueCard 1 储值卡 2 记账卡 | |||
const gotoEditUserOrUnitInfo = () => { | |||
if (state.isValueCard == 1) { | |||
uni.switchTab({ |
@@ -6,6 +6,8 @@ export const URL = "qtzl.etcjz.cn"; | |||
/** | |||
* 配置信息,针对不同的平台进行配置 | |||
*/ | |||
// cardType 1 记账卡 2 储值卡 3 寄存卡 | |||
// isValueCard 1 储值卡 2 记账卡 | |||
export const envs = { | |||
//开发环境配置 | |||
development: { |
@@ -123,15 +123,6 @@ export function request(code, options = {}, start = false) { | |||
uni.reLaunch({ | |||
url: '/login/login', | |||
}) | |||
// uni.navigateBack({ | |||
// delta: 1 | |||
// }) | |||
// setTimeout(() => { | |||
// uni.navigateTo({ | |||
// url: '/login/login', | |||
// }) | |||
// console.log("1111111111111111111111") | |||
// }, 100) | |||
} | |||
} | |||
@@ -173,9 +164,6 @@ export function request(code, options = {}, start = false) { | |||
} else { | |||
let content = s4.decryptData_CBC(res, sm4Key) | |||
// let content = res | |||
// console.log(content); | |||
// content.data.bizContent = JSON.stringify(content.data.bizContent) | |||
console.log('请求成功返回参数:', code, content) | |||
resolve(content.data) | |||
} |