Commit dab0ec64 authored by fwz's avatar fwz

前端

parent 96971673
......@@ -44,6 +44,7 @@ export default {
onShow: function () {},
methods: {
tabChange(index) {
let that = this
switch (index) {
case 0:
this.tab = 'index'
......@@ -65,7 +66,7 @@ export default {
let param = {code : scene}
let opts = { url: '/app/index/check/move/code', method: 'post' }
console.log(param);
that.http.httpTokenRequest(opts, param).then(res => {
that.http.httpTokenRequest(opts, param).then(res => {
console.info(res)
if (res.data.code == 200) {
if(res.data.data.bindFlag) {
......@@ -95,6 +96,20 @@ export default {
}
this.$forceUpdate();
},
//跳转到挪车页面
gotoMoveCar(s) {
let that = this;
uni.navigateTo({
url: '/pagesB/pages/move-car/oneMoveCar?scene=' + s
});
},
//跳转到绑定页面
gotoBindMoveCar(s) {
let that = this;
uni.navigateTo({
url: '/pagesB/pages/move-car/scan?moveCode=' + s
});
},
},
onLoad() {}
}
......
......@@ -7,7 +7,7 @@
车牌号:
</div>
<div class="item__content">
{{appBusCar.carNo}}
{{appBo.carNo}}
</div>
</div>
<div class="car_item__two">
......@@ -89,8 +89,6 @@ export default {
appBo: {
//车牌号
carNo: '',
//申请人手机号
applyUserMobile: '',
//省
provinceName: '',
//市
......@@ -100,44 +98,59 @@ export default {
//详细地址
detailInfo: '',
//是否微信通知
isWechat: false,
//是否成功
isSuccess: false,
//日志唯一编码
logCode: '',
wechat: false,
},
noticeResult: {
secretPhone: '',
allowPhone: false,
allowWechat: false,
notAllowPhoneReason: '',
notAllowWechatReason: '',
},
}
},
methods: {
call() {
this.show = true;
if(this.checked){
this.appBo.wechat = true
}else{
this.appBo.wechat = false
}
this.appBo.moveCode = this.moveCode
let opts = { url: '/app/contact/notice' , method: 'post' };
this.http.httpTokenRequest(opts, this.appBo).then(res => {
if (res.data.code == 200) {
//请求成功逻辑,修改
this.noticeResult = res.data.data
if(!this.noticeResult.allowWechat){
uni.showLoading({
title: this.noticeResult.notAllowWechatReason
});
}
if (!this.noticeResult.allowPhone){
uni.showLoading({
title: this.noticeResult.notAllowPhoneReason
});
}else {
this.list[0].name = this.noticeResult.secretPhone
this.show = true;
}
}
})
},
close() {
this.show = false;
},
selectClick(index){
if(index.name == "2367虚拟号码345"){
}else if(index.name == "呼叫"){
//请求拨打电话路径
let opts = { url: '/app/contact/dialPhone' , method: 'post' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
//请求成功逻辑,修改
}
})
//记录修改
let optsOne = { url: '/app/moveLog/updateLog' , method: 'post' };
this.http.httpTokenRequest(optsOne, this.appBo).then(res => {
if (res.data.code == 200) {
//请求成功逻辑,后端应记录此次电话拨打
}
})
}else{
}
if(index.name == "呼叫"){
uni.makePhoneCall({
honeNumber: this.noticeResult.secretPhone
});
}else if(index.name == "取消"){
this.show = false;
}
},
goMyCar() {
uni.navigateTo({
......@@ -145,12 +158,13 @@ export default {
})
},
getCarNumber(){
//let opts = { url: '/app/moveCode/owner/' + this.moveCode, method: 'get' };
let opts = { url: '/app/moveCode/owner/MV123', method: 'get' };
let opts = { url: '/app/moveCode/owner/' + this.moveCode, method: 'get' };
//let opts = { url: '/app/moveCode/owner/MV123', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
if(JSON.stringify(res.data.data) != "{}"){
this.appBusCar = res.data.data
this.appBo.carNo = res.data.data.carNo
}else{
uni.navigateTo({
url: '/pagesB/pages/move-car/scan?moveCode=' + this.moveCode
......@@ -268,16 +282,17 @@ export default {
onLoad(e) {
// 在页面加载的时候去判断用户有没有授权地理位置,没授权的话引导用户去设置页手动授权
this.getAuthorize()
if(e.query) {
console.log(e)
if(e.scene) {
//获取二维码携带的参数
//扫码后得到的参数
let scene = decodeURIComponent(e.query.scene)
//let scene = decodeURIComponent(e.query.scene)
// scene = scene.split('&')
// let data = {
// //场景值
// scene: e.scene
// }
this.moveCode = scene
this.moveCode = e.scene
//console.log('scene: ' + scene);
}
},
......
......@@ -36,10 +36,7 @@ export default {
data() {
return {
model1: {
userInfo: {
name: "",
sex: "",
},
carInfo: {},
},
formData: [{
id: "kjjns", //id必须唯一 可以是数字
......@@ -130,6 +127,7 @@ export default {
}
//console.log(this.moveCodeInfo)
this.moveCodeInfo.moveCode = this.moveCode
let opts = { url: '/app/moveCode/binding/', method: 'put' };
this.http.httpTokenRequest(opts, this.moveCodeInfo).then(res => {
if (res.data.code == 200) {
......@@ -156,6 +154,16 @@ export default {
this.model1.carInfo = res.data.data
}
})
this.formData.forEach(e=>{
if(e.label == '车牌号'){
e.rules.value = this.model1.carInfo.carNo
}else if(e.label == '品牌'){
e.rules.value = this.model1.carInfo.brand
}else if(e.label == '车型'){
e.rules.value = this.model1.carInfo.carModel
}
})
console.log(this.formData)
}
},
},
......@@ -163,6 +171,7 @@ export default {
this.moveCode = option.moveCode
},
onShow:function(){
this.getCarInfo()
//console.log( this.$store.state.selectedCar);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment