This commit is contained in:
tx 2024-11-28 16:35:10 +08:00
parent f92a62302b
commit 4080feadf5
10 changed files with 153 additions and 40 deletions

View File

@ -1,13 +1,13 @@
const install = (Vue, vm) => { const install = (Vue, vm) => {
uni.setStorageSync('deptId', 101); 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: 'https://che.chuangtewl.com/prod-api', baseUrl: 'https://che.chuangtewl.com/prod-api',
// 测试环境 // 测试环境
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',
// 创特 // 创特

View File

@ -51,7 +51,7 @@
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"libVersion" : "latest", "libVersion" : "latest",
"appid" : "wx4d178f8c80348214", "appid" : "wx3428c498d5061192",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : true, "minified" : true,

View File

@ -522,7 +522,7 @@
url: '/page_user/khfw/khfw' url: '/page_user/khfw/khfw'
}) })
} else if (num == 11) { } else if (num == 11) {
if (info.idCard == '') { if (info.idCard ==null||info.idCard ==''||info.idCard ==undefined) {
uni.navigateTo({ uni.navigateTo({
url: '/page_user/idcard_test' url: '/page_user/idcard_test'
}) })

View File

@ -351,6 +351,7 @@
this.$store.commit('SET_USERID', res.user.userId); this.$store.commit('SET_USERID', res.user.userId);
this.userinfo = res.user this.userinfo = res.user
// this.userinfo.balance=null
console.log(res.user.balance, 'es.user.balance', this.isback); console.log(res.user.balance, 'es.user.balance', this.isback);
if (res.user.balance == parseFloat(this.areaInfo.deposit)) { if (res.user.balance == parseFloat(this.areaInfo.deposit)) {
console.log('进入判断了', this.isback); console.log('进入判断了', this.isback);

View File

@ -1268,10 +1268,6 @@
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
success: function(lb) { success: function(lb) {
// that.latitude = 23.440359
// that.longitude = 117.074552
// that.gps.latitude = 23.440359
// that.gps.longitude = 117.074552;
@ -1548,6 +1544,7 @@
this.isqrcode = true this.isqrcode = true
this.deviceInfos = res.data; this.deviceInfos = res.data;
this.getlist(res.data.modelId) this.getlist(res.data.modelId)
uni.setStorageSync('areaId', res.data.areaId);
if (!this.orderinfo.sn) { if (!this.orderinfo.sn) {
this.mac = res.data.mac this.mac = res.data.mac
} }
@ -2787,10 +2784,10 @@
// //
sub1() { sub1() {
// uni.showLoading({}); // uni.showLoading({});
if (uni.getStorageSync('token')&&this.islogin) { if (uni.getStorageSync('token')&&this.islogin&&this.deviceInfos.sn) {
let data = { let data = {
userId: this.userId, userId: this.userId,
sn: this.sn, sn: this.deviceInfos.sn,
ruleId: this.freeInfo.ruleId, ruleId: this.freeInfo.ruleId,
mark: "确认开锁", mark: "确认开锁",
type: '1' type: '1'

View File

@ -30,13 +30,13 @@
验证码登录 验证码登录
</view> --> </view> -->
<view class="tipss" @click="pageindex=1" style="width: 100%;text-align: center;margin-top: 50rpx;color: #ccc;"> <view class="tipss" @click="pageindex=1" style="width: 100%;text-align: center;margin-top: 50rpx;color: #ccc;">
验证码登录 手机号登录
</view> </view>
<!-- <view class="button1" @click="back"> <!-- <view class="button1" @click="back">
取消登录 取消登录
</view> --> </view> -->
</view> </view>
<view class="page3" v-if="pageindex == 1"> <view class="page3" v-if="pageindex == 2">
<view class="tit"> <view class="tit">
登录 登录
</view> </view>
@ -88,7 +88,7 @@
</image> </image>
</view> </view>
</view> </view>
<view class="page3" v-if="pageindex==2"> <view class="page3" v-if="pageindex==1">
<view class="tit"> <view class="tit">
登录 登录
</view> </view>
@ -315,14 +315,14 @@
}, },
page1(){ page1(){
// clearInterval(this.interval) // clearInterval(this.interval)
this.pageindex=1 this.pageindex=2
this.phone1='' this.phone1=''
this.password1='' this.password1=''
}, },
page2(){ page2(){
// clearInterval(this.interval) // clearInterval(this.interval)
this.pageindex=2 this.pageindex=1
this.phone='' this.phone=''
this.phoneCode='' this.phoneCode=''
this.password='' this.password=''

View File

@ -36,6 +36,12 @@
</view> </view>
<view class="btnbox"> <view class="btnbox">
<view class="btn_box" style="margin-bottom: 20rpx;">
<view class="btn1" @click="btn(5)">
清空校准
</view>
</view>
<view class="btn_box"> <view class="btn_box">
<view class="btn1" @click="btn(0)"> <view class="btn1" @click="btn(0)">
开锁 开锁
@ -243,8 +249,31 @@
}); });
} }
}) })
}else if (num == 5){
uni.showLoading({
title: '加载中...'
})
this.$u.post(' /app/voltage/check?sn=' + this.sn).then((res) => {
if (res.code == 200) {
this.deviceInfo()
uni.hideLoading()
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
} }
} }
} }
} }

