作者 liaolinfeng

开发完成 2018-09-28

{
"pages": [
"pages/start/start",
"pages/chooseadress/chooseadress",
"pages/share_record/share_record",
"pages/index/index",
"pages/poster/poster",
"pages/record/record",
"pages/share_code/share_code"
"pages/share_code/share_code"
],
"window": {
"backgroundTextStyle": "light",
... ...
... ... @@ -100,9 +100,7 @@ Page({
}
}
})
}
}
},
//设置关键词
choosekeyword(e){
... ... @@ -368,10 +366,10 @@ Page({
var width = 600;
var size = width + "*" + height;
myAmapFun.getStaticmap({
zoom: 9,
zoom: 8,
size: size,
scale: 1,
location: "120.644312,31.421561",//中心点苏州火车北站
scale: 2,
location: "120.629029,31.32416",//中心点苏州拙政园
markers: markers,
success: function (data) {
wx.setStorageSync('staticsrc', data.url)
... ... @@ -398,11 +396,11 @@ Page({
for (let item of obj.children){
if (item.check){
tempLocation.push(item.coordinate)
if(locationurl==''){
locationurl = item.coordinate;
}else{
// if(locationurl==''){
// locationurl = item.coordinate;
// }else{
locationurl += '|' + item.coordinate;
}
// }
staticmarkers += (';'+ item.coordinate);
}
}
... ...
... ... @@ -10,10 +10,10 @@
<text>{{item.name}}</text>
</view>
</view>
<view class='main_rigth' wx:if='{{showright}}'>
<view class="main_rigth {{showright?'heiht80':''}}" wx:if='{{showright}}'>
<view class="rigth_cell {{item.check?'activity_cell':''}}" wx:for='{{cityList[currentindex].children}}' data-index='{{index}}' wx:key bindtap='choosetwo'>{{item.scenic_name}}</view>
</view>
<view class='main_rigth' wx:else>
<view class="main_rigth {{showright?'':'heiht100'}}" wx:else>
<view class='seach_box'>
<view class='seach_text'>
<input placeholder='请输入地点' bindinput='setkeyword'
... ...
... ... @@ -81,11 +81,17 @@ page{
}
.main_rigth{
width:560rpx;
height: 100%;
height: 80%;
overflow-x: hidden;
overflow-y: auto;
}
.heiht80{
height: 80%;
}
.heiht100{
height: 100%;
}
.rigth_cell{
display: inline-block;
padding: 0 34rpx;
... ...
... ... @@ -164,64 +164,65 @@ Page({
},
//保存图片
saveImg() {
wx.showToast({
title: '正在开发中~',
icon: 'none',
duration: 2000,
})
let that=this;
let params = {
pages: '/pages/share_record/share_record',
scene: that.data.poster_id,
}
// let params={
// file: wx.getStorageSync('staticsrc'),
// poster_id: that.data.poster_id,
// page: '/pages/share_record/share_record'
// let params = {
// pages: '/pages/share_record/share_record',
// scene: that.data.poster_id,
// }
let url = 'home/home/code';
// let url = 'home/home/poster';
console.log(typeof wx.getStorageSync('staticsrc'))
let params={
file: wx.getStorageSync('staticsrc'),
poster_id: that.data.poster_id,
page: 'pages/start/start'
}
// let url = 'home/home/code';
let url = 'home/home/poster';
app.post(url, params,{}).then((res) => {
console.log(res)
// let imgUrl = res
// wx.showLoading({
// title: '加载中',
// })
// wx.downloadFile({
// url: imgUrl,
// success: function (res) {
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: function (res) {
// wx.hideLoading()
// wx.showToast({
// icon: 'none',
// title: '图片保存成功,可以分享到朋友圈'
// })
// },
// fail: function (res) {
// wx.showToast({
// icon: 'none',
// title: '图片保存失败'
// })
// console.log(res)
// }
// })
// },
// fail: function (res) {
// wx.showModal({
// title: '提示',
// content: '图片保存失败,请重试',
// showCancel: false
// })
// }
// })
if(res.code == 20000){
let imgUrl = res.url
wx.showLoading({
title: '加载中',
})
wx.downloadFile({
url: imgUrl,
success: function (res) {
wx.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function (res) {
wx.hideLoading()
wx.showToast({
icon: 'none',
title: '图片保存成功,可以分享到朋友圈'
})
},
fail: function (res) {
wx.showToast({
icon: 'none',
title: '图片保存失败'
})
console.log(res)
}
})
},
fail: function (res) {
// wx.showModal({
// title: '提示',
// content: '图片保存失败,请重试',
// showCancel: false
// })
}
})
}
}).catch((errMsg) => {
wx.showModal({
title: '提示',
content: errMsg,
showCancel: false
})
// wx.showModal({
// title: '提示',
// content: errMsg,
// showCancel: false
// })
})
},
/**
... ...
... ... @@ -25,27 +25,30 @@ Page({
that.setData({
play: false
})
bgM.src = that.data.musicsrc;
bgM.play();
setTimeout(() => {
bgM.currentTime
bgM.onTimeUpdate(() => {
let palyrate = (parseInt(bgM.currentTime) / parseInt(bgM.duration)) * 100;//播放的百分比
that.setData({
startsec: (bgM.currentTime.toFixed(0) < 10 ? '0' + bgM.currentTime.toFixed(0) : bgM.currentTime.toFixed(0)) + ':00s',
endsec: (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) + ':00s',
startsec: '00:' + (bgM.currentTime.toFixed(0) < 10 ? '0' + bgM.currentTime.toFixed(0) : bgM.currentTime.toFixed(0)),
endsec: '00:' + (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)),
palyrate: palyrate
})
})
bgM.onEnded(() => {
that.setData({
startsec: 0 + ':00s',
endsec: (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) + ':00s',
startsec: '00' + ':00',
endsec: '00:' + (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)),
palyrate: 0,
play: true
})
})
}, 500)
that.setData({
duration: bgM.duration
})
}, 1000)
},
audioPause: function () {//暂停
let that = this;
... ... @@ -97,7 +100,6 @@ Page({
}
})
},
makertap(e) {
console.log(e);
var that = this;
... ... @@ -136,10 +138,8 @@ Page({
let that=this;
if (options.poster_id != undefined){
var poster_id = decodeURIComponent(options.poster_id)
that.getdata(poster_id);
}
}
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
{"navigationBarTitleText": "踏寻苏州"}
\ No newline at end of file
{"navigationBarTitleText": "踏趣苏州"}
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@
<image src='../../images/bg@2x.jpg'></image>
<view class='top_text'>
<view class='mini_title'>去过的地方,就是连接起来的一段脚步音符</view>
<view class='title'>来制作你的音乐logo吧</view>
<view class='title'> 来听听我制作的音乐logo吧</view>
</view>
<view class='center_img'>
<view class='map_container'>
... ...
... ... @@ -33,21 +33,8 @@
"list": []
},
"miniprogram": {
"current": 1,
"list": [
{
"id": -1,
"name": "生成二维码",
"pathName": "pages/record/record",
"query": "id=6"
},
{
"id": 1,
"name": "share_record",
"pathName": "pages/share_record/share_record",
"query": "poster_id=6"
}
]
"current": -1,
"list": []
}
}
}
\ No newline at end of file
... ...