yuantianjiao 6 vuotta sitten
vanhempi
commit
b2c62ad13f

+ 2
- 1
config/index.js Näytä tiedosto

@@ -24,7 +24,8 @@ 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
27
+        // target: 'http://192.168.0.62:8080', //wf
28
+        target: 'http://192.168.0.11:8080', //ys
28 29
         // target: 'http://dev.ycjcjy.com', //zys
29 30
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
30 31
         // pathRewrite: {

+ 7
- 5
src/components/newsItem/index.vue Näytä tiedosto

@@ -1,15 +1,15 @@
1 1
 <template>
2
-  <div class="newsItem flex-h">
2
+  <div class="newsItem flex-h" @click="jump">
3 3
     <div class="img">
4
-      <a><img :src="data.img" class="centerLabel cover" alt=""></a>
4
+      <a><img :src="data.ImageUrl" class="centerLabel cover" alt=""></a>
5 5
     </div>
6 6
     <div class="flex-item flex-v">
7 7
       <div class="flex-item">
8 8
         <div>
9
-          <span>{{data.title}}</span>
9
+          <span>{{data.Title}}</span>
10 10
         </div>
11 11
       </div>
12
-      <span>{{data.time}}</span>
12
+      <span>{{toolClass.dateFormat(data.CreateDate)}}</span>
13 13
     </div>
14 14
   </div>
15 15
 </template>
@@ -34,7 +34,9 @@ export default {
34 34
     
35 35
   },
36 36
   methods: {
37
-    
37
+    jump () {
38
+      this.$emit('jump', this.data)
39
+    }
38 40
   }
39 41
 }
40 42
 </script>

+ 15
- 5
src/module/user/bindMobile/bindMobile.vue Näytä tiedosto

@@ -6,7 +6,7 @@
6 6
 
7 7
         <div class="mobile">
8 8
           <i class="iconfont icon-dianhua"></i>
9
-          <input type="number" max="11" placeholder="手机号" v-model="postData.phone">
9
+          <input type="number" maxlength="11" placeholder="手机号" v-model="postData.phone">
10 10
         </div>
11 11
 
12 12
         <div class="recommend">
@@ -23,7 +23,7 @@
23 23
 
24 24
         <div class="sms">
25 25
           <i class="iconfont icon-mima"></i>
26
-          <input type="number" max="6" placeholder="验证码" v-model="postData.captcha">
26
+          <input type="number" maxlength="6" placeholder="验证码" v-model="postData.captcha">
27 27
           <div class="sand" v-if="seconds === 60" @click="sandMsg">发送验证码</div>
28 28
           <div class="sand" v-else>{{seconds}}后可重发</div>
29 29
         </div>
