|
@@ -76,15 +76,6 @@ export default class Home extends Vue {
|
|
protected saveReportInfo!: any
|
|
protected saveReportInfo!: any
|
|
protected clearBuyState!: any
|
|
protected clearBuyState!: any
|
|
|
|
|
|
- injectBindPhoneScript = {
|
|
|
|
- wx: [
|
|
|
|
- '/js/check-bind-phone.js'
|
|
|
|
- ],
|
|
|
|
- app: [
|
|
|
|
- '/jyapp/js/check-bind-phone.js'
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
skeletonShow = true
|
|
skeletonShow = true
|
|
// detail = {
|
|
// detail = {
|
|
// id: 12,
|
|
// id: 12,
|
|
@@ -115,7 +106,6 @@ export default class Home extends Vue {
|
|
|
|
|
|
mounted () {
|
|
mounted () {
|
|
// 清除购买页面用户填写的信息
|
|
// 清除购买页面用户填写的信息
|
|
- this.loadScript(this.injectBindPhoneScript[this.$env.platform])
|
|
|
|
this.clearBuyState()
|
|
this.clearBuyState()
|
|
this.getDetail(`id=${this.$route.params.id}`).then((res: any) => {
|
|
this.getDetail(`id=${this.$route.params.id}`).then((res: any) => {
|
|
if (res.error_code === 0 && res.data) {
|
|
if (res.error_code === 0 && res.data) {
|
|
@@ -133,16 +123,6 @@ export default class Home extends Vue {
|
|
this.$router.push(`/buy/${id}?t=${+new Date()}`)
|
|
this.$router.push(`/buy/${id}?t=${+new Date()}`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- loadScript (urls) {
|
|
|
|
- if (!urls) return console.log('urls为空')
|
|
|
|
- const dom: any = this.$refs.footer
|
|
|
|
- urls.forEach(item => {
|
|
|
|
- const script = document.createElement('script')
|
|
|
|
- script.src = `${item}?v=${+new Date()}`
|
|
|
|
- dom.parentNode.insertBefore(script, dom)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|