yuantianjiao 6 年 前
コミット
8eb7d3460f

+ 2
- 0
package.json ファイルの表示

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

バイナリ
src/common/icon/honhse.png ファイルの表示


+ 19
- 1
src/pages/user/App.vue ファイルの表示

@@ -8,6 +8,9 @@
8 8
 import '../../common/css/reset.css'
9 9
 import { mapState, createNamespacedHelpers } from 'vuex'
10 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 14
 export default {
12 15
   name: 'app',
13 16
   data () {
@@ -29,10 +32,25 @@ export default {
29 32
       this.code = null
30 33
     }
31 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 52
   methods: {
53
+    ...mapIndexActions(['setLocation']),
36 54
     ...actions(['getUserInfo'])
37 55
   }
38 56
 }

+ 6
- 0
src/pages/user/activeList/activeList.vue ファイルの表示

@@ -27,6 +27,7 @@ export default {
27 27
 <style lang="scss" scoped>
28 28
 .content {
29 29
   padding: 0 0 0 0.1rem;
30
+  background: #fff;
30 31
   .list {
31 32
     width: 100%;
32 33
     height: 0.8rem;
@@ -48,6 +49,11 @@ export default {
48 49
       text-overflow: ellipsis;
49 50
       white-space: nowrap;
50 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 ファイルの表示

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

+ 17
- 10
src/pages/user/calendar/calendar.vue ファイルの表示

@@ -5,17 +5,17 @@
5 5
     </div>
6 6
     <div class="middle">
7 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 10
     </div>
11 11
     <div class="bottom">
12 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 19
     </div>
20 20
     <div class="btn">
21 21
       <div v-if="state === 1" @click="toCheckModel">立即参与</div>
@@ -26,6 +26,7 @@
26 26
 </template>
27 27
 
28 28
 <script>
29
+import wxsdk from '../../../util/share'
29 30
 import { mapState, createNamespacedHelpers } from 'vuex'
30 31
 const { mapActions: mapMakingActions } = createNamespacedHelpers('making')
31 32
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
@@ -35,10 +36,16 @@ export default {
35 36
     return {
36 37
       topImg,
37 38
       state: 1,
38
-      endTime: "2018/12/22 00:00:00"
39
+      endTime: "2018/12/19 00:00:00"
39 40
     }
40 41
   },
41 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 49
     this.getUserInfo({ org: this.org }).then(() => {
43 50
       this.getCalendarCustomer().then((res) => {
44 51
         if (res) {
@@ -67,7 +74,7 @@ export default {
67 74
     toCheckModel () {
68 75
       if (!this.userInfo.customer.Phone) {
69 76
         this.$dialog.confirm({
70
-          title: '标题',
77
+          title: '提示',
71 78
           message: '您还不是注册会员,注册成功后即可参与此活动'
72 79
         }).then(() => {
73 80
           // on confirm

+ 8
- 0
src/pages/user/calendar/checkModel.vue ファイルの表示

@@ -2,6 +2,7 @@
2 2
   <div class="content">
3 3
     <div @click="checkModel(1)">
4 4
       <img :src="coverBlack">
5
+      <p>主题一 (黑色)</p>
5 6
       <div>
6 7
         <img v-if="check === 1" :src="checked" alt>
7 8
         <img v-if="check === 2" :src="unchecked" alt>
@@ -9,6 +10,7 @@
9 10
     </div>
10 11
     <div @click="checkModel(2)">
11 12
       <img :src="coverRed">
13
+      <p>主题二 (红色)</p>
12 14
       <div>
13 15
         <img v-if="check === 2" :src="checked" alt>
14 16
         <img v-if="check === 1" :src="unchecked" alt>
@@ -57,6 +59,12 @@ export default {
57 59
     > img {
58 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 68
     div {
61 69
       position: absolute;
62 70
       right: 0.2rem;

+ 24
- 13
src/pages/user/calendar/making.vue ファイルの表示

@@ -153,7 +153,7 @@ export default {
153 153
       bannerRed: item => item.bannerRed
154 154
     }),
155 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 157
         return '横'
158 158
       } else {
159 159
         return '竖'
@@ -170,7 +170,7 @@ export default {
170 170
   methods: {
171 171
     ...mapMakingActions(['setBanner', 'calendar']),
172 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 174
       this.setBanner({ type: this.$route.query.type, data: JSON.parse(JSON.stringify(this.banner)) })
175 175
       console.log(this.banner)
176 176
       let cutDoms = document.getElementsByClassName('cutDom')[0]
@@ -216,8 +216,8 @@ export default {
216 216
         delete curr['defaultBg']
217 217
         delete curr['style']
218 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 222
         delete curr['defaultNoUser']
223 223
       });
@@ -262,17 +262,28 @@ export default {
262 262
           context.webkitImageSmoothingEnabled = false;
263 263
           context.msImageSmoothingEnabled = false;
264 264
           context.imageSmoothingEnabled = false;
265
-
265
+          console.log(canvas.toDataURL('image/jpeg', 0.8))
266 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 287
             that.banner[i].CalendarImg = res.result.url
277 288
             that.setBanner({ type: that.$route.query.type, data: JSON.parse(JSON.stringify(that.banner)) })
278 289
             resolve()

+ 2
- 2
src/pages/user/courseList/index.vue ファイルの表示

@@ -84,9 +84,9 @@ export default {
84 84
             id: item.CourseId,
85 85
             title: item.CourseName,
86 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 88
             address: item.CaseAddress,
89
-            tag: '',
89
+            tag: item.CourseTags,
90 90
             courseType: '团体课',
91 91
             defaultPrice: item.Price + '/节',
92 92
             getWay: 'ticket',

+ 6
- 2
src/pages/user/customization/customizationDetail.vue ファイルの表示

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

+ 12
- 3
src/pages/user/customization/customizationList.vue ファイルの表示

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

+ 43
- 43
src/pages/user/mainPage/indexPage/index.vue ファイルの表示

@@ -29,13 +29,18 @@
29 29
     </div>
30 30
     <div class="areaHeader flex-h">
31 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 33
     </div>
34 34
     <div class="areaContent">
35 35
       <div class="scroll-h find">
36 36
         <div>
37 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 44
               <router-link
40 45
                 tag="div"
41 46
                 :to="{ name:'majorProjects', query:{ id: item.CmsCaseId } }"
@@ -54,13 +59,18 @@
54 59
     </div>
55 60
     <div class="areaHeader flex-h" v-if="courseList.length>0">
56 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 63
     </div>
59
-    <div class="areaContent" :hidden="!courseList.length">
64
+    <div class="areaContent" v-if="courseList.length>0">
60 65
       <div class="scroll-h course">
61 66
         <div>
62 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 74
               <router-link
65 75
                 tag="div"
66 76
                 :to="{ name:'majorProjectsDetail', query:{ id: item.CourseId } }"
@@ -73,7 +83,7 @@
73 83
                 <div class="price">
74 84
                   <span>¥{{item.Price}}</span>
75 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 87
                 <span>{{item.CaseName}}</span>
78 88
               </router-link>
79 89
             </swiper-slide>
@@ -88,7 +98,13 @@
88 98
       <div class="flex-item">
89 99
         <div>
90 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 108
               <a class="img">
93 109
                 <img :src="item.ImageUrl" class="centerLabel cover" alt>
94 110
               </a>
@@ -111,8 +127,6 @@ import { swiper, swiperSlide } from 'vue-awesome-swiper'
111 127
 import 'swiper/dist/css/swiper.css'
112 128
 import { mapState, createNamespacedHelpers } from 'vuex'
113 129
 const { mapState: mapIndexState, mapActions: mapIndexActions } = createNamespacedHelpers('index')
114
-const wx = require('weixin-js-sdk')
115
-import wxsdk from '@/util/share'
116 130
 export default {
117 131
   name: '',
118 132
   data () {
@@ -160,47 +174,33 @@ export default {
160 174
     swiperSlide
161 175
   },
162 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 202
   methods: {
203
-    ...mapIndexActions(['getIndexLocation', 'getIndexInfo', 'getCourseList', 'setLocation']),
203
+    ...mapIndexActions(['getIndexLocation', 'getIndexInfo', 'getCourseList']),
204 204
     jump (item) {
205 205
       item.ForwardType = item.ForwardType || ''
206 206
       if (item.ForwardType === 'url') {

+ 7
- 4
src/pages/user/mainPage/indexPage/page.scss ファイルの表示

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

+ 1
- 31
src/pages/user/majorProjectsList/index.vue ファイルの表示

@@ -33,10 +33,7 @@
33 33
 </template>
34 34
 
35 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 37
 export default {
41 38
   name: '',
42 39
   data () {
@@ -45,35 +42,8 @@ export default {
45 42
   },
46 43
   computed: {
47 44
     ...mapState({
48
-      orgid: x => x.app.orgId,
49 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 49
 </script>

+ 1
- 1
src/pages/user/majorProjectsList/page.scss ファイルの表示

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

+ 7
- 2
src/store/index/index.js ファイルの表示

@@ -118,8 +118,13 @@ export default {
118 118
       let arr = []
119 119
       let dataNew = []
120 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 129
       arr.sort((a, b) => { return a - b })
125 130
       arr.forEach((curr) => {

+ 52
- 50
src/store/making/index.js ファイルの表示

@@ -47,8 +47,9 @@ export default {
47 47
       {
48 48
         bgImg: coverBlack,
49 49
         defaultBg: '',
50
-        CalendarImg: coverBlack,
50
+        CalendarImg: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverBlack.jpg',
51 51
         CustomerImg: '',
52
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverBlack.jpg',
52 53
         ImgName: '封面',
53 54
         Sort: 1,
54 55
         style: ''
@@ -56,9 +57,9 @@ export default {
56 57
       {
57 58
         bgImg: b1bg,
58 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 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 63
         ImgName: '1月',
63 64
         Sort: 2,
64 65
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.25rem;left:50%;transform:translateX(-50%);object-fit: cover;',
@@ -67,9 +68,9 @@ export default {
67 68
       {
68 69
         bgImg: b2bg,
69 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 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 74
         ImgName: '2月',
74 75
         Sort: 3,
75 76
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
@@ -78,9 +79,9 @@ export default {
78 79
       {
79 80
         bgImg: b3bg,
80 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 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 85
         ImgName: '3月',
85 86
         Sort: 4,
86 87
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;right:0.16rem;object-fit: cover;',
@@ -89,9 +90,9 @@ export default {
89 90
       {
90 91
         bgImg: b4bg,
91 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 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 96
         ImgName: '4月',
96 97
         Sort: 5,
97 98
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50.5%);object-fit: cover;',
@@ -100,9 +101,9 @@ export default {
100 101
       {
101 102
         bgImg: b5bg,
102 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 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 107
         ImgName: '5月',
107 108
         Sort: 6,
108 109
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
@@ -111,9 +112,9 @@ export default {
111 112
       {
112 113
         bgImg: b6bg,
113 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 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 118
         ImgName: '6月',
118 119
         Sort: 7,
119 120
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.24rem;right:0.16rem;object-fit: cover;',
@@ -122,9 +123,9 @@ export default {
122 123
       {
123 124
         bgImg: b7bg,
124 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 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 129
         ImgName: '7月',
129 130
         Sort: 8,
130 131
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
@@ -133,9 +134,9 @@ export default {
133 134
       {
134 135
         bgImg: b8bg,
135 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 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 140
         ImgName: '8月',
140 141
         Sort: 9,
141 142
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.17rem;object-fit: cover;',
@@ -144,9 +145,9 @@ export default {
144 145
       {
145 146
         bgImg: b9bg,
146 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 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 151
         ImgName: '9月',
151 152
         Sort: 10,
152 153
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
@@ -155,9 +156,9 @@ export default {
155 156
       {
156 157
         bgImg: b10bg,
157 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 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 162
         ImgName: '10月',
162 163
         Sort: 11,
163 164
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
@@ -166,9 +167,9 @@ export default {
166 167
       {
167 168
         bgImg: b11bg,
168 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 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 173
         ImgName: '11月',
173 174
         Sort: 12,
174 175
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.16rem;object-fit: cover;',
@@ -177,9 +178,9 @@ export default {
177 178
       {
178 179
         bgImg: b12bg,
179 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 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 184
         ImgName: '12月',
184 185
         Sort: 13,
185 186
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
@@ -190,8 +191,9 @@ export default {
190 191
       {
191 192
         bgImg: coverRed,
192 193
         defaultBg: '',
193
-        CalendarImg: coverRed,
194
+        CalendarImg: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverRed.jpg',
194 195
         CustomerImg: '',
196
+        defaultNoUser: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/calendar/coverRed.jpg',
195 197
         ImgName: '封面',
196 198
         Sort: 1,
197 199
         style: ''
@@ -199,9 +201,9 @@ export default {
199 201
       {
200 202
         bgImg: r1bg,
201 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 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 207
         ImgName: '1月',
206 208
         Sort: 2,
207 209
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.25rem;left:50%;transform:translateX(-50%);object-fit: cover;',
@@ -210,9 +212,9 @@ export default {
210 212
       {
211 213
         bgImg: r2bg,
212 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 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 218
         ImgName: '2月',
217 219
         Sort: 3,
218 220
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
@@ -221,9 +223,9 @@ export default {
221 223
       {
222 224
         bgImg: r3bg,
223 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 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 229
         ImgName: '3月',
228 230
         Sort: 4,
229 231
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;right:0.16rem;object-fit: cover;',
@@ -232,9 +234,9 @@ export default {
232 234
       {
233 235
         bgImg: r4bg,
234 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 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 240
         ImgName: '4月',
239 241
         Sort: 5,
240 242
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50.5%);object-fit: cover;',
@@ -243,9 +245,9 @@ export default {
243 245
       {
244 246
         bgImg: r5bg,
245 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 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 251
         ImgName: '5月',
250 252
         Sort: 6,
251 253
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.23rem;left:0.15rem;object-fit: cover;',
@@ -254,9 +256,9 @@ export default {
254 256
       {
255 257
         bgImg: r6bg,
256 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 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 262
         ImgName: '6月',
261 263
         Sort: 7,
262 264
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.24rem;right:0.16rem;object-fit: cover;',
@@ -265,9 +267,9 @@ export default {
265 267
       {
266 268
         bgImg: r7bg,
267 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 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 273
         ImgName: '7月',
272 274
         Sort: 8,
273 275
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
@@ -276,9 +278,9 @@ export default {
276 278
       {
277 279
         bgImg: r8bg,
278 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 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 284
         ImgName: '8月',
283 285
         Sort: 9,
284 286
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.17rem;object-fit: cover;',
@@ -287,9 +289,9 @@ export default {
287 289
       {
288 290
         bgImg: r9bg,
289 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 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 295
         ImgName: '9月',
294 296
         Sort: 10,
295 297
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',
@@ -298,9 +300,9 @@ export default {
298 300
       {
299 301
         bgImg: r10bg,
300 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 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 306
         ImgName: '10月',
305 307
         Sort: 11,
306 308
         style: 'width:1.44rem;height:.94rem;position:absolute;top:.24rem;left:50%;transform:translateX(-50%);object-fit: cover;',
@@ -309,9 +311,9 @@ export default {
309 311
       {
310 312
         bgImg: r11bg,
311 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 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 317
         ImgName: '11月',
316 318
         Sort: 12,
317 319
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;left:0.16rem;object-fit: cover;',
@@ -320,9 +322,9 @@ export default {
320 322
       {
321 323
         bgImg: r12bg,
322 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 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 328
         ImgName: '12月',
327 329
         Sort: 13,
328 330
         style: 'width:1.01rem;height:1.18rem;position:absolute;top:.2rem;right:0.16rem;object-fit: cover;',

+ 17
- 11
src/util/ajax.js ファイルの表示

@@ -21,6 +21,7 @@ const Axios = axios.create({
21 21
   withCredentials: true,
22 22
   queryData: {},
23 23
   urlData: {},
24
+  headerData: '',
24 25
   headers: {
25 26
     'Content-Type': 'multipart/form-data',
26 27
     'authorization': token()
@@ -29,6 +30,7 @@ const Axios = axios.create({
29 30
 
30 31
 Axios.interceptors.request.use((config) => {
31 32
   config.headers.authorization = token()
33
+  config.headers['Content-Type'] = config.headerData ? config.headerData : 'multipart/form-data'
32 34
   // config.urlData = { ...config.urlData,  }
33 35
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
34 36
   let urlData = qs.stringify(config.urlData)
@@ -44,18 +46,22 @@ Axios.interceptors.request.use((config) => {
44 46
   if (queryData) {
45 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 65
 }, (error) => {
60 66
   console.log(error)
61 67
 })
@@ -81,7 +87,7 @@ const ajax = (...args) => {
81 87
       } else if (code === 405) {
82 88
         // console.log(router.history.current.name)
83 89
         // if (router.history.current.name !== 'bindMobile') {
84
-          router.push({ name: 'login' })
90
+        router.push({ name: 'login' })
85 91
         // }
86 92
       } else {
87 93
         if (message.indexOf("log-error") != -1) {

+ 4
- 0
src/util/api.js ファイルの表示

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

+ 27
- 0
src/util/util.js ファイルの表示

@@ -80,6 +80,33 @@ const toolClass = {
80 80
         resolve(result)
81 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