|
@@ -106,6 +106,7 @@
|
|
|
<script>
|
|
|
import { Popup, Picker, Toast } from 'vant'
|
|
|
import { sendSMS } from '../../../api/common'
|
|
|
+ import { getMyPartnerOrder } from '../explain/api'
|
|
|
import { getChinaArea, createOrder } from './api'
|
|
|
|
|
|
const STRCAPTURE = process.env.API_DOMAIN + '/api/captcha'
|
|
@@ -195,6 +196,23 @@
|
|
|
this.$route.meta.isUseCache = false
|
|
|
},
|
|
|
methods: {
|
|
|
+ funInit () {
|
|
|
+ getMyPartnerOrder().then(res => {
|
|
|
+ if (res.status) {
|
|
|
+ const { id } = res.data
|
|
|
+ if (id) {
|
|
|
+ Toast({
|
|
|
+ message: res.msg,
|
|
|
+ onClose: () => {
|
|
|
+ this.$router.replace({ path: `/partner/detail/${id}` })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ Toast(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
funGetChinaArea () {
|
|
|
getChinaArea().then(res => {
|
|
|
if (res.status) {
|
|
@@ -330,6 +348,11 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ vm.funInit()
|
|
|
+ })
|
|
|
+ },
|
|
|
beforeRouteLeave (to, from, next) {
|
|
|
if (['partnerPrivacy', 'partnerAgreement'].includes(to.name)) {
|
|
|
from.meta.isUseCache = true
|