yuantianjiao 6 years ago
parent
commit
8eb7d3460f

+ 2
- 0
package.json View File

20
     "axios": "^0.18.0",
20
     "axios": "^0.18.0",
21
     "better-scroll": "^1.12.6",
21
     "better-scroll": "^1.12.6",
22
     "canvas2image": "^1.0.5",
22
     "canvas2image": "^1.0.5",
23
+    "exif-js": "^2.3.0",
23
     "html2canvas": "^1.0.0-alpha.12",
24
     "html2canvas": "^1.0.0-alpha.12",
24
     "jQuery": "^1.7.4",
25
     "jQuery": "^1.7.4",
25
     "less": "^3.0.4",
26
     "less": "^3.0.4",
26
     "less-loader": "^4.1.0",
27
     "less-loader": "^4.1.0",
27
     "node-sass": "^4.9.3",
28
     "node-sass": "^4.9.3",
29
+    "pako": "^1.0.7",
28
     "qrcodejs2": "^0.0.2",
30
     "qrcodejs2": "^0.0.2",
29
     "sass-loader": "^7.1.0",
31
     "sass-loader": "^7.1.0",
30
     "vant": "^1.3.0",
32
     "vant": "^1.3.0",

BIN
src/common/icon/honhse.png View File


+ 19
- 1
src/pages/user/App.vue View File

8
 import '../../common/css/reset.css'
8
 import '../../common/css/reset.css'
9
 import { mapState, createNamespacedHelpers } from 'vuex'
9
 import { mapState, createNamespacedHelpers } from 'vuex'
10
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
10
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
11
+const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
12
+const wx = require('weixin-js-sdk')
13
+import wxsdk from '@/util/share'
11
 export default {
14
 export default {
12
   name: 'app',
15
   name: 'app',
13
   data () {
16
   data () {
29
       this.code = null
32
       this.code = null
30
     }
33
     }
31
     this.getUserInfo({ org: this.org, code: this.code }).then(() => {
34
     this.getUserInfo({ org: this.org, code: this.code }).then(() => {
32
-      this.showPage = true
35
+      let that = this
36
+      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
37
+        title: '城的空间',
38
+        desc: '城的空间',
39
+        link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
40
+        thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
41
+      }).then(() => {
42
+        wx.getLocation({
43
+          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
44
+          success: function (res) {
45
+            that.setLocation({ latitude1: res.latitude, longitude1: res.longitude })
46
+            that.showPage = true
47
+          }
48
+        })
49
+      })
33
     })
50
     })
34
   },
51
   },
35
   methods: {
52
   methods: {
53
+    ...mapIndexActions(['setLocation']),
36
     ...actions(['getUserInfo'])
54
     ...actions(['getUserInfo'])
37
   }
55
   }
38
 }
56
 }

+ 6
- 0
src/pages/user/activeList/activeList.vue View File

27
 <style lang="scss" scoped>
27
 <style lang="scss" scoped>
28
 .content {
28
 .content {
29
   padding: 0 0 0 0.1rem;
29
   padding: 0 0 0 0.1rem;
30
+  background: #fff;
30
   .list {
31
   .list {
31
     width: 100%;
32
     width: 100%;
32
     height: 0.8rem;
33
     height: 0.8rem;
48
       text-overflow: ellipsis;
49
       text-overflow: ellipsis;
49
       white-space: nowrap;
50
       white-space: nowrap;
50
       font-size: 0.14rem;
51
       font-size: 0.14rem;
52
+      color: rgba(50, 59, 69, 1);
53
+    }
54
+    i{
55
+      color: rgba(50, 59, 69, 1);
56
+      padding-right: .1rem;
51
     }
57
     }
52
   }
58
   }
53
 }
59
 }

+ 2
- 2
src/pages/user/bindMobile/page.scss View File

10
     height: 100%;
10
     height: 100%;
11
     display: flex;
11
     display: flex;
12
     justify-content: center;
12
     justify-content: center;
13
-    align-items: center;
14
     // background: rgba(0,0,0,0.3);
13
     // background: rgba(0,0,0,0.3);
15
     position: relative;
14
     position: relative;
16
     .logo{
15
     .logo{
27
     }
26
     }
