yuantianjiao 6 jaren geleden
bovenliggende
commit
5c79a0951a

+ 6
- 2
src/pages/user/fiveA/index.vue Bestand weergeven

@@ -29,7 +29,7 @@
29 29
           <div class="newsList flex-h">
30 30
             <ul class="flex-item">
31 31
               <li tag="li" @click="jump(newinfo)" v-for="(newinfo,nindex) in item.News" :key="nindex">
32
-                <newsItem :data="newinfo" @jump='jump'></newsItem>
32
+                <newsItem :data="newinfo"></newsItem>
33 33
               </li>
34 34
             </ul>
35 35
           </div>
@@ -126,7 +126,11 @@ export default {
126 126
       if (item.ForwardType === 'url') {
127 127
         window.location.href = item.ForwardUrl
128 128
       } else if (item.ForwardType === 'course') {
129
-        this.$router.push({ name: 'majorProjectsDetail', query: { id: item.ForwardResourceId || item.ForwardCourseId } }) // 此处去课程详情
129
+        if (item.ForwardResourceId){
130
+          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.ForwardResourceId } }) // 此处去课程详情
131
+        } else {
132
+          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.ForwardCourseId } }) // 此处去课程详情
133
+        }
130 134
       } else {
131 135
         window.location.href = item.InfoUrl
132 136
       }

+ 8
- 1
src/pages/user/mainPage/coffeeIndex/index.vue Bestand weergeven

@@ -477,6 +477,12 @@ export default {
477 477
       // that.topCaseInfoData.caseName = that.CaseList[0].CaseName
478 478
       // that.topCaseInfoData.caseId = that.CaseList[0].CaseId
479 479
       if (this.userInfo.customer.MapUser !== '') {
480
+        wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
481
+          title: '城的空间',
482
+          desc: '城的空间',
483
+          link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
484
+          thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
485
+        })
480 486
         this.topCaseInfoData.caseId = this.userInfo.customer.BelongCaseId
481 487
         for (let i = 0; i < this.CaseList.length; i++) {
482 488
           if (this.CaseList[i].CaseId === this.topCaseInfoData.caseId) {
@@ -521,6 +527,7 @@ export default {
521 527
                 }
522 528
               }
523 529
               if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
530
+                that.$toast('当前位置无案场')
524 531
                 that.topCaseInfoData.caseName = '当前位置无案场'
525 532
               }
526 533
             }
@@ -538,7 +545,7 @@ export default {
538 545
     toOrders (subItem, item) {
539 546
       const _that = this
540 547
       this.getCaseConf({ caseid: subItem.CaseId }).then(res => {
541
-        if (this.checkCanOrder()){
548
+        if (this.checkCanOrder()) {
542 549
           _that.$toast('您的点单功能已被关闭!')
543 550
           return
544 551
         }

+ 12
- 4
src/pages/user/mainPage/indexPage/index.vue Bestand weergeven

@@ -59,9 +59,9 @@
59 59
     </div>
60 60
     <div class="flex-h">
61 61
       <ul class="newsList flex-item">
62
-        <router-link tag="li" :to="{name:'',query:{}}" v-for="(item,index) in newsList" :key="index">
63
-          <newsItem :data="item" @jump='jump'></newsItem>
64
-        </router-link>
62
+        <li @click="jump(item)" v-for="(item,index) in newsList" :key="index">
63
+          <newsItem :data="item"></newsItem>
64
+        </li>
65 65
       </ul>
66 66
     </div>
67 67
   </div>
@@ -155,10 +155,18 @@ export default {
155 155
       item.ForwardType = item.ForwardType || ''
156 156
       if (item.ForwardType === 'url') {
157 157
         window.location.href = item.ForwardUrl
158
+        return
158 159
       } else if (item.ForwardType === 'course') {
159
-        this.$router.push({ name: 'majorProjectsDetail', query: { id: item.ForwardResourceId } }) // 此处去课程详情
160
+        if (item.ForwardResourceId){
161
+          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.ForwardResourceId } }) // 此处去课程详情
162
+          return
163
+        } else {
164
+          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.ForwardCourseId } }) // 此处去课程详情
165
+          return
166
+        }
160 167
       } else {
161 168
         window.location.href = item.InfoUrl
169
+        return
162 170
       }
163 171
     }
164 172
   }

+ 5
- 2
src/pages/user/mainPage/userCenter/index.vue Bestand weergeven

