11
This commit is contained in:
parent
266d86da14
commit
c3f818ae60
|
@ -22,10 +22,10 @@ const install = (Vue, vm) => {
|
||||||
uni.setStorageSync('deptId', 100);
|
uni.setStorageSync('deptId', 100);
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
// baseUrl: 'http://61.174.243.28:15861',
|
// baseUrl: 'http://61.174.243.28:15861',
|
||||||
baseUrl: 'http://192.168.2.46:8080',
|
// baseUrl: 'http://192.168.2.46:8080',
|
||||||
// baseUrl: 'http://124.221.246.124:2289',
|
// baseUrl: 'http://124.221.246.124:2289',
|
||||||
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
|
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
|
||||||
// baseUrl: 'https://dche.ccttiot.com/prod-api',
|
baseUrl: 'https://dche.ccttiot.com/prod-api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 50000,
|
loadingTime: 50000,
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ const install = (Vue, vm) => {
|
||||||
|
|
||||||
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
|
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
|
||||||
// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
|
// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
|
||||||
// const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
|
|
||||||
const token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ0ZDljYzBlLThjZjEtNGFkOC05OGFjLThlNThjMWIxYjQ3OSJ9.v-aMkp9t7Z_QfjfsZy6d_1Ng76hPYa0A--SWScMJY9to7UlNv9IxHQnTJylLKdYKGrr8fRZ47Bu12UPm1DgMQg"
|
// const token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ0ZDljYzBlLThjZjEtNGFkOC05OGFjLThlNThjMWIxYjQ3OSJ9.v-aMkp9t7Z_QfjfsZy6d_1Ng76hPYa0A--SWScMJY9to7UlNv9IxHQnTJylLKdYKGrr8fRZ47Bu12UPm1DgMQg"
|
||||||
|
|
||||||
// console.log("我是token", token)
|
// console.log("我是token", token)
|
||||||
config.header.Authorization = token;
|
config.header.Authorization = token;
|
||||||
|
|
|
@ -20,13 +20,15 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="iptbox" @click="show=true">
|
<view class="iptbox" @click="show=true">
|
||||||
<view class="">
|
<view class="" v-if="hardwareInfo.version">
|
||||||
版本: 版本id:
|
版本:{{hardwareInfo.version}} 版本id:{{hardwareInfo.id}}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="" v-else>
|
||||||
|
请点击选择版本
|
||||||
</view>
|
</view>
|
||||||
<view class="tips">
|
</view>
|
||||||
版本介绍:
|
<view class="tips" v-if="hardwareInfo.version">
|
||||||
|
版本介绍:{{hardwareInfo.instructions}}
|
||||||
</view>
|
</view>
|
||||||
<u-select v-model="show" :list="list" title='选择运营区' @confirm="confirm"></u-select>
|
<u-select v-model="show" :list="list" title='选择运营区' @confirm="confirm"></u-select>
|
||||||
<view class="btn" @click="bind()">
|
<view class="btn" @click="bind()">
|
||||||
|
@ -103,7 +105,8 @@
|
||||||
carstause: false,
|
carstause: false,
|
||||||
isbands: false,
|
isbands: false,
|
||||||
show: false,
|
show: false,
|
||||||
list:[]
|
list: [],
|
||||||
|
hardwareInfo: {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,14 +147,34 @@
|
||||||
methods: {
|
methods: {
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
uni.setStorageSync('adminAreaid', e[0].value);
|
uni.setStorageSync('hardwareVersionId', e[0].value);
|
||||||
this.areaId= e[0].value
|
this.hardwareVersionId = e[0].value
|
||||||
|
const hardwareVersionId =this.hardwareVersionId
|
||||||
|
|
||||||
|
if (hardwareVersionId) {
|
||||||
|
const matchedVersion = this.Versionlist.find(version => version.id ===
|
||||||
|
hardwareVersionId);
|
||||||
|
if (matchedVersion) {
|
||||||
|
this.hardwareInfo = matchedVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getlist() {
|
getlist() {
|
||||||
this.$u.get('/app/hardwareVersion/list').then((res) => {
|
this.$u.get('/app/hardwareVersion/list').then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
this.Versionlist = res.data
|
||||||
|
const hardwareVersionId = uni.getStorageSync('hardwareVersionId');
|
||||||
|
|
||||||
|
if (hardwareVersionId) {
|
||||||
|
this.hardwareVersionId=hardwareVersionId
|
||||||
|
const matchedVersion = this.Versionlist.find(version => version.id ===
|
||||||
|
hardwareVersionId);
|
||||||
|
if (matchedVersion) {
|
||||||
|
this.hardwareInfo = matchedVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.list = res.data.map(item => ({
|
this.list = res.data.map(item => ({
|
||||||
value: item.id,
|
value: item.id,
|
||||||
label: item.version
|
label: item.version
|
||||||
|
@ -184,7 +207,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
bind() {
|
bind() {
|
||||||
this.$u.post(`/appVerify/band?sn=`+this.sn+'&mac='+this.mac).then((res) => {
|
this.$u.post(`/appVerify/band?sn=` + this.sn + '&mac=' + this.mac+'&hardwareVersionId='+this.hardwareVersionId).then((res) => {
|
||||||
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
||||||
|
@ -659,6 +682,7 @@
|
||||||
.page {
|
.page {
|
||||||
padding-bottom: 250rpx;
|
padding-bottom: 250rpx;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin: 160rpx auto;
|
margin: 160rpx auto;
|
||||||
// position: fixed;
|
// position: fixed;
|
||||||
|
@ -676,10 +700,12 @@
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
margin: 28rpx auto 0;
|
margin: 28rpx auto 0;
|
||||||
width: 658rpx;
|
width: 658rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iptbox {
|
.iptbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -691,14 +717,17 @@
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
|
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
|
||||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||||
|
|
||||||
.qrcode {
|
.qrcode {
|
||||||
padding-right: 20rpx;
|
padding-right: 20rpx;
|
||||||
border-right: 2rpx solid #D8D8D8;
|
border-right: 2rpx solid #D8D8D8;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 54rpx;
|
width: 54rpx;
|
||||||
height: 54rpx;
|
height: 54rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ips {
|
.ips {
|
||||||
width: 630rpx;
|
width: 630rpx;
|
||||||
|
|
||||||
|
@ -715,6 +744,7 @@
|
||||||
color: #808080;
|
color: #808080;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_btn {
|
.bot_btn {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@ -727,9 +757,11 @@
|
||||||
// background: linear-gradient( 180deg, #FFFFFF 0%, rgba(255,255,255,0) 100%);
|
// background: linear-gradient( 180deg, #FFFFFF 0%, rgba(255,255,255,0) 100%);
|
||||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
|
||||||
.btn:nth-child(4n) {
|
.btn:nth-child(4n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
|
|
|
@ -4354,7 +4354,9 @@
|
||||||
this.gps.sn = this.sn
|
this.gps.sn = this.sn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.sn != '') {
|
||||||
|
this.gps.sn = this.sn
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setMapScale()
|
this.setMapScale()
|
||||||
}, 300)
|
}, 300)
|
||||||
|
@ -4811,10 +4813,17 @@
|
||||||
duration: 4000
|
duration: 4000
|
||||||
});
|
});
|
||||||
} else if (this.deviceInfos.status == 1) {
|
} else if (this.deviceInfos.status == 1) {
|
||||||
|
|
||||||
|
if (this.areaId != res.data.areaId) {
|
||||||
|
this.getArea()
|
||||||
|
}
|
||||||
// this.routePlanning(res.data.latitude, res.data.longitude)
|
// this.routePlanning(res.data.latitude, res.data.longitude)
|
||||||
|
setTimeout(() => {
|
||||||
this.showdevice = true
|
this.showdevice = true
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
this.deviceIndex = 1;
|
this.deviceIndex = 1;
|
||||||
|
}, 500)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -4937,9 +4946,16 @@
|
||||||
// this.routePlanning(res.data
|
// this.routePlanning(res.data
|
||||||
// .latitude, res.data
|
// .latitude, res.data
|
||||||
// .longitude)
|
// .longitude)
|
||||||
this.showdevice = true;
|
if (this.areaId != res.data
|
||||||
|
.areaId) {
|
||||||
|
this.getArea()
|
||||||
|
}
|
||||||
|
// this.routePlanning(res.data.latitude, res.data.longitude)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showdevice = true
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
this.deviceIndex = 1;
|
this.deviceIndex = 1;
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -6241,6 +6257,7 @@
|
||||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08), 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08), 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
|
|
||||||
.changebiketip {
|
.changebiketip {
|
||||||
bottom: 40rpx;
|
bottom: 40rpx;
|
||||||
left: 320rpx;
|
left: 320rpx;
|
||||||
|
@ -6252,6 +6269,7 @@
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="pages2" v-if="deptId==100&&pageindex==0">
|
<view class="pages2" v-if="deptId==100&&pageindex==0">
|
||||||
<view class="imgbox">
|
<view class="imgbox">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uX6A5Dlyr4lvGFNuqfPK" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/umJTSzDVtnfpyYrZY0VJ" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<button class="button" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
|
<button class="button" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
|
||||||
style="margin-top: 30rpx;">
|
style="margin-top: 30rpx;">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user