28
     .box{
27
     .box{
29
       width: 3.25rem;
28
       width: 3.25rem;
29
+      height: 4.2rem;
30
       background:rgba(255,255,255,1);
30
       background:rgba(255,255,255,1);
31
       border-radius:8px;
31
       border-radius:8px;
32
       padding: .2rem;
32
       padding: .2rem;
33
       box-sizing: border-box;
33
       box-sizing: border-box;
34
-      margin-top: .5rem;
34
+      margin-top: 1.2rem;
35
       .title{
35
       .title{
36
         font-size: .16rem;
36
         font-size: .16rem;
37
         font-weight: bold;
37
         font-weight: bold;

+ 17
- 10
src/pages/user/calendar/calendar.vue View File

5
     </div>
5
     </div>
6
     <div class="middle">
6
     <div class="middle">
7
       <p>云台天境定制专属你的台历</p>
7
       <p>云台天境定制专属你的台历</p>
8
-      <span>时间: 2018年12月12-21日</span>
9
-      <span>地点: 宁区秣陵街道创新东路2号银城蓝溪郡营销中心</span>
8
+      <span>时间: 2018年12月12-2018年12月19日</span>
9
+      <span>地点: 江宁区云台山河路1号云台天境售楼处</span>
10
     </div>
10
     </div>
11
     <div class="bottom">
11
     <div class="bottom">
12
       <p class="title">活动详情</p>
12
       <p class="title">活动详情</p>
13
-      <div>相关活动介绍参与活动需出示“城的空间”官微报名截图并支付198元现金(现金需在活动现场支付)</div>
14
-      <div>以上礼品需成交方可享受,成交指签订车位销售合同/商品房现售合同,并支付全部价款或支付首付款且办理完毕贷款手续,开发商承诺客户交纳的198元,我司无条件退还,活动名额仅限10人,先到先得。</div>
15
-      <div>活动电话:025-86426677</div>
16
-      <div>服务案场:银城蓝溪郡</div>
17
-      <div>地址:江宁区秣陵街道创新东路2号</div>
18
-      <div>*活动最终解释权归银城蓝溪郡开发商所有</div>
13
+      <div>用户在线上传照片生成2019年台历,可通过填写邮箱,获得电子版台历(1个工作日内)。</div>
14
+      <div>前200名上传成功用户,可在关注【城的空间】公众号接到推送或接到短信通知后来云台天境售楼处领取精美实物台历一份。</div>
15
+      <div>活动电话:025-86426666</div>
16
+      <div>服务案场:银城旭辉云台天境</div>
17
+      <div>地址:江宁区云台山河路1号云台天境售楼处</div>
18
+      <div>*活动最终解释权归南京佳运城房地产开发有限公司所有</div>
19
     </div>
19
     </div>
20
     <div class="btn">
20
     <div class="btn">
21
       <div v-if="state === 1" @click="toCheckModel">立即参与</div>
21
       <div v-if="state === 1" @click="toCheckModel">立即参与</div>
26
 </template>
26
 </template>
27
 
27
 
28
 <script>
28
 <script>
29
+import wxsdk from '../../../util/share'
29
 import { mapState, createNamespacedHelpers } from 'vuex'
30
 import { mapState, createNamespacedHelpers } from 'vuex'
30
 const { mapActions: mapMakingActions } = createNamespacedHelpers('making')
31
 const { mapActions: mapMakingActions } = createNamespacedHelpers('making')
31
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
32
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
35
     return {
36
     return {
36
       topImg,
37
       topImg,
37
       state: 1,
38
       state: 1,
38
-      endTime: "2018/12/22 00:00:00"
39
+      endTime: "2018/12/19 00:00:00"
39
     }
40
     }
40
   },
41
   },
41
   created () {
42
   created () {
43
+    wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
44
+      title: '幸福升舱 云帆起航',
45
+      desc: '有一份2019年的台历待您查收!',
46
+      link: `${window.location.origin}${window.location.pathname}#/calendar`,
47
+      thu_image: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/DE4F9402-9449-48fc-8C0D-61C198E82E481543982444.png'
48
+    })
42
     this.getUserInfo({ org: this.org }).then(() => {
49
     this.getUserInfo({ org: this.org }).then(() => {
43
       this.getCalendarCustomer().then((res) => {
50
       this.getCalendarCustomer().then((res) => {
44
         if (res) {
51
         if (res) {
67
     toCheckModel () {
74
     toCheckModel () {
68
       if (!this.userInfo.customer.Phone) {
75
       if (!this.userInfo.customer.Phone) {
69
         this.$dialog.confirm({
76
         this.$dialog.confirm({
70
-          title: '标题',
77
+          title: '提示',
71
           message: '您还不是注册会员,注册成功后即可参与此活动'
78
           message: '您还不是注册会员,注册成功后即可参与此活动'
72
         }).then(() => {
79
         }).then(() => {
73
           // on confirm
80
           // on confirm

+ 8
- 0
src/pages/user/calendar/checkModel.vue View File

2
   <div class="content">
2
   <div class="content">
3
     <div @click="checkModel(1)">
3
     <div @click="checkModel(1)">
4
       <img :src="coverBlack">
4
       <img :src="coverBlack">
5
+      <p>主题一 (黑色)</p>
5
       <div>
6
       <div>
6
         <img v-if="check === 1" :src="checked" alt>
7
         <img v-if="check === 1" :src="checked" alt>
7
         <img v-if="check === 2" :src="unchecked" alt>
8
         <img v-if="check === 2" :src="unchecked" alt>
9
     </div>
10
     </div>
10
     <div @click="checkModel(2)">
11
     <div @click="checkModel(2)">
11
       <img :src="coverRed">
12
       <img :src="coverRed">
13
+      <p>主题二 (红色)</p>
12
       <div>
14
       <div>
13
         <img v-if="check === 2" :src="checked" alt>
15
         <img v-if="check === 2" :src="checked" alt>
14
         <img v-if="check === 1" :src="unchecked" alt>
16
         <img v-if="check === 1" :src="unchecked" alt>
57
     > img {
59
     > img {
58
       width: 100%;
60
       width: 100%;
59
     }
61
     }
62
+    p{
63
+      font-size: .14rem;
64
+      font-weight: bold;
65
+      text-align: center;
66
+      margin-top: .05rem;
67
+    }
60
     div {
68
     div {
61
       position: absolute;
69
       position: absolute;
62
       right: 0.2rem;
70
       right: 0.2rem;

+ 24
- 13
src/pages/user/calendar/making.vue View File

153
       bannerRed: item => item.bannerRed
153
       bannerRed: item => item.bannerRed
154
     }),
154
     }),
155
     size () {
155
     size () {
156
-      if (this.mainIndex === 1 || this.mainIndex === 3 || this.mainIndex === 7 || this.mainIndex === 10) {
156
+      if (this.mainIndex === 2 || this.mainIndex === 5 || this.mainIndex === 8 || this.mainIndex === 11) {
157
         return '横'
157
         return '横'
158
       } else {
158
       } else {
159
         return '竖'
159
         return '竖'
170
   methods: {
170
   methods: {
171
     ...mapMakingActions(['setBanner', 'calendar']),
171
     ...mapMakingActions(['setBanner', 'calendar']),
172
     upload (url) {
172
     upload (url) {
173
-      this.banner[this.mainIndex - 1].CustomerImg = url
173
+      this.banner[this.mainIndex - 1].CustomerImg = url + '?x-oss-process=style/calendar-thumb'
174
       this.setBanner({ type: this.$route.query.type, data: JSON.parse(JSON.stringify(this.banner)) })
174
       this.setBanner({ type: this.$route.query.type, data: JSON.parse(JSON.stringify(this.banner)) })
175
       console.log(this.banner)
175
       console.log(this.banner)
176
       let cutDoms = document.getElementsByClassName('cutDom')[0]
176
       let cutDoms = document.getElementsByClassName('cutDom')[0]
216
         delete curr['defaultBg']
216
         delete curr['defaultBg']
217
         delete curr['style']
217
         delete curr['style']
218
         delete curr['styleCut']
218
         delete curr['styleCut']
219
-        if (!curr['CustomerImg']) {
220
-          curr['CustomerImg'] = curr['defaultNoUser']
219
+        if (!curr.CustomerImg) {
220
+          curr.CustomerImg = curr.defaultNoUser
221
         }
221
         }
222
         delete curr['defaultNoUser']
222
         delete curr['defaultNoUser']
223
       });
223
       });
262
           context.webkitImageSmoothingEnabled = false;
262
           context.webkitImageSmoothingEnabled = false;
263
           context.msImageSmoothingEnabled = false;
263
           context.msImageSmoothingEnabled = false;
264
           context.imageSmoothingEnabled = false;
264
           context.imageSmoothingEnabled = false;
265
-
265
+          console.log(canvas.toDataURL('image/jpeg', 0.8))
266
           // 【重要】默认转化的格式为png,也可设置为其他格式
266
           // 【重要】默认转化的格式为png,也可设置为其他格式
267
-          var img = canvas2image.convertToJPEG(canvas, canvas.width, canvas.height);
268
-          var blobs = that.urltoblob(img.src);
269
-          var namestr = `${that.banner[i].ImgName}.jpg`;
270
-          var file = {
271
-            content: img.src,
272
-            file: that.blobToFile(blobs, namestr)
267
+          // var img = canvas2image.convertToJPEG(canvas, canvas.width, canvas.height);
268
+          // var blobs = that.urltoblob(img.src);
269
+          // var namestr = `${that.banner[i].ImgName}.jpg`;
270
+          // var file = {
271
+          //   content: img.src,
272
+          //   file: that.blobToFile(blobs, namestr)
273
+          // }
274
+          // console.log(file)
275
+          // that.toolClass.upload(file).then((res) => {
276
+          //   that.banner[i].CalendarImg = res.result.url
277
+          //   that.setBanner({ type: that.$route.query.type, data: JSON.parse(JSON.stringify(that.banner)) })
278
+          //   resolve()
279
+          // }).catch(() => {
280
+          //   reject()
281
+          // })
282
+          let file = {
283
+            namestr: `${that.banner[i].ImgName}.jpg`,
284
+            base64str: encodeURIComponent(canvas.toDataURL('image/jpeg', 0.8))
273
           }
285
           }
274
-          console.log(file)
275
-          that.toolClass.upload(file).then((res) => {
286
+          that.toolClass.uploadBase64(file).then((res) => {
276
             that.banner[i].CalendarImg = res.result.url
287
             that.banner[i].CalendarImg = res.result.url
277
             that.setBanner({ type: that.$route.query.type, data: JSON.parse(JSON.stringify(that.banner)) })
288
             that.setBanner({ type: that.$route.query.type, data: JSON.parse(JSON.stringify(that.banner)) })
278
             resolve()
289
             resolve()

+ 2
- 2
src/pages/user/courseList/index.vue View File

84
             id: item.CourseId,
84
             id: item.CourseId,
85
             title: item.CourseName,
85
             title: item.CourseName,
86
             img: item.CourseImg,
86
             img: item.CourseImg,
87
-            remark: this.toolClass.dateFormat(item.BeginDate, 'yyyy-MM-dd') + '' + this.toolClass.dateFormat(item.EndDate, 'yyyy-MM-dd'),
87
+            remark: this.toolClass.dateFormat(item.BeginDate, 'yyyy-MM-dd') + '-' + this.toolClass.dateFormat(item.EndDate, 'yyyy-MM-dd'),
88
             address: item.CaseAddress,
88
             address: item.CaseAddress,
89
-            tag: '',
89
+            tag: item.CourseTags,
90
             courseType: '团体课',
90
             courseType: '团体课',
91
             defaultPrice: item.Price + '/节',
91
             defaultPrice: item.Price + '/节',
92
             getWay: 'ticket',
92
             getWay: 'ticket',

+ 6
- 2
src/pages/user/customization/customizationDetail.vue View File

4
       <img :src="topImg">
4
       <img :src="topImg">
5
       <div>
5
       <div>
6
         <div class="list">
6
         <div class="list">
7
-          <img :src='cover'>
7
+          <img :src="detail.ModelName === '黑色'?cover:cover2">
8
           <div>
8
           <div>
9
             <div>云台天境台历定制</div>
9
             <div>云台天境台历定制</div>
10
-            <div>主办: {{detail.CaseName}}</div>
10
+            <div>主办案场: {{detail.CaseName}}</div>
11
             <div>参与时间: {{toolClass.dateFormat(detail.CreateDate)}}</div>
11
             <div>参与时间: {{toolClass.dateFormat(detail.CreateDate)}}</div>
12
           </div>
12
           </div>
13
           <span>{{detail.MakeStatus === 'making' ? '制作中' : '制作完成'}}</span>
13
           <span>{{detail.MakeStatus === 'making' ? '制作中' : '制作完成'}}</span>
46
 
46
 
47
 <script>
47
 <script>
48
 import cover from '@/common/icon/heise.png'
48
 import cover from '@/common/icon/heise.png'
49
+import cover2 from '@/common/icon/honhse.png'
49
 import topImg from '@/common/icon/topImg.png'
50
 import topImg from '@/common/icon/topImg.png'
50
 import { createNamespacedHelpers } from 'vuex'
51
 import { createNamespacedHelpers } from 'vuex'
51
 const { mapState: mapCustomizationState, mapActions: mapCustomizationActions } = createNamespacedHelpers('customization')
52
 const { mapState: mapCustomizationState, mapActions: mapCustomizationActions } = createNamespacedHelpers('customization')
54
     return {
55
     return {
55
       topImg,
56
       topImg,
56
       cover,
57
       cover,
58
+      cover2,
57
       showPage: false,
59
       showPage: false,
58
       showMore: false
60
       showMore: false
59
     }
61
     }
148
 .main {
150
 .main {
149
   border-bottom: 0.1rem solid #f2f2f2;
151
   border-bottom: 0.1rem solid #f2f2f2;
150
   text-align: center;
152
   text-align: center;
153
+  background: #fff;
151
   .text {
154
   .text {
152
     padding-bottom: 0.15rem;
155
     padding-bottom: 0.15rem;
153
   }
156
   }
157
   }
160
   }
158
 }
161
 }
159
 .bottom {
162
 .bottom {
163
+  background: #fff;
160
   .pic-list {
164
   .pic-list {
161
     padding: 0.05rem;
165
     padding: 0.05rem;
162
     box-sizing: border-box;
166
     box-sizing: border-box;

+ 12
- 3
src/pages/user/customization/customizationList.vue View File

5
       v-for="(item,index) in list"
5
       v-for="(item,index) in list"
6
       :key="index"
6
       :key="index"
7
       @click="toDetail(item.CustomerCalendarId)"
7
       @click="toDetail(item.CustomerCalendarId)"
8
+      v-if="list.length>0"
8
     >
9
     >
9
-      <img :src="cover">
10
+      <img :src="item.ModelName === '黑色'?cover:cover2">
10
       <div>
11
       <div>
11
         <div>云台天境台历定制</div>
12
         <div>云台天境台历定制</div>
12
-        <div>主办: {{item.CaseName}}</div>
13
+        <div>主办案场: {{item.CaseName}}</div>
13
         <div>参与时间: {{toolClass.dateFormat(item.CreateDate)}}</div>
14
         <div>参与时间: {{toolClass.dateFormat(item.CreateDate)}}</div>
14
       </div>
15
       </div>
15
       <span>{{item.MakeStatus === 'making' ? '制作中' : '制作完成'}}</span>
16
       <span>{{item.MakeStatus === 'making' ? '制作中' : '制作完成'}}</span>
16
     </div>
17
     </div>
18
+    <noMore v-else></noMore>
17
   </div>
19
   </div>
18
 </template>
20
 </template>
19
 
21
 
20
 <script>
22
 <script>
21
 import cover from '@/common/icon/heise.png'
23
 import cover from '@/common/icon/heise.png'
24
+import cover2 from '@/common/icon/honhse.png'
25
+import noMore from '@/components/noMore/noMore.vue'
22
 import { createNamespacedHelpers } from 'vuex'
26
 import { createNamespacedHelpers } from 'vuex'
23
 const { mapState: mapCustomizationState, mapActions: mapCustomizationActions } = createNamespacedHelpers('customization')
27
 const { mapState: mapCustomizationState, mapActions: mapCustomizationActions } = createNamespacedHelpers('customization')
24
 export default {
28
 export default {
25
   data () {
29
   data () {
26
     return {
30
     return {
27
       showPage: false,
31
       showPage: false,
28
-      cover
32
+      cover,
33
+      cover2
29
     }
34
     }
30
   },
35
   },
36
+  components:{
37
+    noMore
38
+  },
31
   created () {
39
   created () {
32
     this.getList().then(() => {
40
     this.getList().then(() => {
33
       this.showPage = true
41
       this.showPage = true
76
       div:nth-of-type(1) {
84
       div:nth-of-type(1) {
77
         color: #000;
85
         color: #000;
78
         padding: 0px;
86
         padding: 0px;
87
+        font-size: 0.15rem;
79
       }
88
       }
80
       div:nth-of-type(2) {
89
       div:nth-of-type(2) {
81
         padding-top: 0.12rem;
90
         padding-top: 0.12rem;

+ 43
- 43
src/pages/user/mainPage/indexPage/index.vue View File

29
     </div>
29
     </div>
30
     <div class="areaHeader flex-h">
30
     <div class="areaHeader flex-h">
31
       <h1 class="flex-item">探索·发现</h1>
31
       <h1 class="flex-item">探索·发现</h1>
32
-      <router-link :to="{name: 'majorProjectsList'}">查看所有</router-link>
32
+      <router-link v-if="project.length>5" :to="{name: 'majorProjectsList'}">查看所有</router-link>
33
     </div>
33
     </div>
34
     <div class="areaContent">
34
     <div class="areaContent">
35
       <div class="scroll-h find">
35
       <div class="scroll-h find">
36
         <div>
36
         <div>
37
           <swiper :options="swiperHOption" ref="mySwiperH">
37
           <swiper :options="swiperHOption" ref="mySwiperH">
38
-            <swiper-slide class="swiper-slide" v-for="(item,index) in project" v-if="index<5" :key="index">
38
+            <swiper-slide
39
+              class="swiper-slide"
40
+              v-for="(item,index) in project"
41
+              v-if="index<5"
42
+              :key="index"
43
+            >
39
               <router-link
44
               <router-link
40
                 tag="div"
45
                 tag="div"
41
                 :to="{ name:'majorProjects', query:{ id: item.CmsCaseId } }"
46
                 :to="{ name:'majorProjects', query:{ id: item.CmsCaseId } }"
54
     </div>
59
     </div>
55
     <div class="areaHeader flex-h" v-if="courseList.length>0">
60
     <div class="areaHeader flex-h" v-if="courseList.length>0">
56
       <h1 class="flex-item">近期课程</h1>
61
       <h1 class="flex-item">近期课程</h1>
57
-      <router-link :to="{name: 'courseList'}">查看所有</router-link>
62
+      <router-link v-show="courseList.length>5" :to="{name: 'courseList'}">查看所有</router-link>
58
     </div>
63
     </div>
59
-    <div class="areaContent" :hidden="!courseList.length">
64
+    <div class="areaContent" v-if="courseList.length>0">
60
       <div class="scroll-h course">
65
       <div class="scroll-h course">
61
         <div>
66
         <div>
62
           <swiper :options="swiperHOption" ref="mySwiperH">
67
           <swiper :options="swiperHOption" ref="mySwiperH">
63
-            <swiper-slide class="swiper-slide" v-for="(item,index) in courseList" :key="index">
68
+            <swiper-slide
69
+              class="swiper-slide"
70
+              v-for="(item,index) in courseList"
71
+              :key="index"
72
+              v-if="index<5"
73
+            >
64
               <router-link
74
               <router-link
65
                 tag="div"
75
                 tag="div"
66
                 :to="{ name:'majorProjectsDetail', query:{ id: item.CourseId } }"
76
                 :to="{ name:'majorProjectsDetail', query:{ id: item.CourseId } }"
73
                 <div class="price">
83
                 <div class="price">
74
                   <span>¥{{item.Price}}</span>
84
                   <span>¥{{item.Price}}</span>
75
                 </div>
85
                 </div>
76
-                <span>{{toolClass.dateFormat(item.BeginDate)}}</span>
86
+                <span>{{`${toolClass.dateFormat(item.BeginDate,'yyyy-MM-dd')}~${toolClass.dateFormat(item.EndDate,'MM-dd')}`}}</span>
77
                 <span>{{item.CaseName}}</span>
87
                 <span>{{item.CaseName}}</span>
78
               </router-link>
88
               </router-link>
79
             </swiper-slide>
89
             </swiper-slide>
88
       <div class="flex-item">
98
       <div class="flex-item">
89
         <div>
99
         <div>
90
           <ul>
100
           <ul>
91
-            <li class="flex-h" v-for="(item,index) in newsList" :key="index" @click="jump(item)">
101
+            <li
102
+              class="flex-h"
103
+              v-for="(item,index) in newsList"
104
+              :key="index"
105
+              @click="jump(item)"
106
+              v-if="index<5"
107
+            >
92
               <a class="img">
108
               <a class="img">
93
                 <img :src="item.ImageUrl" class="centerLabel cover" alt>
109
                 <img :src="item.ImageUrl" class="centerLabel cover" alt>
94
               </a>
110
               </a>
111
 import 'swiper/dist/css/swiper.css'
127
 import 'swiper/dist/css/swiper.css'
112
 import { mapState, createNamespacedHelpers } from 'vuex'
128
 import { mapState, createNamespacedHelpers } from 'vuex'
113
 const { mapState: mapIndexState, mapActions: mapIndexActions } = createNamespacedHelpers('index')
129
 const { mapState: mapIndexState, mapActions: mapIndexActions } = createNamespacedHelpers('index')
114
-const wx = require('weixin-js-sdk')
115
-import wxsdk from '@/util/share'
116
 export default {
130
 export default {
117
   name: '',
131
   name: '',
118
   data () {
132
   data () {
160
     swiperSlide
174
     swiperSlide
161
   },
175
   },
162
   created () {
176
   created () {
163
-    let that = this
164
-    wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
165
-      title: '城的空间',
166
-      desc: '城的空间',
167
-      link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
168
-      thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
169
-    }).then(() => {
170
-      wx.getLocation({
171
-        type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
172
-        success: function (res) {
173
-          that.setLocation({ latitude1: res.latitude, longitude1: res.longitude })
174
-          that.getIndexLocation({ orgid: that.orgid, issys: '0' }).then((res) => {
175
-            // that.data.fiveA = that.fiveA
176
-            that.locationId = 'index'
177
-            that.getIndexInfo({ orgid: that.orgid, locationid: that.locationId }).then((res) => {
178
-              that.newsList = that.cms
179
-              if (that.project !== undefined && that.project !== null) {
180
-                for (let i = 0; i < that.project.length; i++) {
181
-                  if (that.project[i].CmsCaseImgs != null) {
182
-                    for (let j = 0; j < that.project[i].CmsCaseImgs.length; j++) {
183
-                      if (that.project[i].CmsCaseImgs[j].ImageType === 'cover') {
184
-                        that.project[i].CaseImageUrl = that.project[i].CmsCaseImgs[j].CaseImageUrl
185
-                      }
186
-                    }
187
-                  }
177
+    this.getIndexLocation({ orgid: this.orgid, issys: '0' }).then((res) => {
178
+      // this.data.fiveA = this.fiveA
179
+      this.locationId = 'index'
180
+      this.getIndexInfo({ orgid: this.orgid, locationid: this.locationId }).then((res) => {
181
+        this.newsList = this.cms
182
+        if (this.project !== undefined && this.project !== null) {
183
+          for (let i = 0; i < this.project.length; i++) {
184
+            if (this.project[i].CmsCaseImgs != null) {
185
+              for (let j = 0; j < this.project[i].CmsCaseImgs.length; j++) {
186
+                if (this.project[i].CmsCaseImgs[j].ImageType === 'cover') {
187
+                  this.project[i].CaseImageUrl = this.project[i].CmsCaseImgs[j].CaseImageUrl
188
                 }
188
                 }
189
               }
189
               }
190
-            })
191
-            that.getCourseList({
192
-              pagesize: 5,
193
-              page: 1
194
-            }).then(() => {
195
-              that.showPage = true
196
-            })
197
-          })
190
+            }
191
+          }
198
         }
192
         }
199
       })
193
       })
194
+      this.getCourseList({
195
+        pagesize: 10000,
196
+        page: 1
197
+      }).then(() => {
198
+        this.showPage = true
199
+      })
200
     })
200
     })
201
   },
201
   },
202
   methods: {
202
   methods: {
203
-    ...mapIndexActions(['getIndexLocation', 'getIndexInfo', 'getCourseList', 'setLocation']),
203
+    ...mapIndexActions(['getIndexLocation', 'getIndexInfo', 'getCourseList']),
204
     jump (item) {
204
     jump (item) {
205
       item.ForwardType = item.ForwardType || ''
205
       item.ForwardType = item.ForwardType || ''
206
       if (item.ForwardType === 'url') {
206
       if (item.ForwardType === 'url') {

+ 7
- 4
src/pages/user/mainPage/indexPage/page.scss View File

83
           width: 100%;
83
           width: 100%;
84
           position: relative;
84
           position: relative;
85
           .swiper-slide{
85
           .swiper-slide{
86
-            width: 1.15rem;
86
+            width: 1.14rem;
87
             height: .9rem;
87
             height: .9rem;
88
             background: #eee;
88
             background: #eee;
89
             position: relative;
89
             position: relative;
125
           width: 100%;
125
           width: 100%;
126
           position: relative;
126
           position: relative;
127
           .swiper-slide{
127
           .swiper-slide{
128
-            width: 1.15rem;
128
+            width: 1.3rem;
129
             position: relative;
129
             position: relative;
130
             overflow: visible;
130
             overflow: visible;
131
             margin-right: .25rem;
131
             margin-right: .25rem;
134
             }
134
             }
135
             .img{
135
             .img{
136
               width: 100%;
136
               width: 100%;
137
-              padding-bottom: 100%;
137
+              padding-bottom: 1.66rem;
138
               background: #eee;
138
               background: #eee;
139
               border-radius: .1rem;
139
               border-radius: .1rem;
140
               position: relative;
140
               position: relative;
147
                 left: 0;
147
                 left: 0;
148
                 top: 0;
148
                 top: 0;
149
                 font-size: .13rem;
149
                 font-size: .13rem;
150
-                font-weight: bolder;
151
                 top: .1rem;
150
                 top: .1rem;
152
                 text-indent: .1rem;
151
                 text-indent: .1rem;
153
                 display: inline-block;
152
                 display: inline-block;
154
                 z-index: 2;
153
                 z-index: 2;
155
                 position: absolute;
154
                 position: absolute;
156
                 color: #fff;
155
                 color: #fff;
156
+                overflow: hidden;
157
+                text-overflow: ellipsis;
158
+                white-space: nowrap;
157
               }
159
               }
158
             }
160
             }
159
             .price{
161
             .price{
182
                 +span{
184
                 +span{
183
                   line-height: .2rem;
185
                   line-height: .2rem;
184
                   font-size: .13rem;
186
                   font-size: .13rem;
187
+                  display: block;
185
                 }
188
                 }
186
               }
189
               }
187
             }
190
             }

+ 1
- 31
src/pages/user/majorProjectsList/index.vue View File

33
 </template>
33
 </template>
34
 
34
 
35
 <script>
35
 <script>
36
-import { mapState, createNamespacedHelpers } from 'vuex'
37
-const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
38
-const wx = require('weixin-js-sdk')
39
-import wxsdk from '@/util/share'
36
+import { mapState } from 'vuex'
40
 export default {
37
 export default {
41
   name: '',
38
   name: '',
42
   data () {
39
   data () {
45
   },
42
   },
46
   computed: {
43
   computed: {
47
     ...mapState({
44
     ...mapState({
48
-      orgid: x => x.app.orgId,
49
       project: x => x.index.project
45
       project: x => x.index.project
50
     })
46
     })
51
-  },
52
-  components: {
53
-  },
54
-  created () {
55
-    let that = this
56
-    wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
57
-      title: '城的空间',
58
-      desc: '城的空间',
59
-      link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
60
-      thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
61
-    }).then(() => {
62
-      wx.getLocation({
63
-        type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
64
-        success: function (res) {
65
-          that.setLocation({ latitude1: res.latitude, longitude1: res.longitude })
66
-          that.getProjectList({
67
-            orgid: that.orgid
68
-          }).then(() => {
69
-            console.log(that.project)
70
-          })
71
-        }
72
-      })
73
-    })
74
-  },
75
-  methods: {
76
-    ...mapIndexActions(['getProjectList', 'setLocation'])
77
   }
47
   }
78
 }
48
 }
79
 </script>
49
 </script>

+ 1
- 1
src/pages/user/majorProjectsList/page.scss View File

21
             padding: .03rem 0;
21
             padding: .03rem 0;
22
             border-bottom: 1px solid #ededed;
22
             border-bottom: 1px solid #ededed;
23
             img{
23
             img{
24
-              width: 1.15rem;
24
+              width: 1.14rem;
25
               height: .9rem;
25
               height: .9rem;
26
               position: relative;
26
               position: relative;
27
               overflow: hidden;
27
               overflow: hidden;

+ 7
- 2
src/store/index/index.js View File

118
       let arr = []
118
       let arr = []
119
       let dataNew = []
119
       let dataNew = []
120
       data.forEach((item) => {
120
       data.forEach((item) => {
121
-        item.jl = parseInt(toolClass.getGreatCircleDistance(state.latitude1, state.longitude1, item.Coordinate.split(',')[0], item.Coordinate.split(',')[1]))
122
-        arr.push(parseInt(toolClass.getGreatCircleDistance(state.latitude1, state.longitude1, item.Coordinate.split(',')[0], item.Coordinate.split(',')[1])))
121
+        if (item.Coordinate) {
122
+          item.jl = parseInt(toolClass.getGreatCircleDistance(state.latitude1, state.longitude1, item.Coordinate.split(',')[0], item.Coordinate.split(',')[1]))
123
+          arr.push(parseInt(toolClass.getGreatCircleDistance(state.latitude1, state.longitude1, item.Coordinate.split(',')[0], item.Coordinate.split(',')[1])))
124
+        } else {
125
+          item.jl = 400000000
126
+          arr.push(400000000)
127
+        }
123
       })
128
       })
124
       arr.sort((a, b) => { return a - b })
129
       arr.sort((a, b) => { return a - b })
125
       arr.forEach((curr) => {
130
       arr.forEach((curr) => {

+ 52
- 50
src/store/making/index.js View File

47
       {
47
       {
48
         bgImg: coverBlack,
48
         bgImg: coverBlack,
49
         defaultBg: '',
49
         defaultBg: '',
50
-        CalendarImg: coverBlack,
50
+        CalendarImg: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverBlack.jpg',
51
         CustomerImg: '',
51
         CustomerImg: '',
52
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverBlack.jpg',
52
         ImgName: '封面',
53
         ImgName: '封面',
53
         Sort: 1,
54
         Sort: 1,
54
         style: ''
55
         style: ''
56
       {
57
       {
57
         bgImg: b1bg,
58
         bgImg: b1bg,
58
         defaultBg: b1,
59
         defaultBg: b1,
59
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546637',
60
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/96917dcd-ed9f-446b-b54d-d2160416cf1a-20181205094151.jpg',
60
         CustomerImg: '',
61
         CustomerImg: '',
61
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b1.jpg',
62
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b1.jpg',
62
         ImgName: '1月',
63
         ImgName: '1月',
63
         Sort: 2,
64
         Sort: 2,
64
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.25rem;left:50%;transform:translateX(-50%);object-fit: cover;',
65
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.25rem;left:50%;transform:translateX(-50%);object-fit: cover;',
67
       {
68
       {
68
         bgImg: b2bg,
69
         bgImg: b2bg,
69
         defaultBg: b2,
70
         defaultBg: b2,
70
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543547849',
71
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/dd3e0c2d-5ea4-47d5-84b7-c1259ddf9cf1-20181205094235.jpg',
71
         CustomerImg: '',
72
         CustomerImg: '',
72
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b2.jpg',
73
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b2.jpg',
73
         ImgName: '2月',
74
         ImgName: '2月',
74
         Sort: 3,
75
         Sort: 3,
75
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
76
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
78
       {
79
       {
79
         bgImg: b3bg,
80
         bgImg: b3bg,
80
         defaultBg: b3,
81
         defaultBg: b3,
81
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546638',
82
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/3a24c0c3-694f-4af2-aa09-0287eb0110fd-20181205094257.jpg',
82
         CustomerImg: '',
83
         CustomerImg: '',
83
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b3.jpg',
84
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b3.jpg',
84
         ImgName: '3月',
85
         ImgName: '3月',
85
         Sort: 4,
86
         Sort: 4,
86
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;right:0.16rem;object-fit: cover;',
87
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;right:0.16rem;object-fit: cover;',
89
       {
90
       {
90
         bgImg: b4bg,
91
         bgImg: b4bg,
91
         defaultBg: b4,
92
         defaultBg: b4,
92
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543547851',
93
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/b387debc-dc6b-4864-8d26-ce41c2702f1a-20181205094322.jpg',
93
         CustomerImg: '',
94
         CustomerImg: '',
94
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b4.jpg',
95
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b4.jpg',
95
         ImgName: '4月',
96
         ImgName: '4月',
96
         Sort: 5,
97
         Sort: 5,
97
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50.5%);object-fit: cover;',
98
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50.5%);object-fit: cover;',
100
       {
101
       {
101
         bgImg: b5bg,
102
         bgImg: b5bg,
102
         defaultBg: b5,
103
         defaultBg: b5,
103
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546640',
104
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/c5b51b42-078d-414b-8cb8-5b5daf6e5463-20181205094344.jpg',
104
         CustomerImg: '',
105
         CustomerImg: '',
105
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b5.jpg',
106
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b5.jpg',
106
         ImgName: '5月',
107
         ImgName: '5月',
107
         Sort: 6,
108
         Sort: 6,
108
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
109
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
111
       {
112
       {
112
         bgImg: b6bg,
113
         bgImg: b6bg,
113
         defaultBg: b6,
114
         defaultBg: b6,
114
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546642',
115
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/8b6a3cb2-23d2-4993-b84b-308e9b302cda-20181205094359.jpg',
115
         CustomerImg: '',
116
         CustomerImg: '',
116
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b6.jpg',
117
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b6.jpg',
117
         ImgName: '6月',
118
         ImgName: '6月',
118
         Sort: 7,
119
         Sort: 7,
119
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.24rem;right:0.16rem;object-fit: cover;',
120
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.24rem;right:0.16rem;object-fit: cover;',
122
       {
123
       {
123
         bgImg: b7bg,
124
         bgImg: b7bg,
124
         defaultBg: b7,
125
         defaultBg: b7,
125
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546643',
126
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/11a72196-3ca1-4759-88c3-6b4317928857-20181205094421.jpg',
126
         CustomerImg: '',
127
         CustomerImg: '',
127
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b7.jpg',
128
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b7.jpg',
128
         ImgName: '7月',
129
         ImgName: '7月',
129
         Sort: 8,
130
         Sort: 8,
130
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
131
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
133
       {
134
       {
134
         bgImg: b8bg,
135
         bgImg: b8bg,
135
         defaultBg: b8,
136
         defaultBg: b8,
136
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546644',
137
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/0d563fa7-7a5c-46fe-bddc-dbb9cdfba160-20181205094436.jpg',
137
         CustomerImg: '',
138
         CustomerImg: '',
138
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b8.jpg',
139
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b8.jpg',
139
         ImgName: '8月',
140
         ImgName: '8月',
140
         Sort: 9,
141
         Sort: 9,
141
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.17rem;object-fit: cover;',
142
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.17rem;object-fit: cover;',
144
       {
145
       {
145
         bgImg: b9bg,
146
         bgImg: b9bg,
146
         defaultBg: b9,
147
         defaultBg: b9,
147
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546645',
148
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/44f83cc7-f57b-472d-b65b-84b5b10babc7-20181205094453.jpg',
148
         CustomerImg: '',
149
         CustomerImg: '',
149
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b9.jpg',
150
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b9.jpg',
150
         ImgName: '9月',
151
         ImgName: '9月',
151
         Sort: 10,
152
         Sort: 10,
152
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
153
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
155
       {
156
       {
156
         bgImg: b10bg,
157
         bgImg: b10bg,
157
         defaultBg: b10,
158
         defaultBg: b10,
158
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546646',
159
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/6cf9a507-87c2-47f9-ad15-990032ecdaac-20181205094510.jpg',
159
         CustomerImg: '',
160
         CustomerImg: '',
160
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b10.jpg',
161
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b10.jpg',
161
         ImgName: '10月',
162
         ImgName: '10月',
162
         Sort: 11,
163
         Sort: 11,
163
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
164
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
166
       {
167
       {
167
         bgImg: b11bg,
168
         bgImg: b11bg,
168
         defaultBg: b11,
169
         defaultBg: b11,
169
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546647',
170
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/2e8d2090-c528-4f37-8964-201a638e17ed-20181205094529.jpg',
170
         CustomerImg: '',
171
         CustomerImg: '',
171
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b11.jpg',
172
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b11.jpg',
172
         ImgName: '11月',
173
         ImgName: '11月',
173
         Sort: 12,
174
         Sort: 12,
174
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.16rem;object-fit: cover;',
175
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.16rem;object-fit: cover;',
177
       {
178
       {
178
         bgImg: b12bg,
179
         bgImg: b12bg,
179
         defaultBg: b12,
180
         defaultBg: b12,
180
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543546648',
181
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/e36c0bd2-5a48-42f0-86c6-99a56bb27210-20181205094545.jpg',
181
         CustomerImg: '',
182
         CustomerImg: '',
182
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b12.jpg',
183
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b12.jpg',
183
         ImgName: '12月',
184
         ImgName: '12月',
184
         Sort: 13,
185
         Sort: 13,
185
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
186
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
190
       {
191
       {
191
         bgImg: coverRed,
192
         bgImg: coverRed,
192
         defaultBg: '',
193
         defaultBg: '',
193
-        CalendarImg: coverRed,
194
+        CalendarImg: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverRed.jpg',
194
         CustomerImg: '',
195
         CustomerImg: '',
196
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverRed.jpg',
195
         ImgName: '封面',
197
         ImgName: '封面',
196
         Sort: 1,
198
         Sort: 1,
197
         style: ''
199
         style: ''
199
       {
201
       {
200
         bgImg: r1bg,
202
         bgImg: r1bg,
201
         defaultBg: b1,
203
         defaultBg: b1,
202
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543557398',
204
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/de1214b4-2984-4d42-b224-66ea4f199b83-20181205094956.jpg',
203
         CustomerImg: '',
205
         CustomerImg: '',
204
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b1.jpg',
206
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b1.jpg',
205
         ImgName: '1月',
207
         ImgName: '1月',
206
         Sort: 2,
208
         Sort: 2,
207
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.25rem;left:50%;transform:translateX(-50%);object-fit: cover;',
209
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.25rem;left:50%;transform:translateX(-50%);object-fit: cover;',
210
       {
212
       {
211
         bgImg: r2bg,
213
         bgImg: r2bg,
212
         defaultBg: b2,
214
         defaultBg: b2,
213
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556811',
215
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/c5d961ed-6a8e-401a-b371-19e3c7be070a-20181205095012.jpg',
214
         CustomerImg: '',
216
         CustomerImg: '',
215
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b2.jpg',
217
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b2.jpg',
216
         ImgName: '2月',
218
         ImgName: '2月',
217
         Sort: 3,
219
         Sort: 3,
218
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
220
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
221
       {
223
       {
222
         bgImg: r3bg,
224
         bgImg: r3bg,
223
         defaultBg: b3,
225
         defaultBg: b3,
224
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543557399',
226
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/390afecc-e7f9-4643-beaf-e696de93f2bf-20181205095032.jpg',
225
         CustomerImg: '',
227
         CustomerImg: '',
226
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b3.jpg',
228
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b3.jpg',
227
         ImgName: '3月',
229
         ImgName: '3月',
228
         Sort: 4,
230
         Sort: 4,
229
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;right:0.16rem;object-fit: cover;',
231
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;right:0.16rem;object-fit: cover;',
232
       {
234
       {
233
         bgImg: r4bg,
235
         bgImg: r4bg,
234
         defaultBg: b4,
236
         defaultBg: b4,
235
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543557400',
237
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/52015d95-f4a3-44bc-9650-79750c3a8a55-20181205095057.jpg',
236
         CustomerImg: '',
238
         CustomerImg: '',
237
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b4.jpg',
239
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b4.jpg',
238
         ImgName: '4月',
240
         ImgName: '4月',
239
         Sort: 5,
241
         Sort: 5,
240
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50.5%);object-fit: cover;',
242
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50.5%);object-fit: cover;',
243
       {
245
       {
244
         bgImg: r5bg,
246
         bgImg: r5bg,
245
         defaultBg: b5,
247
         defaultBg: b5,
246
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556813',
248
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/2ea3e866-151b-4a38-8899-778113672e4b-20181205095118.jpg',
247
         CustomerImg: '',
249
         CustomerImg: '',
248
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b5.jpg',
250
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b5.jpg',
249
         ImgName: '5月',
251
         ImgName: '5月',
250
         Sort: 6,
252
         Sort: 6,
251
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
253
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
254
       {
256
       {
255
         bgImg: r6bg,
257
         bgImg: r6bg,
256
         defaultBg: b6,
258
         defaultBg: b6,
257
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556814',
259
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/23c4e345-addf-40cd-b383-658f2a998367-20181205095139.jpg',
258
         CustomerImg: '',
260
         CustomerImg: '',
259
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b6.jpg',
261
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b6.jpg',
260
         ImgName: '6月',
262
         ImgName: '6月',
261
         Sort: 7,
263
         Sort: 7,
262
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.24rem;right:0.16rem;object-fit: cover;',
264
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.24rem;right:0.16rem;object-fit: cover;',
265
       {
267
       {
266
         bgImg: r7bg,
268
         bgImg: r7bg,
267
         defaultBg: b7,
269
         defaultBg: b7,
268
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543560521',
270
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/f686a7cd-b7d1-4501-aaad-177c10377618-20181205095200.jpg',
269
         CustomerImg: '',
271
         CustomerImg: '',
270
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b7.jpg',
272
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b7.jpg',
271
         ImgName: '7月',
273
         ImgName: '7月',
272
         Sort: 8,
274
         Sort: 8,
273
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
275
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
276
       {
278
       {
277
         bgImg: r8bg,
279
         bgImg: r8bg,
278
         defaultBg: b8,
280
         defaultBg: b8,
279
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556815',
281
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/04d53ced-f552-4986-8f53-8ddc52f2ea9f-20181205095229.jpg',
280
         CustomerImg: '',
282
         CustomerImg: '',
281
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b8.jpg',
283
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b8.jpg',
282
         ImgName: '8月',
284
         ImgName: '8月',
283
         Sort: 9,
285
         Sort: 9,
284
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.17rem;object-fit: cover;',
286
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.17rem;object-fit: cover;',
287
       {
289
       {
288
         bgImg: r9bg,
290
         bgImg: r9bg,
289
         defaultBg: b9,
291
         defaultBg: b9,
290
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543557403',
292
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/e8c6cf08-9036-4e50-9c2f-4ebc5d79f4d5-20181205095248.jpg',
291
         CustomerImg: '',
293
         CustomerImg: '',
292
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b9.jpg',
294
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b9.jpg',
293
         ImgName: '9月',
295
         ImgName: '9月',
294
         Sort: 10,
296
         Sort: 10,
295
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
297
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
298
       {
300
       {
299
         bgImg: r10bg,
301
         bgImg: r10bg,
300
         defaultBg: b10,
302
         defaultBg: b10,
301
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556816',
303
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/2c5cceb6-f418-4e49-bba6-bbd9f36eec2c-20181205095306.jpg',
302
         CustomerImg: '',
304
         CustomerImg: '',
303
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b10.jpg',
305
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b10.jpg',
304
         ImgName: '10月',
306
         ImgName: '10月',
305
         Sort: 11,
307
         Sort: 11,
306
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
308
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
309
       {
311
       {
310
         bgImg: r11bg,
312
         bgImg: r11bg,
311
         defaultBg: b11,
313
         defaultBg: b11,
312
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556817',
314
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/e471c47e-2142-47e1-ad26-abe87af7b168-20181205095320.jpg',
313
         CustomerImg: '',
315
         CustomerImg: '',
314
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b11.jpg',
316
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b11.jpg',
315
         ImgName: '11月',
317
         ImgName: '11月',
316
         Sort: 12,
318
         Sort: 12,
317
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.16rem;object-fit: cover;',
319
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.16rem;object-fit: cover;',
320
       {
322
       {
321
         bgImg: r12bg,
323
         bgImg: r12bg,
322
         defaultBg: b12,
324
         defaultBg: b12,
323
-        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/blob1543556818',
325
+        CalendarImg: 'http://spaceofcheng.oss-cn-beijing.aliyuncs.com/0592e7b4-f7c5-44dd-a557-e20b282e60ca-20181205095342.jpg',
324
         CustomerImg: '',
326
         CustomerImg: '',
325
-        defaultNoUser:'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b12.jpg',
327
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/b12.jpg',
326
         ImgName: '12月',
328
         ImgName: '12月',
327
         Sort: 13,
329
         Sort: 13,
328
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
330
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',

+ 17
- 11
src/util/ajax.js View File

21
   withCredentials: true,
21
   withCredentials: true,
22
   queryData: {},
22
   queryData: {},
23
   urlData: {},
23
   urlData: {},
24
+  headerData: '',
24
   headers: {
25
   headers: {
25
     'Content-Type': 'multipart/form-data',
26
     'Content-Type': 'multipart/form-data',
26
     'authorization': token()
27
     'authorization': token()
29
 
30
 
30
 Axios.interceptors.request.use((config) => {
31
 Axios.interceptors.request.use((config) => {
31
   config.headers.authorization = token()
32
   config.headers.authorization = token()
33
+  config.headers['Content-Type'] = config.headerData ? config.headerData : 'multipart/form-data'
32
   // config.urlData = { ...config.urlData,  }
34
   // config.urlData = { ...config.urlData,  }
33
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
35
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
34
   let urlData = qs.stringify(config.urlData)
36
   let urlData = qs.stringify(config.urlData)
44
   if (queryData) {
46
   if (queryData) {
45
     config.url += '?' + queryData
47
     config.url += '?' + queryData
46
   }
48
   }
47
-  let fm = new FormData()
48
-  for (let k in config.data) {
49
-    if (Array.isArray(config.data[k])) {
50
-      config.data[k].forEach((v) => {
51
-        fm.append(k, v)
52
-      })
53
-    } else {
54
-      fm.append(k, config.data[k])
49
+  if (config.headerData) {
50
+    return config
51
+  } else {
52
+    let fm = new FormData()
53
+    for (let k in config.data) {
54
+      if (Array.isArray(config.data[k])) {
55
+        config.data[k].forEach((v) => {
56
+          fm.append(k, v)
57
+        })
58
+      } else {
59
+        fm.append(k, config.data[k])
60
+      }
55
     }
61
     }
62
+    config.data = fm
63
+    return config
56
   }
64
   }
57
-  config.data = fm
58
-  return config
59
 }, (error) => {
65
 }, (error) => {
60
   console.log(error)
66
   console.log(error)
61
 })
67
 })
81
       } else if (code === 405) {
87
       } else if (code === 405) {
82
         // console.log(router.history.current.name)
88
         // console.log(router.history.current.name)
83
         // if (router.history.current.name !== 'bindMobile') {
89
         // if (router.history.current.name !== 'bindMobile') {
84
-          router.push({ name: 'login' })
90
+        router.push({ name: 'login' })
85
         // }
91
         // }
86
       } else {
92
       } else {
87
         if (message.indexOf("log-error") != -1) {
93
         if (message.indexOf("log-error") != -1) {

+ 4
- 0
src/util/api.js View File

9
     image: { // 图片上传
9
     image: { // 图片上传
10
       method: 'post',
10
       method: 'post',
11
       url: `${baseUrl}${common}/file`
11
       url: `${baseUrl}${common}/file`
12
+    },
13
+    base64: {
14
+      method: 'post',
15
+      url: `${baseUrl}${common}/file/base64`
12
     }
16
     }
13
   },
17
   },
14
   index: { // 首页
18
   index: { // 首页

+ 27
- 0
src/util/util.js View File

80
         resolve(result)
80
         resolve(result)
81
       }).catch(reject)
81
       }).catch(reject)
82
     })
82
     })
83
+  },
84
+  uploadGzip (obj) {
85
+    return new Promise((resolve, reject) => {
86
+      Ajax({
87
+        ...api.file.image,
88
+        headerData: obj.header,
89
+        data: obj.gzip,
90
+      }).then((res) => {
91
+        resolve(res)
92
+      }).catch(reject)
93
+    })
94
+  },
95
+  uploadBase64 (base64) {
96
+    return new Promise((resolve, reject) => {
97
+      Ajax({
98
+        ...api.file.base64,
99
+        queryData: {
100
+          namestr: base64.namestr
101
+        },
102
+        data: { base64str: base64.base64str },
103
+      }).then((res) => {
104
+        let result = {
105
+          result: res
106
+        }
107
+        resolve(result)
108
+      }).catch(reject)
109
+    })
83
   }
110
   }
84
 }
111
 }
85
 
112