diff --git a/common/js/api.js b/common/js/api.js index 12efb0a..0b587c7 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -1,7 +1,7 @@ // let baseUrl = 'http://192.168.66.221:8000' let baseUrl = 'http://192.168.66.16:8084' // baseUrl = 'https://ggl.xingtongworld.com' -baseUrl = 'https://ggl.dingguagua.vip' +// baseUrl = 'https://ggl.dingguagua.vip' let API = { baseUrl: baseUrl, diff --git a/main.js b/main.js index 4600c60..c182913 100644 --- a/main.js +++ b/main.js @@ -1,10 +1,18 @@ import App from './App' import i18n from './lang/i18n' +import VueLazyload from 'vue-lazyload' - +// 添加插件配置 +Vue.use(VueLazyload, { + loading: './static/home/300.jpg', // 图片加载过程中显示的占位图 + error: '/static/home/shibai.png', // 图片加载失败时显示的占位图 + attempt: 3 // 尝试加载次数 +}) +// Vue.use(VueLazyload) // #ifndef VUE3 import Vue from 'vue' Vue.config.productionTip = false +// Vue.use(VueLazyload) App.mpType = 'app' const app = new Vue({ i18n, diff --git a/package-lock.json b/package-lock.json index e020434..15108d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,11 @@ "resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz", "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA==" }, + "vue-lazyload": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.3.tgz", + "integrity": "sha512-uHnq0FTEeNmqnbBC2aRKlmtd9LofMZ6Q3mWvgfLa+i9vhxU8fDK+nGs9c1iVT85axSua/AUnMttIq3xPaU9G3A==" + }, "zrender": { "version": "3.7.3", "resolved": "https://registry.npmmirror.com/zrender/-/zrender-3.7.3.tgz", diff --git a/package.json b/package.json index fd4e6d7..b1bce30 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ }, "dependencies": { "echarts": "3.8.4", - "qrcodejs2": "^0.0.2" + "qrcodejs2": "^0.0.2", + "vue-lazyload": "^1.3.3" } } diff --git a/pages/home/home.vue b/pages/home/home.vue index 1516b19..9e4a702 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -1,136 +1,140 @@ -