Commit 583f8625 by 柳士祥

系统

parent 3b18aa78
...@@ -80,6 +80,7 @@ export default { ...@@ -80,6 +80,7 @@ export default {
console.log(res); console.log(res);
}, },
fail(res) { fail(res) {
console.log(res);
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '系统繁忙,请稍后重试' content: '系统繁忙,请稍后重试'
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<div class="img"> <div class="img">
<image mode="widthFix" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/9462ce53-792c-4607-ab7c-1875bed2d3ba.png" alt=""></image> <image mode="widthFix" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/9462ce53-792c-4607-ab7c-1875bed2d3ba.png" alt=""></image>
</div> </div>
<p>{{ userInfo.company }}</p>
</div> </div>
<div style="margin:8px 0;">{{companyName}}</div>
<div class="userImg"> <div class="userImg">
<image mode="aspectFill" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/22b4fd78-49c6-4596-86a0-5974f46a3805.png" alt=""></image> <image mode="aspectFill" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/22b4fd78-49c6-4596-86a0-5974f46a3805.png" alt=""></image>
</div> </div>
...@@ -39,9 +39,9 @@ export default { ...@@ -39,9 +39,9 @@ export default {
TimeOut: "", TimeOut: "",
qrCode: "", qrCode: "",
qrCodeImg: "", qrCodeImg: "",
userInfo: {},
currentBrightness: 0, currentBrightness: 0,
licensePlateNumber:'' licensePlateNumber: '',
companyName:''
}; };
}, },
components: {}, components: {},
...@@ -56,27 +56,27 @@ export default { ...@@ -56,27 +56,27 @@ export default {
onShow() { onShow() {
let licensePlateNumber = wx.getStorageSync('licensePlateNumber'); let licensePlateNumber = wx.getStorageSync('licensePlateNumber');
this.licensePlateNumber = licensePlateNumber this.licensePlateNumber = licensePlateNumber
console.log('licensePlateNumber',licensePlateNumber); console.log('licensePlateNumber', licensePlateNumber);
let _this = this;
wx.getScreenBrightness({
success: (res) => {
console.log('res.value', res.value);
_this.currentBrightness = res.value
},
fail: (res) => {
console.log(res, '-------getScreenBrightness--fail')
}
});
console.log(this.currentBrightness, '---currentBrightness');
console.log("---onShow");
this.setScreenBrightness(1);
if (licensePlateNumber && licensePlateNumber.trim().length != 0) { if (licensePlateNumber && licensePlateNumber.trim().length != 0) {
let _this = this; this.init();
wx.getScreenBrightness({
success: (res) => {
console.log('res.value',res.value);
_this.currentBrightness = res.value
},
fail: (res) => {
console.log(res, '-------getScreenBrightness--fail')
}
});
console.log(this.currentBrightness, '---currentBrightness');
console.log("---onShow");
this.setScreenBrightness(1);
this.getQrCode();
this.TimeOut = null; this.TimeOut = null;
this.TimeOut = setInterval(() => { this.TimeOut = setInterval(() => {
this.getQrCode(); this.getQrCode();
}, 1000 * 10); }, 1000 * 10);
this.init();
} else { } else {
wx.reLaunch({ wx.reLaunch({
url: '/pages/wo/fillInformation/main', url: '/pages/wo/fillInformation/main',
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
methods: { methods: {
setScreenBrightness(val = 0.7) { setScreenBrightness(val = 0.7) {
if (wx.setScreenBrightness) { if (wx.setScreenBrightness) {
console.log('微信版本111',val) console.log('微信版本111', val)
//设置屏幕亮度 参数值:0-1,越大越亮 //设置屏幕亮度 参数值:0-1,越大越亮
wx.setScreenBrightness({ wx.setScreenBrightness({
value: val value: val
...@@ -109,20 +109,16 @@ export default { ...@@ -109,20 +109,16 @@ export default {
wx.showLoading({ wx.showLoading({
title: "加载中...", title: "加载中...",
}); });
index.getVehicleNumber().then((res) => { this.getQrCode()
wx.hideLoading();
if (res.data.ok == "true") {
console.log(res.data);
this.userInfo = res.data.data;
}
});
}, },
getQrCode() { getQrCode() {
index.generatorUniqueCodeByDynamic(this.licensePlateNumber).then((res) => { index.getVehicleNumber(this.licensePlateNumber).then((res) => {
if (res.data.ok == "true") { if (res.data.ok == "true") {
wx.hideLoading()
this.qrCode = res.data.data.uniqueCode; this.qrCode = res.data.data.uniqueCode;
this.updateTime = res.data.data.createDatetime; this.updateTime = res.data.data.createDatetime;
console.log(res.data.data.vehicleInfoResponseDTO);
this.companyName = res.data.data.vehicleInfoResponseDTO.companyName
this.getQrcodeImg(); this.getQrcodeImg();
} }
}); });
......
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