|
@@ -97,6 +97,8 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.featureType = this.boxFeatureType
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
this.actionSunshineGuide()
|
|
|
},
|
|
|
methods: {
|
|
@@ -185,14 +187,20 @@ export default {
|
|
|
}
|
|
|
const { error_code: code, data } = await getMoveDialog(params)
|
|
|
if (code === 0) {
|
|
|
- this.tipTimes = data || 0
|
|
|
- this.showSunshineGuide = this.tipTimes < 2
|
|
|
if (know && data === 1) {
|
|
|
this.showSunshineGuide = false
|
|
|
+ } else {
|
|
|
+ if (data === 0) {
|
|
|
+ this.scrollToSunshine(() => {
|
|
|
+ this.showSunshineGuide = true
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.showSunshineGuide = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
- return {}
|
|
|
+ console.log(err)
|
|
|
}
|
|
|
},
|
|
|
async toSunshineMore() {
|
|
@@ -201,6 +209,17 @@ export default {
|
|
|
},
|
|
|
toSunshineKnow() {
|
|
|
this.actionSunshineGuide('know')
|
|
|
+ },
|
|
|
+ scrollToSunshine(callback) {
|
|
|
+ setTimeout(() => {
|
|
|
+ const sunshineTab = document.querySelectorAll('.van-tab__pane')[1]
|
|
|
+ if (sunshineTab) {
|
|
|
+ sunshineTab.scrollIntoView({ block: 'end', behavior: 'smooth' })
|
|
|
+ callback && callback()
|
|
|
+ } else {
|
|
|
+ callback && callback()
|
|
|
+ }
|
|
|
+ }, 500)
|
|
|
}
|
|
|
}
|
|
|
}
|