Commit 02afa87a by 李伟康

提交代码

1 parent 2794eb73
......@@ -12,23 +12,23 @@
10%,
90% {
transform: translate3d(-1px, 0, 0);
transform: translateX(-1px);
}
20%,
80% {
transform: translate3d(2px, 0, 0);
transform: translateX(2px);
}
30%,
50%,
70% {
transform: translate3d(-4px, 0, 0);
transform: translateX(-4px);
}
40%,
60% {
transform: translate3d(4px, 0, 0);
transform: translateX(4px);
}
}
......
......@@ -177,16 +177,12 @@ const refreshPage = (message = '系统异常') => {
confirmButtonColor: '#f13c3d'
})
}
const toTop = () => {
let bodySrcollTop = document.body.scrollTop
if (bodySrcollTop !== 0) {
document.body.scrollTop = 0
return
}
let docSrcollTop = document.documentElement.scrollTop
if (docSrcollTop !== 0) {
document.documentElement.scrollTop = 0
}
const toTop = (top = 0) => {
window.scrollTo({
top,
left: 0,
behavior: 'smooth'
})
}
const getParams = () => {
return window.vm.$route.params
......
......@@ -6,6 +6,8 @@
<van-index-bar
highlight-color="#FC5B32"
:index-list="indexList"
@change="indexNumber = $event"
ref="indexBar"
>
<template v-for="(item,index) in brandList">
<div :key="index">
......@@ -39,10 +41,11 @@ export default {
return {
brandList: [],
upData: Date.now(),
indexList: []
indexList: [],
indexNumber: 'A'
}
},
mounted () {
created () {
let data = this.getLocalStorage('wx_scrm_car_brand_list')
if (data) this.formatData(data)
else carLifeApi.getCarBrandList().then(carInfo => {
......@@ -50,6 +53,14 @@ export default {
this.formatData(carInfo)
})
},
activated () {
this.$nextTick(() => {
this.$refs.indexBar.scrollTo(this.indexNumber)
})
},
deactivated () {
},
methods: {
formatData (data) {
let letterList = Array.from(new Set([...data.map(e => e.letter)])),
......
......@@ -102,11 +102,11 @@ export default {
}
}
},
payStatus (n) {
payStatus () {
this.payLoading = false
},
carInfo (n) {
console.log(n)
console.table([JSON.parse(JSON.stringify(n))])
this.params.carBrandsText = `${n.vehicleBrandName} ${n.vehicleSubBrandName}`
this.params.carTypeText = `${n.vehicleSeriesName} ${n.vehicleShapeName}`
}
......
......@@ -381,8 +381,10 @@ export default {
let link = `${redirectUrl}?id=${id}&shareStaffType=${this.ISWXWORK ? 2 : 1}&shareStaffName=${this.toUnicode(name)}&shareStaffImageUrl=${encodeURIComponent(userInfo.logo || userInfo.staffAvatar)}&openId=${userInfo.openid || userInfo.uuid}`
if (userInfo.phone) link = `${link}&userPhone=${userInfo.phone}`
if (this.ISWXWORK) {
link = `${link}&corpId=${userInfo.entmicroId}`
if (userInfo.loginList.length && userInfo.loginList[0].phone) link = `${link}&userPhone=${userInfo.loginList[0].phone}`
let { corpId, agentId } = this.getLocalStorage('dj_scrm_corpId')
link = `${link}&corpId=${corpId || userInfo.entmicroId}`
if (agentId) link += `&agentId=${agentId}`
if (userInfo.loginList && userInfo.loginList.length && userInfo.loginList[0].phone) link = `${link}&userPhone=${userInfo.loginList[0].phone}`
}
if (params && params.shareStaffUuid) link = `${link}&shareStaffUuid=${params.shareStaffUuid}`
if (params && params.merchantId) link = `${link}&merchantId=${params.merchantId}`
......
......@@ -70,6 +70,9 @@ export default {
activated () {
this.getOrderList()
},
deactivated(){
this.imgList = []
},
methods: {
end () {
let { swipe } = this.$refs
......@@ -92,7 +95,7 @@ export default {
getOrderList () {
let { id } = this.getLocalStorage('wx_scrm_link_params')
shopmallApi.getOrderList(id).then(data => {
console.log(data)
console.table(data)
data && data.length && data.map(e => {
e.createdDate = new Date(this.iosTimeFormat(e.payDate))
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!