Commit 02afa87a by 李伟康

提交代码

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