|
|
@@ -121,25 +121,32 @@ export const formatDate = (date, fmt) => {
|
|
|
return fmt
|
|
|
}
|
|
|
|
|
|
-export const goLinkUser = ($this) => {
|
|
|
+export const goLinkUser = ($this, enuu) => {
|
|
|
if ($this.user.logged) {
|
|
|
- $this.$http.get('/basic/enterprise/' + $this.storeInfo.enUU + '/info').then(response => {
|
|
|
- if (response.data.enTel) {
|
|
|
- $this.tel = response.data.enTel
|
|
|
- $this.showLinkBox = true
|
|
|
- } else {
|
|
|
- $this.$http.get('/basic/enterprise/' + response.data.uu + '/admin').then(response => {
|
|
|
- $this.tel = response.data.userTel
|
|
|
- $this.showLinkBox = true
|
|
|
- }, err => {
|
|
|
- $this.$message.error('获取卖家联系方式失败')
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
- }
|
|
|
+ // $this.$http.get('/basic/enterprise/' + $this.storeInfo.enUU + '/info').then(response => {
|
|
|
+ // if (response.data.enTel) {
|
|
|
+ // $this.tel = response.data.enTel
|
|
|
+ // $this.showLinkBox = true
|
|
|
+ // } else {
|
|
|
+ // $this.$http.get('/basic/enterprise/' + response.data.uu + '/admin').then(response => {
|
|
|
+ // $this.tel = response.data.userTel
|
|
|
+ // $this.showLinkBox = true
|
|
|
+ // }, err => {
|
|
|
+ // $this.$message.error('获取卖家联系方式失败')
|
|
|
+ // console.log(err)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // $this.showLinkBox = true
|
|
|
+ // }, err => {
|
|
|
+ // $this.$message.error('获取卖家联系方式失败')
|
|
|
+ // console.log(err)
|
|
|
+ // })
|
|
|
+ $this.$http.get(`/basic/enterprise/${enuu}/tels`).then(response => {
|
|
|
+ $this.tel = response.data.data.entel || response.data.data.adminTel
|
|
|
$this.showLinkBox = true
|
|
|
}, err => {
|
|
|
$this.$message.error('获取卖家联系方式失败')
|
|
|
- console.log(err)
|
|
|
+ throw err
|
|
|
})
|
|
|
} else {
|
|
|
$this.$router.push(`/auth/login?returnUrl=${window.location.href}`)
|