@@ -84,7 +84,9 @@ export default {
84 84
   mounted () {
85 85
     this.getUserInfo({ org: this.org }).then(() => {
86 86
       this.user = this.userInfo.customer
87
-      this.AccountInfo = JSON.parse(this.user.AccountInfo)
87
+      if (this.user.AccountInfo) {
88
+        this.AccountInfo = JSON.parse(this.user.AccountInfo)
89
+      }
88 90
       this.headimgurl = this.user.Headimgurl
89 91
     })
90 92
     this.getNum()
@@ -110,7 +112,8 @@ export default {
110 112
       this.$router.push({ name: 'orderList' })
111 113
     },
112 114
     toBodyCheck () {
113
-      window.location.href = `${window.location.origin}/bodyCheck.html#/`
115
+      var url = window.location.pathname
116
+      window.location.href = url.replace('user.html', 'bodyCheck.html') + '#/'
114 117
     },
115 118
     toLuckdraw () {
116 119
       // ^参数约定为97

+ 4
- 53
src/pages/user/majorProjects/index.vue Bestand weergeven

@@ -68,57 +68,7 @@ export default {
68 68
         }
69 69
       },
70 70
       courseList: [], // 课程列表
71
-      initList: [
72
-        // { // 初始化课程列表
73
-        //   id: '',
74
-        //   title: '课程名称',
75
-        //   img: '',
76
-        //   time: '2018.04.04 18:30-20:00',
77
-        //   address: '南京南',
78
-        //   tag: ['儿童教育', '小小外交官'],
79
-        //   courseType: '团体课',
80
-        //   defaultPrice: '168/节',
81
-        //   getWay: 'ticket',
82
-        //   startDate: 1514779200000,
83
-        //   endDate: 1514781600000,
84
-        // }, {
85
-        //   id: '',
86
-        //   title: '课程名称',
87
-        //   img: '',
88
-        //   time: '2018.04.04 18:30-20:00',
89
-        //   address: '南京南',
90
-        //   tag: ['儿童教育', '小小外交官'],
91
-        //   courseType: '团体课',
92
-        //   defaultPrice: '168/节',
93
-        //   getWay: 'ticket',
94
-        //   startDate: 1514779200000,
95
-        //   endDate: 1514781600000,
96
-        // }, {
97
-        //   id: '',
98
-        //   title: '课程名称',
99
-        //   img: '',
100
-        //   time: '2018.04.04 18:30-20:00',
101
-        //   address: '南京南',
102
-        //   tag: ['儿童教育', '小小外交官'],
103
-        //   courseType: '团体课',
104
-        //   defaultPrice: '168/节',
105
-        //   getWay: 'ticket',
106
-        //   startDate: 1517460000000,
107
-        //   endDate: 1517467200000,
108
-        // }, {
109
-        //   id: '',
110
-        //   title: '课程名称',
111
-        //   img: '',
112
-        //   time: '2018.04.04 18:30-20:00',
113
-        //   address: '南京南',
114
-        //   tag: ['儿童教育', '小小外交官'],
115
-        //   courseType: '团体课',
116
-        //   defaultPrice: '168/节',
117
-        //   getWay: 'ticket',
118
-        //   startDate: 1517460000000,
119
-        //   endDate: 1517467200000,
120
-        // }
121
-      ],
71
+      initList: [],
122 72
     }
123 73
   },
124 74
   computed: {
@@ -179,8 +129,8 @@ export default {
179 129
             id: res.Courses[n].CourseId,
180 130
             title: res.Courses[n].CourseName,
181 131
             img: res.Courses[n].CourseImg,
182
-            time: this.returnDate(res.Courses[n].BeginDate) + '至' + this.returnDate(res.Courses[n].EndDate),
183
-            address: res.CaseAddress == undefined ? '暂无数据' : res.CaseAddress,
132
+            remark: this.toolClass.dateFormat(res.Courses[n].BeginDate, 'yyyy-MM-dd') + '至' + this.toolClass.dateFormat(res.Courses[n].EndDate, 'yyyy-MM-dd'),
133
+            address: res.Courses[n].CaseInfo.CaseAddress,
184 134
             tag: this.returnTag(res.Courses[n].CourseTags),
185 135
             courseType: '团体课',
186 136
             defaultPrice: res.Courses[n].Price + '/节',
@@ -189,6 +139,7 @@ export default {
189 139
             endDate: new Date(res.Courses[n].EndDate).getTime(),
190 140
           })
191 141
         }
