正在显示
9 个修改的文件
包含
87 行增加
和
97 行删除
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | - | ||
4 | "pages/start/start", | 3 | "pages/start/start", |
5 | "pages/chooseadress/chooseadress", | 4 | "pages/chooseadress/chooseadress", |
6 | "pages/share_record/share_record", | 5 | "pages/share_record/share_record", |
7 | "pages/index/index", | 6 | "pages/index/index", |
8 | "pages/poster/poster", | 7 | "pages/poster/poster", |
9 | "pages/record/record", | 8 | "pages/record/record", |
10 | - "pages/share_code/share_code" | ||
11 | - | 9 | + "pages/share_code/share_code" |
12 | ], | 10 | ], |
13 | "window": { | 11 | "window": { |
14 | "backgroundTextStyle": "light", | 12 | "backgroundTextStyle": "light", |
@@ -100,9 +100,7 @@ Page({ | @@ -100,9 +100,7 @@ Page({ | ||
100 | } | 100 | } |
101 | } | 101 | } |
102 | }) | 102 | }) |
103 | - } | ||
104 | - | ||
105 | - | 103 | + } |
106 | }, | 104 | }, |
107 | //设置关键词 | 105 | //设置关键词 |
108 | choosekeyword(e){ | 106 | choosekeyword(e){ |
@@ -368,10 +366,10 @@ Page({ | @@ -368,10 +366,10 @@ Page({ | ||
368 | var width = 600; | 366 | var width = 600; |
369 | var size = width + "*" + height; | 367 | var size = width + "*" + height; |
370 | myAmapFun.getStaticmap({ | 368 | myAmapFun.getStaticmap({ |
371 | - zoom: 9, | 369 | + zoom: 8, |
372 | size: size, | 370 | size: size, |
373 | - scale: 1, | ||
374 | - location: "120.644312,31.421561",//中心点苏州火车北站 | 371 | + scale: 2, |
372 | + location: "120.629029,31.32416",//中心点苏州拙政园 | ||
375 | markers: markers, | 373 | markers: markers, |
376 | success: function (data) { | 374 | success: function (data) { |
377 | wx.setStorageSync('staticsrc', data.url) | 375 | wx.setStorageSync('staticsrc', data.url) |
@@ -398,11 +396,11 @@ Page({ | @@ -398,11 +396,11 @@ Page({ | ||
398 | for (let item of obj.children){ | 396 | for (let item of obj.children){ |
399 | if (item.check){ | 397 | if (item.check){ |
400 | tempLocation.push(item.coordinate) | 398 | tempLocation.push(item.coordinate) |
401 | - if(locationurl==''){ | ||
402 | - locationurl = item.coordinate; | ||
403 | - }else{ | 399 | + // if(locationurl==''){ |
400 | + // locationurl = item.coordinate; | ||
401 | + // }else{ | ||
404 | locationurl += '|' + item.coordinate; | 402 | locationurl += '|' + item.coordinate; |
405 | - } | 403 | + // } |
406 | staticmarkers += (';'+ item.coordinate); | 404 | staticmarkers += (';'+ item.coordinate); |
407 | } | 405 | } |
408 | } | 406 | } |
@@ -10,10 +10,10 @@ | @@ -10,10 +10,10 @@ | ||
10 | <text>{{item.name}}</text> | 10 | <text>{{item.name}}</text> |
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | - <view class='main_rigth' wx:if='{{showright}}'> | 13 | + <view class="main_rigth {{showright?'heiht80':''}}" wx:if='{{showright}}'> |
14 | <view class="rigth_cell {{item.check?'activity_cell':''}}" wx:for='{{cityList[currentindex].children}}' data-index='{{index}}' wx:key bindtap='choosetwo'>{{item.scenic_name}}</view> | 14 | <view class="rigth_cell {{item.check?'activity_cell':''}}" wx:for='{{cityList[currentindex].children}}' data-index='{{index}}' wx:key bindtap='choosetwo'>{{item.scenic_name}}</view> |
15 | </view> | 15 | </view> |
16 | - <view class='main_rigth' wx:else> | 16 | + <view class="main_rigth {{showright?'':'heiht100'}}" wx:else> |
17 | <view class='seach_box'> | 17 | <view class='seach_box'> |
18 | <view class='seach_text'> | 18 | <view class='seach_text'> |
19 | <input placeholder='请输入地点' bindinput='setkeyword' | 19 | <input placeholder='请输入地点' bindinput='setkeyword' |
@@ -81,11 +81,17 @@ page{ | @@ -81,11 +81,17 @@ page{ | ||
81 | } | 81 | } |
82 | .main_rigth{ | 82 | .main_rigth{ |
83 | width:560rpx; | 83 | width:560rpx; |
84 | - height: 100%; | 84 | + height: 80%; |
85 | overflow-x: hidden; | 85 | overflow-x: hidden; |
86 | overflow-y: auto; | 86 | overflow-y: auto; |
87 | 87 | ||
88 | } | 88 | } |
89 | +.heiht80{ | ||
90 | + height: 80%; | ||
91 | +} | ||
92 | +.heiht100{ | ||
93 | + height: 100%; | ||
94 | +} | ||
89 | .rigth_cell{ | 95 | .rigth_cell{ |
90 | display: inline-block; | 96 | display: inline-block; |
91 | padding: 0 34rpx; | 97 | padding: 0 34rpx; |
@@ -164,64 +164,65 @@ Page({ | @@ -164,64 +164,65 @@ Page({ | ||
164 | }, | 164 | }, |
165 | //保存图片 | 165 | //保存图片 |
166 | saveImg() { | 166 | saveImg() { |
167 | - wx.showToast({ | ||
168 | - title: '正在开发中~', | ||
169 | - icon: 'none', | ||
170 | - duration: 2000, | ||
171 | - }) | 167 | + |
172 | let that=this; | 168 | let that=this; |
173 | - let params = { | ||
174 | - pages: '/pages/share_record/share_record', | ||
175 | - scene: that.data.poster_id, | ||
176 | - } | ||
177 | - // let params={ | ||
178 | - // file: wx.getStorageSync('staticsrc'), | ||
179 | - // poster_id: that.data.poster_id, | ||
180 | - // page: '/pages/share_record/share_record' | 169 | + // let params = { |
170 | + // pages: '/pages/share_record/share_record', | ||
171 | + // scene: that.data.poster_id, | ||
181 | // } | 172 | // } |
182 | - let url = 'home/home/code'; | ||
183 | - // let url = 'home/home/poster'; | 173 | + console.log(typeof wx.getStorageSync('staticsrc')) |
174 | + let params={ | ||
175 | + file: wx.getStorageSync('staticsrc'), | ||
176 | + poster_id: that.data.poster_id, | ||
177 | + page: 'pages/start/start' | ||
178 | + } | ||
179 | + // let url = 'home/home/code'; | ||
180 | + let url = 'home/home/poster'; | ||
184 | app.post(url, params,{}).then((res) => { | 181 | app.post(url, params,{}).then((res) => { |
185 | - console.log(res) | ||
186 | - // let imgUrl = res | ||
187 | - // wx.showLoading({ | ||
188 | - // title: '加载中', | ||
189 | - // }) | ||
190 | - // wx.downloadFile({ | ||
191 | - // url: imgUrl, | ||
192 | - // success: function (res) { | ||
193 | - // wx.saveImageToPhotosAlbum({ | ||
194 | - // filePath: res.tempFilePath, | ||
195 | - // success: function (res) { | ||
196 | - // wx.hideLoading() | ||
197 | - // wx.showToast({ | ||
198 | - // icon: 'none', | ||
199 | - // title: '图片保存成功,可以分享到朋友圈' | ||
200 | - // }) | ||
201 | - // }, | ||
202 | - // fail: function (res) { | ||
203 | - // wx.showToast({ | ||
204 | - // icon: 'none', | ||
205 | - // title: '图片保存失败' | ||
206 | - // }) | ||
207 | - // console.log(res) | ||
208 | - // } | ||
209 | - // }) | ||
210 | - // }, | ||
211 | - // fail: function (res) { | ||
212 | - // wx.showModal({ | ||
213 | - // title: '提示', | ||
214 | - // content: '图片保存失败,请重试', | ||
215 | - // showCancel: false | ||
216 | - // }) | ||
217 | - // } | ||
218 | - // }) | 182 | + |
183 | + if(res.code == 20000){ | ||
184 | + | ||
185 | + let imgUrl = res.url | ||
186 | + wx.showLoading({ | ||
187 | + title: '加载中', | ||
188 | + }) | ||
189 | + wx.downloadFile({ | ||
190 | + url: imgUrl, | ||
191 | + success: function (res) { | ||
192 | + wx.saveImageToPhotosAlbum({ | ||
193 | + filePath: res.tempFilePath, | ||
194 | + success: function (res) { | ||
195 | + wx.hideLoading() | ||
196 | + wx.showToast({ | ||
197 | + icon: 'none', | ||
198 | + title: '图片保存成功,可以分享到朋友圈' | ||
199 | + }) | ||
200 | + }, | ||
201 | + fail: function (res) { | ||
202 | + wx.showToast({ | ||
203 | + icon: 'none', | ||
204 | + title: '图片保存失败' | ||
205 | + }) | ||
206 | + console.log(res) | ||
207 | + } | ||
208 | + }) | ||
209 | + }, | ||
210 | + fail: function (res) { | ||
211 | + // wx.showModal({ | ||
212 | + // title: '提示', | ||
213 | + // content: '图片保存失败,请重试', | ||
214 | + // showCancel: false | ||
215 | + // }) | ||
216 | + } | ||
217 | + }) | ||
218 | + } | ||
219 | + | ||
219 | }).catch((errMsg) => { | 220 | }).catch((errMsg) => { |
220 | - wx.showModal({ | ||
221 | - title: '提示', | ||
222 | - content: errMsg, | ||
223 | - showCancel: false | ||
224 | - }) | 221 | + // wx.showModal({ |
222 | + // title: '提示', | ||
223 | + // content: errMsg, | ||
224 | + // showCancel: false | ||
225 | + // }) | ||
225 | }) | 226 | }) |
226 | }, | 227 | }, |
227 | /** | 228 | /** |
@@ -25,27 +25,30 @@ Page({ | @@ -25,27 +25,30 @@ Page({ | ||
25 | that.setData({ | 25 | that.setData({ |
26 | play: false | 26 | play: false |
27 | }) | 27 | }) |
28 | - | 28 | + bgM.src = that.data.musicsrc; |
29 | bgM.play(); | 29 | bgM.play(); |
30 | setTimeout(() => { | 30 | setTimeout(() => { |
31 | bgM.currentTime | 31 | bgM.currentTime |
32 | bgM.onTimeUpdate(() => { | 32 | bgM.onTimeUpdate(() => { |
33 | let palyrate = (parseInt(bgM.currentTime) / parseInt(bgM.duration)) * 100;//播放的百分比 | 33 | let palyrate = (parseInt(bgM.currentTime) / parseInt(bgM.duration)) * 100;//播放的百分比 |
34 | that.setData({ | 34 | that.setData({ |
35 | - startsec: (bgM.currentTime.toFixed(0) < 10 ? '0' + bgM.currentTime.toFixed(0) : bgM.currentTime.toFixed(0)) + ':00s', | ||
36 | - endsec: (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) + ':00s', | 35 | + startsec: '00:' + (bgM.currentTime.toFixed(0) < 10 ? '0' + bgM.currentTime.toFixed(0) : bgM.currentTime.toFixed(0)), |
36 | + endsec: '00:' + (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)), | ||
37 | palyrate: palyrate | 37 | palyrate: palyrate |
38 | }) | 38 | }) |
39 | }) | 39 | }) |
40 | bgM.onEnded(() => { | 40 | bgM.onEnded(() => { |
41 | that.setData({ | 41 | that.setData({ |
42 | - startsec: 0 + ':00s', | ||
43 | - endsec: (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) + ':00s', | 42 | + startsec: '00' + ':00', |
43 | + endsec: '00:' + (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)), | ||
44 | palyrate: 0, | 44 | palyrate: 0, |
45 | play: true | 45 | play: true |
46 | }) | 46 | }) |
47 | }) | 47 | }) |
48 | - }, 500) | 48 | + that.setData({ |
49 | + duration: bgM.duration | ||
50 | + }) | ||
51 | + }, 1000) | ||
49 | }, | 52 | }, |
50 | audioPause: function () {//暂停 | 53 | audioPause: function () {//暂停 |
51 | let that = this; | 54 | let that = this; |
@@ -97,7 +100,6 @@ Page({ | @@ -97,7 +100,6 @@ Page({ | ||
97 | } | 100 | } |
98 | }) | 101 | }) |
99 | }, | 102 | }, |
100 | - | ||
101 | makertap(e) { | 103 | makertap(e) { |
102 | console.log(e); | 104 | console.log(e); |
103 | var that = this; | 105 | var that = this; |
@@ -136,10 +138,8 @@ Page({ | @@ -136,10 +138,8 @@ Page({ | ||
136 | let that=this; | 138 | let that=this; |
137 | if (options.poster_id != undefined){ | 139 | if (options.poster_id != undefined){ |
138 | var poster_id = decodeURIComponent(options.poster_id) | 140 | var poster_id = decodeURIComponent(options.poster_id) |
139 | - | ||
140 | that.getdata(poster_id); | 141 | that.getdata(poster_id); |
141 | - } | ||
142 | - | 142 | + } |
143 | }, | 143 | }, |
144 | /** | 144 | /** |
145 | * 生命周期函数--监听页面初次渲染完成 | 145 | * 生命周期函数--监听页面初次渲染完成 |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <image src='../../images/bg@2x.jpg'></image> | 4 | <image src='../../images/bg@2x.jpg'></image> |
5 | <view class='top_text'> | 5 | <view class='top_text'> |
6 | <view class='mini_title'>去过的地方,就是连接起来的一段脚步音符</view> | 6 | <view class='mini_title'>去过的地方,就是连接起来的一段脚步音符</view> |
7 | - <view class='title'>来制作你的音乐logo吧</view> | 7 | + <view class='title'> 来听听我制作的音乐logo吧</view> |
8 | </view> | 8 | </view> |
9 | <view class='center_img'> | 9 | <view class='center_img'> |
10 | <view class='map_container'> | 10 | <view class='map_container'> |
@@ -33,21 +33,8 @@ | @@ -33,21 +33,8 @@ | ||
33 | "list": [] | 33 | "list": [] |
34 | }, | 34 | }, |
35 | "miniprogram": { | 35 | "miniprogram": { |
36 | - "current": 1, | ||
37 | - "list": [ | ||
38 | - { | ||
39 | - "id": -1, | ||
40 | - "name": "生成二维码", | ||
41 | - "pathName": "pages/record/record", | ||
42 | - "query": "id=6" | ||
43 | - }, | ||
44 | - { | ||
45 | - "id": 1, | ||
46 | - "name": "share_record", | ||
47 | - "pathName": "pages/share_record/share_record", | ||
48 | - "query": "poster_id=6" | ||
49 | - } | ||
50 | - ] | 36 | + "current": -1, |
37 | + "list": [] | ||
51 | } | 38 | } |
52 | } | 39 | } |
53 | } | 40 | } |
-
请 注册 或 登录 后发表评论