yuantianjiao 6 년 전
부모
커밋
fc6cc7f9aa

+ 5
- 5
config/index.js 파일 보기

@@ -24,12 +24,12 @@ module.exports = {
24 24
     proxyTable: {
25 25
       '/api': {
26 26
         // target: 'https://dp.huiju360.com.cn/hj_operations',
27
-        // target: 'http://192.168.0.62:8080', //wf
28
-        target: 'http://dev.ycjcjy.com', //zys
27
+        target: 'http://192.168.0.62:8080', //wf
28
+        // target: 'http://dev.ycjcjy.com', //zys
29 29
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
30
-        pathRewrite: {
31
-          '^/api': '/api-v2/api'
32
-        },
30
+        // pathRewrite: {
31
+        //   '^/api': '/api-v2/api'
32
+        // },
33 33
       },
34 34
     },
35 35
     // CSS Sourcemaps off by default because relative paths are "buggy"

+ 5
- 3
src/module/user/bindMobile/bindMobile.vue 파일 보기

@@ -98,8 +98,10 @@ export default {
98 98
     onConfirmC (value, index) {
99 99
       this.caseName = value.CaseName
100 100
       this.postData.case = value.CaseId
101
-      for (let i=0;i<this.caseInfo.sales.length;i++){
102
-        if (this.caseInfo.sales[i].CaseId === this.postData.case){
101
+      this.columnsS = []
102
+      this.salesName = '选择销售'
103
+      for (let i = 0; i < this.caseInfo.sales.length; i++) {
104
+        if (this.caseInfo.sales[i].CaseId === this.postData.case) {
103 105
           this.columnsS.push(this.caseInfo.sales[i])
104 106
         }
105 107
       }
@@ -123,7 +125,7 @@ export default {
123 125
       if (!this.postData.case) {
124 126
         this.$toast('请先选择案场')
125 127
         return
126
-      } else if (!this.columnsS) {
128
+      } else if (this.columnsS.length <= 0) {
127 129
         this.$toast('此案场无销售')
128 130
         return
129 131
       }

+ 10
- 2
src/module/user/bindMobile/page.scss 파일 보기

@@ -48,12 +48,12 @@
48 48
           height: 100%;
49 49
         }
50 50
         .sand{
51
-          width: .7rem;
51
+          padding: 0 .1rem;
52 52
           height: .24rem;
53 53
           border-radius:20px;
54 54
           border:1px solid rgba(218,218,218,1);
55 55
           color: rgba(218,218,218,1);
56
-          font-size: 12px;
56
+          font-size: .12rem;
57 57
           text-align: center;
58 58
           line-height: .24rem;
59 59
           position: absolute;
@@ -78,11 +78,19 @@
78 78
         div{
79 79
           height: 100%;
80 80
           display: flex;
81
+          flex: 1;
82
+          margin-left: .1rem;
81 83
           align-items: center;
82 84
           border-radius:8px;
83 85
           border:1px solid rgba(168,182,200,0.2);
84 86
           padding: .1rem;
85 87
           box-sizing: border-box;
88
+          span{
89
+            width: 70%;
90
+            overflow:hidden;
91
+            text-overflow:ellipsis;
92
+            white-space:nowrap;
93
+          }
86 94
         }
87 95
       }
88 96
       .submit{

+ 38
- 38
src/module/user/mainPage/indexPage/index.vue 파일 보기

@@ -78,45 +78,45 @@ export default {
78 78
   data () {
79 79
     return {
80 80
       swiperOption: {
81
-          observer:true,
82
-          loop : true,
83
-          autoplay: {
84
-            disableOnInteraction: false,
85
-          }
81
+        observer: true,
82
+        loop: true,
83
+        autoplay: {
84
+          disableOnInteraction: false,
85
+        }
86 86
       },
87 87
       swiperOptionMsg: {
88
-          observer:true,
89
-          direction : 'vertical',
90
-          loop : true,
91
-          autoplay: {
92
-            disableOnInteraction: false,
93
-          }
88
+        observer: true,
89
+        direction: 'vertical',
90
+        loop: true,
91
+        autoplay: {
92
+          disableOnInteraction: false,
93
+        }
94 94
       },
95 95
       newsList: [{ // 资讯列表
96
-        title:'我是标题我是标题我是标题我是标题我是标题我是标题',
97
-        time:'2018年5月25日',
98
-        img:'',
99
-        id:''
100
-      },{
101
-        title:'我是标题我是标题我是标题我是标题我是标题我是标题',
102
-        time:'2018年5月25日',
103
-        img:'',
104
-        id:''
105
-      },{
106
-        title:'我是标题我是标题我是标题我是标题我是标题我是标题',
107
-        time:'2018年5月25日',
108
-        img:'',
109
-        id:''
110
-      },{
111
-        title:'我是标题我是标题我是标题我是标题我是标题我是标题',
112
-        time:'2018年5月25日',
113
-        img:'',
114
-        id:''
115
-      },{
116
-        title:'我是标题我是标题我是标题我是标题我是标题我是标题',
117
-        time:'2018年5月25日',
118
-        img:'',
119
-        id:''
96
+        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
97
+        time: '2018年5月25日',
98
+        img: '',
99
+        id: ''
100
+      }, {
101
+        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
102
+        time: '2018年5月25日',
103
+        img: '',
104
+        id: ''
105
+      }, {
106
+        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
107
+        time: '2018年5月25日',
108
+        img: '',
109
+        id: ''
110
+      }, {
111
+        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
112
+        time: '2018年5月25日',
113
+        img: '',
114
+        id: ''
115
+      }, {
116
+        title: '我是标题我是标题我是标题我是标题我是标题我是标题',
117
+        time: '2018年5月25日',
118
+        img: '',
119
+        id: ''
120 120
       }]
121 121
     }
122 122
   },
@@ -124,10 +124,10 @@ export default {
124 124
     ...mapState({
125 125
       banner: x => x.index.banner
126 126
     }),
127
-    MySwiper() {
127
+    MySwiper () {
128 128
       return this.$refs.mySwiper.swiper
129 129
     },
130
-    MySwiperMsg() {
130
+    MySwiperMsg () {
131 131
       return this.$refs.MySwiperMsg.swiper
132 132
     }
133 133
   },
@@ -137,7 +137,7 @@ export default {
137 137
     swiperSlide,
138 138
   },
139 139
   created () {
140
-    this.getIndexInfo(123)
140
+    this.getIndexInfo({ orgId: '1' })
141 141
   },
142 142
   methods: {
143 143
     ...mapIndexActions(['getIndexInfo'])

+ 2
- 2
src/store/app/app.js 파일 보기

@@ -2,11 +2,11 @@
2 2
 export default {
3 3
   namespaced: true,
4 4
   state: {
5
-    location: []
5
+    orgId: '1'
6 6
   },
7 7
   mutations: {
8 8
     init (state, data) { // 这里的state对应着上面这个state
9
-      state.location = data
9
+      state.orgId = '2'
10 10
     }
11 11
   },
12 12
   actions: {

+ 16
- 12
src/store/index/index.js 파일 보기

@@ -3,11 +3,15 @@ import api from '../../util/api'
3 3
 const http = new Object
4 4
 
5 5
 // 请求数据
6
-http.getBanner = (data) => {
6
+http.getIndexLocation = (data) => {
7 7
   console.log(data)
8 8
   return new Promise((resolve, reject) => {
9
-    Ajax(api.user.case.url, {
10
-      method: api.user.case.method
9
+    Ajax(api.index.location.url, {
10
+      method: api.index.location.method,
11
+      queryData: {
12
+        issys: 0,
13
+        orgid: data
14
+      }
11 15
     }).then(res => {
12 16
       resolve(res)
13 17
     }).catch((err) => {
@@ -16,11 +20,10 @@ http.getBanner = (data) => {
16 20
   })
17 21
 }
18 22
 
19
-http.getFiveA = (data) => {
20
-  console.log(data)
23
+http.getBanner = (data) => {
21 24
   return new Promise((resolve, reject) => {
22
-    Ajax(api.index.fiveA.url, {
23
-      method: api.index.fiveA.method
25
+    Ajax(api.index.banner.url, {
26
+      method: api.index.banner.method
24 27
     }).then(res => {
25 28
       resolve(res)
26 29
     }).catch((err) => {
@@ -30,7 +33,6 @@ http.getFiveA = (data) => {
30 33
 }
31 34
 
32 35
 http.getMessage = (data) => {
33
-  console.log(data)
34 36
   return new Promise((resolve, reject) => {
35 37
     Ajax(api.index.message.url, {
36 38
       method: api.index.message.method
@@ -78,7 +80,7 @@ export default {
78 80
     cms: []
79 81
   },
80 82
   mutations: {
81
-    setBannet (state, data) { // 获取首页轮播图
83
+    setBanner (state, data) { // 获取首页轮播图
82 84
       state.banner = data
83 85
     },
84 86
     setFiveA (state, data) { // 获取5A
@@ -92,15 +94,17 @@ export default {
92 94
     },
93 95
     setCms (state, data) { // 获取cms
94 96
       state.cms = data
95
-    },
97
+    }
96 98
   },
97 99
   actions: {
98 100
     async getIndexInfo (context, param) { // 首页全部请求
99 101
       try {
102
+        let location = await http.getIndexLocation(param.orgId)
103
+        context.commit('setFiveA', location)
100 104
         let banner = await http.getBanner(param)
101 105
         context.commit('setBanner', banner)
102
-        let fiveA = await http.getFiveA(param)
103
-        context.commit('setFiveA', fiveA)
106
+        // let fiveA = await http.getFiveA(param)
107
+        // context.commit('setFiveA', fiveA)
104 108
         let message = await http.getBanner(param)
105 109
         context.commit('setMessage', message)
106 110
         let porject = await http.getBanner(param)

+ 4
- 4
src/store/userCenter/userCenter.js 파일 보기

@@ -3,7 +3,7 @@ import api from '../../util/api'
3 3
 const http = new Object
4 4
 
5 5
 // 请求数据
6
-http.getUserInfo = (data) => {
6
+http.getUserInfo = (data) => { // 获取用户信息
7 7
   return new Promise((resolve, reject) => {
8 8
     Ajax(api.user.info.url, {
9 9
       method: api.user.info.method
@@ -15,7 +15,7 @@ http.getUserInfo = (data) => {
15 15
   })
16 16
 }
17 17
 
18
-http.getCaseInfo = (data) => {
18
+http.getCaseInfo = (data) => { // 获取案场列表
19 19
   return new Promise((resolve, reject) => {
20 20
     Ajax(api.user.case.url, {
21 21
       method: api.user.case.method,
@@ -30,7 +30,7 @@ http.getCaseInfo = (data) => {
30 30
   })
31 31
 }
32 32
 
33
-http.getCaptcha = (data) => {
33
+http.getCaptcha = (data) => { // 获取验证码
34 34
   console.log(data)
35 35
   return new Promise((resolve, reject) => {
36 36
     Ajax(api.user.captcha.url, {
@@ -46,7 +46,7 @@ http.getCaptcha = (data) => {
46 46
   })
47 47
 }
48 48
 
49
-http.submitData = (data) => {
49
+http.submitData = (data) => { // 绑定手机号
50 50
   console.log(data)
51 51
   return new Promise((resolve, reject) => {
52 52
     Ajax(api.user.wxsignup.url, {

+ 26
- 21
src/util/api.js 파일 보기

@@ -1,28 +1,33 @@
1 1
 const baseUrl = '/api'
2 2
 const wechat = '/wechat'
3 3
 const guest = '/guest'
4
+const common = '/common'
4 5
 
5 6
 const $api = {
6
-  index: { // 测试
7
-    banner: {
8
-      method: 'post',
9
-      url: `${baseUrl}${wechat}/wxsignin`
7
+  index: { // 首页
8
+    location: { // 获取轮播图
9
+      method: 'get',
10
+      url: `${baseUrl}${guest}/cms/location`
10 11
     },
11
-    fiveA: {
12
-      method: 'post',
13
-      url: `${baseUrl}${wechat}/wxsignin`
12
+    banner: { // 获取轮播图
13
+      method: 'get',
14
+      url: `${baseUrl}${guest}/cms/img`
14 15
     },
15
-    message: {
16
-      method: 'post',
17
-      url: `${baseUrl}${wechat}/wxsignin`
16
+    fiveA: { // 获取5A
17
+      method: 'get',
18
+      url: `${baseUrl}${guest}/cms/location`
18 19
     },
19
-    project: {
20
-      method: 'post',
21
-      url: `${baseUrl}${wechat}/wxsignin`
20
+    message: { // 获取最新消息
21
+      method: 'get',
22
+      url: `${baseUrl}${guest}/cms/info`
22 23
     },
23
-    cms: {
24
-      method: 'post',
25
-      url: `${baseUrl}${wechat}/wxsignin`
24
+    project: { // 获取项目专题
25
+      method: 'get',
26
+      url: `${baseUrl}${guest}/cms/case`
27
+    },
28
+    cms: { // 获取cms消息
29
+      method: 'get',
30
+      url: `${baseUrl}${guest}/cms/news`
26 31
     }
27 32
   },
28 33
   fiveA: {
@@ -44,19 +49,19 @@ const $api = {
44 49
     }
45 50
   },
46 51
   user: {
47
-    info: {
48
-      method: 'post',
52
+    info: { // 获取用户信息
53
+      method: 'get',
49 54
       url: `${baseUrl}${wechat}/wxsignin`
50 55
     },
51
-    case: {
56
+    case: { // 获取案场及销售列表
52 57
       method: 'get',
53 58
       url: `${baseUrl}${guest}/case`
54 59
     },
55
-    wxsignup: {
60
+    wxsignup: { // 绑定手机号
56 61
       method: 'post',
57 62
       url: `${baseUrl}${guest}/wxsignup`
58 63
     },
59
-    captcha: {
64
+    captcha: { // 获取手机验证码
60 65
       method: 'get',
61 66
       url: `${baseUrl}${guest}/captcha`
62 67
     }