View File

@ -112,7 +112,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="info_card" style="margin-top: 20rpx;" v-if="deviceInfos.etOrders[0]"> <view class="info_card" style="margin-top: 20rpx;" v-if="deviceInfos.etOrders[0]&&deviceInfos.sn">
<view class="info_tit"> <view class="info_tit">
最后订单信息 最后订单信息
</view> </view>
@ -120,27 +120,27 @@
<view class="cont"> <view class="cont">
<view class="info_li"> <view class="info_li">
最后用户姓名 最后用户姓名
<span v-if="deviceInfos.etOrders[0].realName">{{deviceInfos.etOrders[0].realName}}</span> <span v-if="deviceInfos.etOrders[0].realName &&deviceInfos.sn">{{deviceInfos.etOrders[0].realName}}</span>
<span v-else>--</span> <span v-else>--</span>
</view> </view>
<view class="info_li"> <view class="info_li">
最后用户电话 最后用户电话
<span v-if="deviceInfos.etOrders[0].phonenumber">{{deviceInfos.etOrders[0].phonenumber}}</span> <span v-if="deviceInfos.etOrders[0].phonenumber &&deviceInfos.sn">{{deviceInfos.etOrders[0].phonenumber}}</span>
<span v-else>--</span> <span v-else>--</span>
</view> </view>
<view class="info_li" style="flex-wrap: wrap;display: inline-block;"> <view class="info_li" style="flex-wrap: wrap;display: inline-block;">
最后订单编号 最后订单编号
<span v-if="deviceInfos.etOrders[0].orderNo">{{deviceInfos.etOrders[0].orderNo}}</span> <span v-if="deviceInfos.etOrders[0].orderNo &&deviceInfos.sn">{{deviceInfos.etOrders[0].orderNo}}</span>
<span v-else>--</span> <span v-else>--</span>
</view> </view>
<view class="info_li"> <view class="info_li">
订单开始时间 订单开始时间
<span v-if="deviceInfos.etOrders[0].createTime">{{deviceInfos.etOrders[0].createTime}}</span> <span v-if="deviceInfos.etOrders[0].createTime&&deviceInfos.sn">{{deviceInfos.etOrders[0].createTime}}</span>
<span v-else>--</span> <span v-else>--</span>
</view> </view>
<view class="info_li"> <view class="info_li">
<view class="info_li"> <view class="info_li" v-if="deviceInfos.sn">
订单状态<span>{{statuss()}}</span> 订单状态<span>{{statuss()}}</span>
</view> </view>
@ -199,9 +199,13 @@
<view class="btn" @click="tipshow=true" v-if="info.type==2"> <view class="btn" @click="tipshow=true" v-if="info.type==2">
换电处理 换电处理
</view> --> </view> -->
<view class="btn" @click="changeShwoList">
修改车型
</view>
<view class="btn" @click="generateQrcode()"> <view class="btn" @click="generateQrcode()">
设备二维码 设备二维码
</view> </view>
</view> </view>
<u-mask :show="false" @click="show = false" :z-index='100' /> <u-mask :show="false" @click="show = false" :z-index='100' />
@ -320,6 +324,7 @@
</view> </view>
</view> </view>
</view> </view>
<u-select v-model="showModelList" :list="ModelList" title='修改车型' @confirm="confirm"></u-select>
</view> </view>
</template> </template>
@ -397,7 +402,9 @@
btnnum: null, btnnum: null,
showqr: false, showqr: false,
canvasWidth: 300, canvasWidth: 300,
deptId:null deptId:null,
showModelList:false,
ModelList:[]
} }
@ -432,6 +439,47 @@
}, },
methods: { methods: {
changeShwoList(){
console.log('diaoyongle ');
this.showModelList=true
},
confirm(e) {
let modelId=e[0].value
this.$u.put('/appVerify/device/editModel?sn=' + this.deviceInfos.sn+'&modelId='+modelId).then((res) => {
if (res.code == 200) {
this.showModelList=false
this.deviceInfo()
uni.showToast({
title: '修改成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
getModelList(){
this.$u.get('/system/area/selectDeptByAreaId/' + this.deviceInfos.areaId).then((res) => {
if (res.code == 200) {
this.ModelList=res.data.modelList.map(item => ({
value: item.modelId,
label: item.model
}));
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
closeQr(){ closeQr(){
this.showqr=false this.showqr=false
}, },
@ -509,20 +557,23 @@
this.maskloading = false this.maskloading = false
}, },
statuss() { statuss() {
if (this.deviceInfos.etOrders[0]) { if(this.deviceInfos.sn){
if (this.deviceInfos.etOrders[0].status == 0) { if (this.deviceInfos.etOrders[0]) {
return '预约中' if (this.deviceInfos.etOrders[0].status == 0) {
} else if (this.deviceInfos.etOrders[0].status == 1) { return '预约中'
return '取消预约' } else if (this.deviceInfos.etOrders[0].status == 1) {
} else if (this.deviceInfos.etOrders[0].status == 2) { return '取消预约'
return '骑行中' } else if (this.deviceInfos.etOrders[0].status == 2) {
} else if (this.deviceInfos.etOrders[0].status == 3) { return '骑行中'
return '骑行结束' } else if (this.deviceInfos.etOrders[0].status == 3) {
} else if (this.deviceInfos.etOrders[0].status == 4) { return '骑行结束'
return '订单完成' } else if (this.deviceInfos.etOrders[0].status == 4) {
return '订单完成'
}
} }
} }
}, },
closevehicle() { closevehicle() {
this.showvehicle = false this.showvehicle = false
@ -1308,6 +1359,7 @@
// if (this.deviceInfos.onlineStatus == 0) { // if (this.deviceInfos.onlineStatus == 0) {
// this.Binddevice() // this.Binddevice()
// } // }
this.getModelList()
this.latitude = parseFloat(this.deviceInfos.latitude) this.latitude = parseFloat(this.deviceInfos.latitude)
this.longitude = parseFloat(this.deviceInfos.longitude) this.longitude = parseFloat(this.deviceInfos.longitude)
// if (this.deviceInfos.onlineStatus == 0) { // if (this.deviceInfos.onlineStatus == 0) {
@ -1403,7 +1455,7 @@
// title: item.deviceName, // title: item.deviceName,
width: 40, width: 40,
height: 47, height: 47,
iconPath: item.onlineStatus == 0 ? iconPath: this.deviceInfos.onlineStatus == 0 ?
'https://lxnapi.ccttiot.com/bike/img/static/uG13E7BpUFF44wVYC9no' : 'https://lxnapi.ccttiot.com/bike/img/static/uG13E7BpUFF44wVYC9no' :
'https://lxnapi.ccttiot.com/bike/img/static/uHQIdWCTmtUztl49wBKU', 'https://lxnapi.ccttiot.com/bike/img/static/uHQIdWCTmtUztl49wBKU',
callout: { callout: {

View File

@ -94,7 +94,7 @@
<input type="text" v-model="timeoutPrice" placeholder=" " class="input" <input type="text" v-model="timeoutPrice" placeholder=" " class="input"
placeholder-style="color:#C7CDD3"> placeholder-style="color:#C7CDD3">
/ <input type="text" v-model="timeoutTime" placeholder=" " class="input" / <input type="text" v-model="timeoutTime" placeholder=" " class="input"
placeholder-style="color:#C7CDD3">分钟 placeholder-style="color:#C7CDD3">{{timevalue}}
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;">
超出起步价后 超出起步价后
@ -228,12 +228,16 @@
this.data = res.data; this.data = res.data;
if (this.data.rentalUnit == 'minutes') { if (this.data.rentalUnit == 'minutes') {
this.timeUnit = '分钟'
this.timevalue='按分钟'
} else if (this.data.rentalUnit == 'hours') { } else if (this.data.rentalUnit == 'hours') {
this.timeUnit = '小时'
this.timevalue='按小时'
} else if (this.data.rentalUnit == 'day') { } else if (this.data.rentalUnit == 'day') {
this.timeUnit = '天'
this.timevalue='按天'
} }
if (this.data.area) { if (this.data.area) {
this.returnVerify = this.data.area.returnVerify; this.returnVerify = this.data.area.returnVerify;
} }

File diff suppressed because one or more lines are too long