142
+        console.log(aArr)
192 143
         this.initList = aArr
193 144
         this.calcArr()
194 145
       })

+ 1
- 1
src/pages/user/placeOrder/index.vue Bestand weergeven

@@ -9,7 +9,7 @@
9 9
               <span>项目名称:{{caseName}}</span>
10 10
             </div>
11 11
           </div>
12
-          <span>{{userInfo.customer != undefined ? userInfo.customer.CustomerName : ''}}您好!</span>
12
+          <span>{{userInfo.customer.RealName ? userInfo.customer.RealName : userInfo.customer.Name}}您好!</span>
13 13
         </div>
14 14
       </div>
15 15
       <div class="tableInfo flex-h">

+ 2
- 2
src/pages/user/receive/index.vue Bestand weergeven

@@ -1,8 +1,8 @@
1 1
 <template>
2 2
   <div class="mainPage" v-if="show">
3 3
     <div class="banner"  v-if="!video">
4
-      <img :src="data.Images[0].CardImageUrl" alt="" width="100%" height="100%" v-if="type === 'card'">
5
-      <img :src="data.Images[0].CouponImageUrl" alt="" width="100%" height="100%" v-if="type === 'coupon'">
4
+      <img :src="data.Images[0].CardImageUrl" alt="" v-if="type === 'card'">
5
+      <img :src="data.Images[0].CouponImageUrl" alt="" v-if="type === 'coupon'">
6 6
     </div>
7 7
     <div class="content">
8 8
       <div class="title" v-if="$route.query.type === 'card'">{{data.CardName}}</div>

+ 4
- 0
src/pages/user/receive/page.scss Bestand weergeven

@@ -18,6 +18,10 @@
18 18
   .banner{
19 19
     width: 100%;
20 20
     height: 1.8rem;
21
+    text-align: center;
22
+    img{
23
+      height: 100%;
24
+    }
21 25
   }
22 26
   .content{
23 27
     padding: .2rem;

+ 2
- 2
src/pages/user/receiveChannel/index.vue Bestand weergeven

@@ -9,8 +9,8 @@
9 9
       <img :src="logo" alt="">
10 10
     </div>
11 11
     <div class="banner"  v-if="!video">
12
-      <img :src="data.Images[0].CardImageUrl" alt="" width="100%" height="100%" v-if="type === 'card'">
13
-      <img :src="data.Images[0].CouponImageUrl" alt="" width="100%" height="100%" v-if="type === 'coupon'">
12
+      <img :src="data.Images[0].CardImageUrl" alt="" v-if="type === 'card'">
13
+      <img :src="data.Images[0].CouponImageUrl" alt="" v-if="type === 'coupon'">
14 14
     </div>
15 15
     <div class="content">
16 16
       <div class="title" v-if="$route.query.type === 'card'">{{data.CardName}}</div>

+ 4
- 0
src/pages/user/receiveChannel/page.scss Bestand weergeven

@@ -18,6 +18,10 @@
18 18
   .banner{
19 19
     width: 100%;
20 20
     height: 1.8rem;
21
+    text-align: center;
22
+    img{
23
+      height: 100%;
24
+    }
21 25
   }
22 26
   .content{
23 27
     padding: .2rem;

+ 5
- 0
src/store/index/index.js Bestand weergeven

@@ -94,12 +94,15 @@ export default {
94 94
   },
95 95
   mutations: {
96 96
     setBanner (state, data) { // 获取首页轮播图
97
+      data = data || []
97 98
       state.banner = data
98 99
     },
99 100
     setFiveA (state, data) { // 获取5A
101
+      data = data || []
100 102
       state.fiveA = data
101 103
     },
102 104
     setMessage (state, data) { // 获取首页消息
105
+      data = data || []
103 106
       if (data.length > 3) {
104 107
         state.message = data.slice(0,3)
105 108
       } else {
@@ -107,9 +110,11 @@ export default {
107 110
       }
108 111
     },
109 112
     setProject (state, data) { // 获取项目专题
113
+      data = data || []
110 114
       state.project = data
111 115
     },
112 116
     setCms (state, data) { // 获取cms
117
+      data = data || []
113 118
       state.cms = data
114 119
     }
115 120
   },