|
@@ -115,7 +115,8 @@ import { inputFocusHideFooter } from '@/utils/globalFunctions'
|
|
|
},
|
|
|
methods: {
|
|
|
...mapState('home', {
|
|
|
- buyState: (state: any) => state.buyState
|
|
|
+ buyState: (state: any) => state.buyState,
|
|
|
+ reportInfo: (state: any) => state.reportInfo
|
|
|
}),
|
|
|
...mapMutations({
|
|
|
saveBuyState: 'home/saveBuyState',
|
|
@@ -136,6 +137,9 @@ export default class BuyReport extends Vue {
|
|
|
protected sendEmailCode!: any
|
|
|
protected checkEmailCode!: any
|
|
|
|
|
|
+ // 当前数据报告的信息
|
|
|
+ protected reportInfo!: any
|
|
|
+
|
|
|
// 保存恢复状态
|
|
|
protected buyState!: any
|
|
|
protected saveBuyState!: any
|
|
@@ -243,6 +247,13 @@ export default class BuyReport extends Vue {
|
|
|
return !reg.test(email)
|
|
|
}
|
|
|
|
|
|
+ created () {
|
|
|
+ const reportInfo = this.reportInfo()
|
|
|
+ this.orderInfo.reportId = this.$route.params.id
|
|
|
+ this.orderInfo.price = reportInfo.price
|
|
|
+ this.orderInfo.before_price = reportInfo.before_price
|
|
|
+ }
|
|
|
+
|
|
|
mounted () {
|
|
|
const recover = this.recoverState()
|
|
|
if (!recover) {
|
|
@@ -258,30 +269,17 @@ export default class BuyReport extends Vue {
|
|
|
forbidClick: true,
|
|
|
duration: 0
|
|
|
})
|
|
|
- // test
|
|
|
- const res = {
|
|
|
- data: {
|
|
|
- email: 'a@qq.com',
|
|
|
- phone: '13200088125',
|
|
|
- company: '金额急急急'
|
|
|
- }
|
|
|
- }
|
|
|
- setTimeout(() => {
|
|
|
- toast.clear()
|
|
|
- this.originInfo = res.data
|
|
|
- for (const key in res.data) {
|
|
|
- this.userInfo[key] = res.data[key]
|
|
|
+ this.getUserMsg().then(res => {
|
|
|
+ if (res.error_code === 0) {
|
|
|
+ toast.clear()
|
|
|
+ if (res.data) {
|
|
|
+ this.originInfo = res.data
|
|
|
+ for (const key in res.data) {
|
|
|
+ this.userInfo[key] = res.data[key]
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }, 1000)
|
|
|
- // this.getUserMsg().then(res => {
|
|
|
- // toast.clear()
|
|
|
- // if (res.error_code === 0) {
|
|
|
- // this.originInfo = res.data
|
|
|
- // for (const key in res.data) {
|
|
|
- // this.userInfo[key] = res.data[key]
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
formatter (value) {
|
|
@@ -320,7 +318,7 @@ export default class BuyReport extends Vue {
|
|
|
return pass
|
|
|
}
|
|
|
|
|
|
- toServiceTerms () {
|
|
|
+ toServiceTerms (e) {
|
|
|
this.saveState()
|
|
|
// location.href = e.target.href
|
|
|
}
|
|
@@ -362,6 +360,7 @@ export default class BuyReport extends Vue {
|
|
|
reportId: this.orderInfo.reportId
|
|
|
}
|
|
|
console.log(JSON.stringify(data))
|
|
|
+ // this.$router.push('/pay/00e2d1')
|
|
|
this.orderSubmit(data)
|
|
|
}
|
|
|
|