@@ -100,9 +100,11 @@ export default {
100 100
       this.postData.case = value.CaseId
101 101
       this.columnsS = []
102 102
       this.salesName = '选择销售'
103
-      for (let i = 0; i < this.caseInfo.sales.length; i++) {
104
-        if (this.caseInfo.sales[i].CaseId === this.postData.case) {
105
-          this.columnsS.push(this.caseInfo.sales[i])
103
+      if (this.caseInfo.sales) {
104
+        for (let i = 0; i < this.caseInfo.sales.length; i++) {
105
+          if (this.caseInfo.sales[i].CaseId === this.postData.case) {
106
+            this.columnsS.push(this.caseInfo.sales[i])
107
+          }
106 108
         }
107 109
       }
108 110
       this.showCase = false
@@ -154,6 +156,14 @@ export default {
154 156
         this.$toast('请先获取验证码')
155 157
         return
156 158
       }
159
+      if (!this.postData.case) {
160
+        this.$toast('请选择案场')
161
+        return
162
+      }
163
+      if (!this.postData.sales) {
164
+        this.$toast('请选择销售')
165
+        return
166
+      }
157 167
       this.submitData(this.postData).then((res) => {
158 168
         this.$toast(res)
159 169
       })

+ 76
- 41
src/module/user/fiveA/index.vue Näytä tiedosto

@@ -1,16 +1,16 @@
1 1
 <template>
2 2
   <div class="mainPage flex-v">
3 3
     <nav class="flex-h">
4
-      <a class="flex-item" v-for="(item,index) in 6" :key="index" :class="{'active':index==active}">导航{{index+1}}</a>
4
+      <a class="flex-item" v-for="(item,index) in nav" :key="index" :class="{'active':index==active.index}" @click="changeLocation(item,index)">{{item.LocationName}}</a>
5 5
     </nav>
6 6
     <div class="flex-item">
7 7
       <div>
8
-        <div v-for="(item,index) in 6" :key="index" v-if="index==active">
8
+        <div v-for="(item,index) in nav" :key="index" v-if="index==active.index">
9 9
           <div class="banner flex-h">
10 10
             <div class="flex-item">
11 11
               <swiper :options="swiperOption" ref="mySwiper">
12
-                <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">{{index}}
13
-                  <!-- <img src="" class="cover" alt=""> -->
12
+                <swiper-slide class="swiper-slide" v-for="(item,index) in banner" :key="index">
13
+                  <img :src='item.ImageUrl' class="cover" style="border-radius: .12rem;" alt=""  @click="jump(item)">
14 14
                 </swiper-slide>
15 15
               </swiper>
16 16
             </div>
@@ -29,7 +29,7 @@
29 29
           <div class="newsList flex-h">
30 30
             <ul class="flex-item">
31 31
               <router-link tag="li" :to="{name:'',query:{}}" v-for="(item,index) in newsList" :key="index">
32
-                <newsItem :data="item"></newsItem>
32
+                <newsItem :data="item" @jump='jump'></newsItem>
33 33
               </router-link>
34 34
             </ul>
35 35
           </div>
@@ -50,7 +50,10 @@ export default {
50 50
   name: '',
51 51
   data () {
52 52
     return {
53
-      active: 1,
53
+      active: {
54
+        index: 1,
55
+        locationid: ''
56
+      },
54 57
       swiperOption: {
55 58
         observer: true,
56 59
         loop: true,
@@ -58,36 +61,40 @@ export default {
58 61
           disableOnInteraction: false,
59 62
         }
60 63
       },
64
+      nav: [{
65
+        LocationId: "selected",
66
+        LocationName: "精选"
67
+      }],
61 68
       courseList: [{ // 课程列表
62
-        id:'',
63
-        title:'课程名称',
64
-        img:'',
65
-        time:'2018.04.04 18:30-20:00',
66
-        address:'南京南',
67
-        tag:['儿童教育','小小外交官'],
68
-        courseType:'团体课',
69
-        defaultPrice:'168/节',
70
-        getWay:'ticket'
71
-      },{
72
-        id:'',
73
-        title:'课程名称',
74
-        img:'',
75
-        time:'2018.04.04 18:30-20:00',
76
-        address:'南京南',
77
-        tag:['儿童教育','小小外交官'],
78
-        courseType:'团体课',
79
-        defaultPrice:'168/节',
80
-        getWay:'free'
81
-      },{
82
-        id:'',
83
-        title:'课程名称',
84
-        img:'',
85
-        time:'2018.04.04 18:30-20:00',
86
-        address:'南京南',
87
-        tag:['儿童教育','小小外交官'],
88
-        courseType:'团体课',
89
-        defaultPrice:'168/节',
90
-        getWay:'free'
69
+        id: '',
70
+        title: '课程名称',
71
+        img: '',
72
+        time: '2018.04.04 18:30-20:00',
73
+        address: '南京南',
74
+        tag: ['儿童教育', '小小外交官'],
75
+        courseType: '团体课',
76
+        defaultPrice: '168/节',
77
+        getWay: 'ticket'
78
+      }, {
79
+        id: '',
80
+        title: '课程名称',
81
+        img: '',
82
+        time: '2018.04.04 18:30-20:00',
83
+        address: '南京南',
84
+        tag: ['儿童教育', '小小外交官'],
85
+        courseType: '团体课',
86
+        defaultPrice: '168/节',
87
+        getWay: 'free'
88
+      }, {
89
+        id: '',
90
+        title: '课程名称',
91
+        img: '',
92
+        time: '2018.04.04 18:30-20:00',
93
+        address: '南京南',
94
+        tag: ['儿童教育', '小小外交官'],
95
+        courseType: '团体课',
96
+        defaultPrice: '168/节',
97
+        getWay: 'free'
91 98
       }],
92 99
       newsList: [{ // 资讯列表
93 100
         title: '我是标题我是标题我是标题我是标题我是标题我是标题',
@@ -118,15 +125,18 @@ export default {
118 125
     }
119 126
   },
120 127
   computed: {
128
+    ...mapState({
129
+      orgid: x => x.app.orgId,
130
+      navList: x => x.fiveA.nav,
131
+      banner: x => x.fiveA.banner,
132
+      cms: x => x.fiveA.cms
133
+    }),
121 134
     MySwiper () {
122 135
       return this.$refs.mySwiper.swiper
123 136
     },
124 137
     MySwiperMsg () {
125 138
       return this.$refs.MySwiperMsg.swiper
126
-    },
127
-    ...mapState({
128
-      nav: x => x.fiveA.nav
129
-    })
139
+    }
130 140
   },
131 141
   components: {
132 142
     newsItem,
@@ -135,10 +145,35 @@ export default {
135 145
     courseItem,
136 146
   },
137 147
   created () {
138
-    this.getFiveAInfo()
148
+    this.getNav({ orgid: this.orgid, issys: '0' }).then(() => {
149
+      this.nav = this.nav.concat(this.navList)
150
+      this.active.locationid = this.nav[this.active.index].LocationId
151
+      this.getFiveAInfo({ orgid: this.orgid, locationid: this.active.locationid }).then(() => {
152
+        this.newsList = this.cms
153
+      })
154
+    })
139 155
   },
140 156
   methods: {
141
-    ...mapFiveAActions(['getFiveAInfo'])
157
+    ...mapFiveAActions(['getNav']),
158
+    ...mapFiveAActions(['getFiveAInfo']),
159
+    changeLocation (item, index) {
160
+      this.active.index = index
161
+      this.active.locationid = item.LocationId
162
+      this.getFiveAInfo({ orgid: this.orgid, locationid: this.active.locationid }).then(() => {
163
+        this.newsList = this.cms
164
+      })
165
+    },
166
+    jump (item) {
167
+      console.log(item)
168
+      item.ForwardType = item.ForwardType || ''
169
+      if (item.ForwardType === 'url') {
170
+        window.location.href = '//' + item.ForwardUrl
171
+      } else if (item.ForwardType === 'course') {
172
+        this.$router.push({ name: '', query: { id: item.ForwardResourceId } }) // 此处去课程详情
173
+      } else {
174
+        window.location.href = '//' + item.InfoUrl
175
+      }
176
+    }
142 177
   }
143 178
 }
144 179
 </script>

+ 49
- 40
src/module/user/mainPage/indexPage/index.vue Näytä tiedosto

@@ -2,8 +2,8 @@
2 2
   <div class="mainPage">
3 3
     <div class="topBanner">
4 4
       <swiper :options="swiperOption" ref="mySwiper">
5
-        <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">
6
-          <img src="" class="cover" alt="">
5
+        <swiper-slide class="swiper-slide" v-for="(item,index) in banner" :key="index">
6
+          <img :src='item.ImageUrl' class="cover" alt="" @click="jump(item)">
7 7
         </swiper-slide>
8 8
       </swiper>
9 9
     </div>
@@ -14,12 +14,12 @@
14 14
     </div>
15 15
     <div class="flex-h">
16 16
       <nav class="pageNav flex-item">
17
-        <router-link :to="{name:'fiveA',query:{}}" v-for="(item,index) in 5" :key="index">
17
+        <router-link :to="{name:'fiveA',query:{id:item.LocationId}}" v-for="(item,index) in data.fiveA" :key="index">
18 18
           <a>
19
-            <img src="" class="centerLabel cover" alt="">
20
-            <em>标题</em>
19
+            <img :src="item.TypeImg" class="centerLabel cover" alt="">
20
+            <em>{{item.LocationName}}</em>
21 21
           </a>
22
-          <span>备注内容</span>
22
+          <span>{{item.Title}}</span>
23 23
         </router-link>
24 24
       </nav>
25 25
     </div>
@@ -30,8 +30,8 @@
30 30
         <div class="flex-item">
31 31
           <div>
32 32
             <swiper :options="swiperOptionMsg" ref="mySwiperMsg">
33
-              <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">
34
-                <router-link :to="{name:'',query:{}}">这是一条消息</router-link>
33
+              <swiper-slide class="swiper-slide" v-for="(item,index) in message" :key="index">
34
+                <router-link :to="{name:'',query:{}}"><span @click="jump(item)">{{item.InfoName}}</span></router-link>
35 35
               </swiper-slide>
36 36
               <div class="swiper-pagination"  slot="pagination"></div>
37 37
             </swiper>
@@ -46,8 +46,8 @@
46 46
     </div>
47 47
     <div class="flex-h">
48 48
       <ul class="projectList flex-item">
49
-        <router-link tag="li" :to="{name:'majorProjects',query:{}}" v-for="(item,index) in 3" :key="index">
50
-          <img src="" class="centerLabel cover" alt="">
49
+        <router-link tag="li" :to="{ name:'majorProjects', query:{ CmsCaseId: item.CmsCaseId } }" v-for="(item,index) in project" :key="index">
50
+          <img :src='item.CaseImageUrl' :key="indexs" class="centerLabel cover" alt="">
51 51
         </router-link>
52 52
       </ul>
53 53
     </div>
@@ -60,7 +60,7 @@
60 60
     <div class="flex-h">
61 61
       <ul class="newsList flex-item">
62 62
         <router-link tag="li" :to="{name:'',query:{}}" v-for="(item,index) in newsList" :key="index">
63
-          <newsItem :data="item"></newsItem>
63
+          <newsItem :data="item" @jump='jump'></newsItem>
64 64
         </router-link>
65 65
       </ul>
66 66
     </div>
@@ -77,6 +77,10 @@ export default {
77 77
   name: '',
78 78
   data () {
79 79
     return {
80
+      data: {
81
+        fiveA: []
82
+      },
83
+      locationId: '',
80 84
       swiperOption: {
81 85
         observer: true,
82 86
         loop: true,
@@ -92,37 +96,17 @@ export default {
92 96
           disableOnInteraction: false,
93 97
         }
94 98
       },
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: ''
120
-      }]
99
+      newsList: []
121 100
     }
122 101
   },
123 102
   computed: {
124 103
     ...mapState({
125
-      banner: x => x.index.banner
104
+      orgid: x => x.app.orgId,
105
+      fiveA: x => x.index.fiveA,
106
+      banner: x => x.index.banner,
107
+      message: x => x.index.message,
108
+      project: x => x.index.project,
109
+      cms: x => x.index.cms,
126 110
     }),
127 111
     MySwiper () {
128 112
       return this.$refs.mySwiper.swiper
@@ -137,10 +121,35 @@ export default {
137 121
     swiperSlide,
138 122
   },
139 123
   created () {
140
-    this.getIndexInfo({ orgId: '1' })
124
+    this.getIndexLocation({ orgid: this.orgid, issys: '0' }).then((res) => {
125
+      this.data.fiveA = this.fiveA
126
+      this.locationId = 'index'
127
+      this.getIndexInfo({ orgid: this.orgid, locationid: this.locationId }).then(() => {
128
+        this.newsList = this.cms
129
+        for (let i = 0; i < this.project.length; i++) {
130
+          for (let j = 0; j < this.project[i].CmsCaseImgs.length; j++) {
131
+            if (this.project[i].CmsCaseImgs[j].ImageType === 'cover') {
132
+              this.project[i].CaseImageUrl = this.project[i].CmsCaseImgs[j].CaseImageUrl
133
+            }
134
+          }
135
+        }
136
+      })
137
+    })
141 138
   },
142 139
   methods: {
143
-    ...mapIndexActions(['getIndexInfo'])
140
+    ...mapIndexActions(['getIndexInfo']),
141
+    ...mapIndexActions(['getIndexLocation']),
142
+    jump (item) {
143
+      console.log(item)
144
+      item.ForwardType = item.ForwardType || ''
145
+      if (item.ForwardType === 'url') {
146
+        window.location.href = '//' + item.ForwardUrl
147
+      } else if (item.ForwardType === 'course') {
148
+        this.$router.push({ name: '', query: { id: item.ForwardResourceId } }) // 此处去课程详情
149
+      } else {
150
+        window.location.href = '//' + item.InfoUrl
151
+      }
152
+    }
144 153
   }
145 154
 }
146 155
 </script>

+ 3
- 0
src/module/user/mainPage/indexPage/page.scss Näytä tiedosto

@@ -147,6 +147,9 @@
147 147
               text-overflow: ellipsis;
148 148
               line-height: .44rem;
149 149
               color: #f05a3f;
150
+              span{
151
+                color: #f05a3f;
152
+              }
150 153
             }
151 154
           }
152 155
         }

+ 3
- 2
src/module/user/mainPage/userCenter/index.vue Näytä tiedosto

@@ -80,14 +80,15 @@ export default {
80 80
   },
81 81
   computed: {
82 82
     ...mapState({
83
-      userInfo: x => x.userCenter.userInfo
83
+      userInfo: x => x.userCenter.userInfo,
84
+      org: x => x.app.orgId
84 85
     })
85 86
   },
86 87
   components: {
87 88
 
88 89
   },
89 90
   created () {
90
-    this.getUserInfo().then(() => {
91
+    this.getUserInfo({ org: this.org }).then(() => {
91 92
       this.user = this.userInfo
92 93
       if (this.user.mobile) {
93 94
         this.isLoading = false

+ 36
- 33
src/store/fiveA/fiveA.js Näytä tiedosto

@@ -5,8 +5,12 @@ const http = new Object
5 5
 // 请求数据
6 6
 http.getNav = (data) => {
7 7
   return new Promise((resolve, reject) => {
8
-    Ajax(api.fiveA.nav.url, {
9
-      method: api.fiveA.nav.method
8
+    Ajax(api.index.location.url, {
9
+      method: api.index.location.method,
10
+      queryData: {
11
+        issys: data.issys,
12
+        orgid: data.orgid
13
+      }
10 14
     }).then(res => {
11 15
       resolve(res)
12 16
     }).catch((err) => {
@@ -18,8 +22,12 @@ http.getNav = (data) => {
18 22
 http.getBanner = (data) => {
19 23
   console.log(data)
20 24
   return new Promise((resolve, reject) => {
21
-    Ajax(api.fiveA.banner.url, {
22
-      method: api.fiveA.banner.method
25
+    Ajax(api.index.banner.url, {
26
+      method: api.index.banner.method,
27
+      queryData: {
28
+        locationid: data.locationid,
29
+        orgid: data.orgid
30
+      }
23 31
     }).then(res => {
24 32
       resolve(res)
25 33
     }).catch((err) => {
@@ -31,8 +39,8 @@ http.getBanner = (data) => {
31 39
 http.getList = (data) => {
32 40
   console.log(data)
33 41
   return new Promise((resolve, reject) => {
34
-    Ajax(api.fiveA.list.url, {
35
-      method: api.fiveA.list.method
42
+    Ajax(api.index.list.url, {
43
+      method: api.index.list.method
36 44
     }).then(res => {
37 45
       resolve(res)
38 46
     }).catch((err) => {
@@ -44,8 +52,12 @@ http.getList = (data) => {
44 52
 http.getCms = (data) => {
45 53
   console.log(data)
46 54
   return new Promise((resolve, reject) => {
47
-    Ajax(api.fiveA.cms.url, {
48
-      method: api.fiveA.cms.method
55
+    Ajax(api.index.cms.url, {
56
+      method: api.index.cms.method,
57
+      queryData: {
58
+        locationid: data.locationid,
59
+        orgid: data.orgid
60
+      }
49 61
     }).then(res => {
50 62
       resolve(res)
51 63
     }).catch((err) => {
@@ -66,7 +78,7 @@ export default {
66 78
     setNav (state, data) {
67 79
       state.nav = data
68 80
     },
69
-    setBannet (state, data) {
81
+    setBanner (state, data) {
70 82
       state.banner = data
71 83
     },
72 84
     setList (state, data) {
@@ -77,33 +89,24 @@ export default {
77 89
     }
78 90
   },
79 91
   actions: {
80
-    // async getIndexInfo (context, param) { // 首页全部请求
81
-    //   try {
82
-    //     let banner = await http.getBanner(param)
83
-    //     context.commit('setBanner', banner)
84
-    //     let fiveA = await http.getFiveA(param)
85
-    //     context.commit('setFiveA', fiveA)
86
-    //     let message = await http.getBanner(param)
87
-    //     context.commit('setMessage', message)
88
-    //     let porject = await http.getBanner(param)
89
-    //     context.commit('setPorject', porject)
90
-    //     let cms = await http.getBanner(param)
91
-    //     context.commit('setCms', cms)
92
-    //   } catch (err) {
93
-    //     console.log(err)
94
-    //   }
95
-    // }
96
-    getFiveAInfo (context, data) {
97
-      http.getNav().then((res) => {
98
-        context.commit('setNav', res)
92
+    getNav (context, data) {
93
+      return new Promise((resolve) => {
94
+        http.getNav(data).then((res) => {
95
+          context.commit('setNav', res)
96
+          resolve(res)
97
+        })
99 98
       })
100
-      http.getBanner().then((res) => {
99
+      
100
+    },
101
+    getFiveAInfo (context, data) {
102
+      console.log(data)
103
+      http.getBanner(data).then((res) => {
101 104
         context.commit('setBanner', res)
102 105
       })
103
-      http.getList().then((res) => {
104
-        context.commit('setList', res)
105
-      })
106
-      http.getCms().then((res) => {
106
+      // http.getList(data).then((res) => {
107
+      //   context.commit('setList', res)
108
+      // })
109
+      http.getCms(data).then((res) => {
107 110
         context.commit('setCms', res)
108 111
       })
109 112
     }

+ 38
- 21
src/store/index/index.js Näytä tiedosto

@@ -4,13 +4,12 @@ const http = new Object
4 4
 
5 5
 // 请求数据
6 6
 http.getIndexLocation = (data) => {
7
-  console.log(data)
8 7
   return new Promise((resolve, reject) => {
9 8
     Ajax(api.index.location.url, {
10 9
       method: api.index.location.method,
11 10
       queryData: {
12
-        issys: 0,
13
-        orgid: data
11
+        issys: data.issys,
12
+        orgid: data.orgid
14 13
       }
15 14
     }).then(res => {
16 15
       resolve(res)
@@ -23,7 +22,11 @@ http.getIndexLocation = (data) => {
23 22
 http.getBanner = (data) => {
24 23
   return new Promise((resolve, reject) => {
25 24
     Ajax(api.index.banner.url, {
26
-      method: api.index.banner.method
25
+      method: api.index.banner.method,
26
+      queryData: {
27
+        locationid: data.locationid,
28
+        orgid: data.orgid
29
+      }
27 30
     }).then(res => {
28 31
       resolve(res)
29 32
     }).catch((err) => {
@@ -35,7 +38,11 @@ http.getBanner = (data) => {
35 38
 http.getMessage = (data) => {
36 39
   return new Promise((resolve, reject) => {
37 40
     Ajax(api.index.message.url, {
38
-      method: api.index.message.method
41
+      method: api.index.message.method,
42
+      queryData: {
43
+        locationid: data.locationid,
44
+        orgid: data.orgid
45
+      }
39 46
     }).then(res => {
40 47
       resolve(res)
41 48
     }).catch((err) => {
@@ -44,11 +51,14 @@ http.getMessage = (data) => {
44 51
   })
45 52
 }
46 53
 
47
-http.getPorject = (data) => {
48
-  console.log(data)
54
+http.getProject = (data) => {
49 55
   return new Promise((resolve, reject) => {
50 56
     Ajax(api.index.project.url, {
51
-      method: api.index.project.method
57
+      method: api.index.project.method,
58
+      queryData: {
59
+        locationid: data.locationid,
60
+        orgid: data.orgid
61
+      }
52 62
     }).then(res => {
53 63
       resolve(res)
54 64
     }).catch((err) => {
@@ -58,10 +68,13 @@ http.getPorject = (data) => {
58 68
 }
59 69
 
60 70
 http.getCms = (data) => {
61
-  console.log(data)
62 71
   return new Promise((resolve, reject) => {
63 72
     Ajax(api.index.cms.url, {
64
-      method: api.index.cms.method
73
+      method: api.index.cms.method,
74
+      queryData: {
75
+        locationid: data.locationid,
76
+        orgid: data.orgid
77
+      }
65 78
     }).then(res => {
66 79
       resolve(res)
67 80
     }).catch((err) => {
@@ -76,7 +89,7 @@ export default {
76 89
     banner: [],
77 90
     fiveA: [],
78 91
     message: [],
79
-    porject: [],
92
+    project: [],
80 93
     cms: []
81 94
   },
82 95
   mutations: {
@@ -89,27 +102,31 @@ export default {
89 102
     setMessage (state, data) { // 获取首页消息
90 103
       state.message = data
91 104
     },
92
-    setPorject (state, data) { // 获取项目专题
93
-      state.porject = data
105
+    setProject (state, data) { // 获取项目专题
106
+      state.project = data
94 107
     },
95 108
     setCms (state, data) { // 获取cms
96 109
       state.cms = data
97 110
     }
98 111
   },
99 112
   actions: {
113
+    getIndexLocation (context, data) {
114
+      return new Promise((resolve) => {
115
+        http.getIndexLocation(data).then((res) => {
116
+          context.commit('setFiveA', res)
117
+          resolve(res)
118
+        })
119
+      })
120
+    },
100 121
     async getIndexInfo (context, param) { // 首页全部请求
101 122
       try {
102
-        let location = await http.getIndexLocation(param.orgId)
103
-        context.commit('setFiveA', location)
104 123
         let banner = await http.getBanner(param)
105 124
         context.commit('setBanner', banner)
106
-        // let fiveA = await http.getFiveA(param)
107
-        // context.commit('setFiveA', fiveA)
108
-        let message = await http.getBanner(param)
125
+        let message = await http.getMessage(param)
109 126
         context.commit('setMessage', message)
110
-        let porject = await http.getBanner(param)
111
-        context.commit('setPorject', porject)
112
-        let cms = await http.getBanner(param)
127
+        let project = await http.getProject(param)
128
+        context.commit('setProject', project)
129
+        let cms = await http.getCms(param)
113 130
         context.commit('setCms', cms)
114 131
       } catch (err) {
115 132
         console.log(err)

+ 5
- 2
src/store/userCenter/userCenter.js Näytä tiedosto

@@ -6,7 +6,10 @@ const http = new Object
6 6
 http.getUserInfo = (data) => { // 获取用户信息
7 7
   return new Promise((resolve, reject) => {
8 8
     Ajax(api.user.info.url, {
9
-      method: api.user.info.method
9
+      method: api.user.info.method,
10
+      queryData: {
11
+        org: data.org
12
+      }
10 13
     }).then(res => {
11 14
       resolve(res)
12 15
     }).catch((err) => {
@@ -77,7 +80,7 @@ export default {
77 80
   actions: {
78 81
     getUserInfo (context, data) {
79 82
       return new Promise((resolve) => {
80
-        http.getUserInfo().then((res) => {
83
+        http.getUserInfo(data).then((res) => {
81 84
           context.commit('setUserInfo', res)
82 85
           resolve(res)
83 86
         })

+ 2
- 24
src/util/api.js Näytä tiedosto

@@ -5,7 +5,7 @@ const common = '/common'
5 5
 
6 6
 const $api = {
7 7
   index: { // 首页
8
-    location: { // 获取轮播图
8
+    location: { // 获取5A
9 9
       method: 'get',
10 10
       url: `${baseUrl}${guest}/cms/location`
11 11
     },
@@ -13,10 +13,6 @@ const $api = {
13 13
       method: 'get',
14 14
       url: `${baseUrl}${guest}/cms/img`
15 15
     },
16
-    fiveA: { // 获取5A
17
-      method: 'get',
18
-      url: `${baseUrl}${guest}/cms/location`
19
-    },
20 16
     message: { // 获取最新消息
21 17
       method: 'get',
22 18
       url: `${baseUrl}${guest}/cms/info`
@@ -30,28 +26,10 @@ const $api = {
30 26
       url: `${baseUrl}${guest}/cms/news`
31 27
     }
32 28
   },
33
-  fiveA: {
34
-    nav: {
35
-      method: 'post',
36
-      url: `${baseUrl}${wechat}/wxsignin`
37
-    },
38
-    banner: {
39
-      method: 'post',
40
-      url: `${baseUrl}${wechat}/wxsignin`
41
-    },
42
-    list: {
43
-      method: 'post',
44
-      url: `${baseUrl}${wechat}/wxsignin`
45
-    },
46
-    cms: {
47
-      method: 'post',
48
-      url: `${baseUrl}${wechat}/wxsignin`
49
-    }
50
-  },
51 29
   user: {
52 30
     info: { // 获取用户信息
53 31
       method: 'get',
54
-      url: `${baseUrl}${wechat}/wxsignin`
32
+      url: `${baseUrl}${wechat}/customer`
55 33
     },
56 34
     case: { // 获取案场及销售列表
57 35
       method: 'get',