张延森 3 years ago
parent
commit
ddafe1acca
4 changed files with 12 additions and 10 deletions
  1. 2
    6
      src/main.js
  2. 2
    2
      src/pages/signup.vue
  3. 3
    1
      src/router/index.js
  4. 5
    1
      src/utils/initial.js

+ 2
- 6
src/main.js View File

24
 
24
 
25
 
25
 
26
 Login().then(e => {
26
 Login().then(e => {
27
-
28
-
29
   new Vue({
27
   new Vue({
30
     router,
28
     router,
31
     store,
29
     store,
32
     render: h => h(App),
30
     render: h => h(App),
33
   }).$mount('#app')
31
   }).$mount('#app')
34
-
35
-
32
+}).catch(e => {
33
+  alert('系统错误, 请刷新重试')
36
 })
34
 })
37
 
35
 
38
-
39
-

+ 2
- 2
src/pages/signup.vue View File

103
     },
103
     },
104
     handleUser() {
104
     handleUser() {
105
       this.ischecked = true
105
       this.ischecked = true
106
-      this.formData.role = 'user'
106
+      this.formData.role = '用户'
107
     },
107
     },
108
     handleDesigner() {
108
     handleDesigner() {
109
       this.ischecked = false
109
       this.ischecked = false
110
-      this.formData.role = 'designer'
110
+      this.formData.role = '设计师'
111
     },
111
     },
112
     handleArea(val) {
112
     handleArea(val) {
113
       this.showArea = false
113
       this.showArea = false

+ 3
- 1
src/router/index.js View File

8
 
8
 
9
 Vue.use(Router)
9
 Vue.use(Router)
10
 
10
 
11
-export default new Router({
11
+const router = new Router({
12
   mode: "history",
12
   mode: "history",
13
 
13
 
14
   routes: [
14
   routes: [
41
     }
41
     }
42
   ]
42
   ]
43
 })
43
 })
44
+
45
+export default router;

+ 5
- 1
src/utils/initial.js View File

37
   // const defaultLink = origin + pathname
37
   // const defaultLink = origin + pathname
38
   const defaultImg = `${origin}${pathname}images/share.png`
38
   const defaultImg = `${origin}${pathname}images/share.png`
39
 
39
 
40
-  const link = origin + pathname + search // opt.link || defaultLink
40
+  const link = window.location.href
41
   const imgUrl = opt.imgUrl || defaultImg
41
   const imgUrl = opt.imgUrl || defaultImg
42
 
42
 
43
   initSDK(link)
43
   initSDK(link)
76
 
76
 
77
 
77
 
78
     hideLoading()
78
     hideLoading()
79
+    share({
80
+      title: '开启干洗护理新时代',
81
+      desc: '即刻尊享'
82
+    })
79
 
83
 
80
     return;
84
     return;
81
   })
85
   })