Browse Source

修改登录和增加懒加载

master
‘daijinzheng@xingtongworld.com’ 2 years ago
parent
commit
6ee1da29eb
  1. 2
      common/js/api.js
  2. 10
      main.js
  3. 5
      package-lock.json
  4. 3
      package.json
  5. 21
      pages/home/home.vue
  6. 9
      pages/login/login.vue
  7. BIN
      static/home/300.jpg
  8. BIN
      static/home/shibai.png

2
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,

10
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,

5
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",

3
package.json

@ -83,6 +83,7 @@
},
"dependencies": {
"echarts": "3.8.4",
"qrcodejs2": "^0.0.2"
"qrcodejs2": "^0.0.2",
"vue-lazyload": "^1.3.3"
}
}

21
pages/home/home.vue

@ -13,10 +13,13 @@
<view class="banner_area">
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-for="(item, index) in bannerList" :key="index">
<image :src="item.image" mode=""></image>
<!-- <image :src="item.image" mode=""></image> -->
<!-- <image v-lazy="item.image" mode=""></image> -->
<img v-lazy="item.image" />
<!-- <img class="lazy" :src="item.image" alt=""> -->
<!-- <img class="lozad" data-src="'@/static/home/300.jpg'"> -->
</swiper-item>
</swiper>
</view>
<view class="notice" @click="toUrl('notice')" v-if="notice.title">
<text class="notice_t">公告</text>
@ -37,12 +40,13 @@
</view>
</view>
<view class="">
<view v-for="(item,index) in typeGoodsList" :key="index" class="dis-flex-between-center goods-item">
<view v-for="(item,index) in typeGoodsList" :key="index" class="dis-flex-between-center goods-item ">
<view class="">
<image :src="item.cover_image" mode="aspectFill"></image>
<!-- <image :src="item.cover_image" mode="aspectFill"></image> -->
<img v-lazy="item.cover_image" />
</view>
<view class="goods-info">
<view class="" style="color: #333;font-size: 16px;">{{item.title}}</view>
<view class="skeleton-rect" style="color: #333;font-size: 16px;">{{item.title}}</view>
<view class="">面值{{item.price}}</view>
<view class="">最高中奖金额{{item.max_awards_amount}}</view>
</view>
@ -254,6 +258,7 @@
]
},
// 1#endif
showSkeleton: true
}
},
components: {
@ -714,6 +719,7 @@
overflow: hidden;
}
}
.notice{
color: #f00;
font-size: 14px;line-height: 14px;margin-bottom: 30rpx;
@ -775,6 +781,11 @@
height: 88px;
border-radius: 10px;
}
img{
width: 138px;
height: 88px;
border-radius: 10px;
}
.goods-info{
display: flex;
flex-direction: column;

9
pages/login/login.vue

@ -1,6 +1,6 @@
<!-- 账号密码登录页 -->
<template>
<view class="" style="">
<view class="" style="position: relative;">
<view class="nav_area"></view>
<view class="logo_area">
<image src="../../static/home/logo.png" mode=""></image>
@ -39,11 +39,16 @@
<!-- <text class="link" @click="toRegister" v-if="!config.isAdmin">注册账号</text> -->
</view>
</view>
<view v-if="this.userType=='user'"
<!-- <view v-if="this.userType=='user'"
style="width: 100vw;text-align: center;color: #dcdcdc;font-size: 14px;
line-height: 28px;position: fixed;top: calc(100vh - 100px);left:0px;">
温馨提示<br/>
忘记密码请联系平台
</view> -->
<view v-if="this.userType=='user'"
style="width: 100vw;text-align: center;color: #dcdcdc;font-size: 14px; line-height: 28px;position: absolute;bottom: -34vh;">
温馨提示<br/>
忘记密码请联系平台
</view>
</view>
</template>

BIN
static/home/300.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/home/shibai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Loading…
Cancel
Save