Commit bda60e46 by 前端

Merge branch 'develop' into 'master'

上线合并

See merge request !1
2 parents 96cd96b3 48eb28e6
Showing 79 changed files with 2415 additions and 0 deletions
> 1%
last 2 versions
not dead
VUE_APP_REPO=https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config
\ No newline at end of file \ No newline at end of file
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/essential', 'eslint:recommended'],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
},
globals: { wx: true }
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# 嘀加质保卡h5项目
测试环境地址 http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/
生产环境 https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run dev
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
plugins: [
[
'import',
{
libraryName: 'vant',
libraryDirectory: 'es',
style: true
}
]
]
}
This diff could not be displayed because it is too large.
{
"name": "wechat",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --open",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.0",
"babel-plugin-import": "^1.13.6",
"bignumber.js": "^9.1.1",
"core-js": "^3.6.5",
"html2canvas": "^1.4.1",
"intersection-observer": "^0.12.2",
"postcss-px-to-viewport": "^1.1.1",
"sha1": "^1.1.1",
"vant": "^2.12.54",
"vconsole": "^3.14.7",
"vue": "^2.6.12",
"vue-count-to": "^1.0.13",
"vue-router": "^3.2.0",
"vue-scrollama": "^2.0.6",
"vue-wechat-title": "^2.0.7",
"webpack-spritesmith": "^1.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0",
"@vue/cli-plugin-eslint": "^4.5.0",
"@vue/cli-plugin-router": "^4.5.0",
"@vue/cli-plugin-vuex": "^4.5.0",
"@vue/cli-service": "^4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
}
}
const path = require("path");
module.exports = ({ file }) => {
return {
plugins: {
autoprefixer: {},
"postcss-px-to-viewport": {
unitToConvert: "px",
viewportWidth: 375,
unitPrecision: 6,
propList: ["*"],
viewportUnit: "vw",
fontViewportUnit: "vw",
selectorBlackList: [],
minPixelValue: 1,
mediaQuery: true,
exclude: [/equityPoster/, /refundExamine/],
landscape: false,
},
},
};
};
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<!-- 使用CDN的JS文件 预加载 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %>
<!-- <title>精品升级</title> -->
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<style>
html,
body {
margin: 0;
padding: 0;
background: #f4f4f4;
}
#app {
color: #333333;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div id="app">
<keep-alive>
<router-view
v-wechat-title="$route.meta.title"
v-if='$route.meta.keepAlive'
/>
</keep-alive>
<router-view
v-wechat-title="$route.meta.title"
v-if='!$route.meta.keepAlive'
/>
</div>
</template>
<script>
export default {
data () {
return {
}
},
mounted () {
}
}
</script>
<style scoped>
#app {
font-size: 14px;
}
</style>
\ No newline at end of file \ No newline at end of file
const RequestMethods = {
POST: 'post',
GET: 'get',
PUT: 'put',
DELETE: 'delete'
}
export default RequestMethods
\ No newline at end of file \ No newline at end of file
import request from './request'
export const card = {
/**质保卡搜索 */
search(data) {
return request(
{
...data,
pageSize: 9999,
pageNum: 1
},
'dj.api.smartcarlife.customer.warrantyCard.search'
)
},
/**质保卡明细 */
getWarrantyCardDetail(data) {
return request(data, 'dj.api.smartcarlife.customer.warrantyCard.get')
},
/**二维码 */
createWeappQrcode(data) {
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
return request(data, 'dj.api.smartcarlife.common.createWeappQrcode')
},
/**获取质保卡明细 - 新的 - 扫一扫 */
getScanCardDetail(data) {
return request(data, 'dj.api.smartcarlife.customer.warrantyCard.getDetail')
},
/**质保卡激活 */
activeCard(data) {
return request(data, 'dj.api.smartcarlife.customer.warrantyCard.activate')
},
/** 获取权益报价单详情 */
quotationGenerate(data) {
return request(data, 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate')
},
/** 根据订单号获取订单详情 */
getOrderDetail(data) {
return request(data, 'dj.api.smartcarlife.order.detail', 'post')
},
/** 获取太阳膜类商品部位数据字典 */
getPositionList(data) {
return request(data, 'dj.api.smartcarlife.goodsPosition.list', 'post')
},
/** 客户质保卡(订单)获取详情 */
getWarrantyCardOrderDetail(data) {
return request(data, 'dj.api.smartcarlife.customer.warrantyCard.get.new', 'post')
},
/** 退款审核获取详情 */
refundApplyRecordGetById(data) {
return request(data, 'dj.api.smartcarlife.refundApplyRecord.getById', 'post')
}
}
import axios from 'axios'
import Qs from 'qs'
import router from '@/router'
import { Toast, Notify } from 'vant'
axios.defaults.withCredentials = true
const service = axios.create({
// baseURL: process.env.VUE_APP_API,
timeout: 60 * 1000, // 请求超时时间
transformRequest: [
function (data) {
return Qs.stringify(data)
}
]
})
service.interceptors.request.use(config => {
return config
})
service.interceptors.response.use(
response => {
Toast.clear()
const dataAxios = response.data
// 这个状态码是和后端约定的
const { code, data, errId, message } = dataAxios
// 有 code 代表这是一个后端接口 可以进行进一步的判断
if (code == -1 && errId == '30990103') {
router.replace({ name: 'nothing' })
return
}
switch (+code) {
case -1:
case 0:
return { data, message }
case 20:
case 21:
break
default:
Notify({ type: 'danger', message })
// 不是正确的 code
break
}
},
error => {
Toast.clear()
Notify({ type: 'danger', message: '系统异常' })
console.log(error)
return Promise.reject(error)
}
)
export default service
import axios from './axios'
import sign from './sign'
import RequestMethods from './RequestMethods'
// let projectName = window.$fetchConfig.request.baseURL + '/rop-scrm-renewal/router'
const request = (params = {}, target, method = RequestMethods.POST, noSignAttr = []) => {
// console.log(window.$baseConfig.axios.appkey)
params.method = target
params.source = 'dj-wechat'
params.appKey = window.$baseConfig.axios.appkey
params.timestamp = new Date().format('yyyy-MM-dd hh:mm:ss')
params.v = '1.0.0'
params.format = 'json'
params.locale = 'zh_CN'
// let apiName = params.method.includes('scrm.api')
const url = window.$baseConfig.axios.baseURL
const secret = window.$baseConfig.axios.secret
return axios({
url,
method,
data: sign(params, noSignAttr, secret)
})
}
export default request
import sha1 from 'sha1'
import qs from 'qs'
const sign = (params, noSignAttr = [], secret) => {
delete params.sign
var objStr = qs.stringify(params, { arrayFormat: 'indices', encode: false, allowDots: true })
var objVal = objStr.split('&')
var realObj = {}
objVal.forEach(item => {
if (item.split('=')[0] == 'scene') {
realObj.scene = params.scene
} else {
realObj[item.split('=')[0]] = item.split('=')[1]
}
})
const keys = Object.keys(realObj).sort()
var str = []
var obj = null
for (const key in realObj) {
obj = realObj[key]
if (obj === null) {
obj = ''
} else if (typeof obj === 'object') {
obj = JSON.stringify(obj)
}
realObj[key] = obj
}
keys.forEach(e => {
!noSignAttr.includes(e) && str.push(e + realObj[e])
})
realObj.sign = sha1(secret + str.join('') + secret).toUpperCase()
return realObj
}
export default sign
// import request from './request'
import request from './wxRequest'
export const testSheetApi = {
/**保存车险信息 */
vehicleAdd(data) {
return request(data, 'scrm.api.renewal.insurance.vehicle.add')
},
/**获取车辆保险统计信息 */
getStatisticInfo(data) {
return request(data, 'scrm.api.renewal.insurance.vehicle.getStatisticInfo')
},
/**二维码生成接口 */
createQrCode(data) {
return request(data, 'scrm.api.renewal.insurance.vehicle.createQrCode')
}
}
import axios from './axios'
import sign from './sign'
import RequestMethods from './RequestMethods'
// import config from '@/config/conf.js'
// console.log(config, 'config')
const request = (params = {}, target, method = RequestMethods.POST, noSignAttr = []) => {
// console.log(window.$baseConfig.axios.appkey)
params.method = target
params.source = 'dj-wechat'
// params.appKey = window.$baseConfig.axios.appkey
console.log(window.$fetchConfig, 'window.$fetchConfig')
params.appKey = window.$fetchConfig.sign.appKey
console.log(params.appKey, 'params.appKey')
params.timestamp = new Date().format('yyyy-MM-dd hh:mm:ss')
params.v = '1.0.0'
params.format = 'json'
params.locale = 'zh_CN'
// const url = window.$baseConfig.axios.baseURL
// https://scrm.dev.glsx.com.cn/
// const url = 'http://scrm.dev.glsx.com.cn/rop-scrm-equity/router'
// console.log(window.$fetchConfig, 'url')
let router = target.includes('scrm.api.renewal') ? '/rop-scrm-renewal/router' : '/rop-scrm-equity/router'
const url = window.$fetchConfig.request.baseURL + router
// console.log(window.$fetchConfig.secret, 'window.$fetchConfig.secret')
const secret = window.$fetchConfig.secret
return axios({
url,
method,
data: sign(params, noSignAttr, secret)
})
}
export default request
@font-face {
/* 自定义的字体名车,调用该字体时使用 */
/* 引用字体包。.ttf后缀不区分大小写,用.TTF也可以 */
font-family: "number";
src: url('number.TTF');
/* 使用别名 */
font-weight: normal;
font-style: normal;
}
\ No newline at end of file \ No newline at end of file
No preview for this file type
.layout {
position: relative;
background: #ffffff;
.car-box {
box-sizing: border-box;
height: calc(100vh - 380px);
padding: 18px 14px 0 22px;
.p-r-8 {
padding-right: 8px;
}
.car-block {
max-height: calc(100% - 27px);
overflow: scroll;
}
.card-len {
text-align: right;
font-size: 12px;
color: #999999;
margin-top: 10px;
}
}
.fixed-bottom {
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 0;
height: 380px;
width: 100%;
background-color: #ffffff;
padding: 18px 0;
text-align: center;
.bottom-content {
padding: 0 22px;
.select-box{
display: flex;
align-items: center;
justify-content: space-between;
.select_class{
width: 120px;
}
.warning-icon{
flex-shrink: 0;
width: 16px;
height: 16px;
margin-right: 4px;
}
.warning-text{
color: #FFA044;
font-size: 12px;
font-weight: 400;
}
}
.input-class{
background: #327ffa1a;
}
}
}
.fixed-bottom-up {
bottom: 180px;
}
.btn-box {
border-top: 1px solid #eeeeee;
padding-top: 8px;
}
.btn {
width: 300px;
height: 44px;
background: #3582ee;
border-radius: 22px;
font-size: 16px;
color: #ffffff;
text-align: center;
border: 0;
margin: 0 auto;
}
.scan {
font-weight: 600;
font-size: 14px;
color: #4d8df5;
text-align: center;
padding-bottom: 10px;
border-bottom: 1px dashed #bebebe;
margin-bottom: 20px;
}
.title {
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: center;
}
.icon-arrow {
width: 14px;
height: 14px;
margin-top: 6px;
}
.info-box {
display: flex;
margin: 10px 0 36px;
}
.icon-info {
width: 16px;
height: 16px;
}
.txt-info {
font-size: 12px;
color: #cacaca;
margin-left: 4px;
}
.phone-label-class{
span{
color: #282829 !important;
font-size: 14px !important;
font-weight: 500 !important;
}
}
}
::v-deep .van-cell {
// width: 114px;
height: 34px;
font-size: 14px !important;
font-weight: 600 !important;
color: #282829;
border: 1px solid #eeeeee;
border-radius: 4px;
margin: 8px 0;
padding: 3px 10px;
}
::v-deep .phone-label-class{
width: 70px;
font-size: 14px;
font-weight: 600 !important;
color: #282829;
}
.layout {
box-sizing: border-box;
min-height: 100vh;
background-color: #ffffff;
padding: 40px 22px;
text-align: center;
.icon-success {
width: 55px;
height: 55px;
}
.title {
font-size: 14px;
color: #333333;
margin: 14px 0 4px;
}
.tips {
font-size: 12px;
color: rgba(51, 51, 51, 0.7);
margin-bottom: 28px;
}
}
* {
margin: 0;
padding: 0;
}
img {
width: 100%;
height: 100%;
vertical-align: top;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.two-line-ellipsis {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.btn-disabled {
background: #ccc !important;
}
.x-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.y-center {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.btn-on-leave {
position: relative;
overflow: hidden;
&::after {
position: absolute;
top: 0;
left: 0;
content: '';
width: 100%;
height: 100%;
background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15));
}
}
\ No newline at end of file \ No newline at end of file
.layout .card {
position: relative;
width: 100%;
height: 309px;
}
.layout .card-bg {
width: 100%;
height: 100%;
}
.layout .card-info {
position: absolute;
top: 0;
left: 0;
z-index: 2;
padding: 20px;
box-sizing: border-box;
width: 100%;
height: 100%;
color: #333;
}
.layout .card-info .top {
display: flex;
}
.layout .card-info .top .number {
font-size: 14px;
margin-left: auto;
}
.layout .card-info .text {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin-top: 37px;
color: rgba(51, 51, 51, 0.8);
}
.layout .card-info .text .card-title {
font-weight: 700;
font-size: 24px;
color: #333;
margin-bottom: 6px;
}
.layout .box {
width: 100%;
min-height: 674px;
background-color: #FFFFFF;
position: absolute;
top: 284px;
left: 0;
border-radius: 10px 10px 0 0;
box-sizing: border-box;
padding: 0 10px;
}
.layout .box .title {
font-size: 16px;
font-weight: 500;
color: #4D8DF5;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 10px 12px;
}
.layout .box .title .after {
color: #333333;
font-size: 12px;
font-weight: normal;
}
.layout .box .title .after span {
margin-left: 10px;
}
.layout .box .item .sub-title {
height: 30px;
background: #F4F6F8;
display: flex;
align-items: center;
font-weight: 500;
color: #6B7D99;
font-size: 11px;
text-indent: 10px;
}
.layout .box .item .ul {
padding: 10px;
}
.layout .box .item .ul .li {
display: flex;
margin-bottom: 10px;
color: #333333;
align-items: center;
}
.layout .box .item .ul .li .label {
width: 63px;
color: rgba(51, 51, 51, 0.7);
}
.layout .box .item .ul .li .value {
width: calc(100% - 63px);
}
.layout .box .item .ul .is-inline {
width: 50%;
display: inline-flex;
}
.layout .box .manual {
padding: 27px 10px;
}
.layout .box .tips {
border-top: 1px solid #CCCCCC;
padding: 14px 0 30px;
font-weight: 500;
font-size: 10px;
color: #A3A3A3;
margin: 0 10px;
}
.layout .card{position:relative;width:100%;height:309px}.layout .card-bg{width:100%;height:100%}.layout .card-info{position:absolute;top:0;left:0;z-index:2;padding:20px;box-sizing:border-box;width:100%;height:100%;color:#333}.layout .card-info .top{display:flex}.layout .card-info .top .number{font-size:14px;margin-left:auto}.layout .card-info .text{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:37px;color:rgba(51,51,51,0.8)}.layout .card-info .text .card-title{font-weight:700;font-size:24px;color:#333;margin-bottom:6px}.layout .box{width:100%;min-height:674px;background-color:#FFFFFF;position:absolute;top:284px;left:0;border-radius:10px 10px 0 0;box-sizing:border-box;padding:0 10px}.layout .box .title{font-size:16px;font-weight:500;color:#4D8DF5;display:flex;align-items:center;justify-content:space-between;padding:18px 10px 12px}.layout .box .title .after{color:#333333;font-size:12px;font-weight:normal}.layout .box .title .after span{margin-left:10px}.layout .box .item .sub-title{height:30px;background:#F4F6F8;display:flex;align-items:center;font-weight:500;color:#6B7D99;font-size:11px;text-indent:10px}.layout .box .item .ul{padding:10px}.layout .box .item .ul .li{display:flex;margin-bottom:10px;color:#333333;align-items:center}.layout .box .item .ul .li .label{width:63px;color:rgba(51,51,51,0.7)}.layout .box .item .ul .li .value{width:calc(100% - 63px)}.layout .box .item .ul .is-inline{width:50%;display:inline-flex}.layout .box .manual{padding:27px 10px}.layout .box .tips{border-top:1px solid #CCCCCC;padding:14px 0 30px;font-weight:500;font-size:10px;color:#A3A3A3;margin:0 10px}
.layout {
.card {
position: relative;
width: 100%;
height: 309px;
&-bg {
width: 100%;
height: 100%;
}
&-info {
position: absolute;
top: 0;
left: 0;
z-index: 2;
padding: 20px;
box-sizing: border-box;
width: 100%;
height: 100%;
color: #333;
.top {
display: flex;
color: #666666;
.number {
font-size: 14px;
margin-left: auto;
}
}
.text {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin-top: 37px;
color: rgba(51, 51, 51, 0.8);
.card-title {
font-weight: 700;
font-size: 24px;
color: #333;
margin-bottom: 6px;
}
}
}
}
.box {
width: 100%;
min-height: 674px;
background-color: #FFFFFF;
position: absolute;
top: 284px;
left: 0;
border-radius: 10px 10px 0 0;
box-sizing: border-box;
padding: 0 20px;
.title {
font-size: 16px;
font-weight: 500;
color: #4D8DF5;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 0 8px;
border-bottom: 0.5px dashed #BEBEBE;
.after {
color: #333333;
font-size: 12px;
font-weight: normal;
span {
margin-left: 10px;
}
}
}
.item {
.sub-title {
height: 30px;
background: #F4F6F8;
display: flex;
align-items: center;
font-weight: 500;
color: #6B7D99;
font-size: 11px;
text-indent: 10px;
}
.ul {
padding: 10px 0;
.li {
display: flex;
height: 20px;
margin-bottom: 10px;
color: #333333;
align-items: center;
.label {
width: 84px;
color: #333333B3;
}
.value {
width: calc(100% - 84px);
}
}
.li:last-child {
margin-bottom: 0;
}
.dot {
color: #3582EE;
font-size: 50px;
height: 100%;
}
.is-inline {
width: 50%;
display: inline-flex;
}
}
}
.goods-box {
margin-bottom: 14px;
.goods-item {
background: #F4F6F8;
border-radius: 4px;
padding: 14px;
margin-bottom: 6px;
font-size: 14px;
color: #333333;
.item-name {
display: flex;
.film_icon {
width: 20px;
height: 20px;
margin-right: 8px;
}
.name-text {
width: calc(100% - 20px)
}
}
.goods-message {
margin-left: 28px;
.goods-position {
color: #333333B3;
font-size: 12px;
.position-str {
margin-right: 10px;
}
}
.card-code {
margin-top: 12px;
}
.warrantyPeriod {
color: #333333B3;
}
}
}
}
.warrantyPrice {
display: flex;
margin-bottom: 20px;
word-break: break-all;
.label {
// color: #333333;
color: rgba(51, 51, 51, 0.8);
width: 70px;
}
.value {
flex: 1;
}
}
.tips {
border-top: 1px solid #CCCCCC;
padding: 14px 0 30px;
font-weight: 500;
font-size: 10px;
color: #A3A3A3;
margin: 0 10px;
}
}
.evaluateImgCon {
padding: 10px 0 30px;
text-align: center;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #888888;
.evaluateImg {
width: 80px;
height: 80px;
margin-bottom: 7px;
}
}
}
\ No newline at end of file \ No newline at end of file
.layout {
padding: 0 20px;
background-color: #fff;
}
.layout .title {
color: #4D8DF5;
font-size: 16px;
height: 42px;
display: flex;
align-items: center;
font-weight: 500;
}
.layout .search-box {
padding: 6px 0;
}
.layout .search-box .search {
width: 100%;
border-radius: 20px;
border: 2px solid #3582EE;
height: 40px;
display: flex;
align-items: center;
box-sizing: border-box;
}
.layout .search-box .search-icon {
width: 32px;
height: 100%;
}
.layout .search-box .search-input {
width: calc(100% - 114px);
height: 100%;
}
.layout .search-box .search-input input {
width: 100%;
height: 100%;
border: none;
}
.layout .search-box .search-btn {
width: 70px;
height: 100%;
border-radius: 20px;
background-color: #4D8DF5;
color: #fff;
font-size: 16px;
margin-left: auto;
}
.layout .tips {
font-size: 11px;
color: #999999;
padding: 10px 0;
position: relative;
text-align: center;
}
.layout .tips::before,
.layout .tips::after {
position: absolute;
content: '';
top: 50%;
transform: translateY(-50%);
width: 110px;
height: 1px;
background-color: #eee;
}
.layout .tips::before {
left: 0;
}
.layout .tips::after {
right: 0;
}
.layout .card-box {
padding-top: 2px;
height: 176px;
position: relative;
}
.layout .card-box .default {
color: #6B7D99;
font-size: 24px;
width: 100%;
height: 140px;
border-radius: 10px;
box-sizing: border-box;
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
.layout .card-box .filter {
-webkit-filter: blur(12px);
}
.layout .card-box .card-list {
width: 100%;
height: 140px;
}
.layout .card-box .card-list .card-item {
width: 100%;
height: 100%;
}
.layout .card-box .card-list .card-item .card {
position: relative;
height: 100%;
width: 331px;
margin: 0 auto;
}
.layout .card-box .card-list .card-item .card-bg {
width: 100%;
height: 100%;
}
.layout .card-box .card-list .card-item .card-info {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 2;
box-sizing: border-box;
padding: 20px;
font-size: 14px;
color: #333333;
}
.layout .card-box .card-list .card-item .card-info .icon-card-icon {
margin-right: 15px;
}
.layout .card-box .card-list .card-item .card-info-title {
display: flex;
align-items: center;
}
.layout .card-box .card-list .card-item .card-info-title .number {
margin-left: auto;
}
.layout .card-box .card-list .card-item .card-info-detail {
position: absolute;
bottom: 25px;
left: 20px;
width: calc(100% - 40px);
font-size: 12px;
display: flex;
align-items: center;
justify-content: space-between;
color: #4D8DF5;
}
.layout .card-box .card-list .card-item .card-info-detail-goods {
width: calc(100% - 86px);
}
.layout .card-box .card-list .card-item .card-info-detail-time {
margin-left: 10px;
width: 76px;
}
.layout .card-box .card-list .card-item .card-info-detail span {
color: #333333;
margin-right: 10px;
}
.layout .card-box .card-list-indicators {
position: absolute;
left: 50%;
bottom: 12px;
border-radius: 3px;
display: flex;
align-items: center;
transform: translateX(-50%);
overflow: hidden;
background-color: #D8D8D8;
}
.layout .card-box .card-list-indicators div {
width: 13px;
height: 4px;
border-radius: 3px;
}
.layout .card-box .card-list-indicators .active {
background-color: #3582EE;
}
.layout .card-box .nothing {
padding-top: 54px;
text-align: center;
font-size: 24px;
color: #666;
font-weight: 700;
}
.layout .sub-title {
height: 36px;
font-size: 16px;
color: #3582EE;
border-bottom: 1px dashed #EDEDED;
font-weight: 500;
}
.layout .box .ul {
font-size: 12px;
color: #333;
padding-top: 7px;
list-style-type: disc;
padding-left: 20px;
}
.layout .box .ul .li {
line-height: 22px;
}
.layout .maintenance {
width: 100%;
height: 721px;
position: relative;
}
.layout .maintenance .manual {
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.layout .maintenance .text {
position: absolute;
left: 0;
top: 196px;
z-index: 2;
}
.layout .maintenance .bg {
position: absolute;
left: -20px;
top: 0;
width: 100vw;
height: 100%;
}
.layout .maintenance .line {
width: 100%;
border-bottom: 1px dashed #EDEDED;
position: absolute;
left: 0;
bottom: 19px;
}
.telInput {
outline: none;
border: none;
box-sizing: border-box;
background-color: #ccc;
padding: 10px;
margin: auto;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield;
}
\ No newline at end of file \ No newline at end of file
.layout{padding:0 20px;background-color:#fff}.layout .title{color:#4D8DF5;font-size:16px;height:42px;display:flex;align-items:center;font-weight:500}.layout .search-box{padding:6px 0}.layout .search-box .search{width:100%;border-radius:20px;border:2px solid #3582EE;height:40px;display:flex;align-items:center;box-sizing:border-box}.layout .search-box .search-icon{width:32px;height:100%}.layout .search-box .search-input{width:calc(100% - 114px);height:100%}.layout .search-box .search-input input{width:100%;height:100%;border:none}.layout .search-box .search-btn{width:70px;height:100%;border-radius:20px;background-color:#4D8DF5;color:#fff;font-size:16px;margin-left:auto}.layout .tips{font-size:11px;color:#999999;padding:10px 0;position:relative;text-align:center}.layout .tips::before,.layout .tips::after{position:absolute;content:'';top:50%;transform:translateY(-50%);width:110px;height:1px;background-color:#eee}.layout .tips::before{left:0}.layout .tips::after{right:0}.layout .card-box{padding-top:2px;height:176px;position:relative}.layout .card-box .default{color:#6B7D99;font-size:24px;width:100%;height:140px;border-radius:10px;box-sizing:border-box;position:absolute;top:0;left:0;z-index:5}.layout .card-box .filter{-webkit-filter:blur(12px)}.layout .card-box .card-list{width:100%;height:140px}.layout .card-box .card-list .card-item{width:100%;height:100%}.layout .card-box .card-list .card-item .card{position:relative;height:100%;width:331px;margin:0 auto}.layout .card-box .card-list .card-item .card-bg{width:100%;height:100%}.layout .card-box .card-list .card-item .card-info{position:absolute;width:100%;height:100%;left:0;top:0;z-index:2;box-sizing:border-box;padding:20px;font-size:14px;color:#333333}.layout .card-box .card-list .card-item .card-info .icon-card-icon{margin-right:15px}.layout .card-box .card-list .card-item .card-info-title{display:flex;align-items:center}.layout .card-box .card-list .card-item .card-info-title .number{margin-left:auto}.layout .card-box .card-list .card-item .card-info-detail{position:absolute;bottom:25px;left:20px;width:calc(100% - 40px);font-size:12px;display:flex;align-items:center;justify-content:space-between;color:#4D8DF5}.layout .card-box .card-list .card-item .card-info-detail-goods{width:calc(100% - 86px)}.layout .card-box .card-list .card-item .card-info-detail-time{margin-left:10px;width:76px}.layout .card-box .card-list .card-item .card-info-detail span{color:#333333;margin-right:10px}.layout .card-box .card-list-indicators{position:absolute;left:50%;bottom:12px;border-radius:3px;display:flex;align-items:center;transform:translateX(-50%);overflow:hidden;background-color:#D8D8D8}.layout .card-box .card-list-indicators div{width:13px;height:4px;border-radius:3px}.layout .card-box .card-list-indicators .active{background-color:#3582EE}.layout .card-box .nothing{padding-top:54px;text-align:center;font-size:24px;color:#666;font-weight:700}.layout .sub-title{height:36px;font-size:16px;color:#3582EE;border-bottom:1px dashed #EDEDED;font-weight:500}.layout .box .ul{font-size:12px;color:#333;padding-top:7px;list-style-type:disc;padding-left:20px}.layout .box .ul .li{line-height:22px}.layout .maintenance{width:100%;height:721px;position:relative}.layout .maintenance .manual{position:absolute;left:0;top:0;z-index:2}.layout .maintenance .text{position:absolute;left:0;top:196px;z-index:2}.layout .maintenance .bg{position:absolute;left:-20px;top:0;width:100vw;height:100%}.layout .maintenance .line{width:100%;border-bottom:1px dashed #EDEDED;position:absolute;left:0;bottom:19px}
.layout {
padding: 0 20px;
background-color: #fff;
.title {
color: #4D8DF5;
font-size: 16px;
height: 42px;
display: flex;
align-items: center;
font-weight: 500;
}
.search-box {
padding: 6px 0;
.search {
width: 100%;
border-radius: 20px;
border: 2px solid #3582EE;
height: 40px;
display: flex;
align-items: center;
box-sizing: border-box;
&-icon {
width: 32px;
height: 100%;
}
&-input {
width: calc(100% - 114px);
height: 100%;
input {
width: 100%;
height: 100%;
border: none;
}
}
&-btn {
width: 70px;
height: 100%;
border-radius: 20px;
background-color: #4D8DF5;
color: #fff;
font-size: 16px;
margin-left: auto;
}
}
}
.tips {
font-size: 11px;
color: #999999;
padding: 10px 0;
position: relative;
text-align: center;
&::before,
&::after {
position: absolute;
content: '';
top: 50%;
transform: translateY(-50%);
width: 110px;
height: 1px;
background-color: #eee;
}
&::before {
left: 0;
}
&::after {
right: 0;
}
}
.card-box {
padding-top: 2px;
// height: 180px;
position: relative;
margin-bottom: 29px;
.default {
color: #6B7D99;
font-size: 24px;
width: 100%;
height: 140px;
border-radius: 10px;
box-sizing: border-box;
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
.filter {
-webkit-filter: blur(12px);
}
.card-list {
width: 100%;
.card-item {
width: 100%;
height: 100%;
.swipe_item_1{
height: 151px;
}
.swipe_item_2{
height: 172px;
}
.swipe_item_3{
height: 193px;
}
.card {
position: relative;
height: 100%;
width: 331px;
margin: 0 auto;
&-bg {
width: 100%;
height: 100%;
}
&-info {
overflow: hidden;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 2;
box-sizing: border-box;
padding: 20px;
font-size: 14px;
color: #333333;
.activeStatus {
position: absolute;
top: 0;
right: 0;
width: 50px;
height: 20px;
background: #B5B8BE;
border-radius: 0 10px 0 10px;
text-align: center;
line-height: 20px;
color: #fff;
font-size: 12px;
&.active {
background-color: #65B85D;
}
}
.icon-card-icon {
margin-right: 15px;
}
&-title {
display: flex;
align-items: center;
.number {
margin-left: auto;
}
}
&-detail {
position: absolute;
bottom: 20px;
left: 20px;
width: calc(100% - 40px);
font-size: 12px;
display: flex;
align-items: center;
justify-content: space-between;
color: #4D8DF5;
&-goods {
width: calc(100% - 86px);
}
&-time {
margin-left: 10px;
width: 76px;
}
span {
color: #333333;
margin-right: 10px;
}
}
}
}
}
}
.goods-card {
height: 140px;
}
.card-list-indicators {
margin-top: 9px;
position: absolute;
left: 50%;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
transform: translateX(-50%);
background-color: #D8D8D8;
max-width: calc(100% - 40px);
div {
width: 13px;
height: 4px;
border-radius: 3px;
}
.active {
background-color: #3582EE;
}
}
.cardActive {
margin: 10px auto 10px;
color: #4D8DF5;
width: 172px;
height: 24px;
background: #EAF2FE;
border-radius: 12px;
text-align: center;
line-height: 24px;
font-size: 12px;
.icon {
display: inline-block;
width: 8px;
height: 8px;
margin-left: 3px;
}
}
.nothing {
padding-top: 54px;
text-align: center;
font-size: 24px;
color: #666;
font-weight: 700;
}
}
.custom-card-box{
.custom-card-list {
max-height: 193px;
.custom_info{
margin-top: 32px;
font-size: 12px;
color: #4D8DF5;
.label{
color: #333333;
font-weight: 500;
margin-right: 10px;
}
}
.card-info-detail-goods{
display: flex;
.label{
font-weight: 500;
}
.good-name-box{
width: calc(100% - 58px);
.sub_order_list{
margin-bottom: 4px;
}
}
}
.card-info-detail-time{
display: flex;
.label{
font-weight: 500;
}
.sub_order_list{
margin-bottom: 4px;
}
}
}
}
.sub-title {
box-sizing: border-box;
// height: 36px;
width: 66px;
height: 22px;
font-size: 16px;
color: #3582EE;
// border-bottom: 1px dashed #EDEDED;
font-weight: 500;
background-image: linear-gradient(269deg, #FFFFFF 4%, #EAF2FE 52%, #FFFFFF 100%);
}
.box {
.ul {
font-size: 12px;
color: #333;
padding-top: 7px;
list-style-type: disc;
// padding-left: 20px;
.li {
display: flex;
// flex-wrap: wrap;
line-height: 22px;
}
.dot {
margin-right: 5px;
&::before {
content: "•";
color: #3582EE;
font-size: 25px;
width: 40px;
line-height: 22px;
}
}
}
}
.maintenance {
width: 100%;
height: 721px;
position: relative;
display: flex;
flex-direction: column;
.manual {
// position: absolute;
// left: 0;
// top: 0;
z-index: 2;
}
.text {
// position: absolute;
// left: 0;
// top: 196px;
z-index: 2;
}
.bg {
position: absolute;
left: -20px;
top: 0;
width: 100vw;
height: 100%;
img {
width: 100%;
// height: 100%;
}
}
.line {
width: 100%;
border-bottom: 1px dashed #EDEDED;
position: absolute;
left: 0;
bottom: 19px;
}
}
}
::v-deep .van-dialog__header {
font-weight: bold !important;
}
.dialogTitle {
// font-family:;
// font-weight: bold !important;
font-size: 16px;
color: #333333;
// font: PingFangSC-S0rpxibold 16px bold;
// color: #3582EE;
}
.inputCon {
width: 100%;
display: flex;
align-items: center;
padding: 16px 0 32px;
}
.telInput {
outline: none;
border: none;
box-sizing: border-box;
background: #F3F3F3;
padding: 10px;
margin: auto;
font-size: 32rpx;
border-radius: 4px;
color: #333333;
width: 80%;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield;
}
\ No newline at end of file \ No newline at end of file
.sprite-icon { background-image: url(../images/sprite.png);background-size: 672px 440px;}
.icon-addIcon { width: 20px; height: 20px; background-position: -229px -364px;}
.icon-arrow { width: 8px; height: 8px; background-position: -341px -182px;}
.icon-card-bg-1 { width: 331px; height: 151px; background-position: 0px -203px;}
.icon-card-bg-2 { width: 331px; height: 172px; background-position: -341px 0px;}
.icon-card-bg-3 { width: 331px; height: 193px; background-position: 0px 0px;}
.icon-card-icon { width: 32px; height: 36px; background-position: -46px -404px;}
.icon-card { width: 331px; height: 140px; background-position: -341px -203px;}
.icon-close { width: 20px; height: 20px; background-position: -259px -364px;}
.icon-closeIcon { width: 36px; height: 36px; background-position: 0px -404px;}
.icon-film_icon { width: 20px; height: 20px; background-position: -289px -364px;}
.icon-logo { width: 113px; height: 23px; background-position: -106px -364px;}
.icon-scan { width: 18px; height: 18px; background-position: -319px -364px;}
.icon-search-icon { width: 14px; height: 14px; background-position: -347px -364px;}
.icon-supplierLogo { width: 96px; height: 30px; background-position: 0px -364px;}
\ No newline at end of file \ No newline at end of file
@import './common';
@import './sprite';
\ No newline at end of file \ No newline at end of file
// 需要那个,引入那个
import { ImagePreview, Checkbox, Collapse, CollapseItem, Swipe, SwipeItem, Dialog, Toast, Field, Popup, Picker, Form, Button, Icon } from 'vant'
// 导出一个函数,接收一个app参数,在函数中注册组件
export function vant(app) {
// 别忘了注册
app.use(Swipe)
app.use(SwipeItem)
app.use(Dialog)
app.use(Toast)
app.use(Popup)
app.use(Picker)
app.use(Form)
app.use(Field)
app.use(Button)
app.use(Icon)
app.use(Collapse)
app.use(CollapseItem)
app.use(Checkbox)
app.use(ImagePreview)
}
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import '@u/util'
import '@a/scss/style.scss'
import '@/assets/font/font.css'
import { vant } from '@/config/vant.config.js'
import mixin from './mixins/index'
vant(Vue)
import VueWechatTitle from 'vue-wechat-title'
Vue.use(VueWechatTitle)
Vue.config.productionTip = false
window.vm = new Vue({
router,
// store,
render: h => {
Vue.mixin(mixin)
return h(App)
}
}).$mount('#app')
// 最终执行
export default {
beforeRouteEnter(to, from, next) {
next(() => {})
}
}
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
Vue.use(VueRouter)
const router = new VueRouter({
routes
})
router.beforeEach(async(to, from, next) => {
next()
})
export default router
\ No newline at end of file \ No newline at end of file
const pages = {
poster: [
{
name: 'posterIndex',
title: '海报'
}
]
}
let routes = []
Object.keys(pages).map(parent => {
pages[parent].map(val => {
let { name } = val
let meta = val
delete meta.name
let route = {
component: resolve => require([`@v/${parent}/${name}.vue`], resolve),
path: name === 'posterIndex' ? '/' : `/${name}`,
name,
meta
}
routes.push(route)
})
})
export default routes
// import Vue from 'vue'
// import Vuex from 'vuex'
// Vue.use(Vuex)
// export default new Vuex.Store({
// })
import Vue from "vue";
import { Toast, Dialog } from "vant";
/**
* 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss')
*/
Date.prototype.format = function (fmt) {
let o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
//季度
"q+": Math.floor((this.getMonth() + 3) / 3),
S: this.getMilliseconds(), //毫秒
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
(this.getFullYear() + "").substr(4 - RegExp.$1.length)
);
}
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
);
}
}
return fmt;
};
const WindowEvent = (type, callBack) => {
if (window.attachEvent) {
window.attachEvent(`on${type}`, function () {
callBack.call(window);
});
} else {
window.addEventListener(type, callBack, false);
}
};
const throttle = (fn, gapTime) => {
if (gapTime == null || gapTime == undefined) {
gapTime = 1500;
}
let _lastTime = null;
return function () {
let _nowTime = +new Date();
if (_nowTime - _lastTime > gapTime || !_lastTime) {
fn.apply(this, arguments);
_lastTime = _nowTime;
}
};
};
/**防止重复点击 */
// const noScroll = (e) => { e.preventDefault() }
const showLoading = (title = "加载中...") => {
Toast({
type: "loading",
message: title,
forbidClick: true,
duration: 0,
});
};
/**监听页面滚动事件 */
const onPageScroll = (callBack) => {
WindowEvent("scroll", ($event) => {
return callBack($event);
});
};
/**num:要转换的数值,fixed:精确几位小数 */
const decimal = (num, fixed) => {
let pow = Math.pow(10, fixed);
return Math.round(num * pow) / pow;
};
const isMobileDevice = () => {
//判断当前设备是否为移动端
const ua = navigator.userAgent.toLowerCase();
const t1 =
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ua);
const t2 = !ua.match("iphone") && navigator.maxTouchPoints > 1;
return t1 || t2;
};
const showToast = (title = "") => {
Toast({
duration: 1500,
message: title,
forbidClick: true,
});
};
/**触摸样式 */
const touchstart = (e) => {
e.target.classList.add("btn-on-leave");
};
const touchend = (e) => {
e.target.classList.remove("btn-on-leave");
};
/**dialog弹框 */
const dialog = (message, callBack) => {
Dialog.alert({
message,
}).then(() => {
callBack();
});
};
/**
* 时间戳转化为年 月 日 时 分 秒
* ts: 传入时间戳
* format:返回格式,支持自定义,但参数必须与formateArr里保持一致
*/
const formatNumber = (n) => {
n = n.toString();
return n[1] ? n : "0" + n;
};
const hideLoading = () => {
Toast.clear();
};
const tsFormatTime = (timestamp, format) => {
format = format || "Y-M-D h:m:s";
const formateArr = ["Y", "M", "D", "h", "m", "s"];
let returnArr = [];
let date = new Date(timestamp);
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
let hour = date.getHours();
let minute = date.getMinutes();
let second = date.getSeconds();
returnArr.push(year, month, day, hour, minute, second);
returnArr = returnArr.map(formatNumber);
for (var i in returnArr) {
format = format.replace(formateArr[i], returnArr[i]);
}
return format;
};
const getLocalStorage = (key) => {
return JSON.parse(window.localStorage.getItem(key));
};
const utils = {
getLocalStorage,
onPageScroll,
showLoading,
hideLoading,
touchstart,
showToast,
throttle,
touchend,
decimal,
dialog,
isMobileDevice,
tsFormatTime,
};
export default { utils };
Object.keys(utils).map((key) => {
Vue.prototype[key] = utils[key];
});
<template>
<!-- offset="-100px" offset="1"-->
<Scrollama @step-enter="stepEnterHandler" :offset="0.7">
<!-- <img class="img" src="./image/1.jpg" alt="" /> -->
<div
v-for="(el, index) in imgList"
:key="index"
class="image-container"
:data-step="`${index}`"
:style="{ height: getImageHeight(index) }"
>
<img :src="require(`./image/${index + 1}.jpg`)" alt="" />
<!-- <div v-if="index ==4" :ref="`count${index}`"></div> -->
<img
class="mapstar"
v-if="index == 3"
:src="require(`./image/mapstar.gif`)"
alt=""
/>
<!-- :suffix="item.suffix || ''" -->
<span v-for="item in el.countList || []" :key="item.refName">
<!-- -->
<countTo
:style="item.style"
class="count-to-style"
:ref="item.refName"
:startVal="item.startVal"
:endVal="item.endVal"
:autoplay="false"
:duration="item.duration"
separator=""
:class="item.className || ''"
></countTo>
<span class="suffix" :style="item.suffixStyle">{{
item.suffix || ""
}}</span>
</span>
</div>
</Scrollama>
</template>
<script>
import "intersection-observer"; // for cross-browser support
import Scrollama from "vue-scrollama"; // local registration in this example, can also be globally registered
import countTo from "vue-count-to";
export default {
components: {
Scrollama, // local registration in this example, can also be globally registered
countTo,
},
data() {
return {
imgList: [
{
height: 266.67,
},
{
height: 111.2,
countList: [
{
refName: "count01",
startVal: 0,
endVal: 7,
duration: 3000,
style: {
top: "49.1%",
left: "9%",
},
},
{
refName: "count02",
startVal: 0,
endVal: 4.3,
decimals: 1,
duration: 3000,
className: "count02",
style: {
top: "49.1%",
left: "39.5%",
},
},
],
},
{
height: 262.93,
},
{
height: 135.2,
countList: [
{
refName: "count31",
startVal: 0,
endVal: 74,
duration: 2000,
suffix: "%+",
style: {
top: "80.5%",
left: "27%",
},
suffixStyle: {
top: "80.5%",
left: "37.5%",
},
},
{
refName: "count32",
startVal: 0,
endVal: 4000,
duration: 1000,
suffix: "+",
style: {
top: "86.79%",
left: "36%",
},
suffixStyle: {
top: "86.79%",
left: "54.8%",
},
},
],
},
{
height: 170.4,
countList: [
{
refName: "count41",
startVal: 0,
endVal: 50,
duration: 2000,
suffix: "%+",
style: {
top: "33.5%",
left: "14%",
},
suffixStyle: {
top: "33.5%",
left: "24.53%",
},
},
{
refName: "count42",
startVal: 0,
endVal: 30,
duration: 2000,
suffix: "%+",
style: {
top: "49%",
left: "14%",
},
suffixStyle: {
top: "49%",
left: "24.53%",
},
},
],
},
{
height: 190.75,
countList: [
{
refName: "count61",
startVal: 0,
endVal: 25,
duration: 3000,
style: {
fontSize: "7vw",
top: "75.7%",
left: "29%",
},
},
{
refName: "count62",
startVal: 0,
endVal: 4,
duration: 3000,
style: {
fontSize: "7vw",
top: "75.5%",
left: "75.5%",
},
},
{
refName: "count63",
startVal: 0,
endVal: 58,
duration: 3000,
style: {
fontSize: "7vw",
top: "83.5%",
left: "29.9%",
},
},
{
refName: "count64",
startVal: 0,
endVal: 94,
duration: 3000,
style: {
fontSize: "7vw",
top: "83.5%",
left: "68%",
},
},
{
refName: "count65",
startVal: 0,
endVal: 21,
duration: 3000,
style: {
fontSize: "7vw",
top: "91.2%",
left: "29.5%",
},
},
{
refName: "count66",
startVal: 0,
endVal: 82,
duration: 3000,
style: {
fontSize: "7vw",
top: "91.2%",
left: "74.5%",
},
},
],
},
{
height: 108.7,
},
{
height: 255.55,
},
{
height: 188.88,
},
{
height: 222.21,
},
{
height: 211.12,
},
{
height: 251.84,
},
{
height: 282.66,
},
],
duration: 600000,
};
},
computed: {
getImageHeight() {
return (index) => {
// console.log(this.imgList, this.imgList[index]);
return this.imgList[index].height + "vw";
};
},
},
methods: {
start() {
console.log(this.$refs.count1, "this.$refs.count1");
this.$refs.count1[0].start();
},
stepEnterHandler({ element, index, direction }) {
// handle the step-event as required here
console.log({ element, index, direction });
// use the data attributes if needed
console.log(element.dataset.step); // a, b or c
if (this.imgList[index]?.countList) {
this.imgList[index].countList.forEach((item) => {
console.log(item);
console.log(this.$refs[item.refName][0]);
this.$refs[item.refName][0].start();
});
}
// if (element.dataset.step == 13) {
// console.log("step a");
// this.start();
// }
},
},
};
</script>
<style lang="scss" scoped>
.image-container {
position: relative;
min-height: 400px; /* 固定高度 */
font-size: 30px;
color: #024ad7;
/* overflow: hidden; */
/* 可选,隐藏溢出部分 */
img {
width: 100%;
height: 100%;
object-fit: cover; /* 保持比例填充容器 */
}
.mapstar {
width: 93%;
height: 55%;
position: absolute;
top: 23.5%;
left: 3.2%;
}
}
.count-to-style {
z-index: 999;
position: absolute;
// left: 0;
// top: 0;
font-family: number;
}
.suffix {
z-index: 999;
position: absolute;
font-family: number;
}
// .count02 {
// top: 207px;
// left: 147px;
// }
</style>
\ No newline at end of file \ No newline at end of file
const path = require('path')
const versions = Math.round(new Date() / 1000)
// const CDN_URL = 'https://cdn.bootcdn.net/'
const CDN_URL = 'https://img02.glsx.com.cn/dj-carlife-web/'
const CDN = {
// css: [`${CDN_URL}vant-ui.min.css`],
js: [
`${CDN_URL}zxinglibrary.min.js`,
`${CDN_URL}vue.min.js`,
`${CDN_URL}vue-router.min.js`,
`${CDN_URL}axios.min.js`
]
// `${CDN_URL}vant.min.js`
}
// 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
module.exports = {
// publicPath: IS_PROD ? "./" : "/dj-scrm-wx-work-main-zhangls/", // 本地调试时需登录时使用
publicPath: IS_PROD ? './' : '/', // 本地调试时需登录时使用
devServer: {
disableHostCheck: true,
open: false // 启动后打开浏览器
// port: 9528,
// public: '/dj-scrm-wx-work-zhangls'
// open: false
},
// publicPath: './',
chainWebpack: config => {
if (process.env.NODE_ENV === 'production') {
// 给js和css配置版本号2
config.output.filename(`js/[name].${versions}.js`).end()
config.output.chunkFilename(`js/[name].${versions}.js`).end()
config.plugin('extract-css').tap(args => [
{
filename: `css/[name].${versions}.css`,
chunkFilename: `css/[name].${versions}.css`
}
])
config.externals = {
vue: 'Vue',
'vue-router': 'VueRouter',
// vant: 'Vant',
// vuex: 'Vuex',
axios: 'axios',
'@zxinglibrary': '@zxinglibrary'
}
config.plugin('html').tap(args => {
args[0].cdn = CDN
return args
})
}
// 修复HMR
config.resolve.symlinks(true)
// 别名配置
config.resolve.alias
.set('@', path.resolve(__dirname, './src'))
.set('@a', path.resolve(__dirname, './src/assets'))
.set('@api', path.resolve(__dirname, './src/api'))
.set('@c', path.resolve(__dirname, './src/components'))
.set('@v', path.resolve(__dirname, './src/views'))
.set('@u', path.resolve(__dirname, './src/utils'))
},
css: {
sourceMap: false
// loaderOptions: {
// css: {},
// postcss: {
// plugins: [
// require('postcss-px2rem')({
// remUnit: 75 / 2,
// selectorBlackList: ['.vant']
// })
// ]
// }
// }
},
runtimeCompiler: true,
productionSourceMap: false
}
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!