@ -0,0 +1,99 @@ | |||||
// Pages/travel/plan/new/create.js | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
go: ["请选择","黑龙江","吉林","辽宁","河北","河南","湖北","湖南","广东","广西","山东","山西","陕西","内蒙","宁夏","甘肃","青海","新疆","西藏","四川","云南","海南","安徽","江苏","浙江","福建","台湾","北京","天津","上海","重庆","香港","澳门","其他"], | |||||
go_index: 0, | |||||
arrive: ["请选择","上海","杭州","南京","苏州","其他"], | |||||
arrive_index: 0 | |||||
}, | |||||
onRet:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/home/home', | |||||
}) | |||||
}, | |||||
goSelect:function(e){ | |||||
this.setData({ | |||||
go_index: e.detail.value | |||||
}) | |||||
}, | |||||
arriveSelect:function(e){ | |||||
this.setData({ | |||||
arrive_index: e.detail.value | |||||
}) | |||||
}, | |||||
ret:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/plan/new/new', | |||||
}) | |||||
}, | |||||
OK:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/plan/new/share', | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
} | |||||
}) |
@ -0,0 +1,3 @@ | |||||
{ | |||||
"usingComponents": {} | |||||
} |
@ -0,0 +1,33 @@ | |||||
<!--Pages/travel/plan/new/create.wxml--> | |||||
<view style="display: flex;"> | |||||
<image class="navi" src="/asset/img/navi.png" bindtap="onRet"></image> | |||||
<view style="padding: 0;margin: 0;width: 1px;height:700px;background-color: #7B8B6F;"></view> | |||||
<view style="display: block"> | |||||
<view style="display: flex" class="title"> | |||||
<view class="ret" bindtap="ret"> < </view> | |||||
<view style="text-align: center;"> 新行程 </view> | |||||
</view> | |||||
<view class="go"> | |||||
<view>要从哪里出发呢?</view> | |||||
<picker mode="selector" range="{{go}}" class="selected" bindchange="goSelect" value="{{go_index}}"><view>{{go[go_index]}}</view></picker> | |||||
</view> | |||||
<view class="arrive"> | |||||
<view>想去哪里玩?</view> | |||||
<picker mode="selector" range="{{arrive}}" class="selected" bindchange="arriveSelect" value="{{arrive_index}}"><view>{{arrive[arrive_index]}}</view></picker> | |||||
</view> | |||||
<view class="OK" bindtap="OK"> | |||||
<text>定好了!</text> | |||||
</view> | |||||
<view class="hg"> | |||||
<image src="/asset/img/hangou1.png" mode="heightFix" class="hg"></image> | |||||
</view> | |||||
</view> | |||||
</view> |
@ -0,0 +1,63 @@ | |||||
/* Pages/travel/plan/new/create.wxss */ | |||||
.navi{ | |||||
width: 40px; | |||||
height: 30px; | |||||
margin: 5px; | |||||
padding-top: 10px; | |||||
} | |||||
.title{ | |||||
position: relative; | |||||
font-size: 25px; | |||||
font-weight: 900; | |||||
color: #000; | |||||
top:15px; | |||||
left:10px; | |||||
} | |||||
.ret{ | |||||
padding-right: 60px; | |||||
} | |||||
.go{ | |||||
margin-top: 70px; | |||||
padding: 20px; | |||||
font-size: 23px; | |||||
font-weight: bolder; | |||||
} | |||||
.arrive{ | |||||
padding: 20px; | |||||
font-size: 23px; | |||||
font-weight: bolder; | |||||
} | |||||
.selected{ | |||||
background-color: #D8CAAF; | |||||
height: 5vh; | |||||
width: 70vw; | |||||
color: rgba(0, 0, 0, 0.5); | |||||
font-size: 23px; | |||||
margin-top: 5px; | |||||
text-align: center; | |||||
} | |||||
.OK{ | |||||
background-color: #7B8B6F; | |||||
font-size: 28px; | |||||
font-weight: bold; | |||||
margin: 20px; | |||||
width: 150px; | |||||
height: 40px; | |||||
margin: 50px; | |||||
text-align: center; | |||||
} | |||||
.hg { | |||||
height: 150px; | |||||
right: 5px; | |||||
width: 150px; | |||||
left: 100px; | |||||
padding-top: 40px; | |||||
padding-left:100px; | |||||
} |
@ -0,0 +1,78 @@ | |||||
// Pages/travel/plan/new/new.js | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
id: "silhouette", | |||||
}, | |||||
onRet:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/home/home', | |||||
}) | |||||
}, | |||||
add:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/plan/new/create', | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
} | |||||
}) |
@ -0,0 +1,3 @@ | |||||
{ | |||||
"usingComponents": {} | |||||
} |
@ -0,0 +1,22 @@ | |||||
<!--Pages/travel/plan/new/new.wxml--> | |||||
<view style="display: flex;"> | |||||
<image class="navi" src="/asset/img/navi.png" bindtap="onRet"></image> | |||||
<view style="padding: 0;margin: 0;width: 1px;height:700px;background-color: #7B8B6F;"></view> | |||||
<view style="display: block"> | |||||
<view style="display: flex" class="title"> | |||||
<view> {{id}} 的行程</view> | |||||
<view class="add" bindtap="add"> + </view> | |||||
</view> | |||||
<image src="/asset/img/intro.png" class="intro"></image> | |||||
<view class="hg"> | |||||
<image src="/asset/img/hangou1.png" mode="heightFix" class="hg"></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
@ -0,0 +1,37 @@ | |||||
/* Pages/travel/plan/new/new.wxss */ | |||||
.navi{ | |||||
width: 40px; | |||||
height: 30px; | |||||
margin: 5px; | |||||
padding-top: 10px; | |||||
} | |||||
.title{ | |||||
position: relative; | |||||
font-size: 25px; | |||||
font-weight: 900; | |||||
color: #000; | |||||
text-align: center; | |||||
top:15px; | |||||
left:45px; | |||||
} | |||||
.add{ | |||||
color: #7B8B6F; | |||||
padding-left: 50px; | |||||
} | |||||
.intro{ | |||||
height: 320px; | |||||
width: 320px; | |||||
right:20px; | |||||
} | |||||
.hg { | |||||
height: 150px; | |||||
right: 5px; | |||||
width: 150px; | |||||
left: 100px; | |||||
padding-top: 100px; | |||||
padding-left:100px; | |||||
} |
@ -0,0 +1,81 @@ | |||||
// Pages/travel/plan/new/share.js | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
}, | |||||
onRet:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/home/home', | |||||
}) | |||||
}, | |||||
ret:function(){ | |||||
wx.redirectTo({ | |||||
url: '/Pages/travel/plan/new/create', | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function(options) { | |||||
// options 中的 scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene | |||||
var scene = decodeURIComponent(options.scene) | |||||
// | |||||
var query = options.query.dentistId // 3736 | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
} | |||||
}) |
@ -0,0 +1,3 @@ | |||||
{ | |||||
"usingComponents": {} | |||||
} |
@ -0,0 +1,45 @@ | |||||
<!--Pages/travel/plan/new/share.wxml--> | |||||
<view style="display: flex;"> | |||||
<image class="navi" src="/asset/img/navi.png" bindtap="onRet"></image> | |||||
<view style="padding: 0;margin: 0;width: 1px;height:700px;background-color: #7B8B6F;"></view> | |||||
<view style="display: block"> | |||||
<view style="display: flex" class="title"> | |||||
<view class="ret" bindtap="ret"> < </view> | |||||
<view style="text-align: center;"> 新行程 </view> | |||||
<button style="width: 50px;margin-left: 100px;" open-type="share"><image class="icon-share" src="/asset/img/share.png"></image></button> | |||||
</view> | |||||
<!--TODO:分享码的生成与使用:行程存储在服务器里,将分享码视为密码,在后端可以利用map去实现分享码->行程的映射,只需要通过行程来获取这个分享码然后从后端传过来,可以用java生成随机的session和id,然后从后端传入--> | |||||
<view class="go"> | |||||
<view>本次行程的分享码为:</view> | |||||
<textarea style="height: 50px;background-color: #D8CAAF;"></textarea> | |||||
</view> | |||||
<view class="share"> | |||||
<view>也可通过以下方式邀请成员加入行程:</view> | |||||
<view style="display: flex;padding:20px;margin-top: 20px;"> | |||||
<image class="code" src="/asset/img/QRcode.png"></image> | |||||
<view> 生成二维码</view> | |||||
</view> | |||||
<view style="display: flex;padding-left:20px;"> | |||||
<image class="wechat" src="/asset/img/wechat.png"></image> | |||||
<view> 微信分享</view> | |||||
</view> | |||||
<view style="display: flex;padding-left:20px;margin-top: 20px;"> | |||||
<image class="link" src="/asset/img/link.png"></image> | |||||
<view> 复制链接</view> | |||||
</view> | |||||
</view> | |||||
<view class="hg"> | |||||
<image src="/asset/img/hangou1.png" mode="heightFix" class="hg"></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
@ -0,0 +1,82 @@ | |||||
/* Pages/travel/plan/new/share.wxss */ | |||||
.navi{ | |||||
width: 40px; | |||||
height: 30px; | |||||
margin: 5px; | |||||
padding-top: 10px; | |||||
} | |||||
.title{ | |||||
position: relative; | |||||
font-size: 25px; | |||||
font-weight: 900; | |||||
color: #000; | |||||
top:15px; | |||||
left:10px; | |||||
} | |||||
.ret{ | |||||
padding-right: 60px; | |||||
} | |||||
.icon-share{ | |||||
width: 30px; | |||||
height: 30px; | |||||
text-align: center; | |||||
} | |||||
.title button{ | |||||
color: #d8caaf; | |||||
padding: 0; | |||||
margin: 0; | |||||
background-color: inherit; | |||||
} | |||||
.title button:after{ | |||||
content: 0; | |||||
} | |||||
.title button::after{ | |||||
border: 0; | |||||
} | |||||
.go{ | |||||
margin-top: 70px; | |||||
padding: 20px; | |||||
font-size: 23px; | |||||
font-weight: bolder; | |||||
text-align: center; | |||||
} | |||||
.share{ | |||||
padding: 20px; | |||||
font-size: 23px; | |||||
font-weight: bolder; | |||||
text-align: center; | |||||
} | |||||
.code{ | |||||
width: 40px; | |||||
height: 40px; | |||||
padding-right: 10px; | |||||
} | |||||
.wechat{ | |||||
width: 45px; | |||||
height: 40px; | |||||
padding-right: 10px; | |||||
} | |||||
.link{ | |||||
width: 40px; | |||||
height: 40px; | |||||
padding-right: 10px; | |||||
} | |||||
.hg { | |||||
height: 150px; | |||||
right: 5px; | |||||
width: 150px; | |||||
left: 100px; | |||||
padding-top: 18px; | |||||
padding-left:100px; | |||||
} |