瀏覽代碼

优化加载缓慢

master
yangteng 8 月之前
父節點
當前提交
2b1fdfb0a0
共有 4 個檔案被更改,包括 20 行新增15 行删除
  1. 1
    1
      pages.json
  2. 17
    13
      pages/index/index.vue
  3. 1
    0
      subpackage/after-sale/deviceInfo/deviceInfo.vue
  4. 1
    1
      subpackage/orders/order_payment.vue

+ 1
- 1
pages.json 查看文件

"root": "subpackage/carPark", "root": "subpackage/carPark",
"plugins": { "plugins": {
"issuer-plugin": { "issuer-plugin": {
"version": "dev-f3fef32241dbfbe13a7c1cf1b42da8cc",
"version": "dev-a0003b1a405b7995827e5ab6ebef3caa",
// "version": "1.0.2", // "version": "1.0.2",
"provider": "wxa2d9acdd1054e69b" "provider": "wxa2d9acdd1054e69b"
} }

+ 17
- 13
pages/index/index.vue 查看文件

} from "vue"; } from "vue";
import { import {
onPageScroll, onPageScroll,
onLoad, onReachBottom
onLoad, onReachBottom,onReady
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import flowPathList from "./components/flow-path-list.vue"; import flowPathList from "./components/flow-path-list.vue";
import filter from '@/components/filter/filter.vue'; import filter from '@/components/filter/filter.vue';
onLoad((options) => { onLoad((options) => {
console.log("wechatSignNo",options) console.log("wechatSignNo",options)
getInfo(); getInfo();
quanKeyAction().then((val : any) => {
setItem('key', val.dictTypeAndItem)
})
})
// 页面初次渲染完成时触发
onReady(()=>{
setTimeout(()=>{
quanKeyAction()
},5000)
}) })
onMounted(() => { onMounted(() => {
uni.getSystemInfo({ uni.getSystemInfo({
commonQuestion(); commonQuestion();
} }
}; };
//全量枚举值查询
// //全量枚举值查询
const quanKeyAction = () => { const quanKeyAction = () => {
var data = {}; var data = {};
const options = { const options = {
method: "POST", method: "POST",
showLoading: true, showLoading: true,
}; };

return new Promise(async (resolve, reject) => {
const res = await request(queryKey, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
request(queryKey, options).then((res) => {
console.log(stringToJson(res.bizContent));
const data = stringToJson(res.bizContent)
console.log("轮播图", data)
setItem('key', data.dictTypeAndItem)
})
.catch((err) => {
console.log(err);
});


} }



+ 1
- 0
subpackage/after-sale/deviceInfo/deviceInfo.vue 查看文件

console.log(cmdArr); console.log(cmdArr);
console.log(bluetoothUtil); console.log(bluetoothUtil);
bluetoothUtil.transCmd(cmdArr, '10', function(res) { //10:写卡 20:写OBU bluetoothUtil.transCmd(cmdArr, '10', function(res) { //10:写卡 20:写OBU
console.log("5201",res)
let str = res[2].substring(res[2].length - 4, res[2].length); //判断是否为9000 let str = res[2].substring(res[2].length - 4, res[2].length); //判断是否为9000
let str3 = res[3].substring(res[3].length - 4, res[3].length); //判断是否为9000 let str3 = res[3].substring(res[3].length - 4, res[3].length); //判断是否为9000
if (str == "9000" || str3 == "9000") { if (str == "9000" || str3 == "9000") {

+ 1
- 1
subpackage/orders/order_payment.vue 查看文件

type: 2, type: 2,
data: { data: {
orderId: state.orderId, orderId: state.orderId,
wxOpenid: data.openId,
wxOpenid: data.openId?data.openId:data.alipayUserId,
payType: val.payType payType: val.payType
}, },
method: "POST", method: "POST",

Loading…
取消
儲存