Commit 96971673 authored by 肖健's avatar 肖健

免费挪车牌选择车辆,车牌号不渲染的问题

parent 135efa7c
......@@ -46,6 +46,7 @@
default: 8
}
},
data() {
return {
focus: false,
......@@ -63,6 +64,12 @@
this.$emit('input', val.join(''));
this.$emit('change', val);
},
value(val){
for (let i = 0 ; i < val.length; i++) {
this.fill[i] = val.substring(i,i+1)
}
this.$forceUpdate()
}
},
methods: {
focusHandler(index = 0) {
......
......@@ -77,9 +77,13 @@ export default {
},
data() {
return {
carNumber: "",
model1: {
carInfo: {},
carInfo: {
carNo: '',
brand: '',
carModel: '',
mileage: '',
},
},
rules: {
"carInfo.brand": {
......@@ -99,7 +103,6 @@ export default {
max: 8,
message: '车牌长度在7-8个字符之间'
},
{
type: "string",
required: true,
......@@ -113,11 +116,6 @@ export default {
freeCode: {},
};
},
watch: {
carNumber(num) {
//console.log(num);
},
},
methods: {
goLoveCar() {
uni.navigateTo({
......@@ -147,14 +145,20 @@ export default {
},
getCarInfo() {
if (this.carId) {
const that = this
if (that.carId) {
let opts = {
url: '/app/vehicleAdmin/' + this.carId,
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => {
that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.model1.carInfo = res.data.data
that.$nextTick(() => {
that.model1.carInfo = res.data.data;
that.model1.carInfo.carNo = res.data.data.carNo;
console.log(that.model1.carInfo)
that.$set(that.model1.carInfo, 'carNo', res.data.data.carNo);
})
}
})
}
......@@ -177,8 +181,12 @@ export default {
this.$refs.form1.setRules(this.rules)
},
onShow() {
this.$nextTick(() => {
this.getCarInfo()
this.getMoveCode()
})
},
onLoad(e) {
this.orderId = e.orderId
......
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