diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 14ea590..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-# Windows
-[Dd]esktop.ini
-Thumbs.db
-$RECYCLE.BIN/
-
-# macOS
-.DS_Store
-.fseventsd
-.Spotlight-V100
-.TemporaryItems
-.Trashes
-
-# Node.js
-node_modules/
diff --git a/app.js b/app.js
index a67c85b..0274368 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,8 @@
//app.js
App({
onLaunch: function () {
-
+ let rect = wx.getSystemInfoSync();
+ this.globalData.safeBottom = rect.safeArea?(rect.safeArea.bottom - rect.safeArea.height):0
// 展示本地存储能力
@@ -37,6 +38,55 @@ App({
})
},
globalData: {
- userInfo: null
+ // 苏州市政府的经纬度
+ latitude:"31.297401",//纬度
+ longitude:"120.585639",//经度
+ userInfo: null,
+ couponInfo:null,
+ mapKey:"DEUBZ-GG7RR-UZDWR-WXZD3-TARU5-4TB42",
+ safeBottom:0,
+ product:null,
+ postProduct:[],
+ productState:{
+ "WAIT_PAYMENT":"待付款",
+ "WAIT_CONFIRM":"待确认",
+ "WAIT_POST":"待发货",
+ "WAIT_USE":"待出行",
+ 'WAIT_DELIVERY':'待收货',
+ 'WAIT_COMMENT':'待评价',
+ "NEED_REFUND":"退款退货",
+ "CLOSED": "已取消",
+ "PAID": "已支付",
+ "WAIT_REFUND":"待退款",
+ "REFUND":"已退款",
+ "COMPLETED":"已完成",
+ "EXPIRED":"已过期/已失效",
+ "REFUNDING":"退款中"
+ },
+ orderState:{
+ "UNPAID":"待付款",
+ // "WAIT_PAYMENT":"待付款",
+ // "WAIT_CONFIRM":"待确认",
+ // "WAIT_POST":"待发货",
+ // "WAIT_USE":"待出行",
+ // 'WAIT_DELIVERY':'待收货',
+ 'WAIT_COMMENT':'待评价',
+ // "NEED_REFUND":"退款退货",
+ "CLOSED": "已取消",
+ "PAID": "已支付",
+ "WAIT_REFUND":"待退款",
+ "REFUND":"已退款",
+ "COMPLETED":"已完成",
+ // "EXPIRED":"已过期/已失效",
+ "REFUNDING":"退款中"
+ },
+ codeState:['未使用','已使用','已失效','已取消'],
+ weburl:"",
+ pay_methods:{
+ NONE:"无需支付",
+ WEIXIN:"微信支付",
+ JIANSHEYINHANG:"建行支付",
+ ZHIFUBAO:"支付宝支付"
+ }
}
})
\ No newline at end of file
diff --git a/app.json b/app.json
index 17e2049..db81e94 100644
--- a/app.json
+++ b/app.json
@@ -1,10 +1,67 @@
{
"pages":[
"pages/index/index",
+ "pages/map/index",
+ "pages/search/index",
+ "pages/search/list/index",
"pages/login/index",
+ "pages/order/comment/index",
+ "pages/order/coupon/index",
+ "pages/order/pay/index",
+ "pages/order/showSeat/index",
+ "pages/order/show/index",
+ "pages/order/road/index",
+ "pages/order/roadOrder/index",
+ "pages/order/movie/index",
+ "pages/order/food/index",
+ "pages/order/scene/index",
+ "pages/order/hotel/index",
+ "pages/order/card/index",
+ "pages/order/postOrder/index",
+ "pages/order/showOrder/index",
+ "pages/info/newsInfo/index",
+ "pages/info/hotelProductInfo/index",
+ "pages/info/museumInfo/index",
+ "pages/info/sceneProductInfo/index",
+ "pages/info/foodInfo/index",
+ "pages/info/roadInfo/index",
+ "pages/info/cardInfo/index",
+ "pages/info/foodProductInfo/index",
+ "pages/info/postProductInfo/index",
+ "pages/info/sceneInfo/index",
+ "pages/info/hotelInfo/index",
+ "pages/info/activityInfo/index",
+ "pages/info/showInfo/index",
+ "pages/info/strategyInfo/index",
"pages/user/user",
+ "pages/user/coupon/index",
+ "pages/user/verify/index",
+ "pages/user/cartlist/list",
+ "pages/user/couponCenter/index",
+ "pages/user/order/list",
+ "pages/user/order/sceneOrderInfo/index",
+ "pages/user/order/foodOrderInfo/index",
+ "pages/user/order/lineOrderInfo/index",
+ "pages/user/order/couponOrderInfo/index",
+ "pages/user/order/hotelOrderInfo/index",
+ "pages/user/order/postOrderInfo/index",
+ "pages/user/order/movieOrderInfo/index",
+ "pages/user/order/activityOrderInfo/index",
+ "pages/user/order/museumOrderInfo/index",
+ "pages/user/order/refundInfo/index",
+ "pages/user/service/index",
+ "pages/user/service/list/index",
+ "pages/user/service/info/index",
"pages/user/address/index",
"pages/user/profile/index",
+ "pages/user/bindtel/index",
+ "pages/user/nickname/index",
+ "pages/user/likes/index",
+ "pages/user/email/index",
+ "pages/list/feiyi/index",
+ "pages/list/food/index",
+ "pages/list/techan/index",
+ "pages/list/museum/index",
"pages/list/store/index",
"pages/list/activity/index",
"pages/list/road/index",
@@ -13,14 +70,48 @@
"pages/list/night/index",
"pages/list/sale/index",
"pages/list/movieticket/index",
+ "pages/list/movieticket/list/seats/index",
+ "pages/list/movieticket/list/cinema/index",
+ "pages/list/movieticket/list/ticket/index",
+ "pages/list/movieticket/list/info/index",
"pages/list/theatre/index",
"pages/list/card/index",
"pages/list/six/index",
+ "pages/list/scene/index",
+ "pages/list/comments/index",
+ "pages/list/message/index",
+ "pages/pbService/index",
+ "pages/pbService/sceneComfort/index",
+ "pages/pbService/gym/index",
+ "pages/pbService/gym/info/index",
+ "pages/pbService/bus/index",
+ "pages/pbService/bus/search/index",
+ "pages/pbService/bus/lineinfo/index",
+ "pages/pbService/security/index",
+ "pages/pbService/web/index",
"pages/pbService/feiyi/index",
+ "pages/pbService/bike/index",
"pages/pbService/feiyi/info/index",
+ "pages/pbService/appreciate/index",
+ "pages/pbService/appreciate/info/index",
+ "pages/pbService/library/index",
+ "pages/pbService/library/bookinfo/index",
+ "pages/pbService/library/getpoint/index",
+ "pages/pbService/library/mybook/index",
+ "pages/pbService/wbdw/index",
+ "pages/pbService/wbdw/info/index",
"pages/pbService/wwcx/index",
- "pages/pbService/wwcx/search/index"
+ "pages/pbService/wwcx/info/index",
+ "pages/pbService/wwcx/search/index",
+ "pages/ask/index",
+ "pages/ask/info/index",
+ "pages/ask/my/index"
],
+ "permission": {
+ "scope.userLocation": {
+ "desc": "你的位置信息将用于小程序位置接口的效果展示"
+ }
+ },
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
@@ -42,17 +133,11 @@
"text":"首页"
},
{
- "pagePath": "pages/list/sale/index",
+ "pagePath": "pages/map/index",
"iconPath":"/images/map.png",
"selectedIconPath":"/images/mapSeld.png",
"text":"图游"
},
- {
- "pagePath": "pages/list/activity/index",
- "iconPath":"/images/video.png",
- "selectedIconPath":"/images/videoSeld.png",
- "text":"直播"
- },
{
"pagePath": "pages/user/user",
"iconPath":"/images/user.png",
diff --git a/app.wxss b/app.wxss
index 9875ff7..b0b8b4f 100644
--- a/app.wxss
+++ b/app.wxss
@@ -94,7 +94,7 @@ page{
z-index: 0;
}
.common-empty image {
- width: 480rpx;
+ width: 328rpx;
margin-bottom: 20rpx;
}
.textOver2 {
diff --git a/iconfont/iconfont.wxss b/iconfont/iconfont.wxss
index 66661cc..b81bcec 100644
--- a/iconfont/iconfont.wxss
+++ b/iconfont/iconfont.wxss
@@ -1,10 +1,10 @@
@font-face {font-family: "iconfont";
- src: url('iconfont.eot?t=1602579059563'); /* IE9 */
- src: url('iconfont.eot?t=1602579059563#iefix') format('embedded-opentype'), /* IE6-IE8 */
- url('data:application/x-font-woff2;charset=utf-8;base64,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') format('woff2'),
- url('iconfont.woff?t=1602579059563') format('woff'),
- url('iconfont.ttf?t=1602579059563') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
- url('iconfont.svg?t=1602579059563#iconfont') format('svg'); /* iOS 4.1- */
+ src: url('iconfont.eot?t=1607216301826'); /* IE9 */
+ src: url('iconfont.eot?t=1607216301826#iefix') format('embedded-opentype'), /* IE6-IE8 */
+ url('data:application/x-font-woff2;charset=utf-8;base64,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') format('woff2'),
+ url('iconfont.woff?t=1607216301826') format('woff'),
+ url('iconfont.ttf?t=1607216301826') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
+ url('iconfont.svg?t=1607216301826#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
@@ -15,6 +15,42 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-iconfontoptionbutton:before {
+ content: "\e646";
+}
+
+.icon-arrow-line-right:before {
+ content: "\e632";
+}
+
+.icon-gouwuche:before {
+ content: "\e631";
+}
+
+.icon-tiwen:before {
+ content: "\e630";
+}
+
+.icon-tiwen1:before {
+ content: "\e73b";
+}
+
+.icon-daohang:before {
+ content: "\e641";
+}
+
+.icon-dianhua3:before {
+ content: "\e64c";
+}
+
+.icon-kefu:before {
+ content: "\e62b";
+}
+
+.icon-jilu:before {
+ content: "\e62d";
+}
+
.icon-jian:before {
content: "\e629";
}
@@ -163,6 +199,10 @@
content: "\e611";
}
+.icon-zan1-copy:before {
+ content: "\ec21";
+}
+
.icon-liulan:before {
content: "\e65f";
}
@@ -287,6 +327,10 @@
content: "\e608";
}
+.icon-zan-copy:before {
+ content: "\ec20";
+}
+
.icon-icon01:before {
content: "\e606";
}
diff --git a/images/close.png b/images/close.png
new file mode 100755
index 0000000..f655987
Binary files /dev/null and b/images/close.png differ
diff --git a/images/place1.png b/images/place1.png
new file mode 100755
index 0000000..0c65781
Binary files /dev/null and b/images/place1.png differ
diff --git a/images/place2.png b/images/place2.png
new file mode 100755
index 0000000..0bf09ad
Binary files /dev/null and b/images/place2.png differ
diff --git a/pages/ask/index.js b/pages/ask/index.js
new file mode 100644
index 0000000..3afc4f1
--- /dev/null
+++ b/pages/ask/index.js
@@ -0,0 +1,124 @@
+// pages/ask/index.js
+const device = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); // 获取设备信息
+const width = device.windowWidth // 示例为一个与屏幕等宽的正方形裁剪框
+import commonApi from "../../utils/https/common"
+import util from "../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ menuWidth:width - rect.right + rect.width + 6,
+ list:[],
+ page_no:1,
+ total:1,
+ ques:''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(!options.id){
+ util.back()
+ return;
+ }
+ this.setData({
+ id:options.id
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("ask/getQuestionList",{
+ scene_id:this.data.id,
+ page_no:this.data.page_no,
+ page_num:10
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.rows),
+ total:res.data.total,
+ page_no:this.data.page_no+1
+ })
+ console.log(res)
+ })
+ },
+ inputQues:function(e){
+ this.setData({
+ ques:e.detail.value
+ })
+ },
+ question:function(){
+ if(!this.data.ques){
+ wx.showToast({
+ title: '请输入问题!',
+ })
+ return;
+ }
+ commonApi.user_post("ask/postQuestion",{
+ scene_id:this.data.id,
+ question:this.data.ques
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '提交成功待审核',
+ icon: 'success'
+ })
+ this.setData({
+ ques:""
+ })
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/ask/index.json b/pages/ask/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/ask/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/ask/index.wxml b/pages/ask/index.wxml
new file mode 100644
index 0000000..ca8d1b8
--- /dev/null
+++ b/pages/ask/index.wxml
@@ -0,0 +1,26 @@
+
+
+
+
+ 我的问答
+
+
+
+
+
+ {{item.question_name}}
+
+
+
+ {{item.answer && item.answer.lastest_answer?item.answer.lastest_answer.answer:"暂无回答"}}
+
+
+ {{item.created_time}}提问
+ 全部{{item.answer && item.answer.total ? item.answer.total : 0}}个回答
+
+
+
+
+
+ 提问
+
diff --git a/pages/ask/index.wxss b/pages/ask/index.wxss
new file mode 100644
index 0000000..e435e67
--- /dev/null
+++ b/pages/ask/index.wxss
@@ -0,0 +1,81 @@
+/* pages/ask/index.wxss */
+.ask-top-right {
+ color: #000;
+ text-align: center;
+ font-size: 23rpx;
+ line-height: 23rpx;
+ position: absolute;
+}
+.ask-top-right image {
+ width: 27rpx;
+ margin: 0 auto;
+ margin-bottom: 2rpx;
+}
+.item {
+ padding: 30rpx 25rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.item-ques {
+ display: flex;
+ color: #000;
+ font-size: 29rpx;
+ margin-bottom: 33rpx;
+ line-height: 38rpx;
+}
+.item-ques image {
+ width: 36rpx;
+ margin-right: 18rpx;
+}
+.item-ques .ques {
+ font-size: 32rpx;
+ font-weight: 500;
+}
+.ques-tip {
+ margin-left: 54rpx;
+ color: #999999;
+ font-size: 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.ans-number {
+ color: #0B898E;
+ font-size: 28rpx;
+}
+.ans-number .iconfont {
+ font-size: 28rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ height: 133rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 25rpx;
+ bottom: 0em;
+}
+.fixed-bottom-blank {
+ height: 140rpx;
+}
+.fixed-bottom input {
+ display: block;
+ width: 470rpx;
+ border: 1rpx solid #999;
+ height: 70rpx;
+ border-radius: 36rpx;
+ padding: 0 30rpx;
+}
+.fixed-bottom .btn {
+ width: 144rpx;
+ line-height: 72rpx;
+ background: #0B898E;
+ border-radius: 36rpx;
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/pages/ask/info/index.js b/pages/ask/info/index.js
new file mode 100644
index 0000000..bbb4632
--- /dev/null
+++ b/pages/ask/info/index.js
@@ -0,0 +1,144 @@
+// pages/ask/info/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ total:1,
+ page_no:1,
+ keyword:'',
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ commonApi._post("ask/getQuestionDetail",{
+ question_id:options.id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ this.getList();
+ },
+ zan:function(e){
+ let id = e.currentTarget.dataset.id;
+ commonApi.user_post("ask/like",{
+ answer_id:id
+ }).then(res=>{
+ if(res.code==1){
+ let list = this.data.list;
+ list.map(item=>{
+ if(item.id==id){
+ item.is_like = item.is_like?false:true;
+ item.like_nums = item.is_like?(item.like_nums+1):(item.like_nums-1);
+ }
+ })
+ this.setData({
+ list:list
+ })
+ }
+ })
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi.user_post("ask/getQuestionAnswers",{
+ question_id:this.data.id,
+ page_no:this.data.page_no,
+ page_num:10
+ }).then(res=>{
+ res.data.rows.map(item=>{
+ item.is_like = item.is_like?true:false;
+ })
+ this.setData({
+ page_no:this.data.page_no+1,
+ total:res.data.total,
+ list:list.concat(res.data.rows)
+ })
+ })
+ },
+ changeKeyword:function(e){
+ this.setData({
+ keyword:e.detail.value
+ })
+ },
+ postAns:function(){
+ if(!this.data.keyword){
+ wx.showToast({
+ title: '请输入回答内容',
+ icon: 'none'
+ })
+ return;
+ }
+ commonApi.user_post("ask/postAnswer",{
+ question_id:this.data.id,
+ answer:this.data.keyword
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '提交成功',
+ icon:'success'
+ })
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/ask/info/index.json b/pages/ask/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/ask/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/ask/info/index.wxml b/pages/ask/info/index.wxml
new file mode 100644
index 0000000..3986f97
--- /dev/null
+++ b/pages/ask/info/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+ {{info.scene_title}}
+
+
+
+
+ {{info.question_name}}
+
+ {{info.created_time}}提问
+
+
+
+
+ 共{{total}}个回答
+ 暂无回答
+
+
+ 还没有其他人回答,快来第一个回答吧!
+
+
+
+
+ {{item.nickname}}
+
+ {{item.answer}}
+
+ {{item.created_time}}回答
+ 有用 {{item.like_nums}}
+
+
+
+
+
+
+ 回答
+
\ No newline at end of file
diff --git a/pages/ask/info/index.wxss b/pages/ask/info/index.wxss
new file mode 100644
index 0000000..4c3cd7d
--- /dev/null
+++ b/pages/ask/info/index.wxss
@@ -0,0 +1,135 @@
+/* pages/ask/info/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.top-box {
+ background: white;
+ border-radius: 0 0 13rpx 13rpx;
+ padding: 0 20rpx;
+ padding-bottom: 25rpx;
+}
+.title {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ border-bottom: 1rpx solid #ccc;
+ margin: 0 20rpx;
+ justify-content: space-between;
+}
+.title-text {
+ font-weight: bold;
+ font-size: 37rpx;
+}
+.ques-top {
+ display: flex;
+ line-height: 38rpx;
+ margin: 20rpx;
+}
+.ques-top image {
+ width: 36rpx;
+ margin-right: 18rpx;
+}
+.ques-top .ques {
+ font-size: 32rpx;
+ font-weight: 500;
+}
+.ques-time {
+ margin-left: 74rpx;
+ font-size: 24rpx;
+ color: #999;
+}
+.list {
+ width: 710rpx;
+ background: #FFFFFF;
+ border-radius: 13rpx;
+ margin: 24rpx auto;
+}
+.list-top {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #ccc;
+ height: 100rpx;
+ font-size: 27rpx;
+ padding: 0 20rpx;
+}
+.list-top image {
+ width: 36rpx;
+ margin-right: 19rpx;
+}
+.item {
+ margin: 0 20rpx;
+ padding: 20rpx 0;
+ padding-bottom: 30rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.list .item:last-child {
+ border-bottom: none;
+}
+.author-info {
+ display: flex;
+ align-items: center;
+ font-size: 21rpx;
+ color: #666;
+ margin-bottom: 10rpx;
+}
+.author-info image {
+ width: 53rpx;
+ height: 53rpx;
+ border-radius: 50%;
+ margin-right: 21rpx;
+}
+.content {
+ margin-left: 74rpx;
+ font-size: 29rpx;
+ color: #000;
+ line-height: 44rpx;
+ margin-bottom: 20rpx;
+}
+.tips {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-left: 74rpx;
+ color: #999999;
+ font-size: 24rpx;
+}
+.tips .zan.active {
+
+}
+.icon-zan1 {
+ color: red;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ height: 133rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 25rpx;
+ bottom: 0em;
+}
+.fixed-bottom-blank {
+ height: 140rpx;
+}
+.fixed-bottom input {
+ display: block;
+ width: 470rpx;
+ border: 1rpx solid #999;
+ height: 70rpx;
+ border-radius: 36rpx;
+ padding: 0 30rpx;
+}
+.fixed-bottom .btn {
+ width: 144rpx;
+ line-height: 72rpx;
+ background: #0B898E;
+ border-radius: 36rpx;
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/pages/ask/my/index.js b/pages/ask/my/index.js
new file mode 100644
index 0000000..90fd0ad
--- /dev/null
+++ b/pages/ask/my/index.js
@@ -0,0 +1,93 @@
+// pages/ask/my/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ type:1,
+ list:[]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ changeType:function(e){
+ let type = e.currentTarget.dataset.type;
+ this.setData({
+ type:type,
+ list:[]
+ })
+ this.getList();
+ },
+ getList:function(){
+ let service="ask/myAnswers"
+ if(this.data.type==1){
+ service="ask/myQuestions"
+ }
+ commonApi.user_post(service).then(res=>{
+ console.log(res)
+ res.data.map((item)=>{
+ if(item.questions && this.data.type==2){
+ item.my_questions = item.questions;
+ }
+ })
+ this.setData({
+ list:res.data
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/ask/my/index.json b/pages/ask/my/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/ask/my/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/ask/my/index.wxml b/pages/ask/my/index.wxml
new file mode 100644
index 0000000..bb3bd56
--- /dev/null
+++ b/pages/ask/my/index.wxml
@@ -0,0 +1,26 @@
+
+
+
+
+
+ {{item.scene_title}}
+
+
+
+
+
+ {{item.question_name}}
+
+
+
+ {{item.answers && item.answers.rows && item.answers.rows[0]?item.answers.rows[0].answer:"暂无回答"}}
+
+
+ {{item.created_time}}提问
+
+
+
+
\ No newline at end of file
diff --git a/pages/ask/my/index.wxss b/pages/ask/my/index.wxss
new file mode 100644
index 0000000..6bd2457
--- /dev/null
+++ b/pages/ask/my/index.wxss
@@ -0,0 +1,92 @@
+/* pages/ask/my/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.menus {
+ display: flex;
+ align-items: center;
+ height: 86rpx;
+ background: white;
+ justify-content: center;
+ font-size: 29rpx;
+ color: #333;
+}
+.menus view:nth-child(1){
+ margin-right: 236rpx;
+}
+.menus view.active {
+ font-weight: 500;
+ font-size: 37rpx;
+}
+.menus view {
+ line-height: 86rpx;
+ position: relative;
+}
+.menus view.active::after {
+ content: "!";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 5rpx;
+ background: #0B898E;
+ border-radius: 3rpx;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0;
+}
+.item {
+ background: white;
+ border-radius: 13rpx;
+ margin: 24rpx 20rpx;
+}
+.title {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 0 20rpx;
+ justify-content: space-between;
+}
+.title-text {
+ font-weight: bold;
+ font-size: 37rpx;
+}
+.item-ques {
+ display: flex;
+ color: #000;
+ font-size: 29rpx;
+ margin-bottom: 33rpx;
+ line-height: 38rpx;
+}
+.item-ques image {
+ width: 36rpx;
+ margin-right: 18rpx;
+}
+.item-ques .ques {
+ font-size: 32rpx;
+ font-weight: 500;
+}
+.ques-tip {
+ margin-left: 54rpx;
+ color: #999999;
+ font-size: 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.ans-number {
+ color: #0B898E;
+ font-size: 28rpx;
+}
+.ans-number .iconfont {
+ font-size: 28rpx;
+}
+.ans-item {
+ margin: 0 20rpx;
+ padding: 30rpx 0;
+ border-bottom: 1rpx solid #ccc;
+}
+.item .ans-item:last-child {
+ border-bottom: none;
+}
\ No newline at end of file
diff --git a/pages/component/SearchHeader.js b/pages/component/SearchHeader.js
index 6ce36b3..ad07287 100644
--- a/pages/component/SearchHeader.js
+++ b/pages/component/SearchHeader.js
@@ -11,7 +11,7 @@ Component({
properties: {
isIndex:{
type:String,
- value:"0"
+ value:"1"
},
tab: {
type: String,
@@ -66,9 +66,9 @@ Component({
*/
methods: {
inputFocus:function(){
- if(this.properties.focusclickid){
- wx.uma.trackEvent(this.properties.focusclickid);
- }
+ // if(this.properties.focusclickid){
+ // wx.uma.trackEvent(this.properties.focusclickid);
+ // }
},
searchInput:function(e){
this.setData({
@@ -77,6 +77,7 @@ Component({
},
search:function(){
let keywords = this.data.keywords;
+ console.log(keywords)
this.triggerEvent("onload",{keywords:keywords})
// productApi._get("productfront/search", { pageNo: 1, pageNum: 10, keywords:keywords}).then(res=>{
// console.log(res)
@@ -85,24 +86,20 @@ Component({
},
// 如果是首页的那么跳转搜索页
indexFocus:function(){
- if(this.properties.isIndex==1){
- wx.navigateTo({
- url: '/pages/search/index',
- })
- }
+ // if(this.properties.isIndex==1){
+ // wx.navigateTo({
+ // url: '/pages/search/index',
+ // })
+ // }
},
back: function () {
if(this.properties.clickid){
wx.uma.trackEvent(this.properties.clickid);
}
const pages = getCurrentPages();
- wx.showTabBar({})
+ // wx.showTabBar({})
console.log(this.properties.isIndex)
- if(this.properties.isIndex==1){
- // 首页只需要隐藏 不需要返回
- this.triggerEvent("indexback")
- }
- else if (pages.length<=1){
+ if (pages.length<=1){
wx.switchTab({
url: app.globalData.menuRoute
})
diff --git a/pages/component/SearchHeader.wxss b/pages/component/SearchHeader.wxss
index 2a3a7bd..0582311 100644
--- a/pages/component/SearchHeader.wxss
+++ b/pages/component/SearchHeader.wxss
@@ -16,7 +16,7 @@
justify-content: space-between;
font-size: 32rpx;
line-height: 90rpx;
- z-index: 1;
+ z-index: 2;
}
.title-header .icon-fanhui1 {
padding: 0 20rpx;
diff --git a/pages/component/TitleHeader.js b/pages/component/TitleHeader.js
index 1eb03b4..eba9f53 100644
--- a/pages/component/TitleHeader.js
+++ b/pages/component/TitleHeader.js
@@ -41,7 +41,6 @@ Component({
padHeight:systemInfo.statusBarHeight,
right:(systemInfo.screenWidth - rect.right) + rect.width
})
- console.log(systemInfo,rect)
}
},
@@ -50,9 +49,9 @@ Component({
*/
methods: {
back:function(){
- if(this.properties.clickid){
- wx.uma.trackEvent(this.properties.clickid)
- }
+ // if(this.properties.clickid){
+ // wx.uma.trackEvent(this.properties.clickid)
+ // }
const pages = getCurrentPages();
if(pages[pages.length-1].route.indexOf('login')!=-1 || pages[pages.length-1].route.indexOf('bindTel')!=-1){
// 如果是登录页面的返回需要返回两层
@@ -74,7 +73,7 @@ Component({
}
else {
wx.reLaunch({
- url: app.globalData.menuRoute
+ url: "/pages/index/index"
})
}
}
diff --git a/pages/component/commonImage/index.js b/pages/component/commonImage/index.js
index a42f980..5376d17 100644
--- a/pages/component/commonImage/index.js
+++ b/pages/component/commonImage/index.js
@@ -4,10 +4,10 @@ Component({
//默认图片
defaultImage: {
type:String,
- value:"/images/empty.png"
+ value:"/images/place1.png"
},
//原始图片
- originalImage: String,
+ src: String,
width: String,
height: String,
//图片剪裁mode,同Image组件的mode
diff --git a/pages/component/commonImage/index.wxml b/pages/component/commonImage/index.wxml
index 7971e4b..ce03897 100644
--- a/pages/component/commonImage/index.wxml
+++ b/pages/component/commonImage/index.wxml
@@ -1,3 +1,3 @@
-
-
+
+
diff --git a/pages/component/myCalendar/index.js b/pages/component/myCalendar/index.js
new file mode 100644
index 0000000..30ffde8
--- /dev/null
+++ b/pages/component/myCalendar/index.js
@@ -0,0 +1,146 @@
+// pages/component/myCalendar/index.js
+import util from "../../../utils/util"
+Component({
+ /**
+ * 组件的属性列表
+ */
+ options: {
+ styleIsolation: 'apply-shared',
+ addGlobalClass: true
+ },
+ properties: {
+ datelist:{
+ type:Array,
+ value:[]
+ },
+ activeDay:{
+ type:String,
+ value:''
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ year: 0,
+ month: 0,
+ date: ['日', '一', '二', '三', '四', '五', '六'],
+ dateArr: [],
+ isToday: 0,
+ isTodayWeek: false,
+ todayIndex: 0
+ },
+ lifetimes: {
+ attached: function() {
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1;
+ this.dateInit();
+ this.setData({
+ year: year,
+ month: month,
+ isToday: '' + year + month + now.getDate()
+ })
+ let dates={}
+ this.properties.datelist.map(item=>{
+ dates[item.date] = item
+ })
+ console.log(dates)
+ this.setData({
+ dates:dates
+ })
+ }
+ },
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ dateInit: function (setYear, setMonth) {
+ //全部时间的月份都是按0~11基准,显示月份才+1
+ let dateArr = []; //需要遍历的日历数组数据
+ let arrLen = 0; //dateArr的数组长度
+ let now = setYear ? new Date(setYear, setMonth) : new Date();
+ let year = setYear || now.getFullYear();
+ let nextYear = 0;
+ let month = setMonth || now.getMonth(); //没有+1方便后面计算当月总天数
+ let nextMonth = (month + 1) > 11 ? 1 : (month + 1);
+ let startWeek = new Date(year + '/' + (month + 1) + '/' + 1).getDay(); //目标月1号对应的星期
+ let dayNums = new Date(year, nextMonth, 0).getDate(); //获取目标月有多少天
+ let obj = {};
+ let num = 0;
+
+ if (month + 1 > 11) {
+ nextYear = year + 1;
+ dayNums = new Date(nextYear, nextMonth, 0).getDate();
+ }
+ arrLen = startWeek + dayNums;
+ for (let i = 0; i < arrLen; i++) {
+ if (i >= startWeek) {
+ num = i - startWeek + 1;
+ let date =util.formatDate(new Date(year +'/' + (month + 1) +'/' + num));
+ obj = {
+ isToday: '' + year + (month + 1) + num,
+ dateNum: num,
+ weight: 5,
+ date:date
+ }
+ } else {
+ obj = {};
+ }
+ dateArr[i] = obj;
+ }
+ dateArr.map(monthDate=>{
+ console.log(monthDate)
+ })
+ this.setData({
+ dateArr: dateArr
+ })
+
+ let nowDate = new Date();
+ let nowYear = nowDate.getFullYear();
+ let nowMonth = nowDate.getMonth() + 1;
+ let nowWeek = nowDate.getDay();
+ let getYear = setYear || nowYear;
+ let getMonth = setMonth >= 0 ? (setMonth + 1) : nowMonth;
+
+ if (nowYear == getYear && nowMonth == getMonth) {
+ this.setData({
+ isTodayWeek: true,
+ todayIndex: nowWeek
+ })
+ } else {
+ this.setData({
+ isTodayWeek: false,
+ todayIndex: -1
+ })
+ }
+ },
+ lastMonth: function () {
+ //全部时间的月份都是按0~11基准,显示月份才+1
+ let year = this.data.month - 2 < 0 ? this.data.year - 1 : this.data.year;
+ let month = this.data.month - 2 < 0 ? 11 : this.data.month - 2;
+ this.setData({
+ year: year,
+ month: (month + 1)
+ })
+ this.dateInit(year, month);
+ },
+ nextMonth: function () {
+ //全部时间的月份都是按0~11基准,显示月份才+1
+ let year = this.data.month > 11 ? this.data.year + 1 : this.data.year;
+ let month = this.data.month > 11 ? 0 : this.data.month;
+ this.setData({
+ year: year,
+ month: (month + 1)
+ })
+ this.dateInit(year, month);
+ },
+ onTapDay:function(e){
+ let date = e.currentTarget.dataset.date;
+ console.log(date)
+ if(!date || date.price===null || date.stock==null || date.stock==0) return;
+ this.triggerEvent("onTapDay",date)
+ },
+ }
+})
diff --git a/pages/component/myCalendar/index.json b/pages/component/myCalendar/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/pages/component/myCalendar/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/component/myCalendar/index.wxml b/pages/component/myCalendar/index.wxml
new file mode 100644
index 0000000..d259512
--- /dev/null
+++ b/pages/component/myCalendar/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
+ {{year}}年{{month}}月
+
+
+
+
+
+
+
+ {{item.dateNum}}
+
+ ¥{{dates[item.date].price==0?'免费':(dates[item.date].price/100)}}
+
+ 售罄
+
+
+
+
\ No newline at end of file
diff --git a/pages/component/myCalendar/index.wxss b/pages/component/myCalendar/index.wxss
new file mode 100644
index 0000000..a3d0095
--- /dev/null
+++ b/pages/component/myCalendar/index.wxss
@@ -0,0 +1,116 @@
+.date-show{
+ position: relative;
+ width: 250rpx;
+ font-family: PingFang-SC-Regular;
+ font-size: 40rpx;
+ color: #282828;
+ text-align: center;
+ margin: 30rpx auto;
+}
+.lt-arrow,.rt-arrow{
+ position: absolute;
+ top: 1rpx;
+ width: 60rpx;
+ line-height: 60rpx;
+padding-right: 0.6rem;
+}
+.lt-arrow image,.rt-arrow image{
+ width: 40rpx;
+ height: 40rpx;
+}
+.lt-arrow{
+ left: -110rpx;
+ /* transform: rotate(180deg); */
+}
+.rt-arrow{
+ right: -100rpx;
+}
+.header{
+ font-size: 0;
+ padding: 0 24rpx;
+}
+.header>view{
+ display: inline-block;
+ width: 14.285%;
+ color: #333;
+ font-size: 30rpx;
+ text-align: center;
+ border-bottom: 1px solid #D0D0D0;
+ padding: 39rpx 0;
+}
+.weekMark{
+ position: relative;
+}
+.weekMark view{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ /* border-bottom: 1px solid #22A7F6; */
+}
+.date-box{
+ font-size: 0;
+ padding: 10rpx 0;
+}
+.date-box>view{
+ position: relative;
+ width: 14.285%;
+ color: #020202;
+ font-size: 40rpx;
+ text-align: center;
+ vertical-align: middle;
+ height: 90rpx;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+}
+.date-head{
+ /* height: 60rpx; */
+ /* line-height: 60rpx; */
+ font-size: 26rpx;
+}
+.date-head.disable {
+ color: #999;
+}
+.date-tip {
+ font-size: 24rpx;
+ line-height: 26rpx;
+ color: #D62828;
+}
+.date-tip.disable {
+ color: #999;
+}
+.nowDay .date-head{
+ width: 60rpx;
+ line-height: 60rpx;
+ border-radius: 50%;
+ text-align: center;
+ color: #fff;
+ background-color: #0B898E;
+ margin: 0 auto;
+}
+.date-weight{
+ font-size: 22rpx;
+ padding: 15rpx 0;
+}
+.nowDay .date-weight{
+ color: #0B898E;
+}
+.one{
+ position: absolute;
+ bottom: 0;
+ right: 5rpx;
+ width: 20rpx;
+ height: 20rpx;
+ border-radius: 50%;
+ background-color: red;
+}
+.two{
+ position: absolute;
+ bottom: 30rpx;
+ right: 5rpx;
+ width: 20rpx;
+ height: 20rpx;
+ border-radius: 50%;
+ background-color: blue;
+}
\ No newline at end of file
diff --git a/pages/component/notice/notice.js b/pages/component/notice/notice.js
index 752ce65..4cae822 100644
--- a/pages/component/notice/notice.js
+++ b/pages/component/notice/notice.js
@@ -11,6 +11,10 @@ Component({
bookingInfo:{
type:Object,
value:{}
+ },
+ skuName:{
+ type:String,
+ value:""
}
},
lifetimes:{
@@ -26,7 +30,7 @@ Component({
* 组件的初始数据
*/
data: {
- safeBottom:app.globalData.safeBottom,
+ safeBottom:40,
maxHeight:300
},
diff --git a/pages/component/notice/notice.wxml b/pages/component/notice/notice.wxml
index debd822..b01eca2 100644
--- a/pages/component/notice/notice.wxml
+++ b/pages/component/notice/notice.wxml
@@ -5,12 +5,13 @@
- {{bookingInfo.skuName}}
-
-
-
-
-
+ {{skuName}}
+
+
+
+
+
+
diff --git a/pages/index/index.js b/pages/index/index.js
index 608a282..6648052 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,54 +1,261 @@
//index.js
//获取应用实例
-const app = getApp()
-
+let app = getApp()
+import commonApi from "../../utils/https/common"
+import util from "../../utils/util"
Page({
data: {
- motto: 'Hello World',
- userInfo: {},
- hasUserInfo: false,
- canIUse: wx.canIUse('button.open-type.getUserInfo')
+ banner:[],
+ xiaobanner:[],
+ height:0,
+ padHeight:0,
+ right:0,
+ weather:null,
+ saleProduct:null,
+ roadProduct:null,
+ fourProduct:[],
+ hotIndex:0,
+ indexHot:[],
+ area_ids:["zhangjiagang","changshu","taicang","kunshan","wujiang","wuzhong","xiangcheng","gusu","gongyeyuanqu","gaoxin"],
+ month:"",
+ months:['JAN','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','oct','nov','dec'],
+ date:"",
+ list:[],
+ listMore:true,
+ isTest:false
},
- //事件处理函数
- bindViewTap: function() {
- wx.navigateTo({
- url: '../logs/logs'
+ onLoad: function () {
+ let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
+ this.getList()
+ this.setData({
+ height:height,
+ padHeight:systemInfo.statusBarHeight,
+ right:(systemInfo.screenWidth - rect.right) + rect.width
+ })
+ commonApi._post("pbservice/Other/getClientConfig",{
+ unique_key:"wechatxcx"
+ }).then(res=>{
+ let data = JSON.parse(res.data)
+ this.setData({
+ indexHot:data.indexHot,
+ isTest:data.isTest
+ })
+ this.getFourProduct()
})
+ this.getTwoProduct()
+ this.getBanner()
+ this.getWeather()
+ // 获取今天的日期
+ let today = new Date();
+ this.setData({
+ month:(this.data.months[today.getMonth()]).toUpperCase(),
+ date:today.getDate()
+ })
+
},
- onLoad: function () {
- if (app.globalData.userInfo) {
+ // 一城百馆
+ city:function(){
+ wx.navigateToMiniProgram({
+ appId: 'wx114d514f39cb1fed',
+ path:"pages/index/index"
+ })
+ },
+ changeHotIndex:function(e){
+ this.setData({
+ hotIndex:e.currentTarget.dataset.index,
+ fourProduct:[]
+ })
+ this.getFourProduct()
+ },
+ getBanner:function(){
+ commonApi._post("adv/getAdvByKey",{
+ key:"xcxBanner"
+ }).then(res=>{
this.setData({
- userInfo: app.globalData.userInfo,
- hasUserInfo: true
+ banner:res.data.content || []
})
- } else if (this.data.canIUse){
- // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
- // 所以此处加入 callback 以防止这种情况
- app.userInfoReadyCallback = res => {
+ })
+ commonApi._post("adv/getAdvByKey",{
+ key:"xiaobanner"
+ }).then(res=>{
+ this.setData({
+ xiaobanner:res.data.content || []
+ })
+ })
+ },
+ getWeather:function(){
+ commonApi._post('pbservice/Ztfw/getWeather').then(res=>{
+ console.log(res)
+ this.setData({
+ weather:res.data
+ })
+ })
+ },
+ saleDetail:function(){
+ },
+ getTwoProduct:function(){
+ // 获取首页限时特惠
+ commonApi._post('act/fast_sale_now',{
+ offset:0,
+ limit:1
+ }).then(res=>{
+ if(res.data[0] && res.data[0].fast_sales_sku[0]){
this.setData({
- userInfo: res.userInfo,
- hasUserInfo: true
+ saleProduct:res.data[0].fast_sales_sku[0]
})
}
- } else {
- // 在没有 open-type=getUserInfo 版本的兼容处理
- wx.getUserInfo({
- success: res => {
- app.globalData.userInfo = res.userInfo
- this.setData({
- userInfo: res.userInfo,
- hasUserInfo: true
- })
+ })
+ commonApi._post("product/get_product_by_tag",{
+ tag_id:17,
+ offset:0,
+ limit:1
+ }).then(res=>{
+ this.setData({
+ roadProduct:res.data.list[0]
+ })
+ })
+ },
+ getFourProduct:function(){
+ let item = this.data.indexHot[this.data.hotIndex],service="product/get_product_by_tag",data={
+ tag_id:item.id,
+ offset:0,
+ limit:4,
+ sort:'weight',
+ order:'desc'
+ };
+ if(item.type=='scene'){
+ service="scene/get_scene_by_tag";
+ }
+ else if(item.type=='movie'){
+ service="Cinema/getHotMovieList";
+ data = {
+ page:1,
+ pageSize:4
+ };
+ }
+ commonApi._post(service,data).then(res=>{
+ this.setData({
+ fourProduct:res.data.list || res.data
+ })
+ })
+ },
+ tagGotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(this.data.indexHot[this.data.hotIndex].type=='movie'){
+ wx.navigateTo({
+ url: '/pages/list/movieticket/list/info/index?id='+item.third_id+'&title='+item.title,
+ })
+ }
+ else {
+ util.gotoDetail(item)
+ }
+ },
+ productGotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item)
+ },
+ gotoPath:function(e){
+ wx.navigateTo({
+ url: e.currentTarget.dataset.path,
+ })
+ },
+ gotoUrl:function(e){
+ let url = e.currentTarget.dataset.url;
+ app.globalData.weburl = url;
+ wx.navigateTo({
+ url:"/pages/pbService/web/index"
+ })
+ },
+ garbage:function(){
+ wx.navigateToMiniProgram({
+ appId: 'wx13be821f3b1afed3',
+ path:'pages/home/home'
+ })
+ },
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+ audioGuide:function(){
+ wx.navigateToMiniProgram({
+ appId: 'wx74f380bc721a0379',
+ path:'/pages/listen/listen'
+ })
+ },
+ // 热门推荐
+ getList:function(){
+ if(!this.data.listMore) return;
+ commonApi._post("search/recommend",{
+ offset:this.data.list.length,
+ limit:10
+ }).then(res=>{
+ res.data.map(item=>{
+ if(item.ext.display_tags){
+ item.ext.display_tags = item.ext.display_tags.split(",").splice(0,2)
+ }
+ else {
+ item.ext.display_tags = []
}
})
+ if(res.data.length<10) {
+ this.setData({
+ listMore:false
+ })
+ }
+ this.setData({
+ list:this.data.list.concat(res.data)
+ })
+ console.log(res)
+ })
+ },
+ onReachBottom:function(){
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(item.type=='travels'){
+ // 游记做特殊处理 其他都按照原来的来
+ wx.navigateTo({
+ url: '/pages/info/strategyInfo/index?id='+item.s_id,
+ })
+ }
+ else {
+ util.gotoDetail(item.ext);
}
},
- getUserInfo: function(e) {
- console.log(e)
- app.globalData.userInfo = e.detail.userInfo
- this.setData({
- userInfo: e.detail.userInfo,
- hasUserInfo: true
+ meituan:function(){
+ wx.navigateToMiniProgram({
+ appId: 'wxde8ac0a21135c07d',
+ path:"hotel/pages/h5/index?q=https%3A%2F%2Ffenxiao.meituan.com%2Fopdtor%2Fh5%2Fhotel%2Fsearch%3FpartnerId%3D16829"
})
+ },
+ // 轮播图点击
+ bannerClick:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(item.action=='href'){
+ wx.navigateTo({
+ url: item.href,
+ })
+ }
+ else if(item.action=="web"){
+ app.globalData.weburl = item.href;
+ wx.navigateTo({
+ url: "/pages/pbService/web/index",
+ })
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
}
})
diff --git a/pages/index/index.json b/pages/index/index.json
index 8835af0..db066e2 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -1,3 +1,5 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "common-image":"/pages/component/commonImage/index"
+ }
}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 5d30139..991f9bc 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,27 +1,256 @@
-
-
-
-
-
- {{userInfo.nickName}}
-
-
-
- {{motto}}
-
- 登录授权
- feiyi
- 活动
- 一卡游苏州
- 精品线路
- 攻略
- 酒店住宿
- 夜游苏州
- 限时特惠
- 电影票
- 影院
- 非遗
- 文物查询
- 苏城六纪
+
+
+
+
+
+
+
+
+
+ {{weather.max_temp}}°
+ {{weather.weather}}
+
+
+ 搜索想要的旅游产品或服务
+
+
+
+
+
+
+
+ 活动日历
+
+
+
+ 景点门票
+
+
+
+ 酒店住宿
+
+
+
+ 夜游苏州
+
+
+
+ 一卡游苏州
+
+
+
+ 场馆预约
+
+
+
+ 非遗专卖
+
+
+
+ 剧场演出
+
+
+
+ 文创特产
+
+
+
+ 电影购票
+
+
+
+
+
+ 限时特惠超值商品限时抢购
+
+
+
+
+
+
+ {{saleProduct.sku.product.title+saleProduct.sku.sku_name}}
+ ¥{{saleProduct.price/100}}起
+
+
+
+
+ 精品线路精品线路精心挑选
+
+
+
+
+
+
+ {{roadProduct.title}}
+ ¥{{roadProduct.price/100}}起
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 更多
+
+
+
+
+
+
+ 找厕所
+
+
+
+ 停车场
+
+
+
+ 安全服务
+
+
+
+
+ 公共自行车
+
+
+
+ 借书还书
+
+
+
+
+ 非遗传承
+
+
+
+ 投资导引图
+
+
+
+ 文保单位
+
+
+
+ 文物查询
+
+
+
+ 在线鉴赏
+
+
+
+ 体育场馆
+
+
+
+ 垃圾分类
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{date}} {{month}}
+
+ {{item.ext.display_tags[0]}}
+ {{item.title}}
+
+
+
+
+
+ {{item.ext.subtitle}}
+
+
+ {{item.title}}
+
+
+
+ {{item.ext.like_number}}
+
+
+
+ {{item.ext.view_number}}
+
+
+
+
+
+
+
+ {{item.ext.address}}
+
+
+ {{item.title}}
+
+ {{item}}
+
+ ¥{{item.ext.price/100}}起
+
+
+
+
+
+
+ 暂无更多推荐
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index ce30de0..9b21d88 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -1,21 +1,461 @@
/**index.wxss**/
-.userinfo {
+.swiper,.swiper image {
+ width: 100%;
+ display: block;
+ height: 367rpx;
+}
+.top-box {
+ position: absolute;
display: flex;
- flex-direction: column;
align-items: center;
+ left: 9rpx;
+ margin-right: 19rpx;
+ top: 14rpx;
+ justify-content: space-between;
}
-
-.userinfo-avatar {
+.top-box image {
+ flex-shrink: 0;
+ width: 53rpx;
+ height: 53rpx;
+ display: block;
+ margin-left: 14rpx;
+}
+.search-box {
+ flex: 1;
+ width: 423rpx;
+ height: 54rpx;
+ background: #F6F6F6;
+ border-radius: 27rpx;
+ display: flex;
+ align-items: center;
+ color: #999999;
+ font-size: 23rpx;
+ margin: 0 30rpx;
+}
+.search-box .iconfont {
+ font-size: 28rpx;
+ margin-left: 20rpx;
+ margin-right: 10rpx;
+}
+.top-box .weather-num,.top-box .weather {
+ flex-shrink: 0;
+ color: #fff;
+}
+.top-box .weather-num {
+ font-size: 29rpx;
+ margin-bottom: 10rpx;
+ margin-left: 4rpx;
+}
+.top-box .weather {
+ font-size: 19rpx;
+ margin-top: 20rpx;
+ margin-left: -4rpx;
+}
+.top-icons {
+ background: #FFFFFF;
+ box-shadow: 0px 3rpx 26rpx 0px rgba(6, 0, 1, 0.13);
+ border-radius: 27rpx;
+ margin: 0 20rpx;
+ margin-top: -20rpx;
+ position: relative;
+ z-index: 1;
+ display: flex;
+ padding: 34rpx 0;
+ padding-bottom: 7rpx;
+ justify-content: space-between;
+ flex-wrap: wrap;
+}
+.top-icon-item {
+ margin-bottom: 30rpx;
+ line-height: 37rpx;
+ font-size: 25rpx;
+ color: #000;
+ text-align: center;
+ flex-shrink: 0;
+ width: 20%;
+}
+.top-icon-item:nth-child(5n){
+ margin-right: 0;
+}
+.top-icon-item image {
+ width: 87rpx;
+ display: block;
+ margin: 0 auto;
+ margin-bottom: 18rpx;
+}
+.content {
+ margin: 0 25rpx;
+}
+.sale-road-boxes {
+ display: flex;
+ justify-content: space-between;
+ margin-top: 60rpx;
+}
+.sale-box {
+ flex-shrink: 0;
+ width: 337rpx;
+}
+.sale-title {
+ color: #999999;
+ font-size: 20rpx;
+ margin-bottom: 20rpx;
+}
+.sale-title text {
+ color: #000000;
+ font-size: 32rpx;
+ font-weight: 500;
+ margin-right: 8rpx;
+}
+.sale-product {
+ width: 337rpx;
+ position: relative;
+ height: 165rpx;
+ overflow: hidden;
+ border-radius: 8rpx;
+}
+.sale-product-bg {
+ width: 197rpx;
+ height: 165rpx;
+ position: absolute;
+ left: 0;
+ top: 0;
+ background: linear-gradient(90deg, #F78C56, #FB6044);
+
+}
+.road-product-bg {
+ background: linear-gradient(90deg, #35CFB4, #00A6A0);
+}
+.sale-img {
+ position: absolute;
+ right: 0;
+ top: 0;
+ width: 173rpx;
+ height: 165rpx;
+}
+.sale-info {
+ position: absolute;
+ left: 20rpx;
+ top: 20rpx;
+ bottom: 20rpx;
+ width: 140rpx;
+}
+.sale-product-title {
+ font-size: 28rpx;
+ color: #fff;
+ font-weight: 500;
+ line-height: 36rpx;
+}
+.sale-price {
+ padding: 0 10rpx;
+ color: #F44747;
+ font-size: 25rpx;
+ line-height: 39rpx;
+ background: #FFFFFF;
+ border-radius: 5rpx;
+ margin-top: 15rpx;
+ display: inline-block;
+}
+.sale-tip-img {
+ position: absolute;
+ width: 180rpx;
+ left: 157rpx;
+ top: 0;
+}
+.small-swiper {
+ height: 154rpx;
+}
+.small-swiper image {
+ display: block;
+ width: 100%;
+ height: 154rpx;
+}
+.small-swiper-box {
+ margin: 85rpx 0;
+ width: 100%;
+ height: 154rpx;
+ border-radius: 77rpx;
+ overflow: hidden;
+}
+.product-tags {
+ display: flex;
+ margin-top: 40rpx;
+ margin-bottom: 50rpx;
+ overflow-x: auto;
+}
+.product-tag {
+ padding: 0 20rpx;
+ height: 43rpx;
+ background: #F4F4F4;
+ border-radius: 21rpx;
+ font-size: 27rpx;
+ color: #666;
+ margin-right: 20rpx;
+ flex-shrink: 0;
+}
+.product-tag.active {
+ background: #0B898E;
+ color: #fff;
+}
+.tag-product-list {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
+.tag-product {
+ width: 337rpx;
+ background: #FFFFFF;
+ box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
+ border-radius: 13rpx;
+ margin-bottom: 35rpx;
+}
+.tag-product image {
+ display: block;
+ width: 337rpx;
+ height: 213rpx;
+ border-radius: 13rpx 13rpx 0px 0px;
+}
+.tag-product .product-info {
+ padding: 20rpx;
+ padding-bottom: 0;
+}
+.tag-product .tag-product-title {
+ font-size: 33rpx;
+ color: #333333;
+ font-weight: 500;
+ margin-bottom: 10rpx;
+}
+.tag-product .tag-product-address {
+ color: #999;
+ font-size: 22rpx;
+ line-height: 40rpx;
+ padding-bottom: 10rpx;
+}
+.tag-product-price-box {
+ display: flex;
+ height: 70rpx;
+ align-items: center;
+ border-top: 1rpx solid #ccc;
+ justify-content: space-between;
+}
+.tag-product .tag-product-address .iconfont {
+ font-size: 26rpx;
+}
+.price {
+ color: #D62828;
+ font-size: 24rpx;
+}
+.price text:nth-child(2){
+ font-weight: 500;
+ font-size: 33rpx;
+}
+.price text:nth-child(3){
+ font-size: 20rpx;
+ color: #8D8D8D;
+ margin-left: 4rpx;
+}
+.sale-number {
+ font-size: 24rpx;
+ color: #666;
+}
+.sale-number text {
+ font-size: 21rpx;
+}
+.more-btn {
+ line-height: 77rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ text-align: center;
+ color: #0B898E;
+ font-size: 31rpx;
+ font-weight: 500;
+}
+.pic-list {
+ display: flex;
+ justify-content: space-between;
+ margin: 90rpx 0;
+}
+.pic-list image {
+ width: 160rpx;
+ height: 200rpx;
+ display: block;
+}
+.title-more {
+ font-size: 27rpx;
+ color: #0B898E;
+}
+.title-more .iconfont {
+ font-size: 22rpx;
+}
+.pbservice {
+ width: calc(175rpx * 6);
+ display: flex;
+ margin-top: 20rpx;
+ flex-wrap: wrap;
+ margin-bottom: 100rpx;
+}
+.pbservice-item {
+ width: 175rpx;
+ text-align: center;
+ font-size: 25rpx;
+ color: #333;
+ line-height: 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+}
+.pbservice-item image {
+ width: 63rpx;
+ margin-bottom: 20rpx;
+ margin-top: 50rpx;
+}
+.six-box {
+ margin-top: 43rpx;
+ display: flex;
+ margin-bottom: 80rpx;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
+.six-box image {
width: 128rpx;
- height: 128rpx;
- margin: 20rpx;
- border-radius: 50%;
+ height: 110rpx;
+ margin-bottom: 20rpx;
}
-
-.userinfo-nickname {
- color: #aaa;
+.hot-list {
+ display: flex;
+ margin-top: 47rpx;
+ justify-content: space-between;
+}
+.hot-list-item {
+ width: 337rpx;
+}
+.hot-item {
+ background: white;
+ box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
+ border-radius: 15rpx;
+ margin-bottom: 35rpx;
}
+.hot-item image:nth-child(1) {
+ display: block;
+ width: 100%;
+ border-radius: 15rpx 15rpx 0 0;
+}
+.hot-item .hot-info {
+ padding: 20rpx 25rpx;
+}
+.hot-item .hot-title {
+ font-size: 32rpx;
+ color: #333;
+ font-weight: 500;
+}
+.hot-info .tags {
+ display: flex;
+ align-items: center;
+ width: 286rpx;
+ margin: 15rpx 0;
+}
+.hot-info .tag {
+ margin-right: 16rpx;
+ line-height: 32rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 5rpx;
+ box-sizing: border-box;
+ padding: 0 10rpx;
+ color: #0B898E;
+ font-size: 20rpx;
+}
+.hot-info .tag:last-child {
+ margin-right: 0;
+}
+.hot-price {
+ color: #D62828;
+ font-size: 24rpx;
+}
+.hot-price text:nth-child(2){
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.hot-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #8D8D8D;
+ margin-left: 4rpx;
+}
+.hot-location {
+ position: absolute;
+ color: #fff;
+ line-height: 32rpx;
+ font-size: 19rpx;
+ padding: 20rpx;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+.hot-location .iconfont {
+ font-size: 22rpx;
+ margin-right: 10rpx;
+}
+.hot-info .tags .icon-box {
+ flex-shrink: 0;
+ width: 50%;
+ text-align: left;
+ color: #666666;
+ font-size: 21rpx;
+ display: flex;
+ align-items: center;
+}
+.hot-info .tags .icon-box .iconfont {
+ font-size: 30rpx;
+ margin-right: 5rpx;
+}
+.today-hot {
+ position: relative;
+ border-radius: 15rpx;
+ font-size: 0;
+}
+.today-hot .today-main-img {
+ border-radius: 15rpx;
+ height: 615rpx;
+}
+.today-hot-box {
+ position: absolute;
+ left: 10rpx;
+ right: 10rpx;
+ bottom: 10rpx;
+}
+.today-hot-tag {
+ line-height: 34rpx;
+ max-width: 265rpx;
+ background: #FF2245;
+ border-radius: 15rpx 15rpx 0px 0px;
+ padding: 0 15rpx;
+ color: #fff;
+ font-size: 20rpx;
+ display: inline-block;
+ margin: 0 40rpx;
+}
+.today-hot-title {
+ background: rgba(255, 255, 255, 0.8);
+ padding: 20rpx 28rpx;
+ border-radius: 13rpx;
+ font-size: 33rpx;
+ color: #000;
+ font-weight: 500;
-.usermotto {
- margin-top: 200px;
+}
+.today-hot .today-tip-img {
+ position: absolute;
+ width: 154rpx;
+ left: 11rpx;
+ top: 31rpx;
+}
+.today-date {
+ position: absolute;
+ top: 65rpx;
+ left: 11rpx;
+ width: 154rpx;
+ text-align: center;
+ font-size: 30rpx;
+ color: #fff;
+ letter-spacing: 3rpx;
+ font-weight: 500;
}
\ No newline at end of file
diff --git a/pages/info/activityInfo/index.js b/pages/info/activityInfo/index.js
new file mode 100644
index 0000000..333c161
--- /dev/null
+++ b/pages/info/activityInfo/index.js
@@ -0,0 +1,103 @@
+// pages/info/activityInfo/index.js
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:null,
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let id = options.id;
+ this.setData({
+ id:id
+ })
+ commonApi._post("pbservice/Actcalendar/getActDetail",{
+ id:id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ },
+ order:function(){
+ let skuid = this.data.info.sku_id;
+ if(!skuid) return;
+ commonApi._post("product/get_sku_detail_by_id",{
+ sku_id:skuid
+ }).then(res=>{
+ if(!res.data){
+ wx.showToast({
+ title: '本活动不支持预约',
+ icon:'none'
+ })
+ return;
+ }
+ app.globalData.couponInfo = null;
+ app.globalData.product = {
+ sku:res.data,
+ product:res.data.product
+ }
+ wx.navigateTo({
+ url: '/pages/order/scene/index?type=museum',
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/activityInfo/index.json b/pages/info/activityInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/activityInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/activityInfo/index.wxml b/pages/info/activityInfo/index.wxml
new file mode 100644
index 0000000..e39ed60
--- /dev/null
+++ b/pages/info/activityInfo/index.wxml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+ {{info.name}}
+
+
+ 活动时间:{{info.begin_date}} ~ {{info.end_date}}
+
+
+
+ 活动地点:{{info.detail_address}}
+
+
+
+ 活动时间
+
+
+ {{info.begin_date}} ~ {{info.end_date}}
+
+ 活动详情
+
+
+
+
+
+
+ 预约活动
+ 活动已过期
+
\ No newline at end of file
diff --git a/pages/info/activityInfo/index.wxss b/pages/info/activityInfo/index.wxss
new file mode 100644
index 0000000..ffb6954
--- /dev/null
+++ b/pages/info/activityInfo/index.wxss
@@ -0,0 +1,95 @@
+/* pages/info/activityInfo/index.wxss */
+.swiper ,.swiper image{
+ width: 100%;
+ height: 330rpx;
+ display: block;
+}
+.top-box {
+ margin: 25rpx;
+ margin-top: -25rpx;
+ position: relative;
+ z-index: 1;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ border-radius: 13rpx;
+ padding: 20rpx 30rpx;
+}
+.top-box-title {
+ font-size: 31rpx;
+ color: #000;
+}
+.top-tip-box {
+ font-size: 24rpx;
+ color: #999;
+ display: flex;
+ align-items: center;
+ margin-top: 20rpx;
+}
+.top-tip-box image {
+ width: 29rpx;
+ height: 29rpx;
+ display: block;
+ margin-right: 25rpx;
+}
+.box-title {
+ font-weight: 500;
+ font-size: 35rpx;
+ color: #000;
+ margin: 0 27rpx;
+ margin-top: 50rpx;
+}
+.box-content {
+ margin: 0 27rpx;
+ font-size: 25rpx;
+ color: #333;
+ margin-top: 34rpx;
+ display: block;
+}
+.box-tip {
+ margin: 0 27rpx;
+ color: #D62828;
+ margin-top: 50rpx;
+ font-size: 25rpx;
+ margin-bottom: 30rpx;
+}
+.time {
+ margin: 0 27rpx;
+ margin-bottom: 17rpx;
+ border: 1rpx solid #999;
+ border-radius: 10rpx;
+ color: #666;
+ font-size: 24rpx;
+ padding: 0 19rpx;
+ line-height: 73rpx;
+}
+.time.active {
+ border-color: #0B898E;
+ background: #0B898E;
+ color: #fff;
+}
+.bottom-fixed {
+ position: fixed;
+ width: 750rpx;
+ height: 104rpx;
+ background: #FFFFFF;
+ left: 0;
+ bottom: 0;
+ box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
+ display: flex;
+ z-index: 1;
+ align-items: center;
+ justify-content: center;
+}
+.bottom-btn {
+ width: 391rpx;
+ line-height: 74rpx;
+ background: #D62828;
+ border-radius: 37rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ color: #fff;
+ text-align: center;
+}
+.bottom-btn.disable {
+ background: #ccc;
+}
\ No newline at end of file
diff --git a/pages/info/cardInfo/index.js b/pages/info/cardInfo/index.js
new file mode 100644
index 0000000..4ac81e4
--- /dev/null
+++ b/pages/info/cardInfo/index.js
@@ -0,0 +1,168 @@
+// pages/info/roadInfo/index.js
+let device = wx.getSystemInfoSync();
+const ratio = device.windowWidth / 750;
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fixed:false,
+ type:1,
+ info:null,
+ top:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.id){
+ this.setData({
+ id:options.id
+ })
+ }
+ else {
+ util.back();
+ return;
+ }
+ let rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
+ console.log(height)
+ this.setData({
+ top:height
+ })
+ let api = commonApi._post;
+ if(wx.getStorageSync("jstrip_token")){
+ api = commonApi.user_post;
+ }
+ api("product/get_product_detail",{
+ id:options.id
+ }).then(res=>{
+ res.data.display_tags = (res.data.display_tags?res.data.display_tags.split(","):[]).splice(0,2);
+ res.data.sku.map(item=>{
+ item.sku_model.recharge = item.sku_model.recharge?item.sku_model.recharge.split(","):[];
+ item.sku_model.recharge.map(item=>{
+ item = Number(item);
+ })
+ })
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+ changeMenu:function(e){
+ let index = e.currentTarget.dataset.index,that = this;
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
+ query.selectViewport().scrollOffset() //获取页面查询位置的
+ query.exec(function(res) {
+ let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.data.top;
+ wx.pageScrollTo({
+ scrollTop: scrollTop + 4,
+ duration: 0
+ })
+ that.setData({
+ type:index
+ })
+ })
+ },
+ order:function(){
+ app.globalData.couponInfo = null;
+ app.globalData.product = {
+ product:this.data.info,
+ sku:this.data.info.sku[0]
+ }
+ wx.navigateTo({
+ url: '/pages/order/card/index'
+ })
+ },
+ onPageScroll:function(e){
+ let that = this,height = this.data.top;
+ let topHeight = height;
+ wx.createSelectorQuery().select('#menus').boundingClientRect(function(rect){
+ console.log(rect.top,topHeight)
+ if(rect.top<=topHeight){
+ // 此时应该把menus固定在顶部
+ that.setData({
+ fixed:true
+ })
+ }
+ else{
+ that.setData({
+ fixed:false
+ })
+ }
+ // 滚动时判断滚动到哪个部分了
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
+ let minHeight = that.data.fixed?(110 * ratio + height): topHeight;
+ query.exec(function(res) {
+ if(res[1].top
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+ {{item}}
+ ¥{{info.price/100}}起
+
+
+
+
+
+
+ ¥{{info.price/100}}
+
+ 立即预订
+
\ No newline at end of file
diff --git a/pages/info/cardInfo/index.wxss b/pages/info/cardInfo/index.wxss
new file mode 100644
index 0000000..3e58a8b
--- /dev/null
+++ b/pages/info/cardInfo/index.wxss
@@ -0,0 +1,368 @@
+/* pages/info/hotelProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+ margin-right: 10rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-price {
+ flex: 1;
+ text-align: right;
+ color: #D62828;
+}
+.tags-price text:nth-child(1){
+ font-size: 27rpx;
+}
+.tags-price text:nth-child(2){
+ font-size: 40rpx;
+ font-weight: bold;
+}
+.tags-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #999999;
+ margin-left: 4rpx;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.date-all-box {
+ margin: 24rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 80rpx;
+ border-radius: 13rpx;
+ background: #0B898E;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: 500;
+ padding: 0 37rpx;
+}
+.days {
+ text-align: center;
+ font-size: 400;
+ width: 84rpx;
+ line-height: 34rpx;
+ height: 34rpx;
+ border-radius: 18rpx;
+ border: 1px solid white;
+ font-size: 23rpx;
+}
+.picker text {
+ font-weight: 400;
+ font-size: 21rpx;
+ margin-left: 13rpx;
+}
+.product-item {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin: 20rpx;
+ padding: 24rpx 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.product-item image {
+ width: 201rpx;
+ height: 201rpx;
+ border-radius: 10rpx;
+ margin-right: 26rpx;
+ flex-shrink: 0;
+}
+.product-item .product-info {
+ flex: 1;
+}
+.product-item .product-info .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-right {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+}
+.product-right .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.product-right .btn {
+ color: #fff;
+ width: 120rpx;
+ line-height: 80rpx;
+ background: #D62828;
+ border-radius: 13rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ text-align: center;
+ margin-top: 20rpx;
+}
+.product-info .subtitle {
+ font-size: 24rpx;
+ line-height: 36rpx;
+ height: 72rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ color: #999;
+ white-space: normal;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.scroll-all-box {
+ margin: 24rpx 0;
+ background: white;
+}
+.scroll-menus {
+ padding: 0 40rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 29rpx;
+ color: #333;
+ height: 84rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+}
+.scroll-menu-item {
+ position: relative;
+ line-height: 84rpx;
+}
+.scroll-menu-item:nth-child(1){
+ margin-right: 247rpx;
+}
+.scroll-menu-item.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 6rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0rpx;
+}
+.fixed-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ z-index: 1;
+}
+.info-title {
+ font-size: 35rpx;
+ font-weight: bold;
+ color: #000;
+ margin-bottom: 30rpx;
+}
+.info-box {
+ padding: 20rpx 40rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 140rpx;
+ background: white;
+ display: flex;
+ align-items: center;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ padding: 0 40rpx;
+ color: #666666;
+ font-size: 23rpx;
+ justify-content: space-between;
+ text-align: center;
+}
+.fixed-bottom .kefu-box {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.btn {
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ width: 294rpx;
+ line-height: 78rpx;
+ background: #D62828;
+ border-radius: 39rpx;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/pages/info/foodInfo/index.js b/pages/info/foodInfo/index.js
new file mode 100644
index 0000000..34e0753
--- /dev/null
+++ b/pages/info/foodInfo/index.js
@@ -0,0 +1,73 @@
+// pages/info/foodInfo/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("scene/detail",{
+ id:options.id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/foodInfo/index.json b/pages/info/foodInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/foodInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/foodInfo/index.wxml b/pages/info/foodInfo/index.wxml
new file mode 100644
index 0000000..2451d2b
--- /dev/null
+++ b/pages/info/foodInfo/index.wxml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+ {{info.address}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/info/foodInfo/index.wxss b/pages/info/foodInfo/index.wxss
new file mode 100644
index 0000000..10f6761
--- /dev/null
+++ b/pages/info/foodInfo/index.wxss
@@ -0,0 +1,34 @@
+/* pages/info/foodInfo/index.wxss */
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+page {
+ background: #f6f6f6;
+}
+.top-box {
+ padding: 20rpx 39rpx;
+ background: white;
+ border-radius: 20rpx 20rpx 0px 0px;
+ margin-bottom: 25rpx;
+}
+.title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight:500;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-top: 20rpx;
+}
+.content {
+ font-size: 30rpx;
+ padding: 40rpx;
+ background: white;
+}
\ No newline at end of file
diff --git a/pages/info/foodProductInfo/index.js b/pages/info/foodProductInfo/index.js
new file mode 100644
index 0000000..1effabf
--- /dev/null
+++ b/pages/info/foodProductInfo/index.js
@@ -0,0 +1,123 @@
+// pages/info/sceneProductInfo/index.js
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:{},
+ number:['一','二','三','四','五','六','七','八','九','十','十一','十二'],
+ skuIndex:0,
+ bookingInfo:null,
+ skuName:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let api = commonApi._post
+ if(wx.getStorageSync("jstrip_token")){
+ api = commonApi.user_post
+ }
+ api("product/get_product_detail",{
+ id:options.id
+ }).then(res=>{
+ let tags = res.data.display_tags?res.data.display_tags.split(","):[];
+ res.data.tags = tags.splice(0,2);
+ res.data.sku.map(item=>{
+ item.display_tags = (item.display_tags?item.display_tags.split(','):[]).splice(0,2)
+ })
+ // res.data.listimg = res.data.listimg?res.data.listimg.split(","):[];
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ },
+ changeSku:function(e){
+ this.setData({
+ skuIndex:e.currentTarget.dataset.index
+ })
+ },
+ showNotice:function(e){
+ let sku = e.currentTarget.dataset.sku;
+ this.setData({
+ skuName:sku.sku_name,
+ bookingInfo:sku.sku_model
+ })
+ },
+ closeMask:function(){
+ this.setData({
+ skuName:"",
+ bookingInfo:null
+ })
+ },
+ gotoLocation:function(){
+ let info = this.data.info;
+ if(info && info.lat && info.lon){
+ wx.openLocation({
+ latitude: Number(info.lat),
+ longitude: Number(info.lon)
+ })
+ }
+ },
+ order:function(e){
+ app.globalData.couponInfo = null;
+ app.globalData.product = e.currentTarget.dataset;
+ wx.navigateTo({
+ url: '/pages/order/food/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/foodProductInfo/index.json b/pages/info/foodProductInfo/index.json
new file mode 100644
index 0000000..b5d8d8b
--- /dev/null
+++ b/pages/info/foodProductInfo/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "notice":"/pages/component/notice/notice"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/foodProductInfo/index.wxml b/pages/info/foodProductInfo/index.wxml
new file mode 100644
index 0000000..75e7f7f
--- /dev/null
+++ b/pages/info/foodProductInfo/index.wxml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+ {{item}}
+ ¥{{info.price/100}}起
+
+
+
+
+
+ {{info.title}}
+
+
+ {{item.sku_name}}
+
+
+
+ {{item}}
+
+ 预订须知>>
+
+
+ ¥{{item.price/100}}起
+ 立即预订
+
+
+
+
+
+
+
+ 商家信息
+
+
+ 商家电话:{{info.supplier_tel}}
+
+
+
+ 商家地址:{{info.supplier_address}}
+
+
+
+ 购买须知
+
+
+ 套餐{{number[index]}}
+
+
+
+
+
+
+
+
+
+
+ 产品详情
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/info/foodProductInfo/index.wxss b/pages/info/foodProductInfo/index.wxss
new file mode 100644
index 0000000..fd49a9a
--- /dev/null
+++ b/pages/info/foodProductInfo/index.wxss
@@ -0,0 +1,309 @@
+/* pages/info/sceneProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+ margin-right: 10rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-text {
+ flex: 1;
+ text-align: right;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.box {
+ margin: 20rpx;
+ padding: 0 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 120rpx;
+ border-top: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+}
+.info-address {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 30rpx;
+ color: #999;
+ font-size: 29rpx;
+}
+.info-address .iconfont {
+ color: #0B898E;
+ font-size: 31rpx;
+}
+.product-item {
+ margin: 0 20rpx;
+ padding: 27rpx 0;
+ border-bottom: 1rpx solid #ccc;
+}
+.skutitle {
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.product-box {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin-top: 20rpx;
+}
+.product-left {
+ flex: 1;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.order-tip-text {
+ margin-top: 33rpx;
+ font-size: 24rpx;
+ color: #666;
+}
+.product-right {
+ text-align: center;
+ flex-shrink: 0;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 24rpx;
+ margin-bottom: 20rpx;
+}
+.product-right .price text:nth-child(2){
+ font-weight: 500;
+ font-size: 33rpx;
+}
+.product-right .price text:nth-child(3){
+ color: #8D8D8D;
+ font-size: 20rpx;
+}
+.product-right .btn {
+ background: #D62828;
+ color: #fff;
+ border-radius: 30px;
+ line-height: 60rpx;
+ font-size: 29rpx;
+ font-weight: 500;
+ width: 176rpx;
+}
+.box .product-item:last-child {
+ border-bottom: none;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.icon-xin,.icon-shoucang {
+ position: fixed;
+ right: 20rpx;
+ margin-top: 20rpx;
+ width: 60rpx;
+ line-height: 60rpx;
+ background: rgba(0, 0, 0, 0.4);
+ border-radius: 50%;
+ text-align: center;
+ color: #fff;
+ font-size: 36rpx;
+ z-index: 3;
+}
+.icon-shoucang {
+ color: #D62828;
+}
+.tags-price {
+ flex: 1;
+ text-align: right;
+ color: #D62828;
+}
+.tags-price text:nth-child(1){
+ font-size: 27rpx;
+}
+.tags-price text:nth-child(2){
+ font-size: 40rpx;
+ font-weight: bold;
+}
+.tags-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #999999;
+ margin-left: 4rpx;
+}
+.sku-items {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ margin-bottom: 1rpx;
+}
+.sku-item {
+ padding: 0 46rpx;
+ font-size: 29rpx;
+ color: #666;
+ border: 1rpx solid #999;
+ line-height: 58rpx;
+ margin-right: 40rpx;
+ margin-bottom: 25rpx;
+}
+.sku-item.active {
+ background: #0B898E;
+ border-color: #0B898E;
+ color: #fff;
+}
+.details {
+ padding-bottom: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/info/hotelInfo/index.js b/pages/info/hotelInfo/index.js
new file mode 100644
index 0000000..437fd31
--- /dev/null
+++ b/pages/info/hotelInfo/index.js
@@ -0,0 +1,129 @@
+// pages/info/roadInfo/index.js
+let device = wx.getSystemInfoSync();
+const ratio = device.windowWidth / 750;
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fixed:false,
+ type:1,
+ top:0,
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
+ console.log(height)
+ this.setData({
+ top:height
+ })
+ commonApi._post("scene/detail",{
+ id:options.id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+ changeMenu:function(e){
+ let index = e.currentTarget.dataset.index,that = this;
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
+ query.selectViewport().scrollOffset() //获取页面查询位置的
+ query.exec(function(res) {
+ let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.data.top;
+ wx.pageScrollTo({
+ scrollTop: scrollTop + 4,
+ duration: 0
+ })
+ that.setData({
+ type:index
+ })
+ })
+ },
+ onPageScroll:function(e){
+ let that = this,height = this.data.top;
+ let topHeight = height;
+ // 滚动时判断滚动到哪个部分了
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box3").boundingClientRect() //选择toViewid获取位置信息
+ let minHeight = that.data.fixed?(110 * ratio + height): topHeight;
+ query.exec(function(res) {
+ if(res[2].top
+
+
+
\ No newline at end of file
diff --git a/pages/info/hotelInfo/index.wxss b/pages/info/hotelInfo/index.wxss
new file mode 100644
index 0000000..c1d14a2
--- /dev/null
+++ b/pages/info/hotelInfo/index.wxss
@@ -0,0 +1,361 @@
+/* pages/info/hotelProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-price {
+ flex: 1;
+ text-align: right;
+ color: #D62828;
+}
+.tags-price text:nth-child(1){
+ font-size: 27rpx;
+}
+.tags-price text:nth-child(2){
+ font-size: 40rpx;
+ font-weight: bold;
+}
+.tags-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #999999;
+ margin-left: 4rpx;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.date-all-box {
+ margin: 24rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 80rpx;
+ border-radius: 13rpx;
+ background: #0B898E;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: 500;
+ padding: 0 37rpx;
+}
+.days {
+ text-align: center;
+ font-size: 400;
+ width: 84rpx;
+ line-height: 34rpx;
+ height: 34rpx;
+ border-radius: 18rpx;
+ border: 1px solid white;
+ font-size: 23rpx;
+}
+.picker text {
+ font-weight: 400;
+ font-size: 21rpx;
+ margin-left: 13rpx;
+}
+.product-item {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin: 20rpx;
+ padding: 24rpx 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.product-item image {
+ width: 201rpx;
+ height: 201rpx;
+ border-radius: 10rpx;
+ margin-right: 26rpx;
+ flex-shrink: 0;
+}
+.product-item .product-info {
+ flex: 1;
+}
+.product-item .product-info .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-right {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+}
+.product-right .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.product-right .btn {
+ color: #fff;
+ width: 120rpx;
+ line-height: 80rpx;
+ background: #D62828;
+ border-radius: 13rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ text-align: center;
+ margin-top: 20rpx;
+}
+.product-info .subtitle {
+ font-size: 24rpx;
+ line-height: 36rpx;
+ height: 72rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ color: #999;
+ white-space: normal;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.scroll-all-box {
+ background: white;
+}
+.scroll-menus {
+ padding: 0 40rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 29rpx;
+ color: #333;
+ height: 84rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+}
+.scroll-menu-item {
+ position: relative;
+ line-height: 84rpx;
+}
+.scroll-menu-item.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 6rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0rpx;
+}
+.fixed-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ z-index: 1;
+}
+.info-title {
+ font-size: 35rpx;
+ font-weight: bold;
+ color: #000;
+ margin-bottom: 30rpx;
+}
+.info-box {
+ padding: 20rpx 40rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 140rpx;
+ background: white;
+ display: flex;
+ align-items: center;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ padding: 0 40rpx;
+ color: #666666;
+ font-size: 23rpx;
+ justify-content: space-between;
+ text-align: center;
+}
+.fixed-bottom .iconfont {
+ font-size: 34rpx;
+}
+.btn {
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ width: 294rpx;
+ line-height: 78rpx;
+ background: #D62828;
+ border-radius: 39rpx;
+ text-align: center;
+}
diff --git a/pages/info/hotelProductInfo/index.js b/pages/info/hotelProductInfo/index.js
new file mode 100644
index 0000000..3a179a5
--- /dev/null
+++ b/pages/info/hotelProductInfo/index.js
@@ -0,0 +1,246 @@
+// pages/info/hotelProductInfo/index.js
+import util from "../../../utils/util"
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ listimgs:[],
+ startDate:"",//入住时间
+ endDate:"",//离店时间
+ startDateText:"",//入住时间转文字
+ endDateText:"",//离店时间转文字
+ days:1,//住店的日期总数
+ today:"",//今天,也就是入住可以选择的日期
+ tomorrow:"",//离店最早可以选择的日期
+ sceneInfo:null,
+ ask:[],
+ isLike:0,
+ commentTotal:0,
+ comment:[],
+ products:[],
+ isTest:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ commonApi._post("pbservice/Other/getClientConfig",{
+ unique_key:"wechatxcx"
+ }).then(res=>{
+ let data = JSON.parse(res.data);
+ this.setData({
+ isTest:data.isTest
+ })
+ })
+ // 先初始化日期
+ let today = new Date(),tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000);
+ this.setData({
+ today:util.formatDate(today),
+ startDate:util.formatDate(today),
+ endDate:util.formatDate(tomorrow),
+ startDateText:util.dateToText(today),
+ endDateText:util.dateToText(tomorrow),
+ tomorrow:util.formatDate(tomorrow)
+ })
+ this.getDetail()
+ this.getProduct()
+ },
+ getProduct:function(){
+ commonApi._post("scene/get_hotel_sku_list",{
+ start_time:this.data.startDate,
+ end_time:this.data.endDate,
+ scene_id:this.data.id
+ }).then(res=>{
+ res.data.map(item=>{
+ item.display_tags = (item.display_tags?item.display_tags.split(","):[]).splice(0,2)
+ })
+ this.setData({
+ products:res.data
+ })
+ console.log(res)
+ })
+ },
+ order:function(e){
+ let item = e.currentTarget.dataset.item;
+ item.startDate = this.data.startDate;
+ item.endDate = this.data.endDate;
+ item.startDateText = this.data.startDateText;
+ item.endDateText = this.data.endDateText;
+ item.startDay = this.getDay(item.startDate);
+ item.endDay = this.getDay(item.endDate);
+ item.days = this.data.days;
+ app.globalData.product = item;
+ app.globalData.couponInfo = null;
+ wx.navigateTo({
+ url: '/pages/order/hotel/index',
+ })
+ },
+ getDay:function(date){
+ let d = new Date(date.replace(/-/g,'/')).getDay();
+ let days = ["日","一","二","三","四","五","六"];
+ return days[d];
+ },
+ getDetail:function(){
+ // 获取详情
+ commonApi._post("scene/detail",{
+ id:this.data.id
+ }).then(res=>{
+ if(!res.data) {
+ util.back();
+ return;
+ }
+ // res.data.listimg = res.data.listimg?res.data.listimg.split(","):[];
+ res.data.display_tags = (res.data.display_tags?res.data.display_tags.split(","):[]).splice(0,2);
+ this.setData({
+ sceneInfo:res.data
+ })
+ })
+ // 获取问大家
+ commonApi._post("ask/getQuestionList",{
+ scene_id:this.data.id,
+ page_no:1,
+ page_num:3
+ }).then(res=>{
+ console.log(res)
+ this.setData({
+ ask:res.data.rows
+ })
+ })
+ // 获取是否喜欢
+ commonApi.user_post("scene/is_scene_collection",{
+ scene_id:this.data.id
+ }).then(res=>{
+ this.setData({
+ isLike:res.data
+ })
+ })
+ // 获取评价列表
+ commonApi.user_post("scene/get_comment",{
+ scene_id:this.data.id
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.rate = Number(item.rate)
+ })
+ this.setData({
+ comment:res.data.list,
+ commentTotal:res.data.total
+ })
+ })
+ },
+ like:function(){
+ let id = this.data.id,isLike = this.data.isLike;
+ commonApi.user_post(isLike!=1?"scene/scene_collection":"scene/scene_cancel_collection",{
+ scene_id:id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '操作成功',
+ })
+ this.setData({
+ isLike:isLike==1?0:1
+ })
+ }
+ })
+ },
+ gotoLocation:function(){
+ let info = this.data.sceneInfo;
+ wx.openLocation({
+ latitude: Number(info.lat),
+ longitude: Number(info.lon),
+ })
+ },
+ changeInDate:function(e){
+ console.log(e)
+ let date = new Date(e.detail.value.replace(/-/g,'/'));
+ let tomorrow = new Date(date.getTime() + 24 * 60 * 60 * 1000);
+ this.setData({
+ startDate:util.formatDate(date),
+ startDateText:util.dateToText(date),
+ tomorrow:util.formatDate(tomorrow)
+ })
+ // 如果开始日期要比结束日期晚的话 那么结束日期自动变成开始日期的下一天
+ let endDate = new Date(this.data.endDate.replace(/-/g,'/'));
+ if(endDate.getTime()
+
+
+
+
+
+
+
+
+
+
+ {{sceneInfo.title}}
+
+ {{item}}
+ 详情
+
+
+ 地址:{{sceneInfo.address}}
+
+
+
+
+
+
+ {{startDateText}}入住
+
+
+ {{days}}晚
+
+
+ {{endDateText}}离店
+
+
+
+
+
+
+ {{item.product.title+item.sku_name}}
+ {{item.sku_model.area}} {{item.sku_model.bed_type}} {{item.sku_model.breakfast}}
+
+ {{item}}
+
+
+
+ {{item.price_sum/100}}
+ 预订
+
+
+
+
+ 问大家
+
+
+ 这里空空如也,快去向大家提问吧!
+ 去提问
+
+
+
+
+
+ {{item.question_name}}
+ {{item.answer.total}}个回答
+ 暂无回答
+
+
+
+
+
+
+
+
+ 游客点评{{info.rate}}分
+
+
+
+ 这里空空如也,快去点评吧!
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss
new file mode 100644
index 0000000..49df485
--- /dev/null
+++ b/pages/info/hotelProductInfo/index.wxss
@@ -0,0 +1,338 @@
+/* pages/info/hotelProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+ margin-right: 10rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-text {
+ flex: 1;
+ text-align: right;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.date-all-box {
+ margin: 24rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 80rpx;
+ border-radius: 13rpx;
+ background: #0B898E;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: 500;
+ padding: 0 37rpx;
+}
+.days {
+ text-align: center;
+ font-size: 400;
+ width: 84rpx;
+ line-height: 34rpx;
+ height: 34rpx;
+ border-radius: 18rpx;
+ border: 1px solid white;
+ font-size: 23rpx;
+}
+.picker text {
+ font-weight: 400;
+ font-size: 21rpx;
+ margin-left: 13rpx;
+}
+.product-item {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin: 20rpx;
+ padding: 24rpx 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.product-item image {
+ width: 201rpx;
+ height: 201rpx;
+ border-radius: 10rpx;
+ margin-right: 26rpx;
+ flex-shrink: 0;
+}
+.product-item .product-info {
+ flex: 1;
+}
+.product-item .product-info .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-right {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+}
+.product-right .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.product-right .btn {
+ color: #fff;
+ width: 120rpx;
+ line-height: 80rpx;
+ background: #D62828;
+ border-radius: 13rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ text-align: center;
+ margin-top: 20rpx;
+}
+.product-info .subtitle {
+ font-size: 24rpx;
+ line-height: 36rpx;
+ height: 72rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ color: #999;
+ white-space: normal;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+ height: 30rpx;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 26rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin: 0 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.ask-list .ask-item:nth-child(1) {
+ margin-top: 40rpx;
+}
+.ask-item {
+ padding: 0 25rpx;
+ margin-bottom: 40rpx;
+}
+.item-ques {
+ display: flex;
+ color: #000;
+ align-items: center;
+ font-size: 29rpx;
+ line-height: 38rpx;
+}
+.item-ques image {
+ width: 36rpx;
+ margin-right: 18rpx;
+ flex-shrink: 0;
+}
+.item-ques .ques {
+ font-size: 32rpx;
+ font-weight: 500;
+ flex: 1;
+}
+.ques-tip {
+ margin-left: 54rpx;
+ color: #999999;
+ font-size: 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.ans-number {
+ color: #0B898E;
+ font-size: 28rpx;
+}
+.ans-number .iconfont {
+ font-size: 28rpx;
+}
+.icon-xin,.icon-shoucang {
+ position: absolute;
+ right: 20rpx;
+ margin-top: 20rpx;
+ width: 60rpx;
+ line-height: 60rpx;
+ background: rgba(0, 0, 0, 0.4);
+ border-radius: 50%;
+ text-align: center;
+ color: #fff;
+ font-size: 36rpx;
+ z-index: 1;
+}
+.icon-shoucang {
+ color: #D62828;
+}
+.ques-num {
+ flex-shrink: 0;
+ margin-left: 10rpx;
+ font-size: 29rpx;
+ color: #999;
+ font-weight: 400;
+}
\ No newline at end of file
diff --git a/pages/info/museumInfo/index.js b/pages/info/museumInfo/index.js
new file mode 100644
index 0000000..f04eaee
--- /dev/null
+++ b/pages/info/museumInfo/index.js
@@ -0,0 +1,87 @@
+// pages/info/museumInfo/index.js
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("scene/detail_for_venue",{
+ id:options.id
+ }).then(res=>{
+ // res.data.listimg = res.data.listimg?res.data.listimg.split(","):[];
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ order:function(){
+ if(!this.data.info.product_venue) return;
+ if(!this.data.info.product_venue.sku[0]) return;
+ app.globalData.couponInfo = null;
+ app.globalData.product = {
+ product:this.data.info.product_venue,
+ sku:this.data.info.product_venue.sku[0]
+ }
+ wx.navigateTo({
+ url: '/pages/order/scene/index?type=museum'
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/museumInfo/index.json b/pages/info/museumInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/museumInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/museumInfo/index.wxml b/pages/info/museumInfo/index.wxml
new file mode 100644
index 0000000..8a0e878
--- /dev/null
+++ b/pages/info/museumInfo/index.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+ {{info.address}}
+ {{info.tel}}
+
+预订须知
+
+场馆介绍
+
+
+
+
+ 参观预约
+
diff --git a/pages/info/museumInfo/index.wxss b/pages/info/museumInfo/index.wxss
new file mode 100644
index 0000000..a7d1f20
--- /dev/null
+++ b/pages/info/museumInfo/index.wxss
@@ -0,0 +1,63 @@
+/* pages/info/museumInfo/index.wxss */
+.swiper,.swiper image {
+ width: 100%;
+ height: 330rpx;
+ display: block;
+}
+.info {
+ margin: 0 25rpx;
+ margin-top: -30rpx;
+ position: relative;
+ z-index: 1;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ border-radius: 13rpx;
+ padding: 30rpx;
+}
+.info .title {
+ font-size: 31rpx;
+ color: #000;
+ margin-bottom: 20rpx;
+}
+.info .location {
+ color: #999999;
+ font-size: 24rpx;
+ margin-bottom: 20rpx;
+}
+.info .location .iconfont {
+ margin-right: 10rpx;
+ font-size: 26rpx;
+}
+.detail-title {
+ font-weight: 500;
+ font-size: 35rpx;
+ color: #000;
+ margin: 26rpx;
+ margin-top: 45rpx;
+}
+.detail {
+ display: block;
+ padding: 26rpx;
+}
+.fixed-btn {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 104rpx;
+ background: #FFFFFF;
+ box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.fixed-btn .btn {
+ width: 391rpx;
+ line-height: 73rpx;
+ background: #D62828;
+ border-radius: 37rpx;
+ text-align: center;
+ color: #fff;
+ font-size: 31rpx;
+ font-weight: 500;
+}
diff --git a/pages/info/newsInfo/index.js b/pages/info/newsInfo/index.js
new file mode 100644
index 0000000..48550db
--- /dev/null
+++ b/pages/info/newsInfo/index.js
@@ -0,0 +1,76 @@
+// pages/info/newsInfo/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("pbservice/Actcalendar/getInfoDetail",{
+ id:options.id
+ }).then(res=>{
+ res.data.list_imgs = res.data.photographer?res.data.photographer.split(","):[];
+
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/newsInfo/index.json b/pages/info/newsInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/newsInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/newsInfo/index.wxml b/pages/info/newsInfo/index.wxml
new file mode 100644
index 0000000..363e773
--- /dev/null
+++ b/pages/info/newsInfo/index.wxml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ {{info.title}}
+ 来源:{{info.source}}
+ 作者:{{info.author}}
+ 编辑:{{info.editor}}
+ 摄影:{{info.photographer}}
+
+
+ 详情内容:
+
+
diff --git a/pages/info/newsInfo/index.wxss b/pages/info/newsInfo/index.wxss
new file mode 100644
index 0000000..55e04e8
--- /dev/null
+++ b/pages/info/newsInfo/index.wxss
@@ -0,0 +1,32 @@
+/* pages/info/newsInfo/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.content {
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ padding: 30rpx 40rpx;
+}
+.content .title {
+ font-size: 32rpx;
+ color: #000;
+ margin-bottom: 20rpx;
+ font-weight: bold;
+}
+.content .subtitle {
+ font-size: 24rpx;
+ color: #666;
+ line-height: 40rpx;
+}
\ No newline at end of file
diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js
new file mode 100644
index 0000000..df4cc2c
--- /dev/null
+++ b/pages/info/postProductInfo/index.js
@@ -0,0 +1,246 @@
+// pages/info/roadInfo/index.js
+let device = wx.getSystemInfoSync();
+const ratio = device.windowWidth / 750;
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fixed:false,
+ type:1,
+ top:0,
+ isLike:0,
+ commentTotal:0,
+ comment:[],
+ info:null,
+ skuFlag:null,
+ producNum:1,
+ skuIndex:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
+ console.log(height)
+ this.setData({
+ top:height,
+ id:options.id
+ })
+ commonApi._post("product/get_product_detail",{
+ id:options.id
+ }).then(res=>{
+ res.data.display_tags = (res.data.display_tags?res.data.display_tags.split(","):[]).splice(0,2)
+ this.setData({
+ info:res.data
+ })
+ })
+ if(wx.getStorageSync("jstrip_token")){
+ commonApi.user_post("product/is_product_collection",{
+ product_id:options.id
+ }).then(res=>{
+ this.setData({
+ isLike:res.data
+ })
+ })
+ }
+ // 获取评价列表
+ commonApi._post("product/product_comment_list",{
+ product_id:options.id
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.rate = Number(item.rate)
+ })
+ this.setData({
+ comment:res.data.list,
+ commentTotal:res.data.total
+ })
+ })
+ },
+ like:function(){
+ let id = this.data.id,isLike = this.data.isLike;
+ commonApi.user_post("product/"+(isLike==1?"product_cancel_collection":"product_collection"),{
+ product_id:id
+ }).then(res=>{
+ if(res.code==1){
+ this.setData({
+ isLike:isLike==1?0:1
+ })
+ }
+ })
+ },
+ changeMenu:function(e){
+ let index = e.currentTarget.dataset.index,that = this;
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
+ query.selectViewport().scrollOffset() //获取页面查询位置的
+ query.exec(function(res) {
+ let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.data.top;
+ wx.pageScrollTo({
+ scrollTop: scrollTop + 4,
+ duration: 0
+ })
+ that.setData({
+ type:index
+ })
+ })
+ },
+ onPageScroll:function(e){
+ let that = this,height = this.data.top;
+ let topHeight = height;
+ wx.createSelectorQuery().select('#menus').boundingClientRect(function(rect){
+ console.log(rect.top,topHeight)
+ if(rect.top<=topHeight){
+ // 此时应该把menus固定在顶部
+ that.setData({
+ fixed:true
+ })
+ }
+ else{
+ that.setData({
+ fixed:false
+ })
+ }
+ // 滚动时判断滚动到哪个部分了
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box3").boundingClientRect() //选择toViewid获取位置信息
+ let minHeight = that.data.fixed?(110 * ratio + height): topHeight;
+ query.exec(function(res) {
+ if(res[2].top{
+ if(res.code==1){
+ wx.showToast({
+ title: '加入购物车成功',
+ icon:"success"
+ });
+ this.setData({
+ skuFlag:null
+ })
+ }
+ })
+ }
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/postProductInfo/index.json b/pages/info/postProductInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/postProductInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml
new file mode 100644
index 0000000..4cac547
--- /dev/null
+++ b/pages/info/postProductInfo/index.wxml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+ {{info.subtitle}}
+
+ {{item}}
+ ¥{{info.price/100}}起
+
+
+
+
+
+ 游客点评{{info.rate}}分
+
+
+
+ 这里空空如也,快去点评吧!
+
+
+
+
+
+
+
+
+
+ 客服
+
+
+
+ 购物车
+
+
+
+ 加入购物车
+ 立即预订
+
+
+
+
+
+
+
+
+
+ {{info.sku[skuIndex].price/100}}
+ 已选择:{{info.sku[skuIndex].sku_name}}
+
+
+
+ {{item.sku_name}}
+
+
+ 数量
+
+ {{producNum}}
+
+
+
+ {{skuFlag=='cart'?'确认':'立即购买'}}
+
+
+
\ No newline at end of file
diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss
new file mode 100644
index 0000000..7f13a66
--- /dev/null
+++ b/pages/info/postProductInfo/index.wxss
@@ -0,0 +1,513 @@
+/* pages/info/hotelProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.top-info .subtitle {
+ color: #666;
+ font-size: 27rpx;
+ margin-top: 20rpx;
+}
+.tags-box {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+ margin-right: 10rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-price {
+ flex: 1;
+ text-align: right;
+ color: #D62828;
+}
+.tags-price text:nth-child(1){
+ font-size: 27rpx;
+}
+.tags-price text:nth-child(2){
+ font-size: 40rpx;
+ font-weight: bold;
+}
+.tags-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #999999;
+ margin-left: 4rpx;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.date-all-box {
+ margin: 24rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 80rpx;
+ border-radius: 13rpx;
+ background: #0B898E;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: 500;
+ padding: 0 37rpx;
+}
+.days {
+ text-align: center;
+ font-size: 400;
+ width: 84rpx;
+ line-height: 34rpx;
+ height: 34rpx;
+ border-radius: 18rpx;
+ border: 1px solid white;
+ font-size: 23rpx;
+}
+.picker text {
+ font-weight: 400;
+ font-size: 21rpx;
+ margin-left: 13rpx;
+}
+.product-item {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin: 20rpx;
+ padding: 24rpx 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.product-item image {
+ width: 201rpx;
+ height: 201rpx;
+ border-radius: 10rpx;
+ margin-right: 26rpx;
+ flex-shrink: 0;
+}
+.product-item .product-info {
+ flex: 1;
+}
+.product-item .product-info .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-right {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+}
+.product-right .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.product-right .btn {
+ color: #fff;
+ width: 120rpx;
+ line-height: 80rpx;
+ background: #D62828;
+ border-radius: 13rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ text-align: center;
+ margin-top: 20rpx;
+}
+.product-info .subtitle {
+ font-size: 24rpx;
+ line-height: 36rpx;
+ height: 72rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ color: #999;
+ white-space: normal;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.scroll-all-box {
+ margin: 24rpx 0;
+ background: white;
+}
+.scroll-menus {
+ padding: 0 40rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 29rpx;
+ color: #333;
+ height: 84rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+}
+.scroll-menu-item {
+ position: relative;
+ line-height: 84rpx;
+}
+.scroll-menu-item.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 6rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0rpx;
+}
+.fixed-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ z-index: 1;
+}
+.info-title {
+ font-size: 35rpx;
+ font-weight: bold;
+ color: #000;
+ margin-bottom: 30rpx;
+}
+.info-box {
+ padding: 20rpx 40rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 140rpx;
+ background: white;
+ display: flex;
+ align-items: center;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ padding: 0 40rpx;
+ color: #666666;
+ font-size: 23rpx;
+ justify-content: space-between;
+ text-align: center;
+}
+.fixed-bottom .iconfont {
+ font-size: 34rpx;
+}
+.btns {
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ border-radius: 39rpx;
+ text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.btns .btn{
+ width: 216rpx;
+ line-height: 78rpx;
+ background: #D62828;
+}
+.btns .btn:nth-child(1){
+ margin-right: 3rpx;
+ border-radius: 39rpx 0 0 39rpx;
+}
+.btns .btn:nth-child(2){
+ border-radius: 0 39rpx 39rpx 0;
+}
+.mask-content {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 100%;
+}
+.mask-content .icon-close {
+ position: absolute;
+ right: 40rpx;
+ top: 40rpx;
+}
+.sku-info-box {
+ margin: 50rpx 40rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.sku-info-box image {
+ width: 218rpx;
+ height: 180rpx;
+ border-radius: 13rpx;
+ display: block;
+ margin-right: 40rpx;
+ flex-shrink: 0;
+}
+.sku-info {
+ flex: 1;
+}
+.sku-price {
+ font-size: 40rpx;
+ font-weight: 500;
+ color: #D62828;
+ margin: 20rpx 0;
+}
+.sku-price::before {
+ content: "¥";
+ font-weight: 400;
+ font-size: 27rpx;
+}
+.sku-name {
+ font-size: 27rpx;
+ color: #666666;
+}
+.sku-names {
+ display: flex;
+ font-size: 29rpx;
+ color: #333;
+ margin: 0 40rpx;
+ text-align: center;
+ flex-wrap: wrap;
+ margin-bottom: 20rpx;
+}
+.sku-name-item {
+ background: #EFEFEF;
+ border: 1rpx solid #EFEFEF;
+ width: 318rpx;
+ line-height: 77rpx;
+ border-radius: 14rpx;
+ margin-bottom: 25rpx;
+ margin-right: 30rpx;
+}
+.sku-name-item:nth-child(2n){
+ margin-right: 0;
+}
+.sku-name-item.active {
+ color: #0B898E;
+ border-color: #0B898E;
+ background: rgba(11, 137, 142, 0.1);
+}
+.number-box {
+ display: flex;
+ align-items: center;
+ border-top: 1rpx solid #ccc;
+ justify-content: space-between;
+ margin: 0 40rpx;
+ padding: 40rpx 0;
+}
+.number-box text {
+ flex: 1;
+ font-size: 29rpx;
+ color: #333;
+}
+.number-box view {
+ border: 1rpx solid #666;
+ border-radius: 7rpx;
+ text-align: center;
+ width: 67rpx;
+ line-height: 67rpx;
+ font-size: 33rpx;
+ color: #000;
+}
+.number-box view.disable {
+ border-color: #ccc;
+ color: #999;
+}
+.number-box view.number {
+ width: 94rpx;
+ margin: 0 15rpx;
+}
+.btn-box {
+ height: 138rpx;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.mask-btn {
+ width: 670rpx;
+ line-height: 78rpx;
+ background: #D62828;
+ border-radius: 39rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.icon-xin,.icon-shoucang {
+ position: absolute;
+ right: 20rpx;
+ margin-top: 20rpx;
+ width: 60rpx;
+ line-height: 60rpx;
+ background: rgba(0, 0, 0, 0.4);
+ border-radius: 50%;
+ text-align: center;
+ color: #fff;
+ font-size: 36rpx;
+ z-index: 1;
+}
+.icon-shoucang {
+ color: #D62828;
+}
\ No newline at end of file
diff --git a/pages/info/roadInfo/index.js b/pages/info/roadInfo/index.js
new file mode 100644
index 0000000..468af80
--- /dev/null
+++ b/pages/info/roadInfo/index.js
@@ -0,0 +1,179 @@
+// pages/info/roadInfo/index.js
+let device = wx.getSystemInfoSync();
+const ratio = device.windowWidth / 750;
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fixed:false,
+ type:1,
+ top:0,
+ info:null,
+ comment:[],
+ commentTotal:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
+ console.log(height)
+ this.setData({
+ top:height,
+ id:options.id
+ })
+ let api = commonApi._post;
+ if(wx.getStorageSync("jstrip_token")){
+ api = commonApi.user_post;
+ }
+ api("product/get_product_detail",{
+ id:options.id
+ }).then(res=>{
+ res.data.display_tags = (res.data.display_tags?res.data.display_tags.split(","):[]).splice(0,2);
+ this.setData({
+ info:res.data
+ })
+ })
+ commonApi._post("product/product_comment_list",{
+ product_id:options.id,
+ offset:0,
+ limit:3
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.rate = Number(item.rate)
+ })
+ this.setData({
+ commentTotal:res.data.total,
+ comment:res.data.list
+ })
+ })
+ },
+ changeMenu:function(e){
+ let index = e.currentTarget.dataset.index,that = this;
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
+ query.selectViewport().scrollOffset() //获取页面查询位置的
+ query.exec(function(res) {
+ let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.data.top;
+ wx.pageScrollTo({
+ scrollTop: scrollTop + 4,
+ duration: 0
+ })
+ that.setData({
+ type:index
+ })
+ })
+ },
+ onPageScroll:function(e){
+ let that = this,height = this.data.top;
+ let topHeight = height;
+ wx.createSelectorQuery().select('#menus').boundingClientRect(function(rect){
+ console.log(rect.top,topHeight)
+ if(rect.top<=topHeight){
+ // 此时应该把menus固定在顶部
+ that.setData({
+ fixed:true
+ })
+ }
+ else{
+ that.setData({
+ fixed:false
+ })
+ }
+ // 滚动时判断滚动到哪个部分了
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box3").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box4").boundingClientRect() //选择toViewid获取位置信息
+ let minHeight = that.data.fixed?(110 * ratio + height): topHeight;
+ query.exec(function(res) {
+ if(res[3].top
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+ {{item}}
+ ¥{{info.price/100}}起
+
+
+
+
+
+ 游客点评{{info.rate}}分
+
+
+
+ 这里空空如也,快去点评吧!
+
+
+
+
+
+
+
+
+
+ 客服
+
+ 立即预订
+
\ No newline at end of file
diff --git a/pages/info/roadInfo/index.wxss b/pages/info/roadInfo/index.wxss
new file mode 100644
index 0000000..9f3581f
--- /dev/null
+++ b/pages/info/roadInfo/index.wxss
@@ -0,0 +1,362 @@
+/* pages/info/hotelProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-price {
+ flex: 1;
+ text-align: right;
+ color: #D62828;
+}
+.tags-price text:nth-child(1){
+ font-size: 27rpx;
+}
+.tags-price text:nth-child(2){
+ font-size: 40rpx;
+ font-weight: bold;
+}
+.tags-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #999999;
+ margin-left: 4rpx;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.date-all-box {
+ margin: 24rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 80rpx;
+ border-radius: 13rpx;
+ background: #0B898E;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: 500;
+ padding: 0 37rpx;
+}
+.days {
+ text-align: center;
+ font-size: 400;
+ width: 84rpx;
+ line-height: 34rpx;
+ height: 34rpx;
+ border-radius: 18rpx;
+ border: 1px solid white;
+ font-size: 23rpx;
+}
+.picker text {
+ font-weight: 400;
+ font-size: 21rpx;
+ margin-left: 13rpx;
+}
+.product-item {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin: 20rpx;
+ padding: 24rpx 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.product-item image {
+ width: 201rpx;
+ height: 201rpx;
+ border-radius: 10rpx;
+ margin-right: 26rpx;
+ flex-shrink: 0;
+}
+.product-item .product-info {
+ flex: 1;
+}
+.product-item .product-info .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-right {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+}
+.product-right .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.product-right .btn {
+ color: #fff;
+ width: 120rpx;
+ line-height: 80rpx;
+ background: #D62828;
+ border-radius: 13rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ text-align: center;
+ margin-top: 20rpx;
+}
+.product-info .subtitle {
+ font-size: 24rpx;
+ line-height: 36rpx;
+ height: 72rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ color: #999;
+ white-space: normal;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.scroll-all-box {
+ margin: 24rpx 0;
+ background: white;
+}
+.scroll-menus {
+ padding: 0 40rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 29rpx;
+ color: #333;
+ height: 84rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+}
+.scroll-menu-item {
+ position: relative;
+ line-height: 84rpx;
+}
+.scroll-menu-item.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 6rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0rpx;
+}
+.fixed-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ z-index: 1;
+}
+.info-title {
+ font-size: 35rpx;
+ font-weight: bold;
+ color: #000;
+ margin-bottom: 30rpx;
+}
+.info-box {
+ padding: 20rpx 40rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 140rpx;
+ background: white;
+ display: flex;
+ align-items: center;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ padding: 0 40rpx;
+ color: #666666;
+ font-size: 23rpx;
+ justify-content: space-between;
+ text-align: center;
+}
+.fixed-bottom .iconfont {
+ font-size: 34rpx;
+}
+.btn {
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ width: 294rpx;
+ line-height: 78rpx;
+ background: #D62828;
+ border-radius: 39rpx;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/pages/info/sceneInfo/index.js b/pages/info/sceneInfo/index.js
new file mode 100644
index 0000000..7c630d2
--- /dev/null
+++ b/pages/info/sceneInfo/index.js
@@ -0,0 +1,128 @@
+// pages/info/roadInfo/index.js
+let device = wx.getSystemInfoSync();
+const ratio = device.windowWidth / 750;
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fixed:false,
+ type:1,
+ top:0,
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
+ console.log(height)
+ this.setData({
+ top:height
+ })
+ commonApi._post("scene/detail",{
+ id:options.id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+ changeMenu:function(e){
+ let index = e.currentTarget.dataset.index,that = this;
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box"+index).boundingClientRect() //选择toViewid获取位置信息
+ query.selectViewport().scrollOffset() //获取页面查询位置的
+ query.exec(function(res) {
+ let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.data.top;
+ wx.pageScrollTo({
+ scrollTop: scrollTop + 4,
+ duration: 0
+ })
+ that.setData({
+ type:index
+ })
+ })
+ },
+ onPageScroll:function(e){
+ let that = this,height = this.data.top;
+ let topHeight = height;
+ // 滚动时判断滚动到哪个部分了
+ const query=wx.createSelectorQuery(); //创建节点查询器
+ query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
+ query.select("#box3").boundingClientRect() //选择toViewid获取位置信息
+ let minHeight = that.data.fixed?(110 * ratio + height): topHeight;
+ query.exec(function(res) {
+ if(res[2].top
+
+
+
\ No newline at end of file
diff --git a/pages/info/sceneInfo/index.wxss b/pages/info/sceneInfo/index.wxss
new file mode 100644
index 0000000..c1d14a2
--- /dev/null
+++ b/pages/info/sceneInfo/index.wxss
@@ -0,0 +1,361 @@
+/* pages/info/hotelProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-price {
+ flex: 1;
+ text-align: right;
+ color: #D62828;
+}
+.tags-price text:nth-child(1){
+ font-size: 27rpx;
+}
+.tags-price text:nth-child(2){
+ font-size: 40rpx;
+ font-weight: bold;
+}
+.tags-price text:nth-child(3){
+ font-size: 20rpx;
+ color: #999999;
+ margin-left: 4rpx;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.date-all-box {
+ margin: 24rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 80rpx;
+ border-radius: 13rpx;
+ background: #0B898E;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: 500;
+ padding: 0 37rpx;
+}
+.days {
+ text-align: center;
+ font-size: 400;
+ width: 84rpx;
+ line-height: 34rpx;
+ height: 34rpx;
+ border-radius: 18rpx;
+ border: 1px solid white;
+ font-size: 23rpx;
+}
+.picker text {
+ font-weight: 400;
+ font-size: 21rpx;
+ margin-left: 13rpx;
+}
+.product-item {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin: 20rpx;
+ padding: 24rpx 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.product-item image {
+ width: 201rpx;
+ height: 201rpx;
+ border-radius: 10rpx;
+ margin-right: 26rpx;
+ flex-shrink: 0;
+}
+.product-item .product-info {
+ flex: 1;
+}
+.product-item .product-info .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-right {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+}
+.product-right .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.product-right .btn {
+ color: #fff;
+ width: 120rpx;
+ line-height: 80rpx;
+ background: #D62828;
+ border-radius: 13rpx;
+ font-size: 31rpx;
+ font-weight: 500;
+ text-align: center;
+ margin-top: 20rpx;
+}
+.product-info .subtitle {
+ font-size: 24rpx;
+ line-height: 36rpx;
+ height: 72rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ color: #999;
+ white-space: normal;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.scroll-all-box {
+ background: white;
+}
+.scroll-menus {
+ padding: 0 40rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 29rpx;
+ color: #333;
+ height: 84rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+}
+.scroll-menu-item {
+ position: relative;
+ line-height: 84rpx;
+}
+.scroll-menu-item.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 6rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0rpx;
+}
+.fixed-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ z-index: 1;
+}
+.info-title {
+ font-size: 35rpx;
+ font-weight: bold;
+ color: #000;
+ margin-bottom: 30rpx;
+}
+.info-box {
+ padding: 20rpx 40rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 140rpx;
+ background: white;
+ display: flex;
+ align-items: center;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ padding: 0 40rpx;
+ color: #666666;
+ font-size: 23rpx;
+ justify-content: space-between;
+ text-align: center;
+}
+.fixed-bottom .iconfont {
+ font-size: 34rpx;
+}
+.btn {
+ color: #fff;
+ font-size: 32rpx;
+ font-weight: 500;
+ width: 294rpx;
+ line-height: 78rpx;
+ background: #D62828;
+ border-radius: 39rpx;
+ text-align: center;
+}
diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js
new file mode 100644
index 0000000..7a7a0cb
--- /dev/null
+++ b/pages/info/sceneProductInfo/index.js
@@ -0,0 +1,196 @@
+// pages/info/sceneProductInfo/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ bookingInfo:null,
+ bookingInfoTitle:"",
+ safeBottom:app.globalData.safeBottom,
+ isLike:0,
+ comment:[],
+ commentTotal:0,
+ isTest:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(!options.id){
+ util.back()
+ return;
+ }
+ commonApi._post("pbservice/Other/getClientConfig",{
+ unique_key:"wechatxcx"
+ }).then(res=>{
+ let data = JSON.parse(res.data);
+ this.setData({
+ isTest:data.isTest
+ })
+ })
+ this.setData({
+ id:options.id
+ })
+ commonApi._post("scene/detail",{
+ id:options.id
+ }).then(res=>{
+ if(!res.data){
+ wx.showToast({
+ title: '产品已下架',
+ icon:'none'
+ })
+ setTimeout(()=>{
+ util.back();
+ },1000)
+ return;
+ }
+ res.data.display_tags = (res.data.display_tags?res.data.display_tags.split(","):[]).splice(0,2);
+ // res.data.listimg = res.data.listimg?res.data.listimg.split(","):[];
+ res.data.product.map(product=>{
+ product.sku.map(sku=>{
+ sku.display_tags = (sku.display_tags?sku.display_tags.split(","):[]).splice(0,2);
+ })
+ })
+ this.setData({
+ info:res.data
+ })
+ })
+ // 获取收藏的状态
+ if(wx.getStorageSync("jstrip_token")){
+ commonApi.user_post("scene/is_scene_collection",{
+ scene_id:options.id
+ }).then(res=>{
+ this.setData({
+ isLike:res.data
+ })
+ })
+ }
+ commonApi._post("ask/getQuestionList",{
+ scene_id:options.id,
+ page_no:1,
+ page_num:3
+ }).then(res=>{
+ this.setData({
+ ask:res.data.rows
+ })
+ console.log(res)
+ })
+ // 获取评价列表
+ commonApi._post("scene/get_comment",{
+ scene_id:options.id
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.rate = Number(item.rate)
+ })
+ this.setData({
+ comment:res.data.list.splice(0,3),
+ commentTotal:res.data.total
+ })
+ console.log(res)
+ })
+ },
+ like:function(){
+ let id = this.data.id,isLike = Number(this.data.isLike);
+ console.log(isLike)
+ commonApi.user_post(isLike!=1?"scene/scene_collection":"scene/scene_cancel_collection",{
+ scene_id:id
+ }).then(res=>{
+ if(res.code==1){
+ console.log(isLike)
+ wx.showToast({
+ title: '操作成功',
+ })
+ this.setData({
+ isLike:isLike==1?0:1
+ })
+ }
+ })
+ },
+ gotolocation:function(){
+ let info = this.data.info;
+ wx.openLocation({
+ latitude: Number(info.lat),
+ longitude: Number(info.lon)
+ })
+ },
+ audioGuide:function(){
+ wx.navigateToMiniProgram({
+ appId: 'wx74f380bc721a0379',
+ path:'/pages/listen/listen'
+ })
+ },
+ showBookingInfo:function(e){
+ this.setData({
+ bookingInfo:e.currentTarget.dataset.item.sku_model,
+ bookingInfoTitle:e.currentTarget.dataset.item.sku_name
+ })
+ },
+ closeMask:function(){
+ this.setData({
+ bookingInfo:null
+ })
+ },
+ order:function(e){
+ app.globalData.couponInfo = null;
+ // let sku = e.currentTarget.dataset.sku,product = e.currentTarget.dataset.product;
+ app.globalData.product = e.currentTarget.dataset;
+ wx.navigateTo({
+ url: '/pages/order/scene/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/sceneProductInfo/index.json b/pages/info/sceneProductInfo/index.json
new file mode 100644
index 0000000..b5d8d8b
--- /dev/null
+++ b/pages/info/sceneProductInfo/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "notice":"/pages/component/notice/notice"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml
new file mode 100644
index 0000000..6cee6f7
--- /dev/null
+++ b/pages/info/sceneProductInfo/index.wxml
@@ -0,0 +1,106 @@
+
+
+
+
+ 语音导览
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+ {{item}}
+
+
+
+ 开园时间:{{info.open_time}}
+ 优待政策 | 景点介绍
+
+
+ 地址:{{info.address}}
+
+
+
+
+
+ {{item.title}}
+
+
+ {{sku.sku_name}}
+
+
+
+ {{item}}
+
+ 预订须知>>
+
+
+ ¥{{sku.price?sku.price/100:0}}起
+ 立即预订
+
+
+
+
+
+
+
+ 问大家
+
+
+ 这里空空如也,快去向大家提问吧!
+ 去提问
+
+
+
+
+
+ {{item.question_name}}
+ {{item.answer.total}}个回答
+ 暂无回答
+
+
+
+
+
+
+
+
+
+
+ 游客点评{{info.rate}}分
+
+
+
+ 这里空空如也,快去点评吧!
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/info/sceneProductInfo/index.wxss b/pages/info/sceneProductInfo/index.wxss
new file mode 100644
index 0000000..919b45f
--- /dev/null
+++ b/pages/info/sceneProductInfo/index.wxss
@@ -0,0 +1,323 @@
+/* pages/info/sceneProductInfo/index.wxss */
+page {
+ background: #f2f2f2;
+}
+.swiper {
+ width: 100%;
+ height: 400rpx;
+}
+.swiper image {
+ height: 400rpx;
+ display: block;
+ width: 100%;
+}
+.top-info {
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ position: relative;
+ z-index: 1;
+ margin-top: -20rpx;
+ padding: 20rpx 40rpx;
+}
+.top-info .title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #000;
+}
+.tags-box {
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+ display: flex;
+ align-items: center;
+ color: #0B898E;
+ font-size: 27rpx;
+ height: 50rpx;
+}
+.tags-box .tag {
+ position: relative;
+ line-height: 20rpx;
+ font-size: 20rpx;
+ font-weight: 500;
+ line-height: 50rpx;
+ margin-right: 10rpx;
+}
+.tags-box .tag .line {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ background: #DAF3E9;
+ height: 8rpx;
+ top: 30rpx;
+ z-index: -1;
+}
+.tags-text {
+ flex: 1;
+ text-align: right;
+}
+.tags-box .iconfont {
+ margin-left: 4rpx;
+ font-size: 24rpx;
+}
+.address-box {
+ justify-content: space-between;
+ margin-top: 0;
+}
+.info-address {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 0rpx;
+ line-height: 40rpx;
+}
+.address-box .iconfont {
+ font-size: 34rpx;
+}
+.box {
+ margin: 20rpx;
+ background: white;
+ border-radius: 13rpx;
+}
+.box-top {
+ line-height: 95rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ font-weight: 500;
+ color: #000;
+ font-size: 35rpx;
+ padding: 0 20rpx;
+}
+.product-item {
+ margin: 0 20rpx;
+ padding: 27rpx 0;
+ border-bottom: 1rpx solid #ccc;
+}
+.skutitle {
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.product-box {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ margin-top: 20rpx;
+}
+.product-left {
+ flex: 1;
+}
+.product-tags {
+ display: flex;
+ align-items: center;
+}
+.product-tag {
+ font-size: 20rpx;
+ color: #0B898E;
+ border-radius: 16rpx;
+ line-height: 30rpx;
+ border: 1rpx solid;
+ padding: 0 15rpx;
+ margin-right: 13rpx;
+}
+.product-tags .product-tags:last-child {
+ margin-right: 0;
+}
+.order-tip-text {
+ margin-top: 33rpx;
+ font-size: 24rpx;
+ color: #666;
+}
+.product-right {
+ text-align: center;
+ flex-shrink: 0;
+}
+.product-right .price {
+ color: #D62828;
+ font-size: 24rpx;
+ margin-bottom: 20rpx;
+}
+.product-right .price text:nth-child(2){
+ font-weight: 500;
+ font-size: 33rpx;
+}
+.product-right .price text:nth-child(3){
+ color: #8D8D8D;
+ font-size: 20rpx;
+}
+.product-right .btn {
+ background: #D62828;
+ color: #fff;
+ border-radius: 30px;
+ line-height: 60rpx;
+ font-size: 29rpx;
+ font-weight: 500;
+ width: 176rpx;
+}
+.box .product-item:last-child {
+ border-bottom: none;
+}
+.box-top .iconfont {
+ color: #0B898E;
+ font-size: 33rpx;
+ margin-right: 16rpx;
+}
+.empty-box {
+ text-align: center;
+ padding: 40rpx 0;
+ font-size: 23rpx;
+ color: #333;
+}
+.empty-btn {
+ margin: 0 auto;
+ margin-top: 30rpx;
+ width: 283rpx;
+ line-height: 79rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 39rpx;
+ color: #0B898E;
+ font-size: 32rpx;
+ margin-bottom: 10rpx;
+}
+.box-top .score {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: 400;
+ margin-left: 11rpx;
+}
+.product-comment {
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 33rpx 0;
+}
+.product-comment-top {
+ display: flex;
+ justify-content: space-between;
+ color: #999999;
+ align-items: center;
+ font-size: 24rpx;
+}
+.product-comment-top image {
+ flex-shrink: 0;
+ width: 57rpx;
+ height: 57rpx;
+ border-radius: 50%;
+}
+.product-comment-top .comment-info {
+ flex: 1;
+ margin: 0 15rpx;
+ color: #666;
+ font-size: 21rpx;
+}
+.product-comment-top .comment-info .iconfont {
+ color: #D62828;
+ font-size: 22rpx;
+}
+.product-comment-top .comment-info .iconfont text {
+ margin-right: 6rpx;
+}
+.comment-content {
+ margin-left: 72rpx;
+ margin-top: 36rpx;
+ font-size: 28rpx;
+ color: #000;
+}
+.more-comment-btn {
+ line-height: 93rpx;
+ margin-right: 20rpx;
+ text-align: right;
+ color: #999;
+ font-size: 27rpx;
+ font-weight: 500;
+}
+.more-comment-btn .iconfont {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+}
+.all-comment-num {
+ float: right;
+ color: #999999;
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.ask-list .ask-item:nth-child(1) {
+ margin-top: 40rpx;
+}
+.ask-item {
+ padding: 0 25rpx;
+ margin-bottom: 40rpx;
+}
+.item-ques {
+ display: flex;
+ color: #000;
+ align-items: center;
+ font-size: 29rpx;
+ line-height: 38rpx;
+}
+.item-ques image {
+ width: 36rpx;
+ margin-right: 18rpx;
+ flex-shrink: 0;
+}
+.item-ques .ques {
+ font-size: 32rpx;
+ font-weight: 500;
+ flex: 1;
+}
+.ques-tip {
+ margin-left: 54rpx;
+ color: #999999;
+ font-size: 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.ans-number {
+ color: #0B898E;
+ font-size: 28rpx;
+}
+.ans-number .iconfont {
+ font-size: 28rpx;
+}
+.icon-xin,.icon-shoucang {
+ position: absolute;
+ right: 20rpx;
+ margin-top: 20rpx;
+ width: 60rpx;
+ line-height: 60rpx;
+ background: rgba(0, 0, 0, 0.4);
+ border-radius: 50%;
+ text-align: center;
+ color: #fff;
+ font-size: 36rpx;
+ z-index: 1;
+}
+.icon-shoucang {
+ color: #D62828;
+}
+.ques-num {
+ flex-shrink: 0;
+ margin-left: 10rpx;
+ font-size: 29rpx;
+ color: #999;
+ font-weight: 400;
+}
+.audio-box {
+ display: flex;
+ align-items: center;
+ position: absolute;
+ left: 0;
+ height: 64rpx;
+ background: rgba(0, 0, 0, 0.4);
+ color: #fafafa;
+ width: 211rpx;
+ justify-content: center;
+ border-radius: 0 32rpx 32rpx 0;
+ margin-top: 282rpx;
+ font-size: 31rpx;
+ z-index: 1;
+}
+.audio-box image {
+ width: 45rpx;
+ display: block;
+ margin-left: 10rpx;
+}
\ No newline at end of file
diff --git a/pages/info/showInfo/index.js b/pages/info/showInfo/index.js
new file mode 100644
index 0000000..fe43400
--- /dev/null
+++ b/pages/info/showInfo/index.js
@@ -0,0 +1,89 @@
+// pages/info/showInfo/index.js
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi.user_post('product/get_product_detail',{
+ id:options.id
+ }).then(res=>{
+ res.data.display_tags = (res.data.display_tags?res.data.display_tags.split(","):[]).splice(0,2);
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+ order:function(){
+ if(this.data.info.sku.length==0){
+ wx.showToast({
+ title: '该演出暂时无法预约',
+ icon:'none'
+ })
+ return;
+ }
+ app.globalData.couponInfo = null;
+ app.globalData.product = this.data.info;
+ wx.navigateTo({
+ url: '/pages/order/show/index?id='+this.data.id,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/showInfo/index.json b/pages/info/showInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/showInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/showInfo/index.wxml b/pages/info/showInfo/index.wxml
new file mode 100644
index 0000000..532cc16
--- /dev/null
+++ b/pages/info/showInfo/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+ {{item}}
+
+ 演出时间:{{item}}
+ {{info.scene_name}}
+ {{info.scene_address}}
+
+
+演出详情
+
+预定须知
+
+
+
+
+ 立即预约
+
\ No newline at end of file
diff --git a/pages/info/showInfo/index.wxss b/pages/info/showInfo/index.wxss
new file mode 100644
index 0000000..17e4bc5
--- /dev/null
+++ b/pages/info/showInfo/index.wxss
@@ -0,0 +1,83 @@
+/* pages/info/showInfo/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.swiper,.swiper image {
+ display: block;
+ width: 100%;
+ height: 330rpx;
+}
+.top-box {
+ border-bottom: 1rpx solid #ccc;
+ padding: 22rpx 27rpx;
+}
+.top-box .title {
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+ margin-bottom: 10rpx;
+}
+.top-box .tags {
+ display: flex;
+ color: #0B898E;
+ font-size: 20rpx;
+ margin-bottom: 20rpx;
+}
+.top-box .tag {
+ margin-right: 20rpx;
+ padding: 0 15rpx;
+ line-height: 30rpx;
+ border-radius: 16rpx;
+ border: 1rpx solid;
+}
+.top-box .time {
+ font-size: 27rpx;
+ color: #333;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.show-location {
+ margin: 20rpx 0;
+ font-size: 28rpx;
+ color: #666;
+}
+.show-address {
+ color: #999999;
+ font-size: 24rpx;
+ margin-bottom: 10rpx;
+}
+.show-location .iconfont {
+ font-size: 26rpx;
+ margin-right: 10rpx;
+}
+.all-title {
+ margin: 27rpx;
+ font-weight: 500;
+ font-size: 35rpx;
+}
+.detail {
+ padding: 0 27rpx;
+ display: block;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ height: 104rpx;
+ background: #FFFFFF;
+ box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
+ text-align: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ bottom: 0;
+}
+.fixed-bottom .btn {
+ width: 391rpx;
+ line-height: 74rpx;
+ background: #D62828;
+ border-radius: 37rpx;
+ color: #fff;
+ font-size: 31rpx;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/pages/info/strategyInfo/index.js b/pages/info/strategyInfo/index.js
new file mode 100644
index 0000000..5f982b3
--- /dev/null
+++ b/pages/info/strategyInfo/index.js
@@ -0,0 +1,99 @@
+// pages/info/strategyInfo/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi.user_post("travels/getDetail",{
+ id:options.id
+ }).then(res=>{
+ res.data.img = res.data.img?res.data.img.split(","):[]
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ commonApi._post("travels/addView",{
+ id:options.id
+ }).then(res=>{
+
+ })
+ },
+ setLike:function(){
+ commonApi.user_post("travels/like",{
+ id:this.data.info.id
+ }).then(res=>{
+ if(res.code==1){
+ let info = this.data.info;
+ info.is_like = res.data.is_like;
+ if(info.is_like==1) {
+ info.like_number++
+ }
+ else {
+ info.like_number--
+ }
+ this.setData({
+ info:info
+ })
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/info/strategyInfo/index.json b/pages/info/strategyInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/info/strategyInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/info/strategyInfo/index.wxml b/pages/info/strategyInfo/index.wxml
new file mode 100644
index 0000000..004203b
--- /dev/null
+++ b/pages/info/strategyInfo/index.wxml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.title}}
+
+
+ {{info.nickname}}
+
+
+
+
+ {{info.like_number}}
+
+ {{info.view_number}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/info/strategyInfo/index.wxss b/pages/info/strategyInfo/index.wxss
new file mode 100644
index 0000000..6ef21bd
--- /dev/null
+++ b/pages/info/strategyInfo/index.wxss
@@ -0,0 +1,45 @@
+/* pages/info/strategyInfo/index.wxss */
+.content {
+ position: relative;
+ z-index: 1;
+ border-radius: 20rpx 20rpx 0 0;
+ background: white;
+ margin-top: -20rpx;
+ padding: 35rpx;
+}
+.title {
+ font-size: 36rpx;
+ font-weight: 500;
+ color: #000;
+}
+.author-info {
+ display: flex;
+ align-items: center;
+ font-size: 23rpx;
+ color: #999;
+ margin-bottom: 45rpx;
+ margin-top: 10rpx;
+}
+.author-info image {
+ width: 32rpx;
+ height: 32rpx;
+ border-radius: 50%;
+ margin-right: 10rpx;
+}
+.swiper,.swiper image {
+ width: 100%;
+ display: block;
+ height: 340rpx;
+}
+.icons {
+ text-align: right;
+ color: #666666;
+ font-size: 28rpx;
+}
+.icons .iconfont {
+ margin-left: 35rpx;
+ margin-right: 7rpx;
+}
+.icons .icon-aixin1 {
+ color: #d02324;
+}
\ No newline at end of file
diff --git a/pages/list/activity/index.js b/pages/list/activity/index.js
index c011cb6..55d66ff 100644
--- a/pages/list/activity/index.js
+++ b/pages/list/activity/index.js
@@ -1,6 +1,7 @@
// pages/activity/index.js
var app = getApp()
import util from "../../../utils/util"
+import commonApi from "../../../utils/https/common"
Page({
/**
@@ -15,7 +16,8 @@ Page({
date:null,
total:1,
areas:['姑苏','吴江','苏州'],
- area:0
+ area:0,
+ type:1
},
/**
@@ -31,6 +33,34 @@ Page({
date:d.getFullYear()+"-"+month+"-"+day
})
this.getWeekDay();
+ commonApi._post("pbservice/Other/getSuzhouAreas").then(res=>{
+ res.data.unshift({
+ area_code:"",
+ area_name:"苏州"
+ })
+ this.setData({
+ areas:res.data
+ })
+ this.getList()
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ total:1,
+ pageNo:1
+ })
+ this.getList();
+ },
+ changeArea:function(e){
+ this.setData({
+ area:e.detail.value,
+ list:[],
+ total:1,
+ pageNo:1
+ })
+ this.getList()
},
// 获取当前选择日期的一周日期范围
getWeekDay:function(){
@@ -60,7 +90,6 @@ Page({
total:1,
date:e.detail.value
})
- this.addClick("activity_calendar_click")
this.getWeekDay();
this.getList();
},
@@ -79,6 +108,35 @@ Page({
})
this.getList();
},
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post(this.data.type==1?'pbservice/Actcalendar/getActList':'pbservice/Actcalendar/getInfoList',{
+ page_no:this.data.pageNo,
+ date:this.data.date,
+ area_key:this.data.areas[this.data.area].area_code,
+ page_num:10
+ }).then(res=>{
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.rows),
+ pageNo:this.data.pageNo+1
+ })
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(this.data.type==1){
+ wx.navigateTo({
+ url: '/pages/info/activityInfo/index?id='+item.id,
+ })
+ }
+ else {
+ wx.navigateTo({
+ url: '/pages/info/newsInfo/index?id='+item.id,
+ })
+ }
+ },
/**
* 生命周期函数--监听页面初次渲染完成
*/
@@ -117,6 +175,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
+ this.getList()
},
/**
diff --git a/pages/list/activity/index.wxml b/pages/list/activity/index.wxml
index 1dc9d2c..657db05 100644
--- a/pages/list/activity/index.wxml
+++ b/pages/list/activity/index.wxml
@@ -1,7 +1,11 @@
-
+
+ 活动
+ 资讯
+
+
周{{item.day}}
{{item.date}}
@@ -12,34 +16,37 @@
-
-
+
+
- {{areas[area]}}
+ {{areas[area].area_name}}
-
+
-
-
-
+
+
+
- 展览|福地古韵——周至历代金石拓片展
+ {{item.name || item.title}}
- 2020/12/20—2020/12/24
- 太仓市博物馆
+ {{item.begin_date}}—{{item.end_date}}
+ {{item.release_date}}
+ {{item.from_platform?item.from_platform:""}}
+ {{item.source?item.source:""}}
-
+
+
-
-
+
+
暂无内容
\ No newline at end of file
diff --git a/pages/list/activity/index.wxss b/pages/list/activity/index.wxss
index 517e6ef..002a436 100644
--- a/pages/list/activity/index.wxss
+++ b/pages/list/activity/index.wxss
@@ -3,6 +3,35 @@
page {
background: #fff;
}
+.types {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ line-height: 85rpx;
+ border-bottom: 1rpx solid #ccc;
+ background: #fff;
+ font-size: 32rpx;
+ color: #666;
+ margin-bottom: 25rpx;
+}
+.type.active {
+ color: #000;
+ font-size: 32rpx;
+ position: relative;
+}
+.type.active::after {
+ position: absolute;
+ content: "1";
+ display: block;
+ font-size: 0;
+ width: 46rpx;
+ height: 5rpx;
+ background: #0B898E;
+ border-radius: 3rpx;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0;
+}
.date-box {
margin: 0 24rpx;
height: 110rpx;
@@ -45,14 +74,17 @@ page {
right: 0;
z-index: 1;
background: #FFF;
- margin-top: 25rpx;
}
.activity-list {
margin: 0 24rpx;
- margin-top: 256rpx;
- height: calc(100% - 256rpx);
+ margin-top: 336rpx;
+ height: calc(100% - 336rpx);
overflow-y: auto;
}
+.activity-list2 {
+ margin-top: 100rpx;
+ height: calc(100% - 100rpx);
+}
.acitivity-search-box {
display: flex;
margin: 30rpx 24rpx;
@@ -112,6 +144,7 @@ page {
height: 220rpx;
border-radius: 10rpx;
flex-shrink: 0;
+ overflow: hidden;
}
.activity-info {
display: flex;
diff --git a/pages/list/card/index.js b/pages/list/card/index.js
index 13e227d..eeabe70 100644
--- a/pages/list/card/index.js
+++ b/pages/list/card/index.js
@@ -1,18 +1,40 @@
// pages/list/card/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
-
+ list:[],
+ total:1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("product/get_product_by_tag",{
+ tag_id:9,
+ offset:list.length,
+ limit:10,
+ sort:"weight"
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
},
/**
@@ -54,7 +76,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList();
},
/**
diff --git a/pages/list/card/index.wxml b/pages/list/card/index.wxml
index 8442a3b..0adb4d0 100644
--- a/pages/list/card/index.wxml
+++ b/pages/list/card/index.wxml
@@ -1,13 +1,14 @@
-
+
+
-
-
+
+
- 卡类产品名称
+ {{item.title}}
- 76
+ {{item.price/100}}
立即购买
diff --git a/pages/list/card/index.wxss b/pages/list/card/index.wxss
index 5ea14f3..d2d3bd6 100644
--- a/pages/list/card/index.wxss
+++ b/pages/list/card/index.wxss
@@ -20,8 +20,10 @@
}
.item image {
display: block;
- width: 360rpx;
- height: 261rpx;
+ width: 300rpx;
+ height: 200rpx;
+ margin: 30rpx;
+ border-radius: 20rpx;
flex-shrink: 0;
}
.item-info {
@@ -59,4 +61,14 @@
font-size: 28rpx;
text-align: center;
border-radius: 30px;
+}
+.all-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: url(https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/card/bg.png) repeat-y;
+ background-size: 100%;
+ z-index: -1;
+ height: 100%;
}
\ No newline at end of file
diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js
new file mode 100644
index 0000000..c8b156d
--- /dev/null
+++ b/pages/list/comments/index.js
@@ -0,0 +1,99 @@
+// pages/list/comments/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ productid:null,
+ sceneid:null,
+ list:[],
+ total:1
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.productid){
+ this.setData({
+ productid:options.productid
+ })
+ }
+ else if(options.sceneid){
+ this.setData({
+ sceneid:options.sceneid
+ })
+ }
+ this.getList()
+ },
+ getList:function(){
+ let service="product/product_comment_list",list = this.data.list,data = {
+ offset:list.length,
+ limit:10,
+ product_id:this.data.productid,
+ scene_id:this.data.sceneid
+ }
+ if(this.data.total<=list.length) return;
+ if(this.data.sceneid){
+ service = "scene/get_comment"
+ }
+ commonApi._post(service,data).then(res=>{
+ console.log(res)
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.list)
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList();
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/comments/index.json b/pages/list/comments/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/comments/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/comments/index.wxml b/pages/list/comments/index.wxml
new file mode 100644
index 0000000..1583f11
--- /dev/null
+++ b/pages/list/comments/index.wxml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/list/comments/index.wxss b/pages/list/comments/index.wxss
new file mode 100644
index 0000000..042b432
--- /dev/null
+++ b/pages/list/comments/index.wxss
@@ -0,0 +1,47 @@
+/* pages/list/comments/index.wxss */
+.comment-title {
+ padding: 0 25rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+ line-height: 96rpx;
+ font-weight: 500;
+ font-size: 35rpx;
+ color: #000;
+}
+.comment-item {
+ margin: 0 25rpx;
+ padding: 30rpx 0;
+ margin-top: 10rpx;
+ border-bottom: 1rpx solid #d9d9d9;
+}
+.comment-top {
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+}
+.comment-top image{
+ width: 72rpx;
+ display: block;
+ height: 72rpx;
+ border-radius: 50%;
+ flex-shrink: 0;
+ margin-right: 20rpx;
+}
+.author-info {
+ flex: 1;
+ font-size: 27rpx;
+ color: #333;
+}
+.author-time {
+ color: #999999;
+ font-size: 24rpx;
+ margin-top: 4rpx;
+}
+.comment-detail {
+ margin-left: 87rpx;
+ font-size: 29rpx;
+ color: #000;
+ margin-top: 25rpx;
+}
+.comment-item:last-child {
+ border-bottom: none;
+}
\ No newline at end of file
diff --git a/pages/list/feiyi/index.js b/pages/list/feiyi/index.js
new file mode 100644
index 0000000..fffbcf6
--- /dev/null
+++ b/pages/list/feiyi/index.js
@@ -0,0 +1,87 @@
+// pages/list/feiyi/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ total:1
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("supplier/get_supplier_by_tag_id",{
+ tag_id:1,
+ offset:list.length,
+ limit:10
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.product = item.product?item.product.splice(0,3):[];
+ item.display_tags = (item.display_tags?item.display_tags.split(","):[]).splice(0,2)
+ })
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/feiyi/index.json b/pages/list/feiyi/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/feiyi/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/feiyi/index.wxml b/pages/list/feiyi/index.wxml
new file mode 100644
index 0000000..ec51252
--- /dev/null
+++ b/pages/list/feiyi/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.supplier_name}}
+
+ {{item}}
+
+ {{item.address}}
+
+ {{item.start_price/100}}
+
+
+
+
+ {{item.title}}
+
+ {{item.price/100}}
+
+
+
+
+
+
+
diff --git a/pages/list/feiyi/index.wxss b/pages/list/feiyi/index.wxss
new file mode 100644
index 0000000..878bf30
--- /dev/null
+++ b/pages/list/feiyi/index.wxss
@@ -0,0 +1,124 @@
+/* pages/list/feiyi/index.wxss */
+page {
+ background: url(https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/feiyi/feiyinew_03.jpg);
+ background-repeat: repeat-y;
+ background-size: 100%;
+}
+.main-img,.top-img {
+ display: block;
+ width: 100%;
+}
+.store-item {
+ display: block;
+ margin: 0 30rpx;
+ color: #c7a668;
+ margin-bottom: 20rpx;
+}
+.store-in-box {
+ padding: 20rpx 30rpx;
+ background: #1d3256;
+ border-left: 6rpx solid #c7a668;
+ border-right: 6rpx solid #c7a668;
+}
+.store-item-top {
+ display: flex;
+ align-items: center;
+}
+.main-store-img {
+ width: 136rpx;
+ height: 136rpx;
+ border-radius: 16rpx;
+ margin-right: 20rpx;
+ object-fit: cover;
+}
+.store-main-info {
+ flex:1;
+ font-size: 34rpx;
+}
+.store-main-tags {
+ display: flex;
+ height: 50rpx;
+ color: #c7a668;
+ font-size: 16rpx;
+ margin-top: 10rpx;
+}
+.store-main-tag {
+ border: 1rpx solid;
+ margin-right: 10rpx;
+ padding: 0 20rpx;
+ line-height:32rpx;
+ height: 32rpx;
+ border-radius: 16rpx;
+}
+.store-main-location {
+ font-size: 20rpx;
+ color: #999;
+}
+.store-main-location:before {
+ font-family: "iconfont";
+ content: "\e604";
+}
+.store-main-price:before {
+ content: "¥";
+ font-size: 24rpx;
+}
+.store-main-price {
+ font-size: 44rpx;
+ color: #f9e498;
+ margin-left: 20rpx;
+}
+.store-main-price:after {
+ content: "起";
+ font-size: 24rpx;
+ margin-left: 20rpx;
+}
+.store-product-list {
+ display: flex;
+ margin-top: 30rpx;
+}
+.product-item {
+ margin-right: 20rpx;
+}
+.store-product-list .product-item:nth-child(1) .product-img{
+ border-top-left-radius: 16rpx;
+ border-bottom-left-radius: 16rpx;
+}
+.store-product-list .product-item:last-child .product-img{
+ border-top-right-radius: 16rpx;
+ border-bottom-right-radius: 16rpx;
+}
+.store-product-list .product-item:nth-child(3n){
+ margin-right: 0;
+}
+.product-img {
+ display: block;
+ width: 100%;
+ width: 194rpx;
+ margin-bottom:20rpx;
+ height: 194rpx;
+ object-fit: cover;
+}
+.product-title {
+ font-size: 30rpx;
+ line-height: 40rpx;
+ height: 80rpx;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+ width: 194rpx;
+ text-overflow: ellipsis;
+}
+.now-price:before {
+ content: "¥";
+ font-size:24rpx;
+}
+.now-price {
+ color: #f9e498;
+ font-size: 36rpx
+}
+.old-price {
+ font-size: 24rpx;
+ color: #ccc;
+ text-decoration: line-through;
+}
\ No newline at end of file
diff --git a/pages/list/food/index.js b/pages/list/food/index.js
new file mode 100644
index 0000000..1d64595
--- /dev/null
+++ b/pages/list/food/index.js
@@ -0,0 +1,171 @@
+// pages/list/food/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ types:["街巷美食","美食地图"],
+ typeIndex:0,
+ list:[],
+ total:1,
+ sort:"weight",
+ keywords:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ setSort:function(){
+ this.setData({
+ sort:this.data.sort=='weight'?'distance':'weight',
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ changeType:function(e){
+ if(e.detail.value==1){
+ wx.reLaunch({
+ url: '/pages/map/index?type=4',
+ })
+ return;
+ }
+ this.setData({
+ typeIndex:e.detail.value,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(this.data.typeIndex==0){
+ wx.navigateTo({
+ url: '/pages/info/foodInfo/index?id='+item.id,
+ })
+ return;
+ }
+
+ util.gotoDetail(item);
+ },
+ search:function(e){
+ this.setData(e.detail);
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ let service="product/get_product_by_tag",list=this.data.list,data = {
+ title:this.data.keywords,
+ tag_id:"14",
+ offset:list.length,
+ limit:1000,
+ sort:this.data.sort,
+ order:this.data.sort=='weight'?'desc':'asc'
+ },that = this;
+ if(list.length>=this.data.total) return;
+ if(this.data.typeIndex==0){
+ // 景点
+ service = "scene/get_scene_by_tag";
+ data.tag_id = "12"
+ }
+ if(this.data.sort=='distance' && !this.data.latitude){
+ wx.getLocation({
+ type: 'gcj02',
+ success: function (res) {
+ that.setData({
+ latitude:res.latitude,
+ longitude:res.longitude
+ })
+ data.lon = res.longitude;
+ data.lat = res.latitude;
+ that.getRealList(service,data)
+ },
+ fail:function(){
+ that.getRealList(service,data)
+ }
+ })
+ }
+ else if(this.data.sort=='distance'){
+ data.lon = this.data.longitude;
+ data.lat = this.data.latitude;
+ this.getRealList(service,data)
+ }
+ else {
+ this.getRealList(service,data)
+ }
+ },
+ getRealList:function(service,data){
+ let list=this.data.list;
+ commonApi._post(service,data).then(res=>{
+ res.data.list.map(item=>{
+ item.display_tags = (item.display_tags?item.display_tags.split(","):[]).splice(0,2);
+ if(item.distance){
+ item.distance = item.distance>=1000?(item.distance/1000+'km'):(item.distance+'m');
+ }
+ })
+ console.log(res.data)
+ this.setData({
+ list:list.concat(res.data.list),
+ total:this.data.type==0?res.data.total:res.data.count
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ // this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/food/index.json b/pages/list/food/index.json
new file mode 100644
index 0000000..9f79876
--- /dev/null
+++ b/pages/list/food/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "search":"/pages/component/SearchHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/food/index.wxml b/pages/list/food/index.wxml
new file mode 100644
index 0000000..2df2a11
--- /dev/null
+++ b/pages/list/food/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ {{types[typeIndex]}}
+
+
+
+
+ 距离最近
+
+
+
+
+
+ {{item.title}}
+ {{item.address}}
+ 距您直线距离{{item.distance}}
+
+ {{item}}
+ ¥{{item.price/100}}起
+
+
+
+ 立即预定
+
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/list/food/index.wxss b/pages/list/food/index.wxss
new file mode 100644
index 0000000..b49988e
--- /dev/null
+++ b/pages/list/food/index.wxss
@@ -0,0 +1,144 @@
+/* pages/list/food/index.wxss */
+page {
+ background: #fff6e4;
+}
+.types {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 100rpx;
+ background: #FFDEA8;
+ font-size: 32rpx;
+ color: #666;
+}
+.picker {
+ display: flex;
+ align-items: center;
+}
+.picker image {
+ width: 22rpx;
+ margin-left: 10rpx;
+ opacity: 0.6;
+}
+.type-item.active {
+ color: #000;
+ font-size: 32rpx;
+}
+.type-item.active image {
+ opacity: 1;
+}
+.list {
+ display: flex;
+ overflow-y: auto;
+ margin-top: 69rpx;
+ margin: 33rpx;
+}
+
+.item {
+ position: relative;
+ padding-bottom: 60rpx;
+ margin-right: 60rpx;
+}
+.item .main-img {
+ width: 599rpx;
+ height: 828rpx;
+ border-radius: 53rpx;
+ display: block;
+}
+.infos {
+ padding: 30rpx 38rpx;
+ background: white;
+ border-radius: 52rpx;
+ margin: 0 37rpx;
+ margin-top: -180rpx;
+ position: relative;
+ z-index: 1;
+ width: 449rpx;
+}
+.infos .title {
+ line-height: 47rpx;
+ height: 94rpx;
+ font-size: 35rpx;
+ color: #202020;
+ font-weight: 500;
+}
+.infos .location {
+ color: #A3A3A3;
+ font-size: 24rpx;
+ margin-top: 20rpx;
+ margin-bottom: 10rpx;
+}
+.infos .distance {
+ font-size: 24rpx;
+ color: #333;
+ margin-bottom: 10rpx;
+}
+.bottom-infos {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.bottom-infos .tag {
+ position: relative;
+ color: #0B898E;
+ font-size: 24rpx;
+ font-weight: 500;
+ line-height: 39rpx;
+ height: 39rpx;
+}
+.bottom-infos .tag::after {
+ content: "1";
+ font-size: 0;
+ left: 0;
+ right: 0;
+ display: block;
+ height: 8rpx;
+ bottom: 0;
+ background: #DAF3E9;
+}
+.price {
+ color: #D62828;
+ font-size: 24rpx;
+}
+.price text:nth-child(2){
+ font-weight: 500;
+ font-size: 33rpx;
+}
+.price text:nth-child(3){
+ color: #8D8D8D;
+ font-size: 20rpx;
+ margin-left: 4rpx;
+ margin-right: 109rpx;
+}
+.icon-arrow-line-right {
+ text-align: center;
+ width: 110rpx;
+ color: #fff;
+ line-height: 110rpx;
+ background: linear-gradient(180deg, #43B1C5, #0B898E);
+ border-radius: 50%;
+ font-size: 40rpx;
+ position: absolute;
+ right: 0;
+ bottom: 5rpx;
+ z-index: 1;
+}
+.order-btn {
+ width: 180rpx;
+ line-height: 67rpx;
+ background: #D62828;
+ border-radius: 33rpx 0px 0px 33rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 32rpx;
+ font-weight: 500;
+ position: absolute;
+ right: 0;
+ top: 560rpx;
+}
+.tip-img {
+ left: 24rpx;
+ top: 28rpx;
+ width: 119rpx;
+ position: absolute;
+}
\ No newline at end of file
diff --git a/pages/list/hotel/index.js b/pages/list/hotel/index.js
index 58e5de6..424ce06 100644
--- a/pages/list/hotel/index.js
+++ b/pages/list/hotel/index.js
@@ -1,18 +1,63 @@
// pages/list/hotel/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
-
+ type:5,
+ total:1,
+ list:[],
+ keywords:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getList()
+ },
+ search:function(){
+ this.setData(e.detail);
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post('scene/get_scene_by_tag',{
+ offset:list.length,
+ limit:10,
+ sort:"weight",
+ tag_id:this.data.type,
+ title:this.data.keywords
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.display_tags = (item.display_tags?item.display_tags.split(","):[]).splice(0,2);
+ })
+ this.setData({
+ total:res.data.count,
+ list:list.concat(res.data.list)
+ })
+ console.log(res)
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ total:1
+ })
+ this.getList()
},
/**
@@ -54,7 +99,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/hotel/index.wxml b/pages/list/hotel/index.wxml
index 2ca226d..38aa67a 100644
--- a/pages/list/hotel/index.wxml
+++ b/pages/list/hotel/index.wxml
@@ -1,24 +1,23 @@
-
-
+
+
- 星级酒店
- 精品酒店
- 经济连锁
- 特色民宿
+ 星级酒店
+ 精品酒店
+ 经济连锁
+ 特色民宿
-
-
-
+
+
+
- TOP1
+ TOP{{index+1}}
- 苏州香格里拉大酒店
+ {{item.title}}
- 市中心
- 十全街十全街十全街十全街十全街十全街/观前街
- ¥85起
+ {{item}}
+ ¥{{item.price?item.price/100:0}}起
\ No newline at end of file
diff --git a/pages/list/message/index.js b/pages/list/message/index.js
new file mode 100644
index 0000000..a140eb2
--- /dev/null
+++ b/pages/list/message/index.js
@@ -0,0 +1,83 @@
+// pages/list/message/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ isMore:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ getList:function(){
+ if(!this.data.isMore) return;
+ commonApi.user_post("msg/centre",{
+ offset:this.data.list.length,
+ limit:10
+ }).then(res=>{
+ if(res.data.length<10){
+ this.setData({
+ isMore:false
+ })
+ }
+ this.setData({
+ list:this.data.list.concat(res.data)
+ })
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/message/index.json b/pages/list/message/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/message/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/message/index.wxml b/pages/list/message/index.wxml
new file mode 100644
index 0000000..7b15a52
--- /dev/null
+++ b/pages/list/message/index.wxml
@@ -0,0 +1,13 @@
+
+
+
+
+ {{item.msg}}
+ {{item.create_time}}
+
+ 查看详情>>
+
+
+
+ 暂无内容
+
diff --git a/pages/list/message/index.wxss b/pages/list/message/index.wxss
new file mode 100644
index 0000000..df62470
--- /dev/null
+++ b/pages/list/message/index.wxss
@@ -0,0 +1,32 @@
+/* pages/list/message/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.message-item {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 10rpx;
+ padding: 22rpx;
+}
+.msg-top {
+ display: flex;
+ justify-content: space-between;
+}
+.msg-title {
+ font-size: 31rpx;
+ color: #000;
+ line-height: 44rpx;
+ width: 444rpx;
+ height: 88rpx;
+ font-weight: 500;
+}
+.msg-date {
+ font-size: 24rpx;
+ color: #666;
+ text-align: right;
+}
+.more {
+ color: #0B898E;
+ font-size: 26rpx;
+ text-align: right;
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/index.js b/pages/list/movieticket/index.js
index bf05688..403d02c 100644
--- a/pages/list/movieticket/index.js
+++ b/pages/list/movieticket/index.js
@@ -1,18 +1,151 @@
// pages/list/movieticket/index.js
+import commonApi from "../../../utils/https/common"
Page({
/**
* 页面的初始数据
*/
data: {
-
+ type:1,
+ areas:[],
+ areaIndex:0,
+ sort:null,
+ lat:null,
+ lon:null,
+ page:1,
+ isMore:true,
+ list:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ commonApi._post("act/get_suzhou_areas").then(res=>{
+ res.data.unshift({
+ area_id:"",
+ area_title:"苏州"
+ })
+ this.setData({
+ areas:res.data
+ })
+ })
+ wx.getLocation({
+ type: 'gcj02',
+ success:(res)=>{
+ this.setData({
+ lat:res.latitude,
+ lon:res.longitude
+ })
+ this.getList()
+ },
+ fail:()=>{
+ this.getList()
+ }
+ })
+ },
+ changeArea:function(e){
+ this.setData({
+ areaIndex:e.detail.value,
+ list:[],
+ page:1,
+ isMore:true
+ })
+ this.getList()
+ },
+ changeSort:function(e){
+ let sort = e.currentTarget.dataset.sort;
+ this.setData({
+ sort:sort==this.data.sort?null:sort,
+ list:[],
+ page:1,
+ isMore:true
+ })
+ if(this.data.sort=='distance' && !this.data.lon){
+ wx.getLocation({
+ type: 'gcj02',
+ success:(res)=>{
+ this.setData({
+ lat:res.latitude,
+ lon:res.longitude
+ })
+ this.getList()
+ },
+ fail:()=>{
+ this.getList()
+ }
+ })
+ }
+ else {
+ this.getList()
+ }
+
+ },
+ // gotoDetail:function(e){
+ // let item = e.currentTarget.dataset.item;
+ // wx.navigateTo({
+ // url: 'info/ticket/index?id='+item.third_id+"&title="+item.title
+ // })
+ // },
+ gotoDetail1:function(e){
+ let item = e.currentTarget.dataset.item;
+ wx.navigateTo({
+ url: 'list/ticket/index?id='+item.third_id+"&title="+item.title
+ })
+ },
+ gotoDetail2:function(e){
+ let item = e.currentTarget.dataset.item;
+ wx.navigateTo({
+ url: 'list/cinema/index?id='+item.third_id
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ page:1,
+ isMore:true
+ })
+ this.getList()
+ },
+ getList:function(){
+ if(!this.data.isMore) return;
+ let service = "Cinema/getHotMovieList",type = this.data.type,data={},sort=this.data.sort;
+ if(type==2){
+ service="Cinema/getCinemaList";
+ data = {
+ city_code:this.data.areas[this.data.areaIndex].area_id,
+ lat:this.data.lat,
+ lon:this.data.lon,
+ is_price_sort:sort=='price',
+ is_distance_sort:sort=='distance'
+ }
+ }
+ if(type==3){
+ service="Cinema/getSoonShowsList";
+ }
+ data.page = this.data.page;
+ data.pageSize = 10;
+ commonApi.user_post(service,data).then(res=>{
+ console.log(res)
+ res.data.map(item=>{
+ if(item.distance>1000){
+ item.distanceText = (item.distance/1000).toFixed(2) + 'km';
+ }
+ else if(item.distance){
+ item.distanceText = (item.distance).toFixed(2) + 'm';
+ }
+ })
+ this.setData({
+ list:this.data.list.concat(res.data),
+ page:this.data.page+1
+ })
+ if(res.data.length<10){
+ this.setData({
+ isMore:false
+ })
+ }
+ })
},
/**
@@ -54,7 +187,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/movieticket/index.json b/pages/list/movieticket/index.json
index 9f79876..eb3533f 100644
--- a/pages/list/movieticket/index.json
+++ b/pages/list/movieticket/index.json
@@ -1,5 +1,6 @@
{
"usingComponents": {
- "search":"/pages/component/SearchHeader"
+ "title":"/pages/component/TitleHeader",
+ "common-image":"/pages/component/commonImage/index"
}
}
\ No newline at end of file
diff --git a/pages/list/movieticket/index.wxml b/pages/list/movieticket/index.wxml
index f93f352..e7b838b 100644
--- a/pages/list/movieticket/index.wxml
+++ b/pages/list/movieticket/index.wxml
@@ -1,56 +1,65 @@
-
+
- 热映
- 影院
- 即将上映
+ 热映
+ 影院
+ 即将上映
-
-
-
- 标题标题标题标题
- 导演:姓名姓 姓名姓 姓名
- 主演:姓名姓 姓名姓 姓名
-
- 购票
+
+
+
+
+ {{item.title}}
+ 导演:{{item.director}}
+ 主演:{{item.leading_role}}
+
+ 购票
+
-
-
-
- 标题标题标题标题
- 上映时间:2020-11-12
- 导演:姓名姓 姓名姓 姓名
- 主演:姓名姓 姓名姓 姓名
-
- 购票
+
+
+
+
+
+ {{item.title}}
+ 上映时间:{{item.open_time}}
+ 导演:{{item.director}}
+ 主演:{{item.leading_role}}
+
+ 购票
+
-
+
-
+
- {{areas[area]}}
+ {{areas[areaIndex].area_title}}
- 离我最近
- 价格最低
+ 离我最近
+ 价格最低
-
+
- 影院名称影院名称影院名称
+ {{item.title}}
¥
- 86.99
+ {{item.price/100}}
起
- 地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址
- 3.7km
+ {{item.address}}
+ {{item.distanceText}}
+
+
+ 暂无内容
+
diff --git a/pages/list/movieticket/index.wxss b/pages/list/movieticket/index.wxss
index 4f1980a..ab30723 100644
--- a/pages/list/movieticket/index.wxss
+++ b/pages/list/movieticket/index.wxss
@@ -73,6 +73,7 @@ page {
}
.item .info {
flex: 1;
+ width: 153rpx;
}
.item .info .title {
font-size: 35rpx;
diff --git a/pages/list/movieticket/list/cinema/index.js b/pages/list/movieticket/list/cinema/index.js
new file mode 100644
index 0000000..072bcb5
--- /dev/null
+++ b/pages/list/movieticket/list/cinema/index.js
@@ -0,0 +1,180 @@
+// pages/list/movieticket/list/cinema/index.js
+import commonApi from "../../../../../utils/https/common"
+import util from "../../../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ movie:[],
+ currentNum:0,
+ show_id:null,
+ dates:[],
+ dateIndex:0,
+ list:[],
+ name:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ this.initDate();
+ this.enlarge();
+ this.shrink();
+ // 先要获取影片列表 再获取排片
+ commonApi._post("Cinema/getMovieListByCinemaId",{
+ cinema_id:this.data.id
+ }).then(res=>{
+ if(res.data.length==0){
+ wx.showToast({
+ title: '该影院没有排片',
+ icon:'none'
+ })
+ setTimeout(()=>{
+ util.back();
+ },1000)
+ }
+ else {
+ this.setData({
+ movie:res.data
+ })
+ this.getList()
+ }
+ })
+
+ },
+ initDate:function(){
+ let today = new Date(util.formatDate(new Date()).replace(/-/g,'/')).getTime(),single = 24 * 60 * 60 *1000,dates=[];
+ for(let i=0;i<7;i++){
+ let item = new Date(today+i * single);
+ let name = util.formatDate(item).substr(5,5);
+ if(i==0){
+ name="今天 "+name
+ }
+ else if(i==1){
+ name="明天 "+name
+ }
+ else if(i==2){
+ name="后天 "+name
+ }
+ dates.push({
+ date:util.formatDate(item),
+ name:name
+ })
+ }
+ this.setData({
+ dates:dates
+ })
+ console.log(dates)
+ },
+ changeDate:function(e){
+ this.setData({
+ dateIndex:e.currentTarget.dataset.index,
+ list:[]
+ })
+ this.getList()
+ },
+ getList:function(){
+ commonApi._post("Cinema/getScheduleListByCinemaId",{
+ cinema_id:this.data.id,
+ show_date:this.data.dates[this.data.dateIndex].date,
+ show_id:this.data.movie[this.data.currentNum].show_id
+ }).then(res=>{
+ res.data.schedule_list.map(item=>{
+ item.show_time = item.show_time?(item.show_time.split(" ")[1].substr(0,5)):"";
+ item.close_time = item.close_time?(item.close_time.split(" ")[1].substr(0,5)):"";
+
+ })
+ this.setData({
+ list:res.data.schedule_list,
+ name:res.data.cinema_name
+ })
+ console.log(res)
+ })
+ },
+ onChange:function(e){
+ console.log(e)
+ this.setData({
+ list:[],
+ currentNum:e.detail.current
+ })
+ this.enlarge();
+ this.shrink();
+ this.getList()
+ },
+ // 轮播图缩小动画
+ shrink(){
+ const animationNoSelected = wx.createAnimation({
+ duration: 300,
+ timingFunction: 'ease'
+ })
+ animationNoSelected.height('215rpx').width('156rpx').step();
+ this.setData({
+ animationNoSelected: animationNoSelected.export()
+ })
+ },
+ // 轮播图放大动画
+ enlarge(){
+ const animationSelected = wx.createAnimation({
+ duration: 300,
+ timingFunction: 'ease'
+ })
+ animationSelected.height('253rpx').width('184rpx').step();
+ this.setData({
+ animationSelected: animationSelected.export()
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/movieticket/list/cinema/index.json b/pages/list/movieticket/list/cinema/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/movieticket/list/cinema/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/cinema/index.wxml b/pages/list/movieticket/list/cinema/index.wxml
new file mode 100644
index 0000000..6c56679
--- /dev/null
+++ b/pages/list/movieticket/list/cinema/index.wxml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{movie[currentNum].title}}
+ {{movie[currentNum].duration}}分钟
+
+
+ {{item.name}}
+
+
+
+ {{item.show_time}}
+ {{item.close_time}}散场
+
+
+ {{item.show_version}}
+ {{item.hall_name}}
+
+ ¥{{item.price/100}}
+
+ 购票
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/list/movieticket/list/cinema/index.wxss b/pages/list/movieticket/list/cinema/index.wxss
new file mode 100644
index 0000000..cd5a414
--- /dev/null
+++ b/pages/list/movieticket/list/cinema/index.wxss
@@ -0,0 +1,112 @@
+/* pages/list/movieticket/list/cinema/index.wxss */
+page {
+ background: #f0f0f0;
+}
+
+.banner-container{
+ width: 100%;
+ height: 253rpx;
+ margin: 30rpx 0;
+}
+.banner-item{
+ display: flex;
+ align-items: flex-end;
+ justify-content: center;
+}
+.banner-box{
+ width: 90%;
+ height: 100%;
+}
+.banner-img{
+ width: 100%;
+ height: 100%;
+ border-radius: 10rpx;
+}
+.movie-info {
+ text-align: center;
+ margin-bottom: 25rpx;
+ font-size: 27rpx;
+ color: #666;
+}
+.movie-title {
+ font-weight: 500;
+ font-size: 35rpx;
+ color: #000;
+ margin-bottom: 10rpx;
+}
+.dates-list {
+ overflow-y: auto;
+ display: flex;
+ align-items: center;
+ padding: 0 25rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.date-item {
+ position: relative;
+ font-size: 27rpx;
+ color: #666;
+ line-height: 75rpx;
+ margin-right: 65rpx;
+ flex-shrink: 0;
+}
+.date-item.active {
+ font-weight: 500;
+ font-size: 31rpx;
+ color: #000;
+}
+.date-item.active::after {
+ position: absolute;
+ display: block;
+ content: "!";
+ font-size: 0;
+ width: 46rpx;
+ height: 5rpx;
+ background: #0B898E;
+ border-radius: 3rpx;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0;
+}
+.movie-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 23rpx;
+ height: 173rpx;
+ background: white;
+ border-radius: 13rpx;
+ color: #666;
+ font-size: 27rpx;
+ margin: 30rpx 25rpx;
+}
+.movie-item .price {
+ color: #D62828;
+ font-weight: 500;
+ font-size: 33rpx;
+ flex: 1;
+ margin-bottom: 50rpx;
+}
+.movie-item .price text{
+ font-size: 24rpx;
+ font-weight: 400;
+}
+.movie-item .btn {
+ width: 123rpx;
+ line-height: 52rpx;
+ background: #D62828;
+ border-radius: 26rpx;
+ text-align: center;
+ color: #fff;
+ font-weight: 500;
+}
+.movie-item .time {
+ color: #000;
+ font-size: 35rpx;
+ font-weight: 500;
+ margin-bottom: 25rpx;
+}
+.movie-item .type {
+ font-size: 29rpx;
+ color: #333;
+ margin-bottom: 25rpx;
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/info/index.js b/pages/list/movieticket/list/info/index.js
new file mode 100644
index 0000000..6ec3f33
--- /dev/null
+++ b/pages/list/movieticket/list/info/index.js
@@ -0,0 +1,75 @@
+// pages/list/movieticket/list/info/index.js
+import commonApi from "../../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("Cinema/getMovieDetail",{
+ show_id:options.id
+ }).then(res=>{
+ res.data.listimg = res.data.listimg.split(",") || []
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/movieticket/list/info/index.json b/pages/list/movieticket/list/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/movieticket/list/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/info/index.wxml b/pages/list/movieticket/list/info/index.wxml
new file mode 100644
index 0000000..431591e
--- /dev/null
+++ b/pages/list/movieticket/list/info/index.wxml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ {{info.title}}
+ {{info.duration}}分钟/{{info.type}}/{{info.country}}
+ {{info.open_day}}在{{info.country}}上映
+ 评分:{{info.remark}}
+
+
+
+ 演职人员
+ 导演:{{info.director}}
+ 主演:{{info.leading_role}}
+
+ 简介
+ {{info.content}}
+
+ 剧照
+
+
+
+
+
+
+
+ 立即购票
+
\ No newline at end of file
diff --git a/pages/list/movieticket/list/info/index.wxss b/pages/list/movieticket/list/info/index.wxss
new file mode 100644
index 0000000..8bb62ff
--- /dev/null
+++ b/pages/list/movieticket/list/info/index.wxss
@@ -0,0 +1,76 @@
+/* pages/list/movieticket/list/info/index.wxss */
+.top-info {
+ display: flex;
+ padding: 35rpx 40rpx;
+ background: #f6f6f6;
+ justify-content: space-between;
+ padding-bottom: 55rpx;
+}
+.top-info image {
+ flex-shrink: 0;
+ width: 173rpx;
+ height: 229rpx;
+ border-radius: 11rpx;
+ margin-right: 46rpx;
+}
+.info-box {
+ flex: 1;
+ width: 450rpx;
+ color: #666666;
+ font-size: 25rpx;
+ line-height: 47rpx;
+}
+.info-box .title {
+ font-size: 37rpx;
+ color: #000;
+ font-weight: 500;
+ margin-bottom: 20rpx;
+}
+.content {
+ background: white;
+ margin-top: -20rpx;
+ position: relative;
+ z-index: 1;
+ box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.06);
+ border-radius: 27rpx 27rpx 0px 0px;
+ padding: 0 40rpx;
+}
+.content .title {
+ font-size: 33rpx;
+ font-weight: 500;
+ color: 000;
+ padding: 35rpx 0;
+}
+.content .subtitle {
+ font-size: 28rpx;
+ color: #333;
+ line-height: 48rpx;
+}
+.line {
+ height: 1rpx;
+ background: #ccc;
+ margin-top: 40rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 104rpx;
+ z-index: 1;
+ background: #FFFFFF;
+ box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.order-btn {
+ width: 390rpx;
+ line-height: 74rpx;
+ background: #D62828;
+ border-radius: 37rpx;
+ text-align: center;
+ color: #fff;
+ font-size: 31rpx;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/seats/index.js b/pages/list/movieticket/list/seats/index.js
new file mode 100644
index 0000000..b543a9f
--- /dev/null
+++ b/pages/list/movieticket/list/seats/index.js
@@ -0,0 +1,1014 @@
+// pages/list/movieticket/list/seats/index.js
+import commonApi from "../../../../../utils/https/common"
+let app = getApp()
+const seatTypeList = [
+ {
+ "name": "可选",
+ "type": "0",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image1.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "已选",
+ "type": "0-1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image0.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "已售",
+ "type": "0-2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image2.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "维修",
+ "type": "0-3",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image3.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座可选",
+ "type": "1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image4.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座已选",
+ "type": "1-1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image5.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座已售",
+ "type": "1-2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image6.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座维修",
+ "type": "1-3",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image7.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座可选",
+ "type": "2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image8.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座已选",
+ "type": "2-1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image9.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座已售",
+ "type": "2-2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image10.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座维修",
+ "type": "2-3",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image11.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣座",
+ "type": "5",
+ "seats": 2,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image12.png",
+ "isShow": "1",
+ "position": "up"
+ }
+];
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ level_price:[],
+ show_version:"",
+ info:null,
+ movieName: undefined,
+ planDetail: undefined,
+ seatList: [],
+ selectedSeat: [],
+ hallName: undefined,
+ scaleValue: 1,
+ hidden: "hidden",
+ maxSelect: 4,
+ totalPrice: 0,
+ loadComplete: false,
+ timer: null,
+ schedule_list:[],
+ schedule_id:"",
+ options:null,
+ productInfo:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ options:options
+ })
+ commonApi._post('Cinema/getProductAndSku',{
+ show_id:options.show_id,
+ cinema_id:options.cinema_id
+ }).then(res=>{
+ this.setData({
+ productInfo:res.data
+ })
+ })
+ let that = this;
+ let sys = wx.getSystemInfoSync()
+ that.setData({
+ seatArea: sys.screenHeight - sys.statusBarHeight - (500 * sys.screenWidth / 750),
+ rpxToPx: sys.screenWidth / 750
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("Cinema/getLockSeatInfo",{
+ schedule_id:this.data.options.schedule_id
+ }).then(res=>{
+ console.log(res)
+ this.getInfo();
+ })
+
+
+ //---这此替换成自己的接口请求成功后--end--
+ },
+ getInfo:function(){
+ let result,that = this;
+ commonApi._post("Cinema/getSeatInfo",this.data.options).then(res=>{
+ console.log(res)
+ // commonApi._post("uservice/user/test").then(res=>{
+ console.log(res)
+ result = res.data.seat_info.seats.seat;
+ res.data.schedule_list.map(item=>{
+ if(item.schedule_id==res.data.schedule_id){
+ this.setData({
+ hallName:item.hall_name
+ })
+ }
+ })
+ if (res.code == 1) {
+ let seatList = that.prosessSeatList({seatList:result,max_left_px:res.data.seat_info.max_left_px,min_left_px:res.data.seat_info.min_left_px});
+ that.setData({
+ movieName: res.data.movie_name,
+ level_price:res.data.level_price || [],
+ maxX:Number(res.data.seat_info.max_column?res.data.seat_info.max_column:(res.data.seat_info.max_left_px / 30)),
+ maxY:Number(res.data.seat_info.max_row?res.data.seat_info.max_row:(res.data.seat_info.max_top_px / 30)),
+ planDetail: res.data.show_date+" "+res.data.start_end_time,
+ // hallName: res.data.title,
+ seatList: seatList,
+ seatTypeList: seatTypeList,
+ selectedSeat: [],
+ totalPrice: 0,
+ hidden: "hidden",
+ seatArea: this.data.seatArea,
+ maxSelect:res.data.seat_info.max_can_buy,
+ show_version:res.data.show_version,
+ schedule_list:res.data.schedule_list,
+ schedule_id:res.data.schedule_id,
+ show_date:res.data.show_date,
+ start_end_time:res.data.start_end_time,
+ cinema_title:res.data.title
+ });
+ wx.showLoading({
+ title: '加载中',
+ })
+ //计算X和Y坐标最大值
+ that.prosessMaxSeat(seatList);
+ //计算左侧座位栏的数组
+ // that.seatToolArr()
+ //按每排生成座位数组对象
+ // that.creatSeatMap()
+ //确认最佳坐标座位
+ // that.creatBestSeat()
+ wx.hideLoading()
+ } else {
+ wx.showToast({
+ title: '获取座位图失败',
+ icon: 'none',
+ duration: 2000
+ })
+ setTimeout(function() {
+ wx.navigateBack({
+ delta: 1, // 回退前 delta(默认为1) 页面
+ })
+ }, 1000)
+ }
+ })
+ },
+ //解决官方bug
+ handleScale: function(e) {
+ if (this.data.timer) {
+ clearTimeout(this.data.timer)
+ }
+ let timer = setTimeout(() => {
+ this.setData({
+ seatArea: this.data.seatArea
+ });
+ }, 200)
+ },
+ setSchedule:function(e){
+ let item = e.currentTarget.dataset.item,options = {
+ show_id:item.show_id,
+ schedule_id:item.schedule_id,
+ cinema_id:item.cinema_id
+ };
+ this.setData({
+ options:options
+ })
+ this.getInfo();
+ },
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+ /**
+ * 顶级顶部返回按钮时候
+ */
+ prosessSeatList: function(response) {
+ let resSeatList = response.seatList
+ resSeatList.forEach(element => {
+ console.log(element)
+ element.id = element.ext_id;
+ element.gRow = element.top_px?Math.round(element.top_px / 30):Number(element.row);
+ element.gCol = element.left_px?(Math.round(( element.left_px) / 30)):Number(element.column);
+ if(element.status==1){
+ element.type = element.flag;
+ }
+ if(element.status==0){
+ element.type = element.flag+"-2";
+ }
+ if(element.status=="-2" || element.status== '-1'){
+ element.type = element.flag+"-3";
+ }
+ let firstNumber = element.type.split("-")[0];
+ // 获取座位的类型的首字母
+ // 在原来的对象中加入两个属性 otherLoveSeatIndex 对应情侣座位的原数组下标 otherLoveSeatId 对应情侣座位的Id
+ element.otherLoveSeatIndex = null
+ element.otherLoveSeatId = null
+ // 座位的类型的首字母为 '1' 是情侣首座 处理情侣首座位
+ if (element.type == '1') {
+ for (const index in resSeatList) {
+ if (resSeatList[index].gRow === element.gRow &&
+ resSeatList[index].gCol === element.gCol + 1) {
+ element.otherLoveSeatIndex = index
+ element.otherLoveSeatId = resSeatList[index].id
+ }
+ }
+ }
+ // 座位的类型的首字母为 '2' 是情侣次座 处理情侣次座位
+ if (element.type == '2') {
+ for (const index in resSeatList) {
+ if (resSeatList[index].gRow === element.gRow &&
+ resSeatList[index].gCol === element.gCol - 1) {
+ element.otherLoveSeatIndex = index
+ element.otherLoveSeatId = resSeatList[index].id
+ }
+ }
+ }
+ // 加载座位的图标
+ let seatType = seatTypeList;
+ for (const key in seatType) {
+ // 加载每个座位的初始图标defautIcon 和 当前图标 nowIcon
+ if (element.type === seatType[key].type) {
+ element.nowIcon = seatType[key].icon
+ element.defautIcon = seatType[key].icon;
+ if(element.type==0) {
+ element.nowIcon = 'https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image1-'+(element.area_level % 5)+'.png'
+ element.defautIcon = 'https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image1-'+(element.area_level % 5)+'.png'
+ }
+ }
+ // 根据首字母找到对应的被选中图标
+ if (firstNumber + '-1' === seatType[key].type) {
+ element.selectedIcon = seatType[key].icon
+ }
+ // 根据首字母找到对应的被选中图标
+ if (firstNumber + '-2' === seatType[key].type) {
+ element.soldedIcon = seatType[key].icon
+ }
+ // 根据首字母找到对应的被选中图标
+ if (firstNumber + '-3' === seatType[key].type) {
+ element.fixIcon = seatType[key].icon
+ }
+ }
+ // 如果座位是已经售出 和 维修座位 加入属性canClick 判断座位是否可以点击
+ if (element.defautIcon === element.soldedIcon || element.defautIcon === element.fixIcon) {
+ element.canClick = false
+ } else {
+ element.canClick = true
+ }
+ })
+ console.log(resSeatList);
+ return resSeatList;
+ },
+ //计算最大座位数,生成影厅图大小
+ prosessMaxSeat: function(value) {
+ // let seatList = value
+ // let maxY = 0;
+ // for (let i = 0; i < seatList.length; i++) {
+ // let tempY = seatList[i].gRow;
+ // if (parseInt(tempY) > parseInt(maxY)) {
+ // maxY = tempY;
+ // }
+ // }
+ // let maxX = 0;
+ // for (var i = 0; i < seatList.length; i++) {
+ // var tempX = seatList[i].gCol;
+ // if (parseInt(tempX) > parseInt(maxX)) {
+ // maxX = tempX;
+ // }
+ // }
+ let seatRealWidth = parseInt(this.data.maxX) * 70 * this.data.rpxToPx
+ let seatRealheight = parseInt(this.data.maxY) * 70 * this.data.rpxToPx
+ let seatScale = 1;
+ let seatScaleX = 1;
+ let seatScaleY = 1;
+ let seatAreaWidth = 630 * this.data.rpxToPx
+ let seatAreaHeight = this.data.seatArea - 200 * this.data.rpxToPx
+ if (seatRealWidth > seatAreaWidth) {
+ seatScaleX = seatAreaWidth / seatRealWidth
+ }
+ if (seatRealheight > seatAreaHeight) {
+ seatScaleY = seatAreaHeight / seatRealheight
+ }
+ if (seatScaleX < 1 || seatScaleY < 1) {
+ seatScale = seatScaleX < seatScaleY ? seatScaleX : seatScaleY
+ }
+ console.log(seatScale,this.data.rpxToPx)
+ this.setData({
+ // maxY: parseInt(maxY),
+ // maxX: parseInt(maxX),
+ seatScale: seatScale,
+ seatScaleHeight: seatScale * 70 * this.data.rpxToPx
+ });
+ },
+ // 座位左边栏的数组
+ seatToolArr: function() {
+ let seatToolArr = []
+ let yMax = this.data.maxY
+ let seatList = this.data.seatList
+ for (let i = 1; i <= yMax; i++) {
+ let el = ''
+ for (let j = 0; j < seatList.length; j++) {
+ if (parseInt(seatList[j].gRow) === i) {
+ el = seatList[j].row?seatList[j].row:seatList[j].row_name
+ }
+ }
+ seatToolArr.push(el)
+ }
+ this.setData({
+ seatToolArr: seatToolArr
+ })
+ },
+ back: function() {
+ wx.navigateBack({
+ delta: 1, // 回退前 delta(默认为1) 页面
+ })
+ },
+ // 点击每个座位触发的函数
+ clickSeat: function(event) {
+ let index = event.currentTarget.dataset.index;
+ if (this.data.seatList[index].canClick) {
+ if (this.data.seatList[index].nowIcon === this.data.seatList[index].selectedIcon) {
+ this.processSelected(index)
+ } else {
+ this.processUnSelected(index)
+ }
+ }
+ if (this.data.selectedSeat.length == 0) {
+ this.setData({
+ hidden: "hidden"
+ });
+ }
+
+ let _selectedSeatList = this.data.selectedSeat
+ let totalPrice = 0
+ for (const key in _selectedSeatList) {
+ let price = parseInt(_selectedSeatList[key].price);
+ totalPrice += price;
+ }
+ this.setData({
+ totalPrice: totalPrice
+ })
+ },
+ // 处理已选的座位
+ processSelected: function(index) {
+ let _selectedSeatList = this.data.selectedSeat
+ let seatList = this.data.seatList
+ let otherLoveSeatIndex = seatList[index].otherLoveSeatIndex
+ if (otherLoveSeatIndex !== null) {
+ // 如果是情侣座位
+ // 改变这些座位的图标为初始图标
+ seatList[index].nowIcon = seatList[index].defautIcon
+ seatList[otherLoveSeatIndex].nowIcon = seatList[otherLoveSeatIndex].defautIcon
+ for (const key in _selectedSeatList) {
+ // 移除id一样的座位
+ if (_selectedSeatList[key].id === seatList[index].id) {
+ _selectedSeatList.splice(key, 1)
+ }
+ }
+ // 移除对应情侣座位
+ for (const key in _selectedSeatList) {
+ if (_selectedSeatList[key].id === seatList[otherLoveSeatIndex].id) {
+ _selectedSeatList.splice(key, 1)
+ }
+ }
+ } else {
+ // 改变这些座位的图标为初始图标 并 移除id一样的座位
+ seatList[index].nowIcon = seatList[index].defautIcon
+ for (const key in _selectedSeatList) {
+ if (_selectedSeatList[key].id === seatList[index].id) {
+ _selectedSeatList.splice(key, 1)
+ }
+ }
+ }
+ this.setData({
+ selectedSeat: _selectedSeatList,
+ seatList: seatList
+ })
+ },
+ // 处理未选择的座位
+ processUnSelected: function(index) {
+ let _selectedSeatList = this.data.selectedSeat
+ let seatList = this.data.seatList
+ let otherLoveSeatIndex = seatList[index].otherLoveSeatIndex
+ if (otherLoveSeatIndex !== null) {
+ // 如果选中的是情侣座位 判断选择个数不大于 maxSelect
+ if (_selectedSeatList.length >= this.data.maxSelect - 1) {
+ wx.showToast({
+ title: '最多只能选择' + this.data.maxSelect + '个座位哦~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 改变这些座位的图标为已选择图标
+ seatList[index].nowIcon = seatList[index].selectedIcon
+ seatList[otherLoveSeatIndex].nowIcon = seatList[otherLoveSeatIndex].selectedIcon
+ // 记录 orgIndex属性 是原seatList数组中的下标值
+ seatList[index].orgIndex = index
+ seatList[otherLoveSeatIndex].orgIndex = otherLoveSeatIndex
+ // 把选择的座位放入到已选座位数组中
+ let temp = { ...seatList[index]
+ }
+ let tempLove = { ...seatList[otherLoveSeatIndex]
+ }
+ _selectedSeatList.push(temp)
+ _selectedSeatList.push(tempLove)
+ } else {
+ // 如果选中的是非情侣座位 判断选择个数不大于 maxSelect
+ if (_selectedSeatList.length >= this.data.maxSelect) {
+ wx.showToast({
+ title: '最多只能选择' + this.data.maxSelect + '个座位哦~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 改变这些座位的图标为已选择图标
+ seatList[index].nowIcon = seatList[index].selectedIcon
+ // 记录 orgIndex属性 是原seatList数组中的下标值
+ seatList[index].orgIndex = index
+ // 把选择的座位放入到已选座位数组中
+ let temp = { ...seatList[index]
+ }
+ _selectedSeatList.push(temp)
+ }
+ this.setData({
+ selectedSeat: _selectedSeatList,
+ seatList: seatList,
+ hidden: ""
+ })
+ },
+ confirmHandle: function() {
+ let that = this
+ let _this = this.data
+ if (_this.selectedSeat.length === 0) {
+ wx.showToast({
+ title: '请至少选择一个座位~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 开始计算是否留下空位 ------------ 开始
+ let result = _this.selectedSeat.every(function(element, index, array) {
+ return that.checkSeat(element, _this.selectedSeat)
+ })
+ // 开始计算是否留下空位 ------------ 结束
+ if (!result) {
+ // 如果 result 为false
+ wx.showToast({
+ title: '请不要留下空位~',
+ icon: 'none',
+ duration: 2000
+ })
+ } else {
+ if (_this.totalPrice === 0) {
+ wx.showToast({
+ title: '锁座失败了~,金额为0',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 允许锁座
+ wx.showLoading({
+ title: '加载中',
+ })
+ that.createOrder()
+ }
+ },
+ // 检查每个座位是否会留下空位
+ checkSeat: function(element, selectedSeat) {
+ // 标准为 1.左右侧都必须保留 两格座位 + 最大顺延座位(也就是已选座位减去自身)
+ // 2.靠墙和靠已售的座位一律直接通过
+ const checkNum = 2 + selectedSeat.length - 1
+ const gRowBasic = element.gRow
+ const gColBasic = element.gCol
+ let otherLoveSeatIndex = element.otherLoveSeatIndex
+ if (otherLoveSeatIndex != null) {
+ // 如果是情侣座 不检测
+ return true
+ }
+ // 检查座位左侧
+ let left = this.checkSeatDirection(gRowBasic, gColBasic, checkNum, '-', selectedSeat)
+ // 如果左侧已经检查出是靠着过道直接 返回true
+ if (left === 'special') {
+ return true
+ }
+ // 检查座位右侧
+ let right = this.checkSeatDirection(gRowBasic, gColBasic, checkNum, '+', selectedSeat)
+ if (right === 'special') {
+ // 无论左侧是否是什么状态 检查出右侧靠着过道直接 返回true
+ return true
+ } else if (right === 'normal' && left === 'normal') {
+ // 如果左右两侧都有富裕的座位 返回true
+ return true
+ } else if (right === 'fail' || left === 'fail') {
+ // 如果左右两侧都是不通过检测 返回false
+ return false
+ }
+ return true
+ },
+ // 检查左右侧座位满足规则状态
+ checkSeatDirection: function(gRowBasic, gColBasic, checkNum, direction, selectedSeat) {
+ // 空位个数
+ let emptySeat = 0
+ let x = 1 // 检查位置 只允许在x的位置出现过道,已售,维修
+ for (let i = 1; i <= checkNum; i++) {
+ let iter // 根据 gRow gCol direction 找出检查座位左边按顺序排列的checkNum
+ if (direction === '-') {
+ iter = this.data.seatList.find(function(el) {
+ return el.gRow === gRowBasic && el.gCol === gColBasic - i
+ })
+ } else if (direction === '+') {
+ iter = this.data.seatList.find(function(el) {
+ return el.gRow === gRowBasic && el.gCol === gColBasic + i
+ })
+ }
+ if (x === i) {
+ if (iter === undefined) {
+ // 过道
+ return 'special'
+ }
+ if (iter.nowIcon === iter.soldedIcon || iter.nowIcon === iter.fixIcon) {
+ // 已售或者维修
+ return 'special'
+ }
+ let checkSelect = false
+ for (const index in selectedSeat) {
+ if (selectedSeat[index].id === iter.id) {
+ // 已选 顺延一位
+ x++
+ checkSelect = true
+ break;
+ }
+ }
+ if (checkSelect) {
+ continue
+ }
+ } else {
+ if (iter === undefined) {
+ // 过道
+ return 'fail'
+ }
+ if (iter.nowIcon === iter.soldedIcon ||
+ iter.nowIcon === iter.fixIcon) {
+ // 已售或者维修
+ return 'fail'
+ }
+ let checkSelect = false
+ for (const index in selectedSeat) {
+ if (selectedSeat[index].id === iter.id) {
+ return 'fail'
+ }
+ }
+ }
+ emptySeat++
+ if (emptySeat >= 2) {
+ return 'normal'
+ }
+ }
+ },
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+ return app.globalData.share;
+ },
+ /**
+ * 点击确认选择开始生成订单
+ */
+ createOrder: function() {
+ let _this = this.data
+ var seatIds = [],seat_names=[];
+ let selectSeatInfo = _this.selectedSeat;
+ if (selectSeatInfo) {
+ for (var i = 0; i < selectSeatInfo.length; i++) {
+ seatIds.push(selectSeatInfo[i].id);
+ seat_names.push(selectSeatInfo[i].name)
+ }
+ }
+ wx.showLoading({
+ title: '锁座中',
+ })
+ commonApi.user_post("Cinema/lockSeat",{
+ seat_names:seat_names.join(","),
+ seat_ids:seatIds.join(","),
+ schedule_id:this.data.schedule_id
+ }).then(res=>{
+ console.log(res)
+ if(res.code==1){
+ wx.showLoading({
+ title: '加载中',
+ })
+ app.globalData.couponInfo = null;
+ app.globalData.product ={
+ product:this.data.productInfo,
+ info:{
+ hallName:this.data.hallName,
+ show_date:this.data.show_date,
+ start_end_time:this.data.start_end_time,
+ cinema_title:this.data.cinema_title,
+ movieName:this.data.movieName,
+ show_version:this.data.show_version,
+ selectSeatInfo:selectSeatInfo,
+ schedule_id:this.data.schedule_id
+ }
+ }
+ wx.hideLoading()
+ wx.navigateTo({
+ url: '/pages/order/movie/index?key='+res.data.apply_key,
+ })
+ }
+ })
+ console.log(selectSeatInfo,seatIds)
+ return
+ },
+ //生成最佳座位
+ creatBestSeat: function() {
+ // 优先左侧
+ var bestX = parseInt(this.data.maxX / 2) + 1
+ // 四舍五入 0.618为黄金分割比例
+ var bestY = Math.round(this.data.maxY * 0.618)
+ this.setData({
+ bestX: bestX,
+ bestY: bestY,
+ loadComplete: true
+ })
+ },
+ // 根据seatList 生成一个类map的对象 key值为gRow坐标 value值为gRow为key值的数组
+ creatSeatMap: function() {
+ let seatList = this.data.seatList
+ console.log(seatList)
+ var obj = {}
+ for (let index in seatList) {
+ let seatRowList = seatList[index].gRow
+ if (seatRowList in obj) {
+ // 原本数组下标
+ seatList[index].orgIndex = index
+ obj[seatRowList].push(seatList[index])
+ } else {
+ let seatArr = []
+ // 原本数组下标
+ seatList[index].orgIndex = index
+ seatArr.push(seatList[index])
+ obj[seatRowList] = seatArr
+ }
+ }
+ console.log(obj)
+ setTimeout(()=>{
+ wx.hideLoading()
+ },1000)
+
+ this.setData({
+ seatMap: obj
+ })
+ },
+ // 快速选择座位函数
+ quickSeat: function(event) {
+ let value = parseInt(event.currentTarget.dataset.num);
+ let _self = this.data
+ let that = this
+ // 最优座位数组 里面包含了每排的最佳座位组
+ let bestSeatList = []
+ let bestRowSeat
+ for (let i = _self.maxY; i > 0; i--) {
+ // bestRowSeat为 gRow 为 i 的的所有座位对象
+ bestRowSeat = _self.seatMap[i]
+ if (bestRowSeat === undefined) {
+ continue
+ } else {
+ // 找到每排的最佳座位
+ let bestSeat = that.seachBestSeatByRow(bestRowSeat, value)
+ if (bestSeat != null) {
+ bestSeatList.push(bestSeat)
+ }
+ }
+ }
+ if (bestSeatList.length <= 0) {
+ wx.showToast({
+ title: '没有合适的座位~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ let bestSeatListIndex = 0
+ // 递归每排的最优座位组 找出离中心点最近的最优座位组
+ bestSeatList.reduce(function(prev, cur, index, arr) {
+ if (Array.isArray(prev)) {
+ // 取中心点离 最好坐标 绝对值
+ let n = Math.abs((prev[0].gCol + prev[value - 1].gCol) / 2 - _self.bestX)
+ let m = Math.abs(prev[0].gRow - _self.bestY)
+ // 勾股定理
+ prev = Math.sqrt(Math.pow(n, 2) + Math.pow(m, 2))
+ }
+ // 取中心点离 最好坐标 绝对值
+ let x = Math.abs((cur[0].gCol + cur[value - 1].gCol) / 2 - _self.bestX)
+ let y = Math.abs(cur[0].gRow - _self.bestY)
+ // 勾股定理
+ let z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))
+ if (z >= prev) {
+ return prev
+ } else {
+ bestSeatListIndex = index
+ return z
+ }
+ })
+ // 最佳座位中包含情侣座位
+ let notEmitSeatArr = []
+ // 发送选择事件
+ for (const iterator of bestSeatList[bestSeatListIndex]) {
+ if (iterator.otherLoveSeatId !== null) {
+ let checkFor = false
+ for (const item of notEmitSeatArr) {
+ if (iterator.id === item) {
+ // 情侣座的另外一半不发送事件
+ checkFor = true
+ break
+ }
+ }
+ if (checkFor) {
+ continue
+ }
+ notEmitSeatArr.push(iterator.otherLoveSeatId)
+ }
+ that.processUnSelected(iterator.orgIndex)
+ }
+ let _selectedSeatList = _self.selectedSeat
+ let totalPrice = 0
+ for (const key in _selectedSeatList) {
+ let price = parseInt(_selectedSeatList[key].price);
+ totalPrice += price;
+ }
+ this.setData({
+ totalPrice: totalPrice
+ })
+ },
+ // 找寻每排的最佳座位数组
+ seachBestSeatByRow: function(rowSeatList, value) {
+ let effectiveSeatLeft = []
+ let effectiveSeatRight = []
+ let effectiveSeatMiddle = []
+ // 检查居中对齐包含最佳座位的
+ effectiveSeatMiddle = this.checkSeatMiddle(rowSeatList, value)
+ // 左边检查开始
+ effectiveSeatLeft = this.checkSeatWithDirection(rowSeatList, value, '-')
+ // 右边检查开始
+ effectiveSeatRight = this.checkSeatWithDirection(rowSeatList, value, '+')
+ // 如果这排中 包含最佳坐标有座位数满足 返回这批座位数组
+ if (effectiveSeatMiddle.length === value) {
+ return effectiveSeatMiddle
+ }
+ // 如果这排中 不包含最佳座位 但是左右两侧都有满足座位数 取离中心点近的方向座位数组
+ if (effectiveSeatLeft.length === value && effectiveSeatRight.length === value) {
+ return Math.abs(effectiveSeatLeft[0].gCol - this.data.bestX) > Math.abs(effectiveSeatRight[0].gCol - this.data.bestX) ? effectiveSeatRight : effectiveSeatLeft
+ } else {
+ // 否则 返回 左右两侧 某一侧满足的座位数组
+ if (effectiveSeatLeft.length === value) {
+ return effectiveSeatLeft
+ }
+ if (effectiveSeatRight.length === value) {
+ return effectiveSeatRight
+ }
+ return null
+ }
+ },
+ // 找到次排是否有快速选择座位数有效的数组 寻找的坐标为 最佳座位根据快速选择座位数 取左右两边正负座位数
+ checkSeatMiddle: function(rowSeatList, value) {
+ let effectiveSeat = []
+ let existLoveSeat = false
+ // 从负到整的值动态值
+ let activeValue = value > 2 ? value - 2 : value - 1
+ if (value === this.data.maxX) {
+ activeValue = activeValue - 1
+ } else if (value > this.data.maxX) {
+ // 快速选择座位数 大于影厅横向左边值 直接返回没有有效座位
+ return effectiveSeat
+ }
+ // 最佳座位根据快速选择座位数 取左右两边正负座位数
+ for (let j = -activeValue; j <= activeValue; j++) {
+ // 确认最佳座位状态
+ let iter = rowSeatList.find((el) => (parseInt(el.gCol) === this.data.bestX + j))
+ // 最佳座位
+ if (iter === undefined) {
+ break
+ }
+ if (iter.nowIcon === iter.soldedIcon || iter.nowIcon === iter.fixIcon) {
+ effectiveSeat = []
+ existLoveSeat = false
+ continue
+ } else {
+ if (iter.otherLoveSeatId !== null) {
+ existLoveSeat = true
+ }
+ effectiveSeat.push(iter)
+ }
+ }
+ if (effectiveSeat.length > value) {
+ // 最后找出居中座位数组后 由于会有已售和维修和过道的影响 在数组中 先删除后面的位置值 再删除前面位置值 直到值为value(快速选择座位数)
+ for (let i = 0; i < activeValue; i++) {
+ effectiveSeat.pop()
+ if (effectiveSeat.length === value) {
+ break
+ }
+ effectiveSeat.shift()
+ if (effectiveSeat.length === value) {
+ break
+ }
+ }
+ //预检
+ if (this.preCheckSeatMakeEmpty(effectiveSeat)) {
+ return []
+ }
+ } else if (effectiveSeat.length < value) {
+ return []
+ } else {
+ //预检
+ if (this.preCheckSeatMakeEmpty(effectiveSeat)) {
+ return []
+ }
+ }
+ // 如果最近座位组中存在情侣座
+ // 检查数组内情侣座必须成对出现 否则舍弃
+ if (existLoveSeat) {
+ if (!this.checkLoveSeatIsDouble(effectiveSeat)) {
+ return []
+ }
+ }
+ return effectiveSeat
+ },
+ // 找到次排是否有快速选择座位数有效的数组
+ checkSeatWithDirection: function(rowSeatList, value, direction) {
+ let activeValue = value
+ // 最多允许过道等于3 由于某些影厅 居中的位置不是座位 存在大部分的过道 导致无法选择到最佳座位
+ let roadDistance = 3
+ let effectiveSeat = []
+ let existLoveSeat = false
+ for (let j = 0; j < activeValue; j++) {
+ let iter
+ if (direction === '-') {
+ iter = rowSeatList.find((el) => (parseInt(el.gCol) === this.data.bestX - j))
+ } else if (direction === '+') {
+ iter = rowSeatList.find((el) => (parseInt(el.gCol) === this.data.bestX + j))
+ }
+ if (iter === undefined) {
+ activeValue++
+ roadDistance--
+ if (roadDistance <= 0) {
+ break
+ } else {
+ continue
+ }
+ }
+ if (iter.nowIcon === iter.soldedIcon || iter.nowIcon === iter.fixIcon) {
+ activeValue++
+ effectiveSeat = []
+ existLoveSeat = false
+ continue
+ } else {
+ if (iter.otherLoveSeatId !== null) {
+ existLoveSeat = true
+ }
+ effectiveSeat.push(iter)
+ }
+ if (effectiveSeat.length === value) {
+ //预检
+ if (this.preCheckSeatMakeEmpty(effectiveSeat)) {
+ activeValue++
+ effectiveSeat.shift()
+ continue
+ }
+ }
+ }
+ // 如果最近座位组中存在情侣座
+ // 检查数组内情侣座必须成对出现 否则舍弃
+ if (existLoveSeat) {
+ if (!this.checkLoveSeatIsDouble(effectiveSeat)) {
+ return []
+ }
+ }
+ return effectiveSeat
+ },
+ checkLoveSeatIsDouble: function(arr) {
+ // 检查数组内必须情侣座是否对出现 否则舍弃
+ var orgSet = new Set()
+ var loveSeatSet = new Set()
+ for (const iterator of arr) {
+ orgSet.add(iterator.id)
+ }
+ for (const iterator of arr) {
+ if (iterator.otherLoveSeatId !== null) {
+ loveSeatSet.add(iterator.otherLoveSeatId)
+ }
+ }
+ let beforelen = orgSet.size
+ let afterlen = new Set([...orgSet, ...loveSeatSet]).size
+ return beforelen === afterlen
+ },
+ //预检座位
+ preCheckSeatMakeEmpty(arr) {
+ let that = this
+ // 开始计算是否留下空位 ------------ 开始
+ let result = arr.every(function(element, index, array) {
+ return that.checkSeat(element, arr)
+ })
+ // 开始计算是否留下空位 ------------ 结束
+ return !result
+ }
+})
\ No newline at end of file
diff --git a/pages/list/movieticket/list/seats/index.json b/pages/list/movieticket/list/seats/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/movieticket/list/seats/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/seats/index.wxml b/pages/list/movieticket/list/seats/index.wxml
new file mode 100644
index 0000000..a038aa9
--- /dev/null
+++ b/pages/list/movieticket/list/seats/index.wxml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+ {{movieName}}
+ {{planDetail}}
+
+
+
+
+
+
+
+
+
+ {{item.price/100}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{movieName}}
+ {{planDetail}} {{show_version}}
+
+
+ {{item.show_time}}
+ {{item.show_version}}
+ ¥{{item.price/100}}
+
+
+ 立即预订
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/list/movieticket/list/seats/index.wxss b/pages/list/movieticket/list/seats/index.wxss
new file mode 100644
index 0000000..5b1a6ed
--- /dev/null
+++ b/pages/list/movieticket/list/seats/index.wxss
@@ -0,0 +1,491 @@
+/* pages/list/movieticket/list/seats/index.wxss */
+/*
+*@zenghao 2018-06-12
+*/
+
+page {
+ background: #eee;
+}
+
+/*
+*上方影片名称样式
+*/
+
+.movieName {
+ font-size: 35rpx;
+ font-weight: 600;
+ margin-bottom: 10rpx;
+}
+
+/*
+*上方排期信息样式
+*/
+
+.planDetail {
+ color: #aaa;
+ font-size: 27rpx;
+}
+
+/*
+*上方影片,排期信息的父级
+*/
+
+.info {
+ width: 100%;
+ height: 80rpx;
+ background: #fff;
+ border-top: 1rpx solid #eee;
+ border-bottom: 1rpx solid #eee;
+ padding: 30rpx 30rpx;
+ position: relative;
+}
+
+.seatDemosBack {
+ background: #fff;
+}
+
+/*
+*座位样式的父级
+*/
+
+.seatDemos {
+ color: #aaa;
+ background: #fff;
+ position: relative;
+ margin: 0 auto;
+ width: 80%;
+ box-sizing: border-box;
+ font-size: 25rpx;
+ height: 70rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.areaSeatDemos {
+ width: 100%;
+ height: 80rpx;
+ position: fixed;
+ bottom: 100rpx;
+}
+
+.seatDemosScroll {
+ color: #aaa;
+ background: #fff;
+ width: 100%;
+ height: 100%;
+ font-size: 25rpx;
+ white-space: nowrap;
+}
+
+.seatDemosScrollItem {
+ height: 90rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ margin-left: 15px;
+ display: inline-block;
+ align-items: center;
+ margin-top: 25rpx;
+}
+
+.seatDemosScrollItem.Itemnormal image {
+ margin-right: 10rpx;
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: -30%;
+}
+
+/*
+*情侣座位的图片样式
+*/
+
+.seatDemosScrollItem.Itemlove image {
+ margin: 0;
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: -30%;
+}
+
+/*
+*情侣座位的字体样式
+*/
+
+.seatDemosScrollItem.Itemlove text {
+ margin-left: 10rpx;
+}
+
+.seatDemo image {
+ width: 45rpx;
+ height: 45rpx;
+}
+
+/*
+*普通座位的图片样式
+*/
+
+.seatDemoItem {
+ white-space: nowrap;
+ width: 45rpx;
+ display: block;
+}
+
+/*
+*情侣座位的图片样式
+*/
+
+.seatDemo {
+ display: flex;
+ align-items: center;
+}
+
+/*
+*情侣座位的字体样式
+*/
+
+.loveSeatDemo text {
+ margin-left: 10rpx;
+}
+
+/*
+*影厅图上方显示影厅名字区域
+*/
+
+.hallName {
+ width: 200rpx;
+ height: 0;
+ border-top: 40rpx solid #ccc;
+ border-right: 20rpx solid transparent;
+ border-left: 20rpx solid transparent;
+ line-height: 30rpx;
+ color: white;
+ position: absolute;
+ top: -100rpx;
+ z-index: 2;
+ left: 50%;
+ transform: translateX(-50%);
+ white-space: nowrap;
+}
+
+/*
+*影厅图上方显示影厅名字区域字体样式
+*/
+
+.hallName text {
+ font-size: 20rpx;
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ top: -35rpx;
+}
+
+/*
+*所有座位的区域
+*/
+
+.seatArea {
+ margin: 0 auto;
+ font-size: 10rpx;
+ position: relative;
+}
+
+/*
+*中轴线
+*/
+
+.alignLine {
+ position: absolute;
+ left: 50%;
+ height: 100%;
+ border-left: 1px dashed #aaa;
+ transform: translateX(-100%);
+}
+
+/*
+*选座区域普通座位的图片样式
+*/
+
+.normal {
+ position: relative;
+ /* margin: 10rpx; */
+ width: 100%;
+ height: 100%;
+}
+
+/*
+*选座区域情侣座位的图片样式
+*/
+
+.LoveSeat {
+ position: relative;
+ /* margin: 10rpx 0; */
+ width: 70rpx;
+ height: 70rpx;
+}
+
+/*
+*所有座位的图片样式下方透明可点击区域
+*/
+
+.seatTap {
+ position: absolute;
+}
+
+/*
+*情侣座位的图片样式下方透明可点击区域
+*/
+
+.LoveSeatTap {
+ position: absolute;
+ top: 0;
+ width: 70rpx;
+ height: 70rpx;
+}
+
+/*
+* 座位图限制区域
+*/
+
+movable-area {
+ background: #eee;
+ overflow: hidden;
+}
+
+/*
+* 座位图可移动区域(座位图)
+*/
+
+.movableOne {
+ box-sizing: border-box;
+ padding: 100rpx 60rpx;
+ color: #fff;
+}
+
+/*
+* 座位图可移动区域(左边座位排号栏)
+*/
+
+.movableTwo {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 1400rpx;
+ width: 30rpx;
+ padding: 100rpx 0;
+ color: #fff;
+}
+
+/*
+* (左边座位排号栏整体)
+*/
+
+.seatTool {
+ width: 30rpx;
+ padding: 100rpx 0;
+ opacity: 0.5;
+}
+
+.seatToolArea {
+ background: rgba(0, 0, 0, 0.2);
+ border-radius: 50rpx;
+}
+
+/*
+* (左边座位排号栏每一个块)
+*/
+
+.seatTag {
+ text-align: center;
+ color: rgba(0, 0, 0, 0.5);
+}
+
+/*
+*页面最下方确认选座区域
+*/
+
+.orderComfirm {
+ background: #fff;
+ position: fixed;
+ display: flex;
+ bottom: 0rpx;
+ width: 100%;
+ line-height: 100rpx;
+ z-index: 3;
+}
+
+/*
+*页面最下方价格区域
+*/
+
+.orderPrice {
+ text-indent: 30rpx;
+ color: black;
+ height: 100rpx;
+ width: 60%;
+}
+
+/*
+*页面最下方价格字体样式
+*/
+
+.orderPrice text {
+ color: red;
+}
+
+/*
+*页面最下方确认选座区域渐变色
+*/
+
+.comfirm {
+ font-weight: 900;
+ text-align: center;
+ color: white;
+ width: 100%;
+ background: linear-gradient(to right, #C26DFE, #6F50F5);
+ background: #D62828;
+ height: 100rpx;
+}
+
+/*
+*用户选中的座位区域
+*/
+
+.selectSeatInfo {
+ background: #fff;
+ position: fixed;
+ bottom: 100rpx;
+ height: 80rpx;
+ width: 100%;
+ padding: 10rpx 0;
+}
+
+/*
+*用户选中的座位详情滑块
+*/
+
+.scrollSeat {
+ height: 173rpx;
+ white-space: nowrap;
+}
+
+/*
+*每块用户选中的座位详情
+*/
+
+.scrollItem {
+ border: 1rpx solid #bbb;
+ border-radius: 10rpx;
+ width: 180rpx;
+ display: inline-block;
+ margin-left: 20rpx;
+ position: relative;
+}
+
+/*
+* 快速选座模块
+*/
+
+.quickItem {
+ width: 159rpx;
+ height: 173rpx;
+ background: #F5F5F5;
+ border-radius: 13rpx;
+ text-align: center;
+ display: inline-block;
+ margin-right: 28rpx;
+ position: relative;
+ font-size: 27rpx;
+ display: inline-flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+/*
+*每块用户选中的座位详情上方文字
+*/
+
+.scrollTextTop {
+ color: #555;
+ text-indent: 30rpx;
+ line-height: 25rpx;
+ font-size: 26rpx;
+ height: 25rpx;
+ margin-top: 10rpx;
+}
+
+/*
+*每块用户选中的座位详情下方文字
+*/
+
+.scrollTextBottom {
+ font-weight: 600;
+ font-size: 26rpx;
+ color: #ff005a;
+ text-indent: 40rpx;
+ height: 25rpx;
+ line-height: 25rpx;
+ margin: 10rpx 0;
+}
+
+/*
+*每块用户选中的座位详情关闭按钮
+*/
+
+.scrollItem image {
+ position: absolute;
+ z-index: 2;
+ width: 30rpx;
+ height: 30rpx;
+ right: 10rpx;
+ top: 50%;
+ transform: translateY(-50%);
+}
+
+.seatAreaTip {
+ position: relative;
+ width: 750rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+ font-size: 16rpx;
+ color: rgba(0, 0, 0, 0.1);
+ border-top: 1rpx dashed rgba(0, 0, 0, 0.1);
+}
+
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: white;
+ border-radius: 27rpx 27rpx 0px 0px;
+ padding:40rpx 47rpx;
+}
+.fixed-title {
+ font-size: 31rpx;
+ font-weight: 500;
+ color: #000;
+}
+.fixed-tip {
+ margin: 30rpx 0;
+ font-size: 27rpx;
+ color: #666;
+}
+.fixed-btn {
+ height: 78rpx;
+ line-height: 78rpx;
+ text-align: center;
+ background: #D62828;
+ color: #fff;
+ border-radius: 39rpx;
+ font-size: 33rpx;
+ font-weight: 500;
+ margin-top: 47rpx;
+}
+.quickItem.active {
+ background: rgba(214, 40, 40, 0.06);
+ border: 1rpx solid #D62828;
+ box-sizing: border-box;
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/ticket/index.js b/pages/list/movieticket/list/ticket/index.js
new file mode 100644
index 0000000..f852b08
--- /dev/null
+++ b/pages/list/movieticket/list/ticket/index.js
@@ -0,0 +1,208 @@
+// pages/list/movieticket/list/ticket/index.js
+import commonApi from "../../../../../utils/https/common"
+import util from "../../../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:null,
+ dates:[],
+ days:['周日','周一','周二','周三','周四','周五','周六'],
+ dateIndex:0,
+ areas:[],
+ areaIndex:0,
+ lat:"",
+ lon:"",
+ sort:null,
+ list:[],
+ title:"",
+ page:1,
+ isMore:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id,
+ title:options.title
+ })
+ commonApi._post("act/get_suzhou_areas").then(res=>{
+ res.data.unshift({
+ area_id:"",
+ area_title:"苏州"
+ })
+ this.setData({
+ areas:res.data
+ })
+ })
+ this.initDate();
+ wx.getLocation({
+ type: 'gcj02',
+ success:(res)=>{
+ this.setData({
+ lat:res.latitude,
+ lon:res.longitude
+ })
+ this.getList()
+ },
+ fail:()=>{
+ this.getList()
+ }
+ })
+ },
+ changeSort:function(e){
+ let sort = e.currentTarget.dataset.sort;
+ this.setData({
+ sort:this.data.sort==sort?null:sort,
+ list:[],
+ page:1,
+ isMore:true
+ })
+ if(this.data.sort=='distance' && !this.data.lon){
+ wx.getLocation({
+ type: 'gcj02',
+ success:(res)=>{
+ this.setData({
+ lat:res.latitude,
+ lon:res.longitude
+ })
+ this.getList()
+ },
+ fail:()=>{
+ this.getList()
+ }
+ })
+ }
+ else {
+ this.getList()
+ }
+
+ },
+ changeDateIndex:function(e){
+ this.setData({
+ dateIndex:e.currentTarget.dataset.index,
+ list:[],
+ page:1,
+ isMore:true
+ })
+ this.getList()
+ },
+ changeArea:function(e){
+ this.setData({
+ areaIndex:e.detail.value,
+ list:[],
+ page:1,
+ isMore:true
+ })
+ this.getList()
+ },
+ initDate:function(){
+ let today = new Date(util.formatDate(new Date()).replace(/-/g,'/')).getTime(),single = 24 * 60 * 60 *1000,dates=[];
+ for(let i=0;i<7;i++){
+ let item = new Date(today+i * single);
+ let name = this.data.days[item.getDay()]
+ if(i==0){
+ name="今天"
+ }
+ else if(i==1){
+ name="明天"
+ }
+ dates.push({
+ date:util.formatDate(item),
+ dateShort:util.formatDate(item).substr(5,5),
+ name:name
+ })
+ }
+ this.setData({
+ dates:dates
+ })
+ console.log(dates)
+ },
+ getList:function(){
+ if(!this.data.isMore) return
+ commonApi._post("Cinema/getCinemaListByShowId",{
+ third_id:this.data.id,
+ show_date:this.data.dates[this.data.dateIndex].date,
+ city_code:this.data.areas[this.data.areaIndex]?this.data.areas[this.data.areaIndex].area_id:"",
+ lon:this.data.lon,
+ lat:this.data.lat,
+ is_price_sort:this.data.sort=='price'?true:false,
+ is_distance_sort:this.data.sort=='distance',
+ page:this.data.page,
+ pageSize:10
+ }).then(res=>{
+ res.data.map(item=>{
+ if(item.distance>1000){
+ item.distanceText = (item.distance/1000).toFixed(2) + 'km';
+ }
+ else if(item.distance>0){
+ item.distanceText = (item.distance).toFixed(2) + 'm';
+ }
+ })
+ let list = this.data.list;
+ this.setData({
+ list:list.concat(res.data),
+ page:this.data.page+1
+ })
+ if(res.data.length<10){
+ this.setData({
+ isMore:false
+ })
+ }
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/movieticket/list/ticket/index.json b/pages/list/movieticket/list/ticket/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/list/movieticket/list/ticket/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/movieticket/list/ticket/index.wxml b/pages/list/movieticket/list/ticket/index.wxml
new file mode 100644
index 0000000..07110f6
--- /dev/null
+++ b/pages/list/movieticket/list/ticket/index.wxml
@@ -0,0 +1,46 @@
+
+
+
+
+ {{item.dateShort}}
+ {{item.name}}
+
+
+
+
+
+
+ {{areas[areaIndex].area_title}}
+
+
+
+ 离我最近
+ 价格最低
+
+
+
+ {{item.title}}
+
+ ¥
+ {{item.min_price/100}}
+ 起
+
+
+
+
+ {{item.address}}
+ {{item.distanceText}}
+
+
+
+ {{schedule.show_time}}
+ {{schedule.show_version}}
+ ¥{{schedule.price/100}}
+
+
+
+
+
+ 暂无内容
+
+
\ No newline at end of file
diff --git a/pages/list/movieticket/list/ticket/index.wxss b/pages/list/movieticket/list/ticket/index.wxss
new file mode 100644
index 0000000..de2e1b4
--- /dev/null
+++ b/pages/list/movieticket/list/ticket/index.wxss
@@ -0,0 +1,142 @@
+/* pages/list/movieticket/list/ticket/index.wxss */
+page {
+ background: #f0f0f0;
+}
+.dates-list {
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ margin: 25rpx 24rpx;
+ background: #FFFFFF;
+ border: 2rpx solid #0B898E;
+ border-radius: 10rpx;
+ height: 108rpx;
+}
+.dates-item {
+ text-align: center;
+ font-size: 24rpx;
+ color: #999999;
+}
+.date-text {
+ font-size: 25rpx;
+ margin-bottom:4rpx;
+}
+.dates-item.active {
+ color: #0B898E;
+ font-weight: 500;
+}
+.dates-item.active .date-text {
+ font-size: 27rpx;
+}
+.acitivity-search-box {
+ display: flex;
+ margin: 30rpx 32rpx;
+ justify-content: space-between;
+ align-items: center;
+}
+.acitivity-search-box .picker {
+ width: 203rpx;
+ height: 54rpx;
+ display: flex;
+ align-items: center;
+ border: 1rpx solid #ccc;
+ border-radius: 4rpx;
+}
+.areatext {
+ border-right: 1rpx solid #ccc;
+ flex: 1;
+ margin-left: 17rpx;
+ line-height: 54rpx;
+}
+.acitivity-search-box .picker image {
+ margin: 0 22rpx;
+ display: block;
+ width: 16rpx;
+ flex-shrink: 0;
+}
+.sort-text {
+ margin-left: 130rpx;
+ font-size: 27rpx;
+ color: #999;
+ font-weight: 500;
+}
+.sort-text.active {
+ color: #333;
+}
+.cinema {
+ margin: 30rpx 24rpx;
+ background: white;
+ padding: 23rpx;
+ border-radius: 13rpx;
+}
+.cinema-title {
+ display: flex;
+ align-items: center;
+ margin-bottom: 40rpx;
+}
+.cinema-title .textOver {
+ font-size: 35rpx;
+ font-weight: 500;
+ color: #000;
+ flex: 1;
+}
+.cinema-price {
+ flex-shrink: 0;
+ font-size: 20rpx;
+ color: #8D8D8D;
+ margin-left: 10rpx;
+}
+.cinema-price text:nth-child(1){
+ color: #D62828;
+ font-size: 24rpx;
+}
+.cinema-price text:nth-child(2){
+ color: #D62828;
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.ciname-location {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.ciname-location .iconfont {
+ color: #999;
+ font-size: 32rpx;
+ flex-shrink: 0;
+}
+.location-text {
+ color: #a3a3a3;
+ font-size: 24rpx;
+ flex: 1;
+ margin: 0 6rpx;
+}
+.ciname-distance {
+ flex-shrink: 0;
+ color: #0B898E;
+ font-size: 25rpx;
+}
+.cinemalist .cinema:last-child {
+ border-bottom: none;
+}
+.tickets-list {
+ display: flex;
+ align-items: center;
+ margin-top: 30rpx;
+ overflow-y: auto;
+}
+.ticket-item {
+ width: 159rpx;
+ height: 173rpx;
+ background: #F5F5F5;
+ border-radius: 13rpx;
+ text-align: center;
+ font-size: 27rpx;
+ color: #666666;
+ margin-right: 23rpx;
+ flex-shrink: 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
\ No newline at end of file
diff --git a/pages/list/museum/index.js b/pages/list/museum/index.js
new file mode 100644
index 0000000..f8eba63
--- /dev/null
+++ b/pages/list/museum/index.js
@@ -0,0 +1,99 @@
+// pages/list/museum/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ total:1,
+ keywords:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ search:function(e){
+ this.setData(e.detail);
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("scene/get_scene_by_tag",{
+ tag_id:9,
+ offset:list.length,
+ limit:10,
+ sort:"weight",
+ title:this.data.keywords
+ }).then(res=>{
+ this.setData({
+ total:res.data.count,
+ list:list.concat(res.data.list)
+ })
+ })
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/museum/index.json b/pages/list/museum/index.json
new file mode 100644
index 0000000..9f79876
--- /dev/null
+++ b/pages/list/museum/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "search":"/pages/component/SearchHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/museum/index.wxml b/pages/list/museum/index.wxml
new file mode 100644
index 0000000..87c047c
--- /dev/null
+++ b/pages/list/museum/index.wxml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ {{item.title}}
+ 地址:{{item.address}}
+ 电话:{{item.tel}}
+ 点击预约
+
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/list/museum/index.wxss b/pages/list/museum/index.wxss
new file mode 100644
index 0000000..b473521
--- /dev/null
+++ b/pages/list/museum/index.wxss
@@ -0,0 +1,53 @@
+/* pages/list/museum/index.wxss */
+page {
+ background: #62411e;
+}
+.item {
+ margin: 30rpx 25rpx;
+ display: flex;
+ align-items: center;
+}
+.item image {
+ width: 353rpx;
+ height: 296rpx;
+ border-radius: 17rpx;
+}
+.list .item:nth-child(2n){
+ flex-direction: row-reverse;
+}
+.info {
+ border-radius: 0 17rpx 17rpx 0;
+ height: 263rpx;
+ flex: 1;
+ width: 100%;
+ background: white;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ font-size: 19rpx;
+ color: #666;
+ align-items: center;
+}
+.item:nth-child(2n) .info {
+ border-radius: 17rpx 0 0 17rpx;
+}
+.btn {
+ width: 150rpx;
+ line-height: 48rpx;
+ background: #CA2A28;
+ border-radius: 24rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 27rpx;
+ font-weight: 500;
+ margin-top: 15rpx;
+}
+.info .title {
+ font-size: 31rpx;
+ color: #543016;
+ font-weight: 600;
+ margin-bottom: 10rpx;
+}
+.info .address {
+ margin-bottom: 15rpx;
+}
\ No newline at end of file
diff --git a/pages/list/night/index.js b/pages/list/night/index.js
index 6644937..bc70a1a 100644
--- a/pages/list/night/index.js
+++ b/pages/list/night/index.js
@@ -1,18 +1,62 @@
// pages/list/night/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
-
+ list:[],
+ total:1,
+ keywords:"",
+ type:'10,11,12'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getList()
+ },
+ search:function(){
+ this.setData(e.detail);
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("product/get_product_by_tag",{
+ tag_id:this.data.type,
+ offset:list.length,
+ limit:10,
+ title:this.data.keywords
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.tags = item.display_tags?item.display_tags.split(","):[];
+ item.tags = item.tags.splice(0,2);
+ })
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
},
/**
@@ -54,7 +98,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList();
},
/**
diff --git a/pages/list/night/index.wxml b/pages/list/night/index.wxml
index 2f71fe2..2b9e28e 100644
--- a/pages/list/night/index.wxml
+++ b/pages/list/night/index.wxml
@@ -1,21 +1,24 @@
-
+
- 线路
- 门票
- 演出
- 活动
+ 全部
+ 线路
+ 门票
+ 演出
+
-
-
+
+
- 苏州香格里拉大酒店
+ {{item.title}}
- 市中心
- 十全街十全街十全街十全街十全街十全街/观前街
- ¥85起
+ {{item}}
+ ¥{{item.price/100}}起
-
+
+
+ 暂无内容
+
diff --git a/pages/list/night/index.wxss b/pages/list/night/index.wxss
index ca19a3d..74313de 100644
--- a/pages/list/night/index.wxss
+++ b/pages/list/night/index.wxss
@@ -11,6 +11,7 @@
font-size: 29rpx;
color: #333;
background: white;
+ z-index: 1;
}
.night-type {
position: relative;
@@ -39,7 +40,6 @@
}
.hotel-item {
width: 700rpx;
- height: 463rpx;
background: #FFFFFF;
box-shadow: -1rpx 1rpx 16rpx 0rpx rgba(6, 0, 1, 0.1);
border-radius: 13rpx;
diff --git a/pages/list/road/index.js b/pages/list/road/index.js
index 0edbe65..49f1392 100644
--- a/pages/list/road/index.js
+++ b/pages/list/road/index.js
@@ -1,19 +1,89 @@
// pages/list/road/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
- types:['姑苏','吴江','苏州'],
- type:null
+ types:[],
+ type:0,
+ list:[],
+ sort:"weight",
+ order:"desc",
+ total:1,
+ keywords:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ commonApi.user_post("act/get_type_by_area",{
+ tag_id:17,
+ area_id:""
+ }).then(res=>{
+ if(res.data.length==0) return;
+ this.setData({
+ types:res.data
+ })
+ this.getList()
+ })
+ },
+ search:function(e){
+ this.setData(e.detail);
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.detail.value,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ changeSort:function(e){
+ console.log(e)
+ let data = e.currentTarget.dataset;
+ if(data.sort == this.data.sort && data.order==this.data.order) return;
+ this.setData({
+ sort:data.sort,
+ order:data.order,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post('product/get_product_by_tag',{
+ type_id:this.data.types[this.data.type].type_id,
+ tag_id:17,
+ offset:list.length,
+ limit:10,
+ sort:this.data.sort,
+ order:this.data.order,
+ title:this.data.keywords
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.display_tags = (item.display_tags?item.display_tags.split(","):[]).splice(0,2)
+ })
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ console.log(res)
+ })
},
/**
@@ -55,7 +125,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/road/index.wxml b/pages/list/road/index.wxml
index f037a57..26dd697 100644
--- a/pages/list/road/index.wxml
+++ b/pages/list/road/index.wxml
@@ -1,36 +1,39 @@
-
+
-
+
- {{type==null?'选择类型':types[type]}}
+ {{type==null?'选择类型':types[type].type_name}}
- 综合
-
+ 综合
+
价格
-
-
+
+
- 销量
- 好评
+ 销量
+ 好评
-
-
+
+
- 标题标题标题标题标题标题标题标题标题标题
- 4.9分月销279份
+ {{item.title}}
+ {{item.rate}}分月销{{item.sales_number}}份
- 世界文化遗产
- 世界文化遗产
+ {{item}}
- XXX国旅
- ¥265 起
+ {{item.supplier_name}}
+ ¥{{item.price/100}} 起
+
+
+
+ 暂无内容
\ No newline at end of file
diff --git a/pages/list/road/index.wxss b/pages/list/road/index.wxss
index 211b640..2a6e949 100644
--- a/pages/list/road/index.wxss
+++ b/pages/list/road/index.wxss
@@ -26,6 +26,7 @@ pages {
border-radius: 4rpx;
}
.typetext {
+ white-space: nowrap;
border-right: 1rpx solid #ccc;
flex: 1;
margin-left: 17rpx;
@@ -50,8 +51,12 @@ pages {
}
.top-box .price-box image {
width: 15rpx;
+ opacity: 0.6;
display: block;
}
+.top-box .price-box image.active {
+ opacity: 1;
+}
.top-box .price-box image:nth-child(1){
transform: rotate(180deg);
margin-bottom: 5rpx;
@@ -72,6 +77,10 @@ pages {
flex-shrink: 0;
margin-right: 22rpx;
}
+.info {
+ width: 400rpx;
+ flex: 1;
+}
.info .textOver2 {
font-size: 33rpx;
line-height: 44rpx;
diff --git a/pages/list/sale/index.js b/pages/list/sale/index.js
index 9412fbc..bb1de6d 100644
--- a/pages/list/sale/index.js
+++ b/pages/list/sale/index.js
@@ -1,18 +1,91 @@
// pages/list/sale/index.js
+import commonApi from "../../../utils/https/common";
+import util from "../../../utils/util";
+let timer;
Page({
/**
* 页面的初始数据
*/
data: {
-
+ type:0,
+ service:["act/fast_sale_now","act/fast_next_sale_now","act/fast_next_days_sale_now"],
+ list:[],
+ moreFlag:true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+
+ },
+ getList:function(){
+ if(!this.data.moreFlag) return;
+ commonApi._post(this.data.service[this.data.type],{
+ limit:10,
+ offset:this.data.list.length
+ }).then(res=>{
+ if(res.data.length<10){
+ this.setData({
+ moreFlag:false
+ })
+ }
+ res.data.map(item=>{
+ item.start_time_text = item.start_time?item.start_time.split(" ")[1]:'';
+ })
+ this.setData({
+ list:this.data.list.concat(res.data)
+ })
+ this.daojishi()
+ console.log(res)
+ })
+ },
+ daojishi:function(){
+ // 只有正在疯抢的才需要倒计时
+ if(this.data.type!=0) return;
+ let list = this.data.list,now = new Date().getTime();
+ list.map(item=>{
+ let end_time = new Date(item.end_time.replace(/-/g,'/')).getTime(),times = end_time - now;
+ // 活动结束了
+ if(times<=0) {
+ item.is_end = 1;
+ }
+ else {
+ // let day = Math.floor(times / (1000 * 60 * 60 * 24)),times = times - day * 1000 * 60 * 60 *24;
+ let hour = Math.floor(times / (1000 * 60 * 60)),minute = Math.floor((times - hour * 1000 * 60 * 60) / (60 * 1000));
+ let second=Math.round((times - hour * 1000 * 60 * 60 - minute * 60 * 1000) / 1000);
+ item.day = Math.floor(hour/24);
+ hour = hour%24;
+ item.hour = hour>=10?hour:("0"+hour);
+ item.minute = minute>=10?minute:("0"+minute);
+ item.second = second>=10?second:("0"+second);
+ }
+ })
+ this.setData({
+ list:list
+ })
+ timer = setTimeout(()=>{
+ this.daojishi()
+ },1000)
+ },
+ gotoDetail:function(e){
+ // if(this.data.type!=0) return;
+ let item = e.currentTarget.dataset.item;
+ if(item.sku.product){
+ util.gotoDetail(item.sku.product)
+ }
+ console.log(item);
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ moreFlag:true
+ })
+ clearTimeout(timer);
+ timer = null;
+ this.getList()
},
/**
@@ -26,14 +99,15 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
-
+ this.getList()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
-
+ clearTimeout(timer);
+ timer = null;
},
/**
@@ -54,7 +128,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/sale/index.json b/pages/list/sale/index.json
index 9f79876..35cf02f 100644
--- a/pages/list/sale/index.json
+++ b/pages/list/sale/index.json
@@ -1,5 +1,5 @@
{
"usingComponents": {
- "search":"/pages/component/SearchHeader"
+ "title":"/pages/component/TitleHeader"
}
}
\ No newline at end of file
diff --git a/pages/list/sale/index.wxml b/pages/list/sale/index.wxml
index 36f335b..6db22ed 100644
--- a/pages/list/sale/index.wxml
+++ b/pages/list/sale/index.wxml
@@ -1,37 +1,46 @@
-
+
- 正在疯抢
- 即将开抢
- 明日预告
+ 正在疯抢
+ 即将开抢
+ 明日预告
-
+
- 【21:00】正在疯抢
-
+ 【{{activity.start_time_text}}】{{activity.title}}
+ 活动已结束
+
距结束
- 00
+ {{activity.day}}
+ 天
+ {{activity.hour}}
:
- 00
+ {{activity.minute}}
:
- 00
+ {{activity.second}}
-
+
-
+
+
- 【精选菜品】团团圆圆过年宴过年宴过年宴过年宴
- 已抢2788件
+ {{item.sku.product.title +item.sku.sku_name}}
+ 已抢{{item.sales}}件
¥
- 188
- ¥188
+ {{item.price/100}}
+ ¥{{item.sku.market_price/100}}
- 马上抢
+ 马上抢
+ 即将开抢
+
+
+
+ 暂无内容
\ No newline at end of file
diff --git a/pages/list/sale/index.wxss b/pages/list/sale/index.wxss
index ceb05cb..4dce904 100644
--- a/pages/list/sale/index.wxss
+++ b/pages/list/sale/index.wxss
@@ -90,11 +90,23 @@
height: 194rpx;
flex-shrink: 0;
margin-right: 25rpx;
+ flex-shrink: 0;
+}
+.item .image-box image.border-img {
+ position: absolute;
+ left: 0;
+ right: 0;
+ z-index: 1;
}
.item image {
width: 194rpx;
height: 194rpx;
display: block;
+ flex-shrink: 0;
+}
+.right-info {
+ flex: 1;
+ width: 100%;
}
.right-info .title{
font-size: 31rpx;
@@ -115,7 +127,8 @@
align-items: flex-end;
}
.item-bottom .btn {
- width: 123rpx;
+ padding: 0 20rpx;
+ /* width: 123rpx; */
line-height: 52rpx;
background: #D62828;
border-radius: 26rpx;
diff --git a/pages/list/scene/index.js b/pages/list/scene/index.js
new file mode 100644
index 0000000..452e4ea
--- /dev/null
+++ b/pages/list/scene/index.js
@@ -0,0 +1,128 @@
+// pages/list/scene/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ total:1,
+ latitude:"",
+ longitude:"",
+ keywords:''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let that = this;
+ wx.getLocation({
+ type: 'gcj02',
+ success: function (res) {
+ that.setData({
+ latitude:res.latitude,
+ longitude:res.longitude
+ })
+ that.getList()
+ },
+ fail:function(){
+ that.getList()
+ }
+ })
+
+ },
+ search:function(e){
+ this.setData(e.detail);
+ this.setData({
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("scene/get_scene_by_tag",{
+ tag_id:"4",
+ limit:10,
+ lon:this.data.longitude,
+ lat:this.data.latitude,
+ offset:list.length,
+ sort:"weight",
+ title:this.data.keywords
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.tags = item.tags?item.tags.split(","):[];
+ item.tags = item.tags.splice(0,2);
+ if(item.distance && item.distance>=1000){
+ item.distance = item.distance/1000 + "km"
+ }
+ else if(item.distance){
+ item.distance = item.distance + "m"
+ }
+ })
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.count
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/scene/index.json b/pages/list/scene/index.json
new file mode 100644
index 0000000..9f79876
--- /dev/null
+++ b/pages/list/scene/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "search":"/pages/component/SearchHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/scene/index.wxml b/pages/list/scene/index.wxml
new file mode 100644
index 0000000..88dd4e3
--- /dev/null
+++ b/pages/list/scene/index.wxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+ NO.{{index+1}}
+
+ {{item.title}}
+
+ {{item}}
+
+ {{item.address}}
+
+ 距您直线距离{{item.distance}}
+
+ ¥{{item.price?item.price/100:0}}起
+
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/list/scene/index.wxss b/pages/list/scene/index.wxss
new file mode 100644
index 0000000..261f759
--- /dev/null
+++ b/pages/list/scene/index.wxss
@@ -0,0 +1,115 @@
+/* pages/list/scene/index.wxss */
+.hot-keywords {
+ position: fixed;
+ left: 0;
+ right: 0;
+ display: flex;
+ padding: 30rpx;
+ height: 40rpx;
+ overflow-x: auto;
+ font-weight: 500;
+ background: white;
+ z-index: 1;
+}
+.hot-keywords text {
+ color: #3B3B3B;
+ font-size: 27rpx;
+ flex-shrink: 0;
+}
+.hot-keywords .hot-item {
+ flex-shrink: 0;
+ margin-left: 25rpx;
+ border-radius: 12rpx;
+ background: #f3f3f3;
+ line-height: 40rpx;
+ padding: 0 15rpx;
+ font-size: 24rpx;
+ color: #a2a2a2;
+}
+.item {
+ display: flex;
+ align-items: center;
+ margin: 40rpx 25rpx;
+ margin-top: 0;
+ justify-content: space-between;
+ position: relative;
+}
+.item .info {
+ flex: 1;
+}
+.item image {
+ width: 233rpx;
+ height: 233rpx;
+ border-radius: 11rpx;
+ display: block;
+ margin-right: 24rpx;
+ flex-shrink: 0;
+}
+.item .no-text {
+ width: 67rpx;
+ line-height: 42rpx;
+ background: linear-gradient(90deg, #FF9568, #FEB42F);
+ border-radius: 11rpx 0 11rpx 0;
+ color: #fff;
+ font-size: 22rpx;
+ font-weight: bold;
+ position: absolute;
+ left: 0;
+ top: 0;
+ text-align: center;
+}
+.tags {
+ display: flex;
+ margin-top: 16rpx;
+ align-items: center;
+ margin-bottom: 30rpx;
+ width: 430rpx;
+}
+.tag {
+ color: #0B898E;
+ font-size: 20rpx;
+ margin-right: 30rpx;
+ position: relative;
+ line-height: 20rpx;
+ white-space: nowrap;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+}
+.tags .tag::after {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 8rpx;
+ background: #DAF3E9;
+ top: 16rpx;
+ z-index: -1;
+}
+.location {
+ color: #A3A3A3;
+ font-size: 24rpx;
+}
+.location .iconfont {
+ margin-right: 6rpx;
+ font-size: 26rpx;
+}
+.price-box {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-end;
+ font-size: 24rpx;
+ color: #333333;
+}
+.price-box .price {
+ color: #D62828;
+}
+.price-box .price text:nth-child(2){
+ font-weight: 500;
+ font-size: 33rpx;
+}
+.price-box .price text:nth-child(3){
+ font-size: 20rpx;
+ color: #8D8D8D;
+}
\ No newline at end of file
diff --git a/pages/list/six/index.js b/pages/list/six/index.js
index 612c86b..05cf7c2 100644
--- a/pages/list/six/index.js
+++ b/pages/list/six/index.js
@@ -1,13 +1,19 @@
// pages/list/six/index.js
import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
+ types:[],
+ areaIndex:0,
areas:[],
- areaIndex:0
+ typeIndex:0,
+ total:1,
+ list:[],
+ keywords:""
},
/**
@@ -15,17 +21,85 @@ Page({
*/
onLoad: function (options) {
// 获取地区
- commonApi._post("Other/getSuzhouAreas",{}).then(res=>{
- console.log(res)
+ commonApi._post("act/get_suzhou_areas",{}).then(res=>{
+ let areaIndex = 0;
+ res.data.map((item,index)=>{
+ if(options.area && item.area_key==options.area && areaIndex==0){
+ areaIndex = index;
+ }
+ })
this.setData({
- areas:res.data
+ areas:res.data,
+ areaIndex:areaIndex
})
+ this.getTypes()
+ })
+ },
+ getTypes:function(){
+ // 获取苏城六纪下面的分类
+ commonApi.user_post("act/get_type_by_area",{
+ area_id:this.data.areas[this.data.areaIndex].area_id,
+ tag_id:16
+ }).then(res=>{
+ res.data.unshift({
+ type_name:"全部",
+ type_id:""
+ })
+ this.setData({
+ types:res.data,
+ typeIndex:0
+ })
+ this.getList();
})
},
changeArea:function(e){
this.setData({
- areaIndex:e.detail.value
+ areaIndex:e.detail.value,
+ list:[],
+ total:1
+ })
+ this.getTypes();
+ },
+ changeType:function(e){
+ this.setData({
+ typeIndex:e.detail.value,
+ list:[],
+ total:1
})
+ this.getList()
+ },
+ search:function(e){
+ this.setData({
+ keywords:e.detail.keywords,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ if(!this.data.types[this.data.typeIndex]) return;
+ commonApi._post('product/get_product_by_tag',{
+ areas_id:this.data.areas[this.data.areaIndex].area_id,
+ type_id:this.data.types[this.data.typeIndex].type_id,
+ tag_id:16,
+ offset:list.length,
+ limit:10,
+ sort:"weight",
+ order:"desc",
+ title:this.data.keywords
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ console.log(item)
+ util.gotoDetail(item);
},
/**
@@ -67,7 +141,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList();
},
/**
diff --git a/pages/list/six/index.wxml b/pages/list/six/index.wxml
index 3211bac..7246e28 100644
--- a/pages/list/six/index.wxml
+++ b/pages/list/six/index.wxml
@@ -1,26 +1,30 @@
-
-
-
+
+
+
-
+
- {{areas[areaIndex].area_name}}
+ {{areas[areaIndex].area_title}}
-
+
- 全部分类
+ {{types[typeIndex].type_name}}
-
-
- 产品主标题产品主标题产品主标题
- 地址地址地址地址地址地址地址地址地址地址
- ¥277起
+
+
+ {{item.title}}
+ {{item.address}}
+ ¥{{item.price/100}}起
+
+
+
+ 暂无内容
\ No newline at end of file
diff --git a/pages/list/six/index.wxss b/pages/list/six/index.wxss
index 1ca9f12..db50b93 100644
--- a/pages/list/six/index.wxss
+++ b/pages/list/six/index.wxss
@@ -1,10 +1,7 @@
/* pages/list/six/index.wxss */
.bannerImg {
- height: 307rpx;
- width: 700rpx;
+ width: 100%;
display: block;
- margin: 47rpx auto;
- border-radius: 20rpx;
}
.topbg {
position: absolute;
diff --git a/pages/list/store/index.js b/pages/list/store/index.js
index 803d57e..7f7812e 100644
--- a/pages/list/store/index.js
+++ b/pages/list/store/index.js
@@ -1,18 +1,51 @@
// pages/list/store/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
-
+ list:[],
+ total:1,
+ info:null,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.setData({
+ id:options.id
+ })
+ commonApi._post('supplier/get_supplier_detail',{
+ supplier_id:options.id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ getList(){
+ let list = this.data.list,total = this.data.total;
+ if(list.length>=total) return;
+ commonApi._post("supplier/get_product_by_supplier_id",{
+ supplier_id:this.data.id,
+ offset:list.length,
+ limit:10
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
},
/**
@@ -54,7 +87,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/store/index.json b/pages/list/store/index.json
index 9f79876..35cf02f 100644
--- a/pages/list/store/index.json
+++ b/pages/list/store/index.json
@@ -1,5 +1,5 @@
{
"usingComponents": {
- "search":"/pages/component/SearchHeader"
+ "title":"/pages/component/TitleHeader"
}
}
\ No newline at end of file
diff --git a/pages/list/store/index.wxml b/pages/list/store/index.wxml
index d4db339..d2f179a 100644
--- a/pages/list/store/index.wxml
+++ b/pages/list/store/index.wxml
@@ -1,24 +1,30 @@
-
-
+
+
+
-
-
+
+
+
{{item.title}}
- ¥{{item.salePrice/100}}¥{{item.linethroughPrice/100}}
+ ¥{{item.price/100}}¥{{item.linethroughPrice/100}}
抢购
-
+
+
+
+
+ 暂无内容
\ No newline at end of file
diff --git a/pages/list/store/index.wxss b/pages/list/store/index.wxss
index cedc697..50225b5 100644
--- a/pages/list/store/index.wxss
+++ b/pages/list/store/index.wxss
@@ -6,6 +6,11 @@
width: 100%;
height: 246rpx;
}
+.heaimg {
+ display: block;
+ margin: 25rpx;
+ width: calc(100% - 50rpx);
+}
page {
background: #f9f9f9;
}
@@ -36,8 +41,8 @@ page {
.info-box .title {
font-size: 30rpx;
display: -webkit-box;
- line-height: 32rpx;
- height: 64rpx;
+ line-height: 42rpx;
+ height: 84rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
diff --git a/pages/list/strategy/index.js b/pages/list/strategy/index.js
index 803d57e..1b46bb8 100644
--- a/pages/list/strategy/index.js
+++ b/pages/list/strategy/index.js
@@ -1,18 +1,49 @@
// pages/list/store/index.js
+import commonApi from "../../../utils/https/common"
Page({
/**
* 页面的初始数据
*/
data: {
-
+ list:[],
+ page_no:1,
+ total:1,
+ keywords:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getList()
+ },
+ search:function(e){
+ this.setData({
+ keywords:e.detail.keywords,
+ total:1,
+ list:[],
+ page_no:1
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(this.data.total<=list.length) return;
+ commonApi._post("travels/getList",{
+ type_key:"",
+ title:this.data.keywords,
+ page_no:this.data.page_no,
+ page_num:10
+ }).then(res=>{
+ list = list.concat(res.data.rows);
+ this.setData({
+ page_no:this.data.page_no+1,
+ list:list,
+ total:res.data.total
+ })
+ console.log(res)
+ })
},
/**
@@ -54,7 +85,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/strategy/index.wxml b/pages/list/strategy/index.wxml
index 3ea1cfe..d61f593 100644
--- a/pages/list/strategy/index.wxml
+++ b/pages/list/strategy/index.wxml
@@ -1,19 +1,23 @@
-
+
-
+
- 游记标题一
+ {{item.title}}
- 副标题副标题副标题副标题副副标题副标题副标题副标题副标题副标题副标题副标题副标题......
+ {{item.subtitle}}
-
- 昵称昵称
+
+ {{item.nickname}}
- 111
+ {{item.like_number}}
- 222
+ {{item.view_number}}
+
+
+
+ 暂无内容
\ No newline at end of file
diff --git a/pages/list/strategy/index.wxss b/pages/list/strategy/index.wxss
index b197294..5e2b063 100644
--- a/pages/list/strategy/index.wxss
+++ b/pages/list/strategy/index.wxss
@@ -16,6 +16,7 @@
border-bottom: 1rpx solid #ccc;
}
.title {
+ width: 100%;
font-size: 33rpx;
font-weight: 500;
color: #000;
@@ -34,6 +35,7 @@
display: block;
width: 60rpx;
margin-left: 10rpx;
+ flex-shrink: 0;
}
.strategy-bottom {
display: flex;
@@ -57,7 +59,6 @@
flex-shrink: 0;
}
.strategy-bottom .iconfont {
- color: #2b9094;
margin-left: 40rpx;
flex-shrink: 0;
font-size: 30rpx;
diff --git a/pages/list/techan/index.js b/pages/list/techan/index.js
new file mode 100644
index 0000000..c39985f
--- /dev/null
+++ b/pages/list/techan/index.js
@@ -0,0 +1,106 @@
+// pages/list/store/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ total:1,
+ type:19,
+ keywords:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ search:function(e){
+ this.setData({
+ keywords:e.detail.keywords,
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("product/get_product_by_tag",{
+ tag_id:this.data.type,
+ limit:10,
+ offset:list.length,
+ sort:"weight",
+ title:this.data.keywords
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item);
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/list/techan/index.json b/pages/list/techan/index.json
new file mode 100644
index 0000000..9f79876
--- /dev/null
+++ b/pages/list/techan/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "search":"/pages/component/SearchHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/list/techan/index.wxml b/pages/list/techan/index.wxml
new file mode 100644
index 0000000..1c85150
--- /dev/null
+++ b/pages/list/techan/index.wxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ 文创
+ 特产
+
+
+
+
+
+
+
+ {{item.title}}
+
+ ¥{{item.price/100}}¥{{item.linethroughPrice/100}}
+ 抢购
+
+
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/list/techan/index.wxss b/pages/list/techan/index.wxss
new file mode 100644
index 0000000..13ed13f
--- /dev/null
+++ b/pages/list/techan/index.wxss
@@ -0,0 +1,103 @@
+/* pages/feiyi/list/index.wxss */
+.heaimg {
+ display: block;
+ margin: 25rpx;
+ margin-bottom: 0;
+ width: calc(100% - 50rpx);
+}
+page {
+ background: #f9f9f9;
+}
+.night-types {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 86rpx;
+ font-size: 29rpx;
+ color: #333;
+ z-index: 1;
+}
+.night-type {
+ position: relative;
+ width: 25%;
+ text-align: center;
+ height: 86rpx;
+ line-height: 86rpx;
+}
+.night-type.active {
+ color: #000;
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.night-type.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 5rpx;
+ background: #0B898E;
+ border-radius: 3rpx;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0;
+}
+.feiyi-list {
+ margin: 22rpx;
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+}
+.feiyi-item {
+ width: 340rpx;
+ background: white;
+ box-shadow:0px 0px 6rpx 0px rgba(7,0,2,0.2);
+ border-radius:10rpx;
+ margin-bottom: 28rpx;
+}
+.main-img {
+ display: block;
+ width: 340rpx;
+ border-top-left-radius: 10rpx;
+ border-top-right-radius: 10rpx;
+ height: 224rpx;
+ overflow: hidden;
+}
+.info-box {
+ margin: 10rpx 20rpx;
+}
+.info-box .title {
+ font-size: 30rpx;
+ display: -webkit-box;
+ line-height: 42rpx;
+ height: 84rpx;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+ margin-bottom: 10rpx;
+}
+.price-box {
+ display: flex;
+ justify-content: space-between;
+ padding-bottom: 10rpx;
+}
+.price-box-left {
+ font-size: 32rpx;
+ color: #D62828;
+}
+.old-price {
+ font-size: 22rpx;
+ color: #999;
+ text-decoration: line-through;
+ margin-left: 6rpx;
+}
+.btn {
+ width: 108rpx;
+ height: 44rpx;
+ line-height: 44rpx;
+ border-radius: 22rpx;
+ text-align: center;
+ background: #D62828;
+ color: white;
+ font-size: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/list/theatre/index.js b/pages/list/theatre/index.js
index 77a9d06..7f95cb7 100644
--- a/pages/list/theatre/index.js
+++ b/pages/list/theatre/index.js
@@ -1,18 +1,94 @@
// pages/list/theatre/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
-
+ list:[],
+ total:1,
+ type:1,
+ sort:["","weight","distance","weight","price"],
+ order:['','desc',"asc","desc","asc"],
+ lat:"",
+ lon:"",
+ keywords:""
},
+
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getList();
+ },
+ search:function(e){
+ this.setData({
+ list:[],
+ keywords:e.detail.keywords,
+ total:1
+ })
+ this.getList()
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoDetail(item)
+ },
+ getList:function(){
+ let list = this.data.list,that = this;
+ if(list.length>=this.data.total) return;
+ // 距离排序
+ if(this.data.type==2 && !this.data.lon){
+ wx.getLocation({
+ type: 'gcj02',
+ success: function (res) {
+ that.setData({
+ lat:res.latitude,
+ lon:res.longitude
+ })
+ that.realgetList()
+ },
+ fail:function(){
+ that.realgetList()
+ }
+ })
+ }
+ else {
+ this.realgetList()
+ }
+
+ },
+ realgetList:function(){
+ let list = this.data.list;
+ commonApi._post("product/get_product_by_tag",{
+ tag_id:"6",
+ offset:list.length,
+ limit:10,
+ sort:this.data.sort[this.data.type],
+ order:this.data.order[this.data.type],
+ lat:this.data.lat,
+ lon:this.data.lon,
+ title:this.data.keywords
+ }).then(res=>{
+ res.data.list.map(item=>{
+ item.display_tags = (item.display_tags?item.display_tags.split(","):[]).splice(0,2)
+ })
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ total:1
+ })
+ this.getList();
},
/**
@@ -54,7 +130,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getList()
},
/**
diff --git a/pages/list/theatre/index.wxml b/pages/list/theatre/index.wxml
index 67d2622..85ee8e3 100644
--- a/pages/list/theatre/index.wxml
+++ b/pages/list/theatre/index.wxml
@@ -1,21 +1,24 @@
-
+
- 综合排序
- 距离最近
- 销量最高
- 价格最低
+ 综合排序
+ 距离最近
+ 销量最高
+ 价格最低
-
-
+
+
- 【网师园】昆曲演出【网师园】昆曲演出【网师园】昆曲演出【网师园】昆曲演出
- 【网师园】昆曲演出【网师园】昆曲演出【网师园】昆曲演出【网师园】昆曲演出【网师园】昆曲演出【网师园】昆曲演出
+ {{item.title}}
+ {{item.subtitle?item.subtitle:""}}
- 十全街十全街十全街十全街十全街十全街
- 十全街十全街十全街十全街十全街十全街/观前街
- ¥85起
+ {{item}}
+ ¥{{item.price?item.price/100:0}}起
+
+
+
+ 暂无内容
\ No newline at end of file
diff --git a/pages/login/index.js b/pages/login/index.js
index 50830b1..34ace56 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -15,7 +15,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- this.addClick("register_load")
+ },
+ cancel:function(){
+ wx.reLaunch({
+ url: '/pages/index/index',
+ })
},
getUserInfo:function(e){
let that = this;
@@ -32,9 +36,9 @@ Page({
// return;
// r.data.isBind是false的时候去绑定手机号 该用户没有注册过
// 已经注册的用户返回userinfo
- if (r.data.isBind === false) {
+ if (r.data.isBindMobile === 0) {
wx.redirectTo({
- url: '/pages/user/bindtel/index?regToken=' + r.data.regToken,
+ url: '/pages/user/bindtel/index?regToken=' + r.data.openid,
})
}
else if(r.data && r.data.id && r.data.token){
@@ -108,12 +112,5 @@ Page({
*/
onReachBottom: function () {
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
}
})
\ No newline at end of file
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
index e0c2901..39fcb65 100644
--- a/pages/login/index.wxml
+++ b/pages/login/index.wxml
@@ -1,6 +1,6 @@
-苏州文化旅游平台 申请获得
+君到苏州 申请获得
以下权限
@@ -8,5 +8,6 @@
+
\ No newline at end of file
diff --git a/pages/map/index.js b/pages/map/index.js
new file mode 100644
index 0000000..f0b496d
--- /dev/null
+++ b/pages/map/index.js
@@ -0,0 +1,217 @@
+// pages/map/index.js
+let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
+let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height + systemInfo.statusBarHeight;
+import commonApi from "../../utils/https/common"
+import util from "../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ seachHeight:height,
+ topHeight:rect.top,
+ areas:['姑苏','吴江','苏州'],
+ areaIndex:0,
+ latitude:"",
+ longitude:"",
+ type:0,
+ keywords:"",
+ list:[],
+ showInfo:false,
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.type){
+ this.setData({
+ type:options.type
+ })
+ }
+ let that = this;
+ // 获取当前定位
+ commonApi._post("act/get_suzhou_areas").then(res=>{
+ wx.getLocation({
+ type: 'gcj02',
+ success: function (r) {
+ console.log(r)
+ res.data.unshift({
+ area_id:"",
+ area_title:"全部",
+ lon:r.longitude,
+ lat:r.latitude
+ })
+ that.setData({
+ areas:res.data,
+ areaIndex:0
+ })
+ }
+ })
+
+ commonApi._post("pbservice/Other/getClientConfig",{
+ unique_key:"wechatxcx"
+ }).then(res=>{
+ let data = JSON.parse(res.data)
+ this.setData({
+ indexHot:data.indexHot,
+ isTest:data.isTest
+ })
+ if(data.isTest==true){
+ this.setData({
+ type:1
+ })
+ }
+ that.getList()
+ })
+
+ })
+ },
+ gotoDetail:function(){
+ if(this.data.info.info.type=='relic'){
+ wx.navigateTo({
+ url: '/pages/pbService/wbdw/info/index?id='+this.data.info.info.id,
+ })
+ }
+ else if(this.data.info.info.type=='restaurant'){
+ wx.navigateTo({
+ url: '/pages/info/foodInfo/index?id='+this.data.info.info.id,
+ })
+ }
+ else {
+ util.gotoDetail(this.data.info.info)
+ }
+
+ },
+ onTapMarker:function(e){
+ console.log(e)
+ this.setData({
+ info:this.data.list[e.detail.markerId],
+ showInfo:true
+ })
+ },
+ hideInfo:function(){
+ this.setData({
+ info:null,
+ showInfo:false
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type
+ })
+ this.getList()
+ },
+ changeArea:function(e){
+ this.setData({
+ areaIndex:e.detail.value
+ })
+ this.getList()
+ },
+ changeRegion:function(e){
+ console.log(e)
+ this.getList()
+ },
+ getList:function(){
+ this.mapCtx = wx.createMapContext("map");
+ let types = ['','scenic','venue','post','restaurant','relic','show','cinema'],that = this;
+ this.mapCtx.getRegion({
+ type: 'gcj02',
+ success: function(res) {
+ console.log(res)
+ commonApi._post("act/map_travel",{
+ type:types[that.data.type],
+ title:that.data.keywords,
+ m_lon:res.southwest.longitude-0.05,
+ l_lon:res.northeast.longitude+0.05,
+ m_lat:res.southwest.latitude-0.05,
+ l_lat:res.northeast.latitude+0.05
+ }).then(res=>{
+ let list = [];
+ res.data.map((item,index)=>{
+ let mapItem = {};
+ mapItem.latitude = Number(item.lat);
+ mapItem.longitude = Number(item.lon);
+ mapItem.id = index;
+ mapItem.info = item;
+ mapItem.iconPath = "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/map/"+item.type+".png";
+ mapItem.width = 20;
+ mapItem.height=23;
+ if(mapItem.latitude<40){
+ list.push(mapItem)
+ }
+ })
+ that.setData({
+ list:list
+ })
+ })
+ // that.mapCtx.getRegion({
+ // success:function(r){
+ // let location = r.longitude+","+r.latitude;
+
+ // that.getParkList(res.northeast.longitude,res.northeast.latitude,res.southwest.longitude,res.southwest.latitude,location)
+ // }
+ // })
+ }
+ })
+
+
+
+ },
+ search:function(e){
+ console.log(e)
+ this.setData(e.detail)
+ this.getList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/map/index.json b/pages/map/index.json
new file mode 100644
index 0000000..9f79876
--- /dev/null
+++ b/pages/map/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "search":"/pages/component/SearchHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/map/index.wxml b/pages/map/index.wxml
new file mode 100644
index 0000000..3207c49
--- /dev/null
+++ b/pages/map/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+ {{areas[areaIndex].area_title}}
+
+
+
+
+
+
+
+
+ {{info.info.title}}
+ 地址:{{info.info.address}}
+ 查看详情
+
+
\ No newline at end of file
diff --git a/pages/map/index.wxss b/pages/map/index.wxss
new file mode 100644
index 0000000..6956214
--- /dev/null
+++ b/pages/map/index.wxss
@@ -0,0 +1,146 @@
+/* pages/map/index.wxss */
+.map {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 100%;
+ height: 100%;
+}
+.picker {
+ position: fixed;
+ left: 25rpx;
+ display: flex;
+ align-items: center;
+ width: 202rpx;
+ line-height: 54rpx;
+ border: 1rpx solid #ccc;
+ background: #FFFFFF;
+ margin-top: 13rpx;
+ border-radius: 4rpx;
+}
+.picker image {
+ width: 15rpx;
+ margin: 0 22rpx;
+ flex-shrink: 0;
+}
+.areatext {
+ flex: 1;
+ margin-left: 16rpx;
+ border-right: 1rpx solid #ccc;
+}
+.right-menus {
+ position: fixed;
+ margin-top: 60rpx;
+ right: 0;
+ width: 105rpx;
+ background: #FFFFFF;
+ border-radius: 20rpx 0px 0px 20rpx;
+ font-size: 27rpx;
+ color: #333;
+ line-height: 80rpx;
+ overflow: hidden;
+}
+.right-menu-item {
+ margin: 0 10rpx;
+ border-top: 3px solid #E0E0E0;
+ text-align: active;
+ text-align: center;
+}
+.right-menu-item.active {
+ background: #0B898E;
+ color: #fff;
+ margin: 0;
+ border-color: #0B898E;
+}
+.right-menu-item.active+view {
+ border-top: none;
+}
+.right-menus .right-menu-item:nth-child(2).active {
+ background: #3D77D8;
+ border-color: #3D77D8;
+}
+.right-menus .right-menu-item:nth-child(3).active {
+ background: #C02C2C;
+ border-color: #C02C2C;
+}
+.right-menus .right-menu-item:nth-child(4).active {
+ background: #EE641B;
+ border-color: #EE641B;
+}
+.right-menus .right-menu-item:nth-child(5).active {
+ background: #00B3C8;
+ border-color: #00B3C8;
+}
+.right-menus .right-menu-item:nth-child(6).active {
+ background: #EB3C70;
+ border-color: #EB3C70;
+}
+.right-menus .right-menu-item:nth-child(7).active {
+ background: #9342CB;
+ border-color: #9342CB;
+}
+.right-menu-item.active .iconfont {
+ color: #fff !important;
+}
+.right-menu-item .iconfont {
+ margin-right: 5rpx;
+ font-size: 27rpx;
+}
+.right-menu-item:nth-child(1) {
+ border-top: none;
+}
+.map-item {
+ display: flex;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 13rpx 0px rgba(0, 0, 0, 0.3);
+ border-radius: 13rpx;
+ justify-content: space-between;
+ padding: 25rpx;
+ width: 530rpx;
+ position: absolute;
+ left: 44rpx;
+ top: 50%;
+ margin-top: -100rpx;
+}
+.map-item image {
+ display: block;
+ width: 200rpx;
+ height: 207rpx;
+ flex-shrink: 0;
+ margin-right: 20rpx;
+}
+.map-item .info {
+ width: 260rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+.map-item .info .title {
+ font-size: 33rpx;
+ color: #0E050B;
+ font-weight: 500;
+}
+.map-item .subtitle {
+ font-size: 25rpx;
+ color: #666;
+ margin: 10rpx 0;
+}
+.info-btn {
+ margin: 0 auto;
+ width: 199rpx;
+ line-height: 56rpx;
+ color: #fff;
+ background: #D62828;
+ font-size: 28rpx;
+ text-align: center;
+ border-radius: 28rpx;
+}
+.icon-ic_searchclosed {
+ position: absolute;
+ right: -40rpx;
+ top: -40rpx;
+}
+.title-header .icon-fanhui1 {
+ display: none;
+}
\ No newline at end of file
diff --git a/pages/order/card/index.js b/pages/order/card/index.js
new file mode 100644
index 0000000..83a724b
--- /dev/null
+++ b/pages/order/card/index.js
@@ -0,0 +1,233 @@
+// pages/order/scene/index.js
+let app = getApp()
+import util from "../../../utils/util"
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ product:app.globalData.product,
+ productNum:1,
+ linkmanList:[],
+ skuIndex:0,
+ type:0,
+ address:null,
+ postFee:0,
+ coupon:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(!app.globalData.product){
+ util.back();
+ return;
+ }
+ this.couponCom = this.selectAllComponents("#coupon")[0];
+ this.setData({
+ product:app.globalData.product
+ })
+ if(app.globalData.product.product.sku[0].sku_model.fetch_type=='post'){
+ this.setData({
+ type:1
+ })
+ }
+ },
+ changeType:function(e){
+ if(e.currentTarget.dataset.type==this.data.type) return;
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ linkmanList:[],
+ address:null
+ })
+ if(this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ coupon:null
+ })
+ }
+ },
+ setSku:function(e){
+ let skuIndex = e.currentTarget.dataset.index;
+ if(skuIndex==this.data.skuIndex) return;
+ this.setData({
+ skuIndex:skuIndex
+ })
+ if(this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ coupon:null
+ })
+ }
+ },
+ setLinkman:function(e){
+ let linkmanList = e.detail;
+ this.setData({
+ productNum:linkmanList.length==0?1:linkmanList.length,
+ linkmanList:linkmanList
+ })
+ },
+ setAddress:function(e){
+ this.setData({
+ address:e.detail,
+ postFee:0
+ })
+ this.getPostFee()
+ },
+ add:function(){
+ if(this.data.product.sku.sku_model.traveller_limit_num!=0 && this.data.productNum==this.data.product.sku.sku_model.traveller_limit_num){
+ wx.showToast({
+ title: '出行人限购'+this.data.product.sku.sku_model.traveller_limit_num+"份",
+ icon:'none'
+ })
+ return;
+ }
+ this.setData({
+ productNum:this.data.productNum+1
+ })
+ this.getPostFee()
+ },
+ minus:function(){
+ this.setData({
+ productNum:this.data.productNum>1?(this.data.productNum-1):1
+ })
+ if(this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ coupon:null
+ })
+ }
+ this.getPostFee()
+ },
+ getPostFee:function(){
+ if(!this.data.address) return;
+ commonApi.user_post("order/get_post_price",{
+ sku_id:this.data.product.sku.id,
+ num:this.data.productNum,
+ consignee_id:this.data.address.id
+ }).then(res=>{
+ if(res.data.price<0) {
+ wx.showToast({
+ title: '该地区不发货',
+ icon:'none'
+ })
+ res.data.price = 0;
+ };
+ if(res.data.price!=this.data.postFee && this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ coupon:null
+ })
+ }
+ this.setData({
+ postFee:res.data.price
+ })
+ })
+ },
+ order:function(){
+ let linkmanList = this.data.linkmanList,productNum = this.data.productNum,product = this.data.product,visitors=[];
+ if(linkmanList.length{
+ visitors.push(item.id)
+ })
+ let data = {
+ source:"WECHATXCX",
+ coupon_id:this.data.coupon?this.data.coupon.id:null,
+ product_list:[{
+ type:product.product.type,
+ product_id:product.product.id,
+ sku_id:product.sku.id,
+ product_num:productNum,
+ recharge:product.sku.sku_model.recharge[this.data.skuIndex] || 0,
+ visitors:visitors.join(","),
+ post:this.data.type==0?'':this.data.address.id,
+ fetch_type:this.data.type==0?'selffetch':'post'
+ }]
+ }
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/card/index.json b/pages/order/card/index.json
new file mode 100644
index 0000000..7d93bc6
--- /dev/null
+++ b/pages/order/card/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "contact":"../components/contact/index",
+ "address":"../components/address/index",
+ "coupon":"../components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/card/index.wxml b/pages/order/card/index.wxml
new file mode 100644
index 0000000..9319cb8
--- /dev/null
+++ b/pages/order/card/index.wxml
@@ -0,0 +1,46 @@
+
+
+
+ {{product.product.title}}
+
+
+
+
+
+ 购票数量
+
+ {{productNum}}
+
+
+
+
+
+ 请选择充值金额
+
+
+ {{item/100}}元
+
+
+
+
+ 请选择
+
+
+ 自取
+ 邮寄
+
+
+
+
+
+
+
+ 运费
+ {{postFee?(postFee==0?'包邮':(postFee/100)):product.sku.sku_model.post_template_name}}
+
+
+
+
+ 合计:¥{{((productNum * (product.sku.price + 1 * (product.sku.sku_model.recharge[skuIndex] || 0)) + 1 * postFee - (coupon?coupon.activity.money:0))<0?0:(productNum * (product.sku.price + 1 * (product.sku.sku_model.recharge[skuIndex] || 0)) + 1 * postFee - (coupon?coupon.activity.money:0))) /100}}
+ 提交订单
+
diff --git a/pages/order/card/index.wxss b/pages/order/card/index.wxss
new file mode 100644
index 0000000..74debb4
--- /dev/null
+++ b/pages/order/card/index.wxss
@@ -0,0 +1,196 @@
+page {
+ background: #f6f6f6;
+}
+.product-info {
+ padding: 20rpx 47rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.product-title {
+ font-size: 33rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-price {
+ color: #D62828;
+ font-size: 27rpx;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.dates-boxes {
+ display: flex;
+ align-items: center;
+ padding: 31rpx 21rpx;
+ border-top: 1rpx solid #ccc;
+}
+.date-item {
+ width: 162rpx;
+ height: 97rpx;
+ border-radius: 10rpx;
+ border: 1rpx solid #333;
+ text-align: center;
+ font-size: 27rpx;
+ color: #000;
+ margin-right: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+.date-item.active {
+ border-color: #0B898E;
+ color: #fff;
+ background: #0B898E;
+}
+.date-item.disable {
+ border-color: #CCCCCC;
+ color: #666;
+}
+.date-item .price {
+ font-size: 25rpx;
+ color: #D62828;
+}
+.date-item.active .price {
+ color: #fff;
+}
+.date-item.disable .price {
+ color: #666;
+}
+.more-item {
+ width: 99rpx;
+ margin-right: 0;
+}
+.date-times {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin: 0 21rpx;
+ padding-top: 34rpx;
+ padding-bottom: 10rpx;
+ border-top: 1rpx dashed #ccc;
+ flex-wrap: wrap;
+}
+.date-time {
+ width: 315rpx;
+ line-height: 58rpx;
+ border: 1px solid #333;
+ border-radius: 10rpx;
+ text-align: center;
+ font-size: 25rpx;
+ flex-shrink: 0;
+ margin-bottom: 24rpx;
+ color: #000;
+}
+.date-time.disable {
+ border-color: #ccc;
+ color: #666666;
+}
+.date-time.active {
+ border-color: #0B898E;
+ background: #0B898E;
+ color: #fff;
+}
+.box-title .iconfont {
+ font-size: 28rpx;
+ flex-shrink: 0;
+}
+.number-box {
+ font-size: 29rpx;
+ font-weight: 500;
+ color: #000;
+ flex-shrink: 0;
+ width: 67rpx;
+ line-height: 49rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 20rpx;
+}
+
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+}
+.fixed-btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ text-align: center;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.fixed-price-box {
+ margin-left: 25rpx;
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.fixed-price-box .price {
+ color: #D62828;
+ font-size: 36rpx;
+ margin-left: 10rpx;
+}
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.box-title input {
+ flex: 1;
+ display: block;
+ font-size: 31rpx;
+ color: #666;
+ margin-left: 15rpx;
+ font-weight: 400;
+}
+.fill-box {
+ padding: 30rpx 20rpx;
+ display: flex;
+ flex-wrap: wrap;
+ border-top: 1rpx solid #ccc;
+}
+.fill-item {
+ width: 205rpx;
+ line-height: 65rpx;
+ text-align: center;
+ background: #fff;
+ border-radius: 10rpx;
+ border: 1rpx solid #333;
+ margin-right: 20rpx;
+ margin-bottom: 20rpx;
+ font-size: 27rpx;
+ color: #000;
+}
+.fill-item:nth-child(3n){
+ margin-right: 0;
+}
+.fill-item.active {
+ background: #0B898E;
+ color: #fff;
+ border-color: #0B898E;
+}
\ No newline at end of file
diff --git a/pages/order/comment/index.js b/pages/order/comment/index.js
new file mode 100644
index 0000000..44b07d1
--- /dev/null
+++ b/pages/order/comment/index.js
@@ -0,0 +1,144 @@
+// pages/order/comment/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi.user_post("order/query",{
+ order_id:options.id
+ }).then(res=>{
+ let list = [];
+ res.data.order_product_list.map(item=>{
+ item.star = 5;
+ item.content = "";
+ if(item.state=='WAIT_COMMENT'){
+ list.push(item);
+ }
+ })
+ if(list.length==0){
+ wx.showToast({
+ title: '该订单没有待评价产品',
+ icon:'none'
+ })
+ setTimeout(()=>{
+ wx.navigateBack()
+ },1000)
+ return;
+ }
+ res.data.order_product_list = list;
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+ changeStar:function(e){
+ console.log(e)
+ wx.showLoading({
+ title: '加载中'
+ })
+ let index = e.currentTarget.dataset.index,star = e.currentTarget.dataset.star;
+ let info = this.data.info;
+ info.order_product_list[index].star = Number(star)+1;
+ this.setData({
+ info:info
+ })
+ wx.hideLoading({
+ })
+ },
+ changeContent:function(e){
+ console.log(e)
+ let index = e.currentTarget.dataset.index,info = this.data.info;
+ info.order_product_list[index].content = e.detail.value;
+ this.setData({
+ info:info
+ })
+ },
+ submit:function(){
+ let info = this.data.info,flag = true,ajax=[]
+ info.order_product_list.map(item=>{
+ if(!item.content) {
+ wx.showToast({
+ title: '请输入评价内容',
+ icon:'none'
+ })
+ flag = false;
+ }
+ ajax.push(commonApi.user_post("product/product_comment",{
+ product_id:item.product_id,
+ content:item.content,
+ order_id:this.data.id
+ }))
+ })
+ if(!flag) return;
+ Promise.all(ajax).then(res=>{
+ console.log(res)
+ let flag = false;
+ res.map(item=>{
+ if(item.code==1){
+ flag = true
+ }
+ })
+ if(flag){
+ wx.navigateBack()
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/comment/index.json b/pages/order/comment/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/order/comment/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/comment/index.wxml b/pages/order/comment/index.wxml
new file mode 100644
index 0000000..271c5d6
--- /dev/null
+++ b/pages/order/comment/index.wxml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ {{item.product_title}}
+ {{item.sku_name}}
+
+
+ ¥{{item.paid_money/100}}
+ x{{item.product_num}}
+
+
+
+ 综合评分
+
+
+
+
+
+
+提交
\ No newline at end of file
diff --git a/pages/order/comment/index.wxss b/pages/order/comment/index.wxss
new file mode 100644
index 0000000..dc717b2
--- /dev/null
+++ b/pages/order/comment/index.wxss
@@ -0,0 +1,73 @@
+/* pages/order/comment/index.wxss */
+.product-box {
+ margin: 0 30rpx;
+ font-size: 28rpx;
+}
+.product-top {
+ display: flex;
+ padding: 40rpx 0;
+ font-size: 26rpx;
+ color: #666666;
+}
+.product-top image {
+ width: 170rpx;
+ height: 120rpx;
+}
+.product-info {
+ flex: 1;
+ width: 100%;
+ margin: 0 30rpx;
+}
+.product-title {
+ font-size: 32rpx;
+ color: #000;
+}
+.product-price {
+ flex-shrink: 0;
+ text-align: right;
+}
+.product-price .price {
+ color: #D62828;
+ font-size: 32rpx;
+ font-weight: 500;
+ margin-bottom: 30rpx;
+}
+.product-price .price text {
+ font-size: 26rpx;
+ font-weight: 400;
+}
+.product-num {
+ color: #999999;
+ font-size: 32rpx;
+}
+.icon-xingxing {
+ font-size: 36rpx;
+ color: #D62828;
+ margin-right: 20rpx;
+}
+.icon-xingxing.disable {
+ color: #999;
+}
+.tip {
+ color: #000;
+ margin-right: 40rpx;
+ font-size: 32rpx;
+}
+.product-box textarea {
+ display: block;
+ width: 100%;
+}
+.btn {
+ width: 360rpx;
+ line-height: 80rpx;
+ text-align: center;
+ color: #fff;
+ background: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ border-radius: 40rpx;
+ position: fixed;
+ bottom: 40rpx;
+ left: 50%;
+ margin-left: -180rpx;
+}
\ No newline at end of file
diff --git a/pages/order/components/address/index.js b/pages/order/components/address/index.js
new file mode 100644
index 0000000..1e87fde
--- /dev/null
+++ b/pages/order/components/address/index.js
@@ -0,0 +1,229 @@
+// pages/order/components/contact/index.js
+import userApi from "../../../../utils/https/user"
+import commonApi from "../../../../utils/https/common"
+let app = getApp()
+Component({
+ /**
+ * 组件的属性列表
+ */
+ options: {
+ styleIsolation: 'apply-shared',
+ addGlobalClass: true
+ },
+ properties: {
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ selectLinkman:null,
+ linkmanList:[],
+ showMask:false,
+ editId:null
+ },
+ lifetimes: {
+ attached: function() {
+ // 在组件实例进入页面节点树时执行
+ // 获取默认联系人
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ userApi.user_post("user/getDefaultContact",{
+ contactType:"CONSIGNEE"
+ }).then(res=>{
+ console.log(res)
+ this.setData({
+ selectLinkman:res.data
+ })
+ if(res.data){
+ this.triggerEvent("setAddress",res.data)
+ }
+ this.getLinkmanList()
+ })
+ }
+ })
+
+ },
+ detached: function() {
+ // 在组件实例被从页面节点树移除时执行
+ },
+ },
+ pageLifetimes: {
+ show: function() {
+ // 页面被展示
+ if(this.data.editId){
+ let editId = this.data.editId;
+ userApi.user_post("user/getContactInfoById",{
+ id:editId
+ }).then(res=>{
+ let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList;
+ if(selectLinkman.id==editId){
+ selectLinkman.name = res.data.name;
+ selectLinkman.tel = res.data.tel;
+ selectLinkman.address = res.data.address;
+ selectLinkman.is_default = res.data.is_default;
+ }
+ linkmanList.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.address = res.data.address;
+ item.is_default = res.data.is_default;
+ }
+ else if(res.data.is_default==1 && item.is_default==1){
+ item.is_default = 0;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList,
+ selectLinkman:selectLinkman
+ })
+ this.triggerEvent("setAddress",res.data)
+ })
+ }
+ else {
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ this.getLinkmanList()
+ }
+ })
+ }
+ },
+ hide: function() {
+ // 页面被隐藏
+ },
+ resize: function(size) {
+ // 页面尺寸变化
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ gotoEdit:function(e){
+ this.setData({
+ editId:e.currentTarget.dataset.item.id
+ })
+ wx.navigateTo({
+ url: '/pages/user/address/add/index?id='+this.data.editId+'&from=order',
+ })
+ },
+ showLinkman:function(){
+ this.setData({
+ showMask:!this.data.showMask
+ })
+ },
+ cancel:function(){
+ // let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList;
+ // linkmanList.map(linkman=>{
+ // linkman.selected = 0;
+ // if(selectLinkman.id==linkman.id){
+ // linkman.selected = 1;
+ // }
+ // })
+ // this.setData({
+ // linkmanList:linkmanList
+ // })
+ this.showLinkman()
+ },
+ confirm:function(){
+ let linkmanList = this.data.linkmanList,selectLinkman = null;
+ linkmanList.map(linkman=>{
+ if(linkman.selected==1){
+ selectLinkman = (linkman);
+ }
+ })
+ this.setData({
+ selectLinkman:selectLinkman
+ })
+ this.triggerEvent("setAddress",selectLinkman)
+ this.showLinkman()
+ },
+ getLinkmanList:function(){
+ // 直接获取1000条出行人信息 就不要分页了
+ userApi.user_post("user/getContactOrConsignee",{
+ contactType:"CONSIGNEE",
+ offset:0,
+ limit:1000
+ }).then(res=>{
+ let list = res.data;
+ this.setData({
+ linkmanList:list
+ })
+ })
+ },
+ setDefault:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList;
+ userApi.user_post("user/setDefaultConsignee",{
+ id:item.id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '设置成功',
+ icon: 'success'
+ })
+ linkmanList.map(linkman=>{
+ if(linkman.id==item.id){
+ linkman.is_default=1;
+ }
+ else {
+ linkman.is_default = 0;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ })
+ },
+ delLinkman:function(e){
+ wx.showLoading({
+ title: '加载中',
+ })
+ let index = e.currentTarget.dataset.index,selectLinkman = this.data.selectLinkman;
+ selectLinkman.splice(index,1);
+ this.setData({
+ selectLinkman:selectLinkman
+ })
+ wx.hideLoading()
+ },
+ del:function(e){
+ let item = e.currentTarget.dataset.item,index = e.currentTarget.dataset.index,that = this,linkmanList=this.data.linkmanList;
+ wx.showModal({
+ title:"提示",
+ content:"确定删除吗?",
+ success (res) {
+ if (res.confirm) {
+ userApi.user_post("user/delConsignee",{
+ id:item.id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '删除成功',
+ icon:"success"
+ })
+ linkmanList.splice(index,1);
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ })
+ console.log('用户点击确定')
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
+ },
+ selectIt:function(e){
+ let item = e.currentTarget.dataset.item;
+ this.setData({
+ selectLinkman:item,
+ showMask:false
+ })
+ this.triggerEvent("setAddress",item)
+ }
+ }
+})
diff --git a/pages/order/components/address/index.json b/pages/order/components/address/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/pages/order/components/address/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/order/components/address/index.wxml b/pages/order/components/address/index.wxml
new file mode 100644
index 0000000..950f01c
--- /dev/null
+++ b/pages/order/components/address/index.wxml
@@ -0,0 +1,44 @@
+
+
+ 收货地址
+ 选择
+
+
+
+
+
+ {{selectLinkman.name}}{{selectLinkman.tel}}
+
+ {{selectLinkman.address}}
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+ 取消
+
+
+ 添加收货地址
+
+
+
+
+
+ {{item.name}} {{item.tel}}
+ {{item.address}}
+
+
+
+ 设为默认收货地址
+
+
+
\ No newline at end of file
diff --git a/pages/order/components/address/index.wxss b/pages/order/components/address/index.wxss
new file mode 100644
index 0000000..49d5094
--- /dev/null
+++ b/pages/order/components/address/index.wxss
@@ -0,0 +1,140 @@
+/* pages/order/components/contact/index.wxss */
+.contact-add {
+ width: 140rpx;
+ line-height: 56rpx;
+ border: 1rpx solid #333333;
+ border-radius: 28rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.contacts-list {
+ border-top: 1rpx solid #ccc;
+ padding: 0 21rpx;
+}
+.contact-item {
+ padding: 30rpx 0;
+ border-bottom: 1rpx solid #ccc;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.contacts-list .contact-item:last-child {
+ border-bottom: none;
+}
+.contact-item .icon-jian {
+ color: #D62828;
+ font-size: 45rpx;
+ flex-shrink: 0;
+}
+.contact-item .contact-info {
+ flex: 1;
+ text-align: left;
+ color: #666666;
+ font-size: 27rpx;
+ margin-right: 50rpx;
+}
+.contact-item .contact-name {
+ font-size: 31rpx;
+ color: #000;
+ margin-bottom: 20rpx;
+}
+.contact-item .contact-name text {
+ font-size: 25rpx;
+ margin-left: 25rpx;
+ color: #666;
+}
+.contact-item .icon-bianji1 {
+ color: #666666;
+ flex-shrink: 0;
+ font-size: 37rpx;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.btns {
+ display: flex;
+ justify-content: space-between;
+ font-size: 31rpx;
+ color: #000;
+ margin-bottom: 10rpx;
+ line-height: 90rpx;
+}
+.add-btn {
+ line-height: 80rpx;
+ background: #FFFFFF;
+ text-align: center;
+ border-radius: 40rpx;
+ font-size: 29rpx;
+ color: #000;
+ margin-bottom: 24rpx;
+}
+.mask-content {
+ width: 700rpx;
+ padding: 0 25rpx;
+ overflow-y: auto;
+ background: #F7F7F7;
+}
+.linkmanlist-item {
+ background: white;
+ margin-bottom: 24rpx;
+ border-radius: 9rpx;
+}
+.linkmanlist-item-top {
+ display: flex;
+ margin: 0 20rpx;
+ padding: 30rpx 13rpx;
+ border-bottom: 1rpx dashed #ccc;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #666;
+ font-size: 25rpx;
+}
+.linkmanlist-item-top .iconfont {
+ flex-shrink: 0;
+ font-size: 42rpx;
+}
+.linkman-nickname {
+ font-size: 29rpx;
+ color: #000;
+ margin-left: 50rpx;
+}
+.linkman-info {
+ flex: 1;
+ margin: 0 30rpx;
+}
+.linkmanlist-item-top .icon-gou {
+ color: #D62828;
+}
+.linkmanlist-tip {
+ line-height: 70rpx;
+ font-size: 24rpx;
+ color: #666;
+ margin: 0 34rpx;
+}
+.linkmanlist-tip .iconfont {
+ margin-right: 4rpx;
+ font-size: 23rpx;
+}
+.add-btn1 {
+ width: 218rpx;
+ line-height: 72rpx;
+ border: 1rpx solid #333333;
+ border-radius: 37rpx;
+ text-align: center;
+ font-size: 29rpx;
+ color: #000;
+ margin: 25rpx auto;
+}
\ No newline at end of file
diff --git a/pages/order/components/contact/index.js b/pages/order/components/contact/index.js
new file mode 100644
index 0000000..2ebdd04
--- /dev/null
+++ b/pages/order/components/contact/index.js
@@ -0,0 +1,233 @@
+// pages/order/components/contact/index.js
+import userApi from "../../../../utils/https/user"
+import commonApi from "../../../../utils/https/common"
+let app = getApp()
+Component({
+ /**
+ * 组件的属性列表
+ */
+ options: {
+ styleIsolation: 'apply-shared',
+ addGlobalClass: true
+ },
+ properties: {
+ maxNum:{
+ type:String,
+ value:"-1"
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ selectLinkman:[],
+ linkmanList:[],
+ showMask:false,
+ editId:null
+ },
+ lifetimes: {
+ attached: function() {
+ // 在组件实例进入页面节点树时执行
+ // 获取默认联系人
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ userApi.user_post("user/getDefaultContact",{
+ contactType:"CONTACT"
+ }).then(res=>{
+ if(res.data){
+ this.setData({
+ selectLinkman:[res.data]
+ })
+ this.triggerEvent("setLinkman",[res.data])
+ }
+ this.getLinkmanList()
+ })
+ }
+ })
+ },
+ detached: function() {
+ // 在组件实例被从页面节点树移除时执行
+ },
+ },
+ pageLifetimes: {
+ show: function() {
+ // 页面被展示
+ if(this.data.editId){
+ let editId = this.data.editId;
+ userApi.user_post("user/getContactInfoById",{
+ id:editId
+ }).then(res=>{
+ let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList;
+ selectLinkman.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.id_number = res.data.id_number;
+ item.is_default = res.data.is_default;
+ }
+ })
+ linkmanList.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.id_number = res.data.id_number;
+ item.is_default = res.data.is_default;
+ }
+ else if(res.data.is_default==1 && item.is_default==1){
+ item.is_default = 0;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList,
+ selectLinkman:selectLinkman
+ })
+ })
+ }
+ else {
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ this.getLinkmanList()
+ }
+ })
+ }
+ },
+ hide: function() {
+ // 页面被隐藏
+ },
+ resize: function(size) {
+ // 页面尺寸变化
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ gotoEdit:function(e){
+ this.setData({
+ editId:e.currentTarget.dataset.item.id
+ })
+ },
+ showLinkman:function(){
+ this.setData({
+ showMask:!this.data.showMask
+ })
+ },
+ cancel:function(){
+ let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList;
+ linkmanList.map(linkman=>{
+ linkman.selected = 0;
+ selectLinkman.map(item=>{
+ if(item.id==linkman.id){
+ linkman.selected = 1;
+ }
+ })
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ this.showLinkman()
+ },
+ confirm:function(){
+ let linkmanList = this.data.linkmanList,selectLinkman = [];
+ linkmanList.map(linkman=>{
+ if(linkman.selected==1){
+ selectLinkman.push(linkman);
+ }
+ })
+ if(this.properties.maxNum!=-1 && selectLinkman.length>Number(this.properties.maxNum)){
+ wx.showToast({
+ title: '最多只能选择'+this.properties.maxNum+"个出行人",
+ icon:'none'
+ })
+ return;
+ }
+ this.setData({
+ selectLinkman:selectLinkman
+ })
+ this.triggerEvent("setLinkman",selectLinkman)
+ this.showLinkman()
+ },
+ getLinkmanList:function(){
+ // 直接获取1000条出行人信息 就不要分页了
+ userApi.user_post("user/getContactOrConsignee",{
+ contactType:"CONTACT",
+ offset:0,
+ limit:1000
+ }).then(res=>{
+ let list = res.data;
+ list.map(item=>{
+ this.data.selectLinkman.map(linkman=>{
+ if(linkman.id==item.id){
+ item.selected = 1;
+ }
+ })
+ })
+ this.setData({
+ linkmanList:list
+ })
+ })
+ },
+ setDefault:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList;
+ userApi.user_post("user/setDefaultContact",{
+ contactId:item.id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '设置成功',
+ icon: 'success'
+ })
+ linkmanList.map(linkman=>{
+ if(linkman.id==item.id){
+ linkman.is_default=1;
+ }
+ else {
+ linkman.is_default = 0;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ })
+ },
+ delLinkman:function(e){
+ wx.showLoading({
+ title: '加载中',
+ })
+ let index = e.currentTarget.dataset.index,selectLinkman = this.data.selectLinkman;
+ selectLinkman.splice(index,1);
+ this.triggerEvent("setLinkman",selectLinkman)
+ this.setData({
+ selectLinkman:selectLinkman
+ })
+ wx.hideLoading()
+ },
+ selectIt:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:app.globalData.product.sku.sku_model.traveller_limit_num;
+ linkmanList.map(linkman=>{
+ if(this.properties.maxNum!=-1 && num==traveller_limit_num && item.id==linkman.id){
+ wx.showToast({
+ title: '最多只能选择'+this.properties.maxNum+"个出行人",
+ icon:'none'
+ })
+ }
+ else if(traveller_limit_num!=0 && num==traveller_limit_num && item.id==linkman.id){
+ wx.showToast({
+ title: '出行人限购'+traveller_limit_num+"份",
+ icon:'none'
+ })
+ }
+ else if(item.id==linkman.id){
+ linkman.selected = item.selected==1?0:1;
+ num++;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ }
+})
diff --git a/pages/order/components/contact/index.json b/pages/order/components/contact/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/pages/order/components/contact/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/order/components/contact/index.wxml b/pages/order/components/contact/index.wxml
new file mode 100644
index 0000000..9a1edf5
--- /dev/null
+++ b/pages/order/components/contact/index.wxml
@@ -0,0 +1,44 @@
+
+
+ 出行人信息
+ 添加
+
+
+
+
+
+ {{item.name}}
+ 手机号{{item.tel}}
+ {{item.title}}{{item.id_number}}
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+ 添加出行人
+
+
+
+ {{item.name}}
+
+ 手机号 {{item.tel}}
+ {{item.title}}: {{item.id_number}}
+
+
+
+ 设为默认出行人
+
+
+
\ No newline at end of file
diff --git a/pages/order/components/contact/index.wxss b/pages/order/components/contact/index.wxss
new file mode 100644
index 0000000..7b4e420
--- /dev/null
+++ b/pages/order/components/contact/index.wxss
@@ -0,0 +1,138 @@
+/* pages/order/components/contact/index.wxss */
+.contact-add {
+ width: 140rpx;
+ line-height: 56rpx;
+ border: 1rpx solid #333333;
+ border-radius: 28rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.contacts-list {
+ border-top: 1rpx solid #ccc;
+ padding: 0 21rpx;
+}
+.contact-item {
+ padding: 30rpx 0;
+ border-bottom: 1rpx solid #ccc;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.contacts-list .contact-item:last-child {
+ border-bottom: none;
+}
+.contact-item .icon-jian {
+ color: #D62828;
+ font-size: 45rpx;
+ flex-shrink: 0;
+}
+.contact-item .contact-info {
+ flex: 1;
+ text-align: left;
+ color: #666666;
+ font-size: 25rpx;
+ margin: 0 60rpx;
+}
+.contact-item .contact-name {
+ font-size: 28rpx;
+ color: #000;
+ margin-bottom: 20rpx;
+}
+.contact-item .contact-other text {
+ margin-right: 57rpx;
+}
+.contact-item .icon-bianji1 {
+ color: #666666;
+ flex-shrink: 0;
+ font-size: 37rpx;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.btns {
+ display: flex;
+ justify-content: space-between;
+ font-size: 31rpx;
+ color: #000;
+ margin-bottom: 10rpx;
+ line-height: 90rpx;
+}
+.add-btn {
+ line-height: 80rpx;
+ background: #FFFFFF;
+ text-align: center;
+ border-radius: 40rpx;
+ font-size: 29rpx;
+ color: #000;
+ margin-bottom: 24rpx;
+}
+.mask-content {
+ width: 700rpx;
+ padding: 0 25rpx;
+ overflow-y: auto;
+ background: #F7F7F7;
+}
+.linkmanlist-item {
+ background: white;
+ margin-bottom: 24rpx;
+ border-radius: 9rpx;
+}
+.linkmanlist-item-top {
+ display: flex;
+ margin: 0 20rpx;
+ padding: 30rpx 13rpx;
+ border-bottom: 1rpx dashed #ccc;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #666;
+ font-size: 25rpx;
+}
+.linkmanlist-item-top .iconfont {
+ flex-shrink: 0;
+ font-size: 42rpx;
+}
+.linkman-nickname {
+ font-size: 29rpx;
+ color: #000;
+ margin-left: 50rpx;
+}
+.linkman-info {
+ flex: 1;
+ margin: 0 30rpx;
+}
+.linkmanlist-item-top .icon-gou {
+ color: #D62828;
+}
+.linkmanlist-tip {
+ line-height: 70rpx;
+ font-size: 24rpx;
+ color: #666;
+ margin: 0 34rpx;
+}
+.linkmanlist-tip .iconfont {
+ margin-right: 4rpx;
+ font-size: 23rpx;
+}
+.add-btn1 {
+ width: 218rpx;
+ line-height: 72rpx;
+ border: 1rpx solid #333333;
+ border-radius: 37rpx;
+ text-align: center;
+ font-size: 29rpx;
+ color: #000;
+ margin: 25rpx auto;
+}
\ No newline at end of file
diff --git a/pages/order/components/coupon/index.js b/pages/order/components/coupon/index.js
new file mode 100644
index 0000000..14cf5dc
--- /dev/null
+++ b/pages/order/components/coupon/index.js
@@ -0,0 +1,42 @@
+// pages/order/components/coupon/index.js
+let app = getApp()
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ money:{
+ type:String,
+ value:"0"
+ },
+ sku:{
+ type:String,
+ value:""
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ coupon:null
+ },
+ pageLifetimes: {
+ show: function() {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ setNullCoupon:function(){
+ this.setData({
+ coupon:null
+ })
+ }
+ }
+})
diff --git a/pages/order/components/coupon/index.json b/pages/order/components/coupon/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/pages/order/components/coupon/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/order/components/coupon/index.wxml b/pages/order/components/coupon/index.wxml
new file mode 100644
index 0000000..1ae1794
--- /dev/null
+++ b/pages/order/components/coupon/index.wxml
@@ -0,0 +1,8 @@
+
+
+
+ 优惠券
+ -{{coupon.activity.money/100}}
+ 请选择
+
+
diff --git a/pages/order/components/coupon/index.wxss b/pages/order/components/coupon/index.wxss
new file mode 100644
index 0000000..0a1745c
--- /dev/null
+++ b/pages/order/components/coupon/index.wxss
@@ -0,0 +1,24 @@
+/* pages/order/components/coupon/index.wxss */
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
\ No newline at end of file
diff --git a/pages/order/components/date/index.js b/pages/order/components/date/index.js
new file mode 100644
index 0000000..361f275
--- /dev/null
+++ b/pages/order/components/date/index.js
@@ -0,0 +1,147 @@
+// pages/order/components/date/index.js
+import commonApi from "../../../../utils/https/common"
+import util from "../../../../utils/util"
+let app = getApp()
+Component({
+ /**
+ * 组件的属性列表
+ */
+ options: {
+ styleIsolation: 'apply-shared',
+ addGlobalClass: true
+ },
+ properties: {
+ product:{
+ type:Object,
+ default:{}
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ threeDays:[],
+ activeDate:"",
+ datelist:[],
+ showMoreDateFlag:false,
+ moreFlag:true,
+ timelist:[],
+ timeIndex:0
+ },
+ lifetimes: {
+ attached: function() {
+
+ // 在组件实例进入页面节点树时执行
+ let product = app.globalData.product,today = util.formatDate(new Date()),end_date = util.formatDate(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000));
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ // 获取价格日历
+ commonApi.user_post("product/product_date_price",{
+ start_date:today,
+ end_date:end_date,
+ sku_id:product.sku.id
+ }).then(res=>{
+ for(let i=0;i0){
+ this.setData({
+ activeDate:res.data[i]
+ })
+ this.getTimeStock()
+ this.triggerEvent("onChangeDate",this.data.activeDate)
+ break;
+ }
+ }
+ this.setData({
+ datelist:res.data
+ })
+
+ this.setData({
+ threeDays:res.data.slice(0,3)
+ })
+ console.log(res)
+ })
+ }
+ })
+
+ },
+ detached: function() {
+ // 在组件实例被从页面节点树移除时执行
+ },
+ },
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ showMoreDate:function(){
+ this.setData({
+ showMoreDateFlag:true
+ })
+ },
+ hideCalendar:function(){
+ this.setData({
+ showMoreDateFlag:false
+ })
+ },
+ changeDate:function(e){
+ let date = e.currentTarget.dataset.date;
+ if(date.stock<=0) return;
+ if(date.stock==null) return;
+ if(date.price==null) return;
+ this.setData({
+ activeDate:date,
+ moreFlag:true
+ })
+ this.triggerEvent("onChangeDate",this.data.activeDate)
+ this.getTimeStock()
+ },
+ // 修改日期
+ onTapDay:function(e){
+ console.log(e)
+ let threeDays = this.data.threeDays,flag=false;
+ threeDays.map(item=>{
+ if(item.date==e.detail.date){
+ flag = true
+ }
+ })
+ e.detail.short_date = e.detail.date.substr(5,5);
+ console.log(e.detail)
+ this.setData({
+ activeDate:e.detail,
+ showMoreDateFlag:false,
+ moreFlag:flag
+ })
+ this.triggerEvent("onChangeDate",this.data.activeDate)
+ this.getTimeStock()
+ },
+ getTimeStock:function(){
+ if(this.data.activeDate.is_time_stock!=true) return;
+ commonApi.user_post("product/product_timestock_price",{
+ date:this.data.activeDate.date,
+ sku_id:app.globalData.product.sku.id
+ }).then(res=>{
+ let timeIndex = -1;
+ for(let i=0;i0){
+ timeIndex = i;
+ break;
+ }
+ }
+ this.setData({
+ timelist:res.data,
+ timeIndex:timeIndex
+ })
+ this.triggerEvent("onChangeTime",this.data.timelist[this.data.timeIndex])
+ })
+ },
+ selectTime:function(e){
+ if(this.data.timelist[e.currentTarget.dataset.index].stock_number!=0){
+ this.setData({
+ timeIndex:e.currentTarget.dataset.index
+ })
+ this.triggerEvent("onChangeTime",this.data.timelist[this.data.timeIndex])
+ }
+
+ }
+ }
+})
diff --git a/pages/order/components/date/index.json b/pages/order/components/date/index.json
new file mode 100644
index 0000000..c88e652
--- /dev/null
+++ b/pages/order/components/date/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "calendar":"/pages/component/myCalendar/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/components/date/index.wxml b/pages/order/components/date/index.wxml
new file mode 100644
index 0000000..0695d36
--- /dev/null
+++ b/pages/order/components/date/index.wxml
@@ -0,0 +1,40 @@
+
+
+ 使用日期
+
+
+ {{item.date}}
+ {{item.price==0?'免费':('¥'+item.price/100)}}
+
+ 售罄
+
+
+
+ 更多
+
+
+ {{activeDate.short_date}}
+ {{activeDate.price==0?'免费':('¥'+activeDate.price/100)}}
+
+
+
+ {{item.start_time}}-{{item.end_time}}{{item.stock_number==-1?'无限':('余票'+item.stock_number)}})
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/components/date/index.wxss b/pages/order/components/date/index.wxss
new file mode 100644
index 0000000..2c9de38
--- /dev/null
+++ b/pages/order/components/date/index.wxss
@@ -0,0 +1,95 @@
+/* pages/order/components/date/index.wxss */
+.date-box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.dates-boxes {
+ display: flex;
+ align-items: center;
+ padding: 31rpx 21rpx;
+ border-top: 1rpx solid #ccc;
+}
+.date-item {
+ width: 162rpx;
+ height: 97rpx;
+ border-radius: 10rpx;
+ border: 1rpx solid #333;
+ text-align: center;
+ font-size: 27rpx;
+ color: #000;
+ margin-right: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+.date-item.active {
+ border-color: #0B898E;
+ color: #fff;
+ background: #0B898E;
+}
+.date-item.disable {
+ border-color: #CCCCCC;
+ color: #666;
+}
+.date-item .price {
+ font-size: 25rpx;
+ color: #D62828;
+}
+.date-item.active .price {
+ color: #fff;
+}
+.date-item.disable .price {
+ color: #666;
+}
+.more-item {
+ width: 99rpx;
+ margin-right: 0;
+}
+.date-times {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin: 0 21rpx;
+ padding-top: 34rpx;
+ padding-bottom: 10rpx;
+ border-top: 1rpx dashed #ccc;
+ flex-wrap: wrap;
+}
+.date-time {
+ width: 315rpx;
+ line-height: 58rpx;
+ border: 1px solid #333;
+ border-radius: 10rpx;
+ text-align: center;
+ font-size: 25rpx;
+ flex-shrink: 0;
+ margin-bottom: 24rpx;
+ color: #000;
+}
+.date-time.disable {
+ border-color: #ccc;
+ color: #666666;
+}
+.date-time.active {
+ border-color: #0B898E;
+ background: #0B898E;
+ color: #fff;
+}
+.calendar-content {
+ background: white;
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
\ No newline at end of file
diff --git a/pages/order/coupon/index.js b/pages/order/coupon/index.js
new file mode 100644
index 0000000..ac70388
--- /dev/null
+++ b/pages/order/coupon/index.js
@@ -0,0 +1,103 @@
+// pages/order/coupon/index.js
+import commonApi from "../../../utils/https/common";
+import util from "../../../utils/util";
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ moreFlag:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList(options)
+ },
+ getList:function(options){
+ if(!this.data.moreFlag) return
+ commonApi.user_post('coupon/use_coupon_list',{
+ money:options.money,
+ sku_ids:options.sku
+ }).then(res=>{
+ res.data.map(item=>{
+ item.selected = false;
+ })
+ this.setData({
+ list:res.data
+ })
+ })
+ },
+ selectIt:function(e){
+ wx.showLoading({
+ title: '加载中'
+ })
+ let list = this.data.list,index = e.currentTarget.dataset.index;
+ list.map((item,i)=>{
+ if(i!=index) {
+ item.selected = false;
+ }
+ })
+ list[index].selected = list[index].selected?false:true;
+ this.setData({
+ list:list
+ })
+ wx.hideLoading()
+ },
+ submit:function(){
+ let list = this.data.list,coupon = null;
+ list.map(item=>{
+ if(item.selected){
+ coupon = item;
+ }
+ })
+ console.log(coupon)
+ app.globalData.couponInfo = coupon;
+ util.back()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ }
+})
\ No newline at end of file
diff --git a/pages/order/coupon/index.json b/pages/order/coupon/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/order/coupon/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/coupon/index.wxml b/pages/order/coupon/index.wxml
new file mode 100644
index 0000000..f29fbe0
--- /dev/null
+++ b/pages/order/coupon/index.wxml
@@ -0,0 +1,11 @@
+
+
+
+ {{item.activity.money/100}}
+
+ 满{{item.activity.mini_money/100}}元可用
+ {{item.activity.end_time}}到期
+
+
+
+确定
\ No newline at end of file
diff --git a/pages/order/coupon/index.wxss b/pages/order/coupon/index.wxss
new file mode 100644
index 0000000..9277006
--- /dev/null
+++ b/pages/order/coupon/index.wxss
@@ -0,0 +1,59 @@
+/* pages/order/coupon/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.coupon-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin: 26rpx;
+ background: white;
+ border-radius: 7rpx;
+ height: 136rpx;
+ padding-right: 27rpx;
+}
+.coupon-item .money {
+ color: #D62828;
+ font-size: 67rpx;
+ width: 187rpx;
+ text-align: center;
+ font-weight: 500;
+ flex-shrink: 0;
+}
+.coupon-item .money::before {
+ content: '¥';
+ font-size: 30rpx;
+}
+.coupon-info {
+ flex: 1;
+ margin-right: 20rpx;
+ color: #000;
+ font-size: 31rpx;
+}
+.couon-date {
+ color: #666;
+ font-size: 24rpx;
+}
+.coupon-item .iconfont {
+ font-size: 47rpx;
+ color: #333;
+}
+.coupon-item .iconfont.icon-gou {
+ color: #D62828;
+}
+.coupon-item.disable,.coupon-item.disable .money,.coupon-item.disable .coupon-info,.coupon-item.disable .iconfont,.coupon-item.disable .coupon-info .couon-date {
+ color: #999 !important;
+}
+.coupon-item.disable {
+ background: #ECECEC;
+}
+.btn {
+ margin: 25rpx;
+ line-height: 73rpx;
+ background: #D62828;
+ border-radius: 37rpx;
+ color: #fff;
+ font-size: 36rpx;
+ font-weight: 500;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/pages/order/food/index.js b/pages/order/food/index.js
new file mode 100644
index 0000000..18c0e6d
--- /dev/null
+++ b/pages/order/food/index.js
@@ -0,0 +1,156 @@
+// pages/order/food/index.js
+import userApi from "../../../utils/https/user"
+import commonApi from "../../../utils/https/common"
+let app = getApp();
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ productNum:1,
+ product:app.globalData.product,
+ couponMoney:0,
+ user:"",
+ tel:"",
+ showNoticeFlag:false,
+ coupon:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.couponCom = this.selectAllComponents("#coupon")[0];
+ // 获取下用户信息 易梦静说默认用用户绑定的手机号和昵称
+ this.setData({
+ product:app.globalData.product
+ })
+ userApi.user_post("user/getMyInfo").then(res=>{
+ console.log(res)
+ this.setData({
+ tel:res.data.mobile,
+ user:res.data.fullname?res.data.fullname:""
+ })
+ })
+ console.log(app.globalData.product)
+ },
+ showNotice:function(){
+ this.setData({
+ showNoticeFlag:true
+ })
+ },
+ closeNotice:function(){
+ this.setData({
+ showNoticeFlag:false
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ minus:function(){
+ if(this.data.productNum<=1) return;
+ if(this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ }
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ productNum:(this.data.productNum-1),
+ coupon:null
+ })
+ },
+ add:function(){
+ this.setData({
+ productNum:this.data.productNum+1
+ })
+ },
+ userInput:function(e){
+ this.setData({
+ user:e.detail.value
+ })
+ },
+ telInput:function(e){
+ this.setData({
+ tel:e.detail.value
+ })
+ },
+ order:function(){
+ if(!this.data.user){
+ wx.showToast({
+ title: '请输入预订人',
+ icon: 'none'
+ })
+ return;
+ }
+ if(!this.data.tel){
+ wx.showToast({
+ title: '请输入手机号码',
+ icon: 'none'
+ })
+ return;
+ }
+ let product = this.data.product;
+ let product_list = [{
+ type:product.product.type,
+ product_id:product.product.id,
+ sku_id:product.sku.id,
+ product_num:this.data.productNum,
+ reserve_username:this.data.user,
+ reserve_mobile:this.data.tel
+ }],data = {
+ product_list:product_list,
+ source:"WECHATXCX",
+ coupon_id:this.data.coupon?this.data.coupon.id:null
+ };
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/food/index.json b/pages/order/food/index.json
new file mode 100644
index 0000000..fe0a5a2
--- /dev/null
+++ b/pages/order/food/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "notice":"/pages/component/notice/notice",
+ "coupon":"/pages/order/components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/food/index.wxml b/pages/order/food/index.wxml
new file mode 100644
index 0000000..a483092
--- /dev/null
+++ b/pages/order/food/index.wxml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ {{product.product.title+product.sku.sku_name}}
+
+ ¥{{product.sku.price/100}}
+ 购买须知
+
+
+
+
+ 购票数量
+
+ {{productNum}}
+
+
+
+ 预订人:
+
+
+
+ 手机号码:
+
+
+
+
+
+
+ 合计:¥{{((product.sku.price * productNum - (coupon?coupon.activity.money:0))>0?(product.sku.price * productNum - (coupon?coupon.activity.money:0)):0) / 100}}
+ 立即预约
+
+
\ No newline at end of file
diff --git a/pages/order/food/index.wxss b/pages/order/food/index.wxss
new file mode 100644
index 0000000..37a9558
--- /dev/null
+++ b/pages/order/food/index.wxss
@@ -0,0 +1,134 @@
+/* pages/order/food/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.skuinfo {
+ display: flex;
+ justify-content: space-between;
+ padding: 30rpx 20rpx;
+ margin-bottom: 30rpx;
+}
+.skuinfo image {
+ flex-shrink: 0;
+ width: 174rpx;
+ height: 143rpx;
+ border-radius: 7rpx;
+ margin-right: 23rpx;
+ background: red;
+}
+.right-info {
+ flex: 1;
+ width: 100%;
+}
+.sku-name {
+ font-size: 32rpx;
+ line-height: 47rpx;
+ height: 94rpx;
+ color: #333;
+ margin-bottom: 10rpx;
+}
+.info-tips {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 27rpx;
+ color: #666;
+}
+.info-tips .price {
+ font-size: 33rpx;
+ color: #000;
+}
+.info-tips .price text {
+ font-size: 24rpx;
+}
+.info-tips .iconfont {
+ font-size: 26rpx;
+}
+.box-title .iconfont {
+ font-size: 28rpx;
+ flex-shrink: 0;
+}
+.number-box {
+ font-size: 29rpx;
+ font-weight: 500;
+ color: #000;
+ flex-shrink: 0;
+ width: 67rpx;
+ line-height: 49rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 20rpx;
+}
+.line {
+ margin: 0 20rpx;
+ background: #ccc;
+ height: 1rpx;
+}
+.topbox .box-title {
+ border-top: 1rpx solid #ccc;
+}
+.box-title input {
+ flex: 1;
+ display: block;
+ font-size: 31rpx;
+ color: #666;
+ margin-left: 15rpx;
+ font-weight: 400;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+}
+.fixed-btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ text-align: center;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.fixed-price-box {
+ margin-left: 25rpx;
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.fixed-price-box .price {
+ color: #D62828;
+ font-size: 36rpx;
+ margin-left: 10rpx;
+}
\ No newline at end of file
diff --git a/pages/order/hotel/index.js b/pages/order/hotel/index.js
new file mode 100644
index 0000000..d3f8800
--- /dev/null
+++ b/pages/order/hotel/index.js
@@ -0,0 +1,341 @@
+// pages/order/hotel/index.js
+import commonApi from "../../../utils/https/common"
+import userApi from "../../../utils/https/user"
+let app = getApp();
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ safeBottom:app.globalData.safeBottom,
+ showNoticeFlag:false,
+ roomNumbers:[1,2,3,4,5,6,7,8],
+ times:['14:00','15:00','16:00','17:00','18:00','19:00','20:00','21:00','22:00','23:00','23:59',"次日1:00","次日2:00","次日3:00","次日4:00","次日5:00","次日6:00"],
+ timeIndex:0,
+ numberIndex:0,
+ showInfoFlag:false,
+ showFeeFlag:false,
+ CtripHotelCart:null,
+ wifis:['无WiFi','收费WiFi','免费WiFi'],
+ wiredNetworks:['无有线宽带','收费有线宽带','免费有线宽带'],
+ showInfoMoreFlag:false,
+ selectLinkman:[],
+ customerNum:0,
+ customerName:[],
+ coupon:null,
+ tel:'',
+ priceInfo:[],
+ showMask:false,
+ editId:null,
+ linkmanList:[]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.couponCom = this.selectAllComponents("#coupon")[0];
+ let CtripHotelCart = app.globalData.product;
+ // 获取默认联系人
+ userApi.user_post("user/getDefaultContact",{
+ contactType:"CONTACT"
+ }).then(res=>{
+ if(res.data){
+ this.setData({
+ selectLinkman:[res.data],
+ tel:res.data.tel
+ })
+ }
+ this.getLinkmanList()
+ })
+ let roomNumbers = []
+ for(let i=0;i<10;i++){
+ roomNumbers.push(i+1)
+ }
+ this.setData({
+ roomNumbers:roomNumbers,
+ CtripHotelCart:CtripHotelCart
+ })
+ commonApi.user_post("product/product_date_price",{
+ sku_id:CtripHotelCart.id,
+ end_date:CtripHotelCart.endDate,
+ start_date:CtripHotelCart.startDate
+ }).then(res=>{
+ res.data.splice(0,1);
+ this.setData({
+ priceInfo:res.data
+ })
+ console.log(res)
+ })
+ },
+ inputTel:function(e){
+ this.setData({
+ tel:e.detail.value
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ // 显示房型详情
+ showInfo:function(){
+ this.setData({
+ showInfoFlag:!this.data.showInfoFlag
+ })
+ },
+ // 房型详情显示更多
+ showInfoMore:function(){
+ this.setData({
+ showInfoMoreFlag:!this.data.showInfoMoreFlag
+ })
+ },
+ // 显示价格明细
+ showFee:function(){
+ this.setData({
+ showFeeFlag:!this.data.showFeeFlag
+ })
+ },
+ // 修改房间数量
+ changeNumber:function(e){
+ if(Number(e.detail.value){
+ linkman.selected = 0;
+ selectLinkman.map(item=>{
+ if(item.id==linkman.id){
+ linkman.selected = 1;
+ }
+ })
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ this.showLinkman()
+ },
+ confirm:function(){
+ let linkmanList = this.data.linkmanList,selectLinkman = [];
+ linkmanList.map(linkman=>{
+ if(linkman.selected==1){
+ selectLinkman.push(linkman);
+ }
+ })
+ if(selectLinkman.length>(this.data.numberIndex+1)){
+ this.setData({
+ numberIndex:selectLinkman.length-1
+ })
+ }
+ if(selectLinkman.length>0){
+ this.setData({
+ tel:selectLinkman[0].tel
+ })
+ }
+ this.setData({
+ selectLinkman:selectLinkman
+ })
+ this.showLinkman()
+ },
+ getLinkmanList:function(){
+ // 直接获取1000条出行人信息 就不要分页了
+ userApi.user_post("user/getContactOrConsignee",{
+ contactType:"CONTACT",
+ offset:0,
+ limit:1000
+ }).then(res=>{
+ let list = res.data;
+ list.map(item=>{
+ this.data.selectLinkman.map(linkman=>{
+ if(linkman.id==item.id){
+ item.selected = 1;
+ }
+ })
+ })
+ this.setData({
+ linkmanList:list
+ })
+ })
+ },
+ setDefault:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList;
+ userApi.user_post("user/setDefaultContact",{
+ contactId:item.id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '设置成功',
+ icon: 'success'
+ })
+ linkmanList.map(linkman=>{
+ if(linkman.id==item.id){
+ linkman.is_default=1;
+ }
+ else {
+ linkman.is_default = 0;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ })
+ },
+ selectIt:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList;
+ linkmanList.map(linkman=>{
+ if(item.id==linkman.id){
+ linkman.selected = item.selected==1?0:1
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ if(this.data.editId){
+ // 如果是去编辑的
+ let editId = this.data.editId;
+ userApi.user_post("user/getContactInfoById",{
+ id:editId
+ }).then(res=>{
+ let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList;
+ selectLinkman.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.id_number = res.data.id_number;
+ item.is_default = res.data.is_default;
+ }
+ else if(res.data.is_default==1){
+ item.is_default = 0;
+ }
+ })
+ linkmanList.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.id_number = res.data.id_number;
+ item.is_default = res.data.is_default;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList,
+ selectLinkman:selectLinkman
+ })
+ })
+ }
+ else {
+ this.getLinkmanList()
+ }
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+ // 去支付
+ gotoPay:function(){
+ // let CtripHotelCart = this.data.CtripHotelCart;
+ // 判断入住人姓名是否和房间数量一致
+ console.log(this.data.selectLinkman)
+ let customerName = this.data.selectLinkman,numberIndex = this.data.numberIndex+1;
+ if(customerName.length{
+ selectLinkman.push(item.name);
+ })
+ let product = this.data.CtripHotelCart;
+ let data = {
+ coupon_id:this.data.coupon?this.data.coupon.id:null,
+ source:"WECHATXCX",
+ product_list:[{
+ type : "hotel",//酒店
+ product_id: product.product_id,
+ sku_id:product.id,
+ start_date:product.startDate,
+ end_date:product.endDate,
+ reserve_mobile:this.data.tel,
+ customer_name:selectLinkman.join(","),
+ product_num:numberIndex
+ }]
+ }
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ }).catch(err=>{
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+ app.globalData.coupon = null;
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+ })
\ No newline at end of file
diff --git a/pages/order/hotel/index.json b/pages/order/hotel/index.json
new file mode 100644
index 0000000..8172ad6
--- /dev/null
+++ b/pages/order/hotel/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "coupon":"/pages/order/components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/hotel/index.wxml b/pages/order/hotel/index.wxml
new file mode 100644
index 0000000..fe10e3f
--- /dev/null
+++ b/pages/order/hotel/index.wxml
@@ -0,0 +1,126 @@
+
+
+
+
+
+ {{CtripHotelCart.startDateText}} 周{{CtripHotelCart.startDay}}
+ {{CtripHotelCart.days}}晚
+ {{CtripHotelCart.endDateText}} 周{{CtripHotelCart.endDay}}
+
+
+ {{CtripHotelCart.sku_name}}
+
+ {{CtripHotelCart.sku_model.area}}
+ {{CtripHotelCart.sku_model.bed_type}}
+ {{CtripHotelCart.sku_model.breakfast}}
+
+
+
+
+ 入住信息
+ 姓名与证件保持一致,每间只需填1人
+
+
+ 房间数量
+
+
+
+ {{numberIndex+1}}间 每间最多住{{CtripHotelCart.sku_model.max_room_num}}人
+
+
+
+
+
+
+
+
+ 房间{{index+1}}
+
+ 住客姓名
+
+
+
+
+
+
+
+
+
+ 手机号
+
+
+
+
+
+
+
+ 费用明细
+
+ {{CtripHotelCart.days}}晚,{{numberIndex+1}}间共¥{{CtripHotelCart.price_sum/100 * (numberIndex+1)}}
+
+
+
+
+ {{item.date+" "+CtripHotelCart.sku_model.breakfast}}
+
+
+ {{numberIndex+1}} x ¥{{item.price/100}}
+
+
+
+
+
+
+
+ 在线支付:¥{{(CtripHotelCart.price_sum/100 * (numberIndex+1) - (coupon?coupon.activity.money/100:0))>0?CtripHotelCart.price_sum/100 * (numberIndex+1) - (coupon?coupon.activity.money/100:0):0}}
+ 每晚明细
+ 去支付
+
+
+
+
+
+
+ 在线支付
+ {{CtripHotelCart.days}}晚,{{numberIndex+1}}间共¥{{CtripHotelCart.price_sum/100 * (numberIndex+1)}}
+
+
+
+ {{item.date+" "+CtripHotelCart.sku_model.breakfast}}
+
+
+ {{numberIndex+1}} x ¥{{item.price/100}}
+
+
+
+
+ 优惠金额
+
+
+ -{{coupon.activity.money/100}}
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+ 添加出行人
+
+
+
+ {{item.name}}
+
+ 手机号 {{item.tel}}
+ 身份证 {{item.id_number}}
+
+
+
+ 设为默认出行人
+
+
+
\ No newline at end of file
diff --git a/pages/order/hotel/index.wxss b/pages/order/hotel/index.wxss
new file mode 100644
index 0000000..bb102fe
--- /dev/null
+++ b/pages/order/hotel/index.wxss
@@ -0,0 +1,435 @@
+/* pages/order/ctriphotel/index.wxss */
+.box {
+ background: white;
+ font-size: 28rpx;
+ color: #000;
+ margin: 25rpx;
+ border-radius: 9rpx;
+ margin-bottom: 18rpx;
+}
+page {
+ background: #f7f7f7;
+}
+.box1 {
+ padding: 40rpx 47rpx;
+ font-size: 28rpx;
+ color: #000;
+ margin-bottom: 18rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.top-box {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ color: #5CC05F;
+ height: 36rpx;
+}
+.top-box text {
+ font-weight: 500;
+ color: #000;
+}
+.top-box .night-number {
+ line-height: 28rpx;
+ border: 1rpx solid #cacaca;
+ padding: 0 20rpx;
+ font-size: 22rpx;
+ color: #333;
+ margin: 0 26rpx;
+ border-radius: 15rpx;
+}
+.top-tip {
+ flex: 1;
+ text-align: right;
+}
+.sku-name {
+ font-weight: 500;
+ line-height: 50rpx;
+ margin-bottom: 10rpx;
+}
+.tags {
+ display: flex;
+ flex-wrap: wrap;
+ color: #FF632C;
+ font-size: 20rpx;
+ line-height: 28rpx;
+ padding-bottom: 8rpx;
+}
+.tag {
+ margin-right: 9rpx;
+ border-radius: 14rpx;
+ background: rgba(11, 137, 142, .2);
+ padding: 0 16rpx;
+ color: #0B898E;
+}
+.top-box image {
+ width: 36rpx;
+ height: 36rpx;
+ display: block;
+ margin-right: 12rpx;
+}
+.top-box1 {
+ height: 113rpx;
+ align-items: center;
+ padding: 0 20rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.top-box1 text {
+ font-size: 32rpx;
+}
+.top-tip2 {
+ font-size: 22rpx;
+ color: #808080;
+ flex: 1;
+ margin-left: 30rpx;
+ margin-top: 6rpx;
+}
+.line-box {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 109rpx;
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid #cacaca;
+}
+.line-box .iconfont {
+ color: #666666;
+ font-size: 22rpx;
+}
+.line-box text {
+ width: 240rpx;
+ text-align: left;
+ color: #808080;
+ font-weight: 400;
+}
+.line-box-text {
+ font-weight: 500;
+ flex: 1;
+}
+.line-box1 {
+ height: 109rpx;
+}
+.box .line-box1:last-child {
+ border-bottom: none;
+}
+.line-box image {
+ width: 53rpx;
+ height: 52rpx;
+ margin-left: 32rpx;
+ display: block;
+}
+.line-box-tip {
+ font-size: 20rpx;
+ color: #333;
+ margin-bottom: 6rpx;
+ font-weight: 400;
+}
+.pay-info-box {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.pay-info-box-left {
+ font-weight: 500;
+}
+.pay-info-box-right {
+ font-size: 26rpx;
+ color: #666;
+}
+.pay-info-box-right text {
+ color: #FB6E4D;
+ margin-left: 20rpx;
+}
+.pay-info-box2 {
+ align-items: flex-start;
+ font-size: 26rpx;
+ line-height: 52rpx;
+ color: #666;
+ margin: 20rpx;
+ padding-bottom: 20rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ height: 100rpx;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ font-weight: 500;
+ font-size: 30rpx;
+ padding-left: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ box-shadow:0px -1rpx 7rpx 0px rgba(153,153,153,0.3);
+ z-index: 98;
+}
+.price-all {
+ line-height: 100rpx;
+ flex: 1;
+}
+.price-all text {
+ font-size: 36rpx;
+ color: #FB6E4D;
+}
+.price-tip {
+ color: #FB6E4D;
+ font-size: 24rpx;
+ margin: 30rpx;
+ flex-shrink: 0;
+}
+.pay-btn {
+ color: #Fff;
+ background: #FB6E4D;
+ font-size: 36rpx;
+ width: 272rpx;
+ line-height: 100rpx;
+ text-align: center;
+ flex-shrink: 0;
+}
+.mask-content.fee-mask-box {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ padding: 30rpx 0;
+ border-radius: 0;
+ width: 100%;
+ max-height: 60%;
+ min-height: 30%;
+}
+.mask-title {
+ text-align: center;
+ margin-bottom: 50rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+}
+.mask .iconfont {
+ position: absolute;
+ right: 30rpx;
+ top: 30rpx;
+ font-size: 32rpx;
+}
+.mask .icon-ic_searchclosed {
+ color: rgba(0, 0, 0,0.4);
+ font-size: 40rpx;
+}
+.fee-mask-box {
+ font-size: 28rpx;
+ padding: 20rpx 30rpx;
+ box-sizing: border-box;
+ min-height: 0;
+ bottom: 100rpx;
+}
+.fee-mask-box .pay-info-box2 {
+ border-bottom: none;
+ padding-bottom: 0;
+ margin-bottom: 0;
+}
+.notice-hotel-box {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ min-height: 40%;
+ max-height: 70%;
+ background: white;
+ border-radius: 20rpx 20rpx 0 0;
+ overflow: auto;
+}
+.icon-ic_searchclosed {
+ position: absolute;
+ right: 18rpx;
+ top: 16rpx;
+ font-size: 60rpx;
+ color: rgba(0, 0, 0,0.5);
+ z-index: 2;
+}
+.bottom-btns {
+ display: flex;
+ align-items: center;
+ line-height: 100rpx;
+ text-align: center;
+ background: white;
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ font-size: 30rpx;
+}
+.notice-price {
+ font-size: 36rpx;
+ color: #FB6E4D;
+}
+.notice-price-box {
+ width: 430rpx;
+}
+.notice-btn {
+ background: #FB6E4D;
+ color: white;
+ font-size: 36rpx;
+ width: 320rpx;
+}
+.sku-box {
+ margin: 22rpx;
+ background: white;
+ border-radius: 10rpx;
+ font-size: 30rpx;
+ padding: 24rpx 17rpx;
+}
+.form-box {
+ display: flex;
+ border: 1rpx solid #CCCCCC;
+ font-size: 24rpx;
+ font-weight: 500;
+ text-align: center;
+ border-bottom: none;
+ flex-wrap: wrap;
+ border-right: none;
+ margin: 22rpx;
+}
+.form-item {
+ width: 25%;
+ flex-shrink: 0;
+ box-sizing: border-box;
+ border-right: 1rpx solid #ccc;
+ border-bottom: 1rpx solid #ccc;
+ line-height: 60rpx;
+}
+.fee-box {
+ display: flex;
+ font-size: 24rpx;
+ margin: 22rpx;
+}
+.fee-box-in {
+ flex: 1;
+ font-weight: 500;
+ margin-left: 45rpx;
+}
+.notice-more {
+ text-align: center;
+ color: #5CC060;
+ font-size: 26rpx;
+ line-height: 50rpx;
+ margin-bottom: 30rpx;
+}
+.notice-more .iconfont {
+ font-size: 26rpx;
+ margin-left: 20rpx;
+ position: static;
+}
+.coupon-box {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin: 0 25rpx;
+ height: 120rpx;
+ background: white;
+ padding: 0 20rpx;
+ margin-bottom: 20rpx;
+ border-radius: 9rpx;
+}
+.coupon-btn {
+ width: 140rpx;
+ line-height: 57rpx;
+ border: 1rpx solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.dfbd-bottom {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 70rpx;
+ background: linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,1),rgba(255,255,255,0));
+ z-index: 2;
+ bottom: 0;
+}
+.main-img {
+ display: block;
+ width: 100%;
+ height: 400rpx;
+}
+.notice-hotel-box .icon-ic_searchclosed {
+ position: absolute;
+ right: 18rpx;
+ top: 16rpx;
+ font-size: 60rpx;
+ color: rgba(0, 0, 0,0.5);
+ z-index: 2;
+}
+.linkmanlist-item {
+ background: white;
+ margin-bottom: 24rpx;
+ border-radius: 9rpx;
+}
+.linkmanlist-item-top {
+ display: flex;
+ margin: 0 20rpx;
+ padding: 30rpx 13rpx;
+ border-bottom: 1rpx dashed #ccc;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #666;
+ font-size: 25rpx;
+}
+.linkmanlist-item-top .iconfont {
+ flex-shrink: 0;
+ font-size: 42rpx;
+ position: static;
+}
+.linkman-nickname {
+ font-size: 29rpx;
+ color: #000;
+ margin-left: 50rpx;
+}
+.linkman-info {
+ flex: 1;
+ margin: 0 30rpx;
+}
+.linkmanlist-item-top .icon-gou {
+ color: #D62828;
+}
+.linkmanlist-tip {
+ line-height: 70rpx;
+ font-size: 24rpx;
+ color: #666;
+ margin: 0 34rpx;
+}
+.linkmanlist-tip .iconfont {
+ margin-right: 4rpx;
+ font-size: 23rpx;
+}
+.add-btn1 {
+ width: 218rpx;
+ line-height: 72rpx;
+ border: 1rpx solid #333333;
+ border-radius: 37rpx;
+ text-align: center;
+ font-size: 29rpx;
+ color: #000;
+ margin: 25rpx auto;
+}
+.mask-content.linkman-mask {
+ width: 700rpx;
+ padding: 0 25rpx;
+ background: #F7F7F7;
+}
+.btns {
+ display: flex;
+ justify-content: space-between;
+ font-size: 31rpx;
+ color: #000;
+ margin-bottom: 10rpx;
+ line-height: 90rpx;
+}
+.add-btn {
+ line-height: 80rpx;
+ background: #FFFFFF;
+ text-align: center;
+ border-radius: 40rpx;
+ font-size: 29rpx;
+ color: #000;
+ margin-bottom: 24rpx;
+}
\ No newline at end of file
diff --git a/pages/order/movie/index.js b/pages/order/movie/index.js
new file mode 100644
index 0000000..98bb663
--- /dev/null
+++ b/pages/order/movie/index.js
@@ -0,0 +1,135 @@
+// pages/order/movie/index.js
+import util from "../../../utils/util"
+import commonApi from "../../../utils/https/common"
+import userApi from "../../../utils/https/user"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ key:"",
+ tel:'',
+ product:null,
+ price:0,
+ coupon:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let key = options.key;
+ if(!key){
+ util.back()
+ return;
+ }
+ let product = app.globalData.product,price=0;
+ product.info.selectSeatInfo.map(item=>{
+ price = Number(item.price) + Number(price)
+ })
+ this.setData({
+ product:product,
+ key:key,
+ price:price
+ })
+ userApi.user_post("user/getMyInfo").then(res=>{
+ this.setData({
+ tel:res.data.mobile
+ })
+ })
+ },
+ changeTel:function(e){
+ this.setData({
+ tel:e.detail.value
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ order:function(){
+ if(!this.data.tel){
+ wx.showToast({
+ title: '请输入手机号',
+ icon:'none'
+ })
+ return;
+ }
+ let product = this.data.product,seats_list=[],seats_ids=[];
+ product.info.selectSeatInfo.map(item=>{
+ seats_list.push(item.name);
+ seats_ids.push({
+ ext_id:item.ext_id,
+ area:item.area || "",
+ flag:Number(item.flag)
+ })
+ })
+ let product_list = [{
+ "type" : "movie",//电影,必填
+ "product_id": product.product.id,
+ "sku_id": product.product.sku_info.id,
+ "product_num": product.info.selectSeatInfo.length,//也就是锁定的座位数,必填
+ "reserve_mobile": this.data.tel,
+ "use_date": product.info.show_date,//使用日期,Y-m-d日期格式字符串,必填
+ "use_time": product.info.start_end_time,//场次时间,直接传字符串,必填
+ "show_version": product.info.show_version,//场次版本,必填
+ "scene_id": product.product.scene_id,//场景id,我方系统的场景id,必填
+ "schedules_name": product.info.hallName,//放映厅名称,必填
+ "seats_list": seats_list.join(","),//座位中文名称,多个座位逗号分隔,必填
+ "key": this.data.key,//锁座返回的key,必填
+ "schedules_id": product.info.schedule_id,//淘票票场次id,必填
+ "seats_ids": seats_ids
+ }];
+ let data = {
+ product_list:product_list,
+ source:"WECHATXCX",
+ coupon_id:this.data.coupon?this.data.coupon.id:null
+ }
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/movie/index.json b/pages/order/movie/index.json
new file mode 100644
index 0000000..8172ad6
--- /dev/null
+++ b/pages/order/movie/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "coupon":"/pages/order/components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/movie/index.wxml b/pages/order/movie/index.wxml
new file mode 100644
index 0000000..fb3730b
--- /dev/null
+++ b/pages/order/movie/index.wxml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ {{product.info.movieName}}
+ {{product.info.show_date}} {{product.info.start_end_time}}{{product.info.show_version}}
+ {{product.info.cinema_title}}
+ {{product.info.hallName}} {{item.name}}
+
+
+
+ 手机号码:
+
+
+
+
+
+
+ ¥{{((price - (coupon?coupon.activity.money:0))>0?(price - (coupon?coupon.activity.money:0)):0)/100}}
+ 总计优惠{{coupon?coupon.activity.money/100:0}}元
+
+
+ 立即付款
+
\ No newline at end of file
diff --git a/pages/order/movie/index.wxss b/pages/order/movie/index.wxss
new file mode 100644
index 0000000..11ba0af
--- /dev/null
+++ b/pages/order/movie/index.wxss
@@ -0,0 +1,108 @@
+/* pages/order/movie/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.info-box {
+ background: white;
+ border-radius: 7rpx;
+ margin: 25rpx;
+ padding: 0 21rpx;
+}
+.info-top {
+ display: flex;
+ padding-top: 30rpx;
+ padding-bottom: 41rpx;
+ border-bottom: 1rpx solid #ccc;
+ font-size: 27rpx;
+ color: #999;
+ justify-content: space-between;
+}
+.info-top image {
+ width: 173rpx;
+ height: 196rpx;
+ border-radius: 7rpx;
+ margin-right: 22rpx;
+ flex-shrink: 0;
+}
+.info {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+}
+.info .title {
+ font-size: 35rpx;
+ color: #000;
+ font-weight: 500;
+ margin-bottom: 20rpx;
+}
+.tel-box {
+ display: flex;
+ align-items: center;
+ height: 126rpx;
+ font-size: 31rpx;
+ justify-content: space-between;
+}
+.tel-box>text {
+ color: #000;
+ font-weight: 500;
+ flex-shrink: 0;
+}
+.tel-box input {
+ flex: 1;
+ display: block;
+}
+.info-box .btn {
+ width: 140rpx;
+ line-height: 58rpx;
+ border: 1rpx solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ color: #000;
+ font-size: 28rpx;
+}
+.youhui-text {
+ font-size: 28rpx;
+}
+.youhui-text .iconfont {
+ font-size: 26rpx;
+ margin-left: 10rpx;
+}
+.fixed-bottom {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 25rpx;
+ height: 113rpx;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+.money-box {
+ font-size: 23rpx;
+ color: #666666;
+ flex: 1;
+}
+.money-box .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.fixed-bottom .tip {
+ font-size: 27rpx;
+ color: #D62828;
+ flex-shrink: 0;
+ margin: 0 63rpx;
+}
+.fixed-bottom .btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ color: #fff;
+ text-align: center;
+ background: #D62828;
+ font-size: 36rpx;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/pages/order/pay/index.js b/pages/order/pay/index.js
new file mode 100644
index 0000000..0bf6552
--- /dev/null
+++ b/pages/order/pay/index.js
@@ -0,0 +1,152 @@
+// pages/order/pay/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:null,
+ info:null,
+ second:"00",
+ minute:"00"
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ else {
+ util.back()
+ }
+ this.setData({
+ info:res.data
+ })
+ })
+ this.checkPay();
+
+ },
+ checkPay:function(){
+ commonApi.user_post("order/query_pay_result",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.code==1){
+ wx.showToast({
+ title: '订单已支付',
+ icon:'success'
+ })
+ setTimeout(()=>{
+ wx.reLaunch({
+ url: '/pages/user/order/list',
+ })
+ },1000)
+ return;
+ }
+ })
+ },
+ pay:function(){
+ let _this = this;
+ commonApi.user_post("order/pay",{
+ order_id:this.data.id,
+ pay_method:"WEIXIN",
+ pay_platform:"MINI",
+ app_name:"WxXcxConfig"
+ }).then(res=>{
+ res.data = JSON.parse(res.data)
+ wx.requestPayment({
+ nonceStr: res.data.nonceStr,
+ package: res.data.package,
+ paySign: res.data.paySign,
+ timeStamp:""+res.data.timeStamp,
+ signType:res.data.signType,
+ success:function(res){
+ wx.showToast({
+ title: '支付成功',
+ icon:'success'
+ })
+ setTimeout(()=>{
+ wx.reLaunch({
+ url: '/pages/user/order/list',
+ })
+ },1000)
+ },
+ fail:function(err){
+ console.log(err)
+ }
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer)
+ timer = null;
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/pay/index.json b/pages/order/pay/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/order/pay/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/pay/index.wxml b/pages/order/pay/index.wxml
new file mode 100644
index 0000000..adaeb82
--- /dev/null
+++ b/pages/order/pay/index.wxml
@@ -0,0 +1,19 @@
+
+
+
+ 支付剩余时间
+ {{minute}}:{{second}}
+
+ 应付金额:
+ ¥{{info.paid_money/100}}
+
+
+
+ 支付方式:
+
+
+ 微信支付
+
+
+
+立即付款
\ No newline at end of file
diff --git a/pages/order/pay/index.wxss b/pages/order/pay/index.wxss
new file mode 100644
index 0000000..f759b9a
--- /dev/null
+++ b/pages/order/pay/index.wxss
@@ -0,0 +1,62 @@
+/* pages/order/pay/index.wxss */
+.btn {
+ text-align: center;
+ line-height: 74rpx;
+ border-radius: 37rpx;
+ background: #d62828;
+ color: #fff;
+ margin: 100rpx 25rpx;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+page {
+ background: white;
+ font-size: 24rpx;
+ color: #666;
+}
+.tip-box {
+ text-align: center;
+ border-bottom: 1rpx solid #ccc;
+ margin: 0 25rpx;
+ padding-bottom: 30rpx;
+ padding-top: 53rpx;
+}
+.tip-box .time {
+ font-size: 56rpx;
+ color: #000;
+ margin-top: 30rpx;
+ margin-bottom: 30rpx;
+}
+.tip-price {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.tip-price .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.pay-methods-box {
+ margin: 0 25rpx;
+ padding-top: 40rpx;
+}
+.pay-method {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-top: 20rpx;
+}
+.pay-method .method-name {
+ margin: 0 20rpx;
+ font-size: 27rpx;
+ color: #000;
+ text-align: left;
+ flex: 1;
+}
+.pay-method .icon-weixin1 {
+ font-size: 72rpx;
+ color: #3AA632;
+}
+.icon-iconfontoptionbutton {
+ font-size: 32rpx;
+}
\ No newline at end of file
diff --git a/pages/order/postOrder/index.js b/pages/order/postOrder/index.js
new file mode 100644
index 0000000..e1b812a
--- /dev/null
+++ b/pages/order/postOrder/index.js
@@ -0,0 +1,214 @@
+// pages/order/post/index.js
+let app = getApp()
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ product:[],
+ showPrice:0,
+ from:null,
+ address:null,
+ postFee:0,
+ coupon:null,
+ sku_id:''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ product:app.globalData.postProduct,
+ from:options.from
+ })
+ let price = 0,sku_id=[];
+ app.globalData.postProduct.map(item=>{
+ price = price + item.sku.price * item.productNum;
+ sku_id.push(item.sku.id)
+ })
+ this.setData({
+ showPrice:price,
+ sku_id:sku_id.join(",")
+ })
+ this.couponCom = this.selectAllComponents("#coupon")[0];
+ },
+ inputRemark:function(e){
+ let index = e.currentTarget.dataset.index,product = this.data.product;
+ product[index].remark = e.detail.value;
+ this.setData({
+ product:product
+ })
+ },
+ setAddress:function(e){
+ this.setData({
+ address:e.detail
+ })
+ this.getPostFee()
+ },
+ minus:function(e){
+ let index = e.currentTarget.dataset.index,product = this.data.product;
+ let productNum = product[index].productNum;
+ if(productNum<=1) return;
+
+ product[index].productNum--;
+ this.setData({
+ product:product,
+ coupon:null
+ })
+ this.getPostFee()
+ this.changePrice()
+ },
+ add:function(e){
+ let index = e.currentTarget.dataset.index,product = this.data.product;
+ product[index].productNum = product[index].productNum+1;
+ this.setData({
+ product:product,
+ coupon:null
+ })
+ this.getPostFee()
+ this.changePrice()
+ },
+ changePrice:function(){
+ let product = this.data.product,price=0;
+ product.map(item=>{
+ price = price + item.sku.price * item.productNum;
+ })
+ if(this.data.coupon && this.data.showPrice!=price){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ app.globalData.couponInfo = null;
+ this.couponCom.setNullCoupon()
+ this.setData({
+ coupon:null
+ })
+ }
+ this.setData({
+ showPrice:price
+ })
+ },
+ order:function(){
+ if(!this.data.address){
+ wx.showToast({
+ title: '请选择收货地址!',
+ icon:'none'
+ })
+ return;
+ }
+ let product = this.data.product,product_list=[];
+ product.map(item=>{
+ let productItem = {
+ type:item.product.type,
+ product_id:item.product.id,
+ sku_id:item.sku.id,
+ post:this.data.address.id,
+ product_num:item.productNum,
+ remark:item.remark
+ }
+ product_list.push(productItem)
+ })
+ let data = {
+ source:"WECHATXCX",
+ product_list:product_list,
+ coupon:this.data.coupon?this.data.coupon.id:null
+ };
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ console.log(res)
+ })
+ },
+ getPostFee:function(){
+ if(!this.data.address) return;
+ let product = this.data.product,list=[],that = this;
+ product.map(item=>{
+ list.push(commonApi.user_post("order/get_post_price",{
+ sku_id:item.sku.id,
+ num:item.productNum,
+ consignee_id:that.data.address.id
+ }))
+ })
+ // 获取邮费
+ Promise.all(list).then(res=>{
+ let postFee = 0,flag = true;
+ res.map((item,index)=>{
+ if(item.data.price<0) flag = false;
+ postFee = postFee+Number(item.data.price);
+ product[index].postFee = item.data.price;
+ })
+ if(!flag){
+ wx.showToast({
+ title: '该地区不发货',
+ icon:'none'
+ })
+ product.map(item=>{
+ item.postFee = 0;
+ })
+ postFee = 0;
+ }
+ if(this.data.coupon && this.data.postFee!=postFee){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ app.globalData.couponInfo = null;
+ this.couponCom.setNullCoupon()
+ this.setData({
+ coupon:null
+ })
+ }
+ this.setData({
+ postFee:postFee,
+ product:product
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/postOrder/index.json b/pages/order/postOrder/index.json
new file mode 100644
index 0000000..e69fb76
--- /dev/null
+++ b/pages/order/postOrder/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "address":"../components/address/index",
+ "coupon":"../components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/postOrder/index.wxml b/pages/order/postOrder/index.wxml
new file mode 100644
index 0000000..db1942a
--- /dev/null
+++ b/pages/order/postOrder/index.wxml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+ {{item.product.title}}
+ ¥{{item.sku.price/100}}
+
+
+ {{item.sku.sku_name}}
+ x{{item.productNum}}
+
+
+
+
+
+ 购票数量
+
+ {{item.productNum}}
+
+
+
+ 运费
+ {{item.postFee?(item.postFee==0?'包邮':(item.postFee/100)):item.sku.sku_model.post_template_name}}
+
+
+ 订单备注:
+
+
+
+ 小计:¥{{item.sku.price/100 * item.productNum}}
+
+
+
+
+
+ 合计:¥{{((showPrice + postFee - (coupon?coupon.activity.money:0))>0?(showPrice + postFee - (coupon?coupon.activity.money:0)):0)/100}}
+ 提交订单
+
\ No newline at end of file
diff --git a/pages/order/postOrder/index.wxss b/pages/order/postOrder/index.wxss
new file mode 100644
index 0000000..8363b90
--- /dev/null
+++ b/pages/order/postOrder/index.wxss
@@ -0,0 +1,165 @@
+/* pages/order/post/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.skuinfo {
+ display: flex;
+ justify-content: space-between;
+ padding: 30rpx 20rpx;
+ margin-bottom: 30rpx;
+}
+.skuinfo image {
+ flex-shrink: 0;
+ width: 174rpx;
+ height: 143rpx;
+ border-radius: 7rpx;
+ margin-right: 23rpx;
+}
+.right-info {
+ flex: 1;
+ width: 100%;
+}
+.sku-name {
+ font-size: 32rpx;
+ line-height: 47rpx;
+ color: #333;
+ margin: 10rpx 0;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.info-tips {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 27rpx;
+ color: #666;
+}
+.info-tips .price {
+ font-size: 33rpx;
+ color: #000;
+ flex: 1;
+ margin-left: 10rpx;
+}
+.info-tips .price text {
+ font-size: 24rpx;
+}
+.info-tips .iconfont {
+ font-size: 26rpx;
+}
+.box-title .iconfont {
+ font-size: 28rpx;
+ flex-shrink: 0;
+}
+.number-box {
+ font-size: 29rpx;
+ font-weight: 500;
+ color: #000;
+ flex-shrink: 0;
+ width: 67rpx;
+ line-height: 49rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 20rpx;
+}
+.line {
+ margin: 0 20rpx;
+ background: #ccc;
+ height: 1rpx;
+}
+.topbox .box-title {
+ border-top: 1rpx solid #ccc;
+}
+.box-title input {
+ flex: 1;
+ display: block;
+ font-size: 31rpx;
+ color: #666;
+ margin-left: 15rpx;
+ font-weight: 400;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ z-index: 1;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+}
+.fixed-btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ text-align: center;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.fixed-price-box {
+ margin-left: 25rpx;
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.fixed-price-box .price {
+ color: #D62828;
+ font-size: 36rpx;
+ margin-left: 10rpx;
+}
+.all-money-box {
+ margin: 0 20rpx;
+ display: flex;
+ justify-content: flex-end;
+ font-size: 27rpx;
+ height: 80rpx;
+ align-items: center;
+ border-top: 1rpx solid #ccc;
+ color: #000;
+}
+.all-money-box text {
+ color: #D62828;
+}
+.all-money-box .unit {
+ font-size: 24rpx;
+}
+.all-money-box .s-price {
+ font-size: 33rpx;
+}
+.header-title {
+ font-size: 31rpx;
+ font-weight: 500;
+ color: #000;
+ line-height: 113rpx;
+ padding: 0 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
\ No newline at end of file
diff --git a/pages/order/road/index.js b/pages/order/road/index.js
new file mode 100644
index 0000000..294eeca
--- /dev/null
+++ b/pages/order/road/index.js
@@ -0,0 +1,269 @@
+// pages/order/road/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ monthDays1:[0,0],
+ monthDays2:[0,0],
+ month:[],
+ monthIndex:0,
+ prices:{},
+ selectDate:null,
+ id:21,
+ sku:[],
+ nums:[],
+ price:0,
+ infoFlag:false,
+ productInfo:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ // 获取产品下的规格
+ commonApi._post("product/get_product_detail",{
+ id:this.data.id
+ }).then(res=>{
+ let nums = [];
+ res.data.sku.map(item=>{
+ nums.push(0)
+ })
+ for(let i=0;ires.data.sku[j].id){
+ [res.data.sku[i],res.data.sku[j]] = [res.data.sku[j],res.data.sku[i]]
+ }
+ }
+ }
+ this.setData({
+ productInfo:res.data,
+ sku:res.data.sku,
+ nums:nums
+ })
+ })
+ this.initDate()
+ },
+ changeMonth:function(e){
+ this.setData({
+ monthIndex:e.currentTarget.dataset.index
+ })
+ },
+ initDate(){
+ let today = new Date(),month1 = today.getMonth()+1,month2 = (month1 + 1) % 12,year = today.getFullYear(),year2 = month1{
+ let prices={};
+ res.data.map(item=>{
+ // 给规格排序
+ for(let i=0;iitem.info[j].sku_info.id){
+ [item.info[i],item.info[j]] = [item.info[j],item.info[i]]
+ }
+ }
+ }
+ let stock = 0;
+ item.info.map(i=>{
+ stock = stock+i.stock;
+ })
+ item.stock = stock;
+ if(item.stock>0){
+ let date = item.date.split("-").splice(1,2),newDate=[];
+ console.log(date)
+ date.map(d=>{
+ d = parseInt(d);
+ newDate.push(d)
+ })
+ if(!selectDate){
+ selectDate = newDate[1];
+ selectMonth = newDate[0];
+ }
+ prices[newDate.join("-")] = item;
+ }
+ })
+ this.setData({
+ prices:prices
+ })
+ if(!selectDate) return;
+ let info = prices[selectMonth+'-'+selectDate];
+ info.selectMonth = selectMonth;
+ info.selectDate = selectDate;
+ this.setData({
+ selectDate:info,
+ monthIndex:selectMonth==month1?0:1
+ })
+ this.changePrice()
+ })
+ },
+ // 获取这个月有几天
+ getMonthDays:function(month,year){
+ let date = new Date(year+"/"+month+"/01").getDay();
+ if(month==2){
+ if(year % 100 !==0 && year % 4==0 || year % 400 ==0){
+ return [29,date];
+ }
+ else {
+ return [28,date];
+ }
+ }
+ else if(month<8 && month % 2 ==1 || month>=8 && month % 2==0){
+ return [31,date];
+ }
+ else {
+ return [30,date];
+ }
+ },
+ selectDate:function(e){
+ // 选择日期
+ let item = e.currentTarget.dataset.item,selectMonth = this.data.month[this.data.monthIndex];
+ if(!selectMonth) return
+ let info = this.data.prices[selectMonth+'-'+(item+1)];
+ console.log(info)
+ if(info && info.m_price && info.m_price!==null && info.stock!=0){
+ info.selectMonth = selectMonth;
+ info.selectDate = item+1;
+ this.setData({
+ selectDate:info
+ })
+ this.changePrice()
+ }
+ },
+ minus:function(e){
+ if(!this.data.selectDate){
+ wx.showToast({
+ title: '请先选择出行日期',
+ icon:'none'
+ })
+ return;
+ }
+ let index = e.currentTarget.dataset.index,nums = this.data.nums;
+ if(nums[index]==0) return;
+ nums[index] = nums[index] - 1;
+ this.setData({
+ nums:nums
+ })
+ this.changePrice()
+ },
+ add:function(e){
+ let index = e.currentTarget.dataset.index,nums = this.data.nums,selectDate = this.data.selectDate,sku = this.data.sku;
+ if(!selectDate){
+ wx.showToast({
+ title: '请先选择出行日期',
+ icon:'none'
+ })
+ return;
+ }
+ if(selectDate.info[index].stock==nums[index]) return;
+ nums[index] = nums[index] + 1;
+ this.setData({
+ nums:nums
+ })
+ this.changePrice()
+ },
+ showInfo:function(){
+ this.setData({
+ infoFlag:!this.data.infoFlag
+ })
+ },
+ changePrice:function(){
+ let selectDate = this.data.selectDate,nums = this.data.nums,price=0;
+ nums.map((num,index)=>{
+ price = price + num * selectDate.info[index].price;
+ })
+ this.setData({
+ price:price
+ })
+ },
+ order:function(){
+ let selectDate = this.data.selectDate,sku = this.data.sku,nums = this.data.nums,allNum = 0;
+ if(!selectDate){
+ wx.showToast({
+ title: '请先选择日期',
+ icon:'none'
+ })
+ return;
+ }
+ sku.map((item,index)=>{
+ item.num = nums[index];
+ allNum = allNum + nums[index];
+ item.price = selectDate.info[index].price;
+ })
+ if(allNum==0){
+ wx.showToast({
+ title: '至少选择一个规格',
+ icon:'none'
+ })
+ return;
+ };
+ app.globalData.product = {
+ product:this.data.productInfo,
+ sku:sku,
+ selectDate:selectDate,
+ price:this.data.price
+ }
+ wx.navigateTo({
+ url: '/pages/order/roadOrder/index',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/road/index.json b/pages/order/road/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/order/road/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/road/index.wxml b/pages/order/road/index.wxml
new file mode 100644
index 0000000..8922714
--- /dev/null
+++ b/pages/order/road/index.wxml
@@ -0,0 +1,68 @@
+
+
+
+
+ {{item}}月
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(index+1)>=10?(index+1):("0"+(index+1))}}
+ ¥{{prices[month[monthIndex]+'-'+(index+1)].m_price/100}}
+ 售罄
+
+
+
+
+
+
+
+ {{item.sku_name}}
+ {{item.sku_type_info}}
+
+ {{nums[index]}}
+
+
+ {{selectDate.info[index].price/100}}
+
+
+
+ 总额:
+ ¥{{price/100}}
+ 明细
+
+
+ 客服
+
+ 下一步
+
+
+
+
+
+ 基本费用
+ ¥{{price/100}}
+
+
+ {{item.sku_name}}
+ ¥{{selectDate.info[index].price/100}} x {{nums[index]}}
+
+ 订单总额(在线支付): ¥{{price/100}}
+
+
diff --git a/pages/order/road/index.wxss b/pages/order/road/index.wxss
new file mode 100644
index 0000000..6a6b500
--- /dev/null
+++ b/pages/order/road/index.wxss
@@ -0,0 +1,220 @@
+/* pages/order/road/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.date-all-box {
+ margin: 25rpx;
+}
+.month-box {
+ padding: 0 20rpx;
+ height: 116rpx;
+ display: flex;
+ border-bottom: 1rpx solid #ccc;
+ align-items: center;
+}
+.month-item {
+ margin-right: 70rpx;
+ font-size: 33rpx;
+ color: #000;
+ font-weight: 500;
+ line-height: 116rpx;
+ position: relative;
+}
+.month-item.active::after {
+ content: "1";
+ display: block;
+ font-size: 0;
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 8rpx;
+ background: #0B898E;
+ border-radius: 4rpx;
+ bottom: 0;
+}
+.day-header {
+ padding-top: 40rpx;
+ line-height: 45rpx;
+ font-size: 29rpx;
+ color: #000;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ margin-bottom: 50rpx;
+}
+.day-header-item,.day-item {
+ width: calc(702rpx / 7);
+ text-align: center;
+ flex-shrink: 0;
+}
+.day-box {
+ display: flex;
+ align-items: center;
+ font-size: 35rpx;
+ flex-wrap: wrap;
+ color: #999;
+}
+.date-item-in {
+ width: 87rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ height: 87rpx;
+}
+.day-item {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 30rpx;
+}
+.date-item-in .price {
+ font-size: 23rpx;
+ color: #D62828;
+ line-height: 20rpx;
+}
+.date-item-in .price::after {
+ content: "起";
+ font-size: 17rpx;
+}
+.date-num {
+ line-height: 40rpx;
+}
+.date-price-place {
+ height: 20rpx;
+}
+.day-item.active .date-item-in {
+ background: #0B898E;
+ color: #fff;
+ border-radius: 7rpx;
+}
+.day-item.active .date-item-in .price {
+ color: #fff;
+}
+.date-num.active {
+ color: #000;
+}
+.day-item.active .date-item-in .date-num {
+ color: #fff;
+}
+.box {
+ background: white;
+ margin: 25rpx;
+ background: #FFFFFF;
+ border-radius: 9rpx;
+ padding: 35rpx 20rpx;
+}
+.box-top {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ line-height: 50rpx;
+ font-size: 28rpx;
+ color: #666;
+}
+.box-title {
+ font-size: 31rpx;
+ color: #000;
+}
+.box-tip {
+ flex: 1;
+ margin-left: 30rpx;
+}
+.box .iconfont {
+ color: #000;
+ font-size: 34rpx;
+}
+.box .iconfont.disable {
+ color: #666;
+}
+.box .number {
+ width: 67rpx;
+ height: 50rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 23rpx;
+}
+.box .single-price {
+ font-size: 33rpx;
+ color: #D62828;
+ text-align: right;
+ margin-top: 20rpx;
+}
+.box .single-price::before {
+ content: "¥";
+ font-size: 24rpx;
+ margin-right: 4rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ background: white;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 25rpx;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ z-index: 999;
+}
+.fixed-bottom text {
+ flex-shrink: 0;
+ font-size: 29rpx;
+}
+.mingxi {
+ font-size: 27rpx;
+ color: #D62828;
+ margin-right: 73rpx;
+}
+.kefu-box {
+ flex-shrink: 0;
+ text-align: center;
+ font-size: 23rpx;
+ color: #666;
+}
+.fixed-bottom .price {
+ flex: 1;
+ font-size: 36rpx;
+ color: #D62828;
+ font-weight: 500;
+}
+.fixed-bottom .btn {
+ width: 267rpx;
+ text-align: center;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ font-size: 36rpx;
+ font-weight: 500;
+ margin-left: 30rpx;
+}
+.mask-content {
+ position: absolute;
+ bottom: 113rpx;
+ left: 0;
+ right: 0;
+ padding: 30rpx 47rpx;
+ width: auto;
+ border-radius: 0;
+}
+.mask-tip {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 28rpx;
+ margin-bottom: 30rpx;
+}
+.mask-tip2 {
+ color: #666;
+ font-size: 27rpx;
+ margin-bottom: 20rpx;
+}
+.mask-price {
+ text-align: right;
+}
+.mask-price text {
+ color: #D62828;
+}
\ No newline at end of file
diff --git a/pages/order/roadOrder/index.js b/pages/order/roadOrder/index.js
new file mode 100644
index 0000000..f81f822
--- /dev/null
+++ b/pages/order/roadOrder/index.js
@@ -0,0 +1,336 @@
+// pages/order/roadOrder/index.js
+import userApi from "../../../utils/https/user"
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ product:null,
+ sku:[],
+ selectDate:null,
+ linkmans:[],
+ linkmanFlag:false,
+ linkmanList:[],
+ selectLinkman:[],
+ skuIndex:null,
+ reserve_mobile:"",
+ remark:"",
+ editId:null,
+ price:0,
+ coupon:null,
+ sku_ids:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ userApi.user_post("user/getMyInfo").then(res=>{
+ this.setData({
+ reserve_mobile:res.data.mobile
+ })
+ })
+ let product = app.globalData.product,linkmans=[],sku_ids=[];
+ product.sku.map(item=>{
+ let num = Number(item.num);
+ linkmans.push(new Array(num));
+ sku_ids.push(item.id)
+ })
+ this.setData({
+ product:product.product,
+ sku:product.sku,
+ selectDate:product.selectDate,
+ linkmans:linkmans,
+ price:product.price,
+ sku_ids:sku_ids.join(",")
+ })
+ // 获取默认联系人
+ this.getLinkmanList()
+ },
+
+ showLinkman:function(e){
+ if(!this.data.linkmanFlag) {
+ let skuIndex = e.currentTarget.dataset.index,linkmans = this.data.linkmans[skuIndex],linkmanList = this.data.linkmanList;
+ linkmanList.map(item=>{
+ item.selected = 0;
+ linkmans.map(linkman=>{
+ if(item.id==linkman.id){
+ item.selected = 1;
+ }
+ })
+ })
+ linkmanList.map(item=>{
+ item.disable = 0;
+ this.data.linkmans.map((linkman,index)=>{
+ if(index!=skuIndex){
+ linkman.map(l=>{
+ if(l.id==item.id){
+ // 已经被别的规格选择了 那么只能灰掉
+ item.disable = 1;
+ }
+ })
+
+ }
+ })
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ this.setData({
+ linkmanFlag:!this.data.linkmanFlag,
+ skuIndex:e?e.currentTarget.dataset.index:null
+ })
+ },
+ gotoEdit:function(e){
+ let item = e.currentTarget.dataset.item;
+ this.setData({
+ editId:item.id
+ })
+ },
+ getLinkmanList:function(){
+ // 直接获取1000条出行人信息 就不要分页了
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ userApi.user_post("user/getContactOrConsignee",{
+ contactType:"CONTACT",
+ offset:0,
+ limit:1000
+ }).then(res=>{
+ let list = res.data;
+ this.setData({
+ linkmanList:list,
+ linkmanFlag:false
+ })
+ })
+ }
+ })
+
+ },
+ setDefault:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList;
+ userApi.user_post("user/setDefaultContact",{
+ contactId:item.id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '设置成功',
+ icon: 'success'
+ })
+ linkmanList.map(linkman=>{
+ if(linkman.id==item.id){
+ linkman.is_default=1;
+ }
+ else {
+ linkman.is_default = 0;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ }
+ })
+ },
+ selectIt:function(e){
+ let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,skuIndex = this.data.skuIndex,sku = this.data.sku[skuIndex],num=0;
+ if(item.disable==1) return;
+ linkmanList.map(linkman=>{
+ if(item.id==linkman.id){
+ if(num >= sku.num && item.selected!=1){
+ linkman.selected = 0;
+ }
+ else {
+ linkman.selected = item.selected==1?0:1;
+ }
+ }
+ if(linkman.selected==1){
+ num ++;
+ }
+ })
+ if(num>sku.num) return;
+ this.setData({
+ linkmanList:linkmanList
+ })
+ },
+ cancel:function(){
+ let selectLinkman = this.data.linkmans[this.data.skuIndex],linkmanList = this.data.linkmanList;
+ linkmanList.map(linkman=>{
+ linkman.selected = 0;
+ selectLinkman.map(item=>{
+ if(item.id==linkman.id){
+ linkman.selected = 1;
+ }
+ })
+ })
+ this.setData({
+ linkmanList:linkmanList
+ })
+ this.showLinkman()
+ },
+ confirm:function(){
+ let linkmanList = this.data.linkmanList,selectLinkman = [],linkmans = this.data.linkmans,skuIndex = this.data.skuIndex;
+ linkmanList.map(linkman=>{
+ if(linkman.selected==1){
+ selectLinkman.push(linkman);
+ }
+ })
+ linkmans[skuIndex] = selectLinkman;
+ this.setData({
+ linkmans:linkmans
+ })
+ this.showLinkman()
+ },
+ inputTel:function(e){
+ this.setData({
+ reserve_mobile:e.detail.value
+ })
+ },
+ inputRemark:function(e){
+ this.setData({
+ remark:e.detail.value
+ })
+ },
+ order:function(){
+ let sku = this.data.sku,product = this.data.product,linkmans = this.data.linkmans,product_list = [],reserve_mobile = this.data.reserve_mobile;
+ if(!reserve_mobile) {
+ wx.showToast({
+ title: '请输入联系方式',
+ icon:'none'
+ })
+ return;
+ }
+ let orderFlag = true;
+ sku.map((item,index)=>{
+ if(item.num>0){
+ let linkman = linkmans[index],visitors=[];
+ if(linkman.length{
+
+ })
+
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ if(this.data.editId){
+ // 如果是去编辑的
+ let editId = this.data.editId;
+ userApi.user_post("user/getContactInfoById",{
+ id:editId
+ }).then(res=>{
+ let linkmans = this.data.linkmans,linkmanList = this.data.linkmanList;
+ linkmans.map(linkman=>{
+ linkman.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.id_number = res.data.id_number;
+ item.is_default = res.data.is_default;
+ }
+ else if(res.data.is_default==1){
+ item.is_default = 0;
+ }
+ })
+ })
+ linkmanList.map(item=>{
+ if(item.id==editId){
+ item.name = res.data.name;
+ item.tel = res.data.tel;
+ item.id_number = res.data.id_number;
+ item.is_default = res.data.is_default;
+ }
+ })
+ this.setData({
+ linkmanList:linkmanList,
+ linkmans:linkmans
+ })
+ })
+ }
+ else {
+ this.getLinkmanList()
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/roadOrder/index.json b/pages/order/roadOrder/index.json
new file mode 100644
index 0000000..8172ad6
--- /dev/null
+++ b/pages/order/roadOrder/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "coupon":"/pages/order/components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/roadOrder/index.wxml b/pages/order/roadOrder/index.wxml
new file mode 100644
index 0000000..b7a230e
--- /dev/null
+++ b/pages/order/roadOrder/index.wxml
@@ -0,0 +1,59 @@
+
+
+
+ {{product.title}}
+ {{selectDate.date}}
+ {{item.sku_name}}x{{item.num}}
+
+
+ 出行人信息
+
+
+ {{linkmans[skuIndex][index]?linkmans[skuIndex][index].name:skuItem.sku_name}}
+ {{linkmans[skuIndex][index].title}}{{linkmans[skuIndex][index].id_number}}
+ {{skuItem.sku_model.sku_type_info}}
+
+ 添加
+
+
+
+ 联系方式
+
+
+
+
+ 订单备注
+
+
+
+
+
+
+ 订单金额:¥{{((price - (coupon?coupon.activity.money:0))>0?(price - (coupon?coupon.activity.money:0)):0)/100}}
+ 去支付
+
+
+
+
+
+ 取消
+ 确定
+
+ 添加出行人
+
+
+
+ {{item.name}}
+
+ 手机号 {{item.tel}}
+ {{item.title}} {{item.id_number}}
+
+
+
+ 设为默认出行人
+
+
+
\ No newline at end of file
diff --git a/pages/order/roadOrder/index.wxss b/pages/order/roadOrder/index.wxss
new file mode 100644
index 0000000..65b17fb
--- /dev/null
+++ b/pages/order/roadOrder/index.wxss
@@ -0,0 +1,187 @@
+/* pages/order/roadOrder/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.top-box {
+ padding: 30rpx 47rpx;
+ color: #333333;
+ font-size: 28rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.product-title {
+ color: #000000;
+ font-size: 33rpx;
+ font-weight: 500;
+ line-height: 47rpx;
+ margin-bottom: 30rpx;
+}
+.product-num {
+ margin-top: 30rpx;
+}
+.product-num text {
+ margin-right: 50rpx;
+}
+.user-box {
+ margin: 25rpx;
+ background: #FFFFFF;
+ border-radius: 9rpx;
+}
+.user-box-title {
+ border-bottom: 1rpx solid #ccc;
+ line-height: 113rpx;
+ font-size: 33rpx;
+ color: #000;
+ font-weight: 500;
+ padding: 0 20rpx;
+}
+.user-item {
+ margin: 0 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 126rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.user-item .user-info {
+ font-size: 27rpx;
+ margin-right: 20rpx;
+ flex: 1;
+ text-align: left;
+}
+.user-item>text {
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #000;
+ font-weight: 500;
+ margin-right: 20rpx;
+}
+.user-item input {
+ flex: 1;
+ font-size: 29rpx;
+ display: block;
+}
+.user-item .add-btn {
+ display: flex;
+ width: 140rpx;
+ height: 57rpx;
+ border: 1rpx solid #333333;
+ border-radius: 29rpx;
+ box-sizing: border-box;
+ justify-content: center;
+ align-items: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.user-item .icon-bianji1 {
+ margin-right: 10rpx;
+}
+.linkmanlist-item {
+ background: white;
+ margin-bottom: 24rpx;
+ border-radius: 9rpx;
+}
+.linkmanlist-item-top {
+ display: flex;
+ margin: 0 20rpx;
+ padding: 30rpx 13rpx;
+ border-bottom: 1rpx dashed #ccc;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #666;
+ font-size: 25rpx;
+}
+.linkmanlist-item-top .iconfont {
+ flex-shrink: 0;
+ font-size: 42rpx;
+ position: static;
+}
+.linkman-nickname {
+ font-size: 29rpx;
+ color: #000;
+ margin-left: 50rpx;
+}
+.linkman-info {
+ flex: 1;
+ margin: 0 30rpx;
+}
+.linkmanlist-item-top .icon-gou {
+ color: #D62828;
+}
+.linkmanlist-tip {
+ line-height: 70rpx;
+ font-size: 24rpx;
+ color: #666;
+ margin: 0 34rpx;
+}
+.linkmanlist-tip .iconfont {
+ margin-right: 4rpx;
+ font-size: 23rpx;
+}
+.add-btn1 {
+ width: 218rpx;
+ line-height: 72rpx;
+ border: 1rpx solid #333333;
+ border-radius: 37rpx;
+ text-align: center;
+ font-size: 29rpx;
+ color: #000;
+ margin: 25rpx auto;
+}
+.mask-content.linkman-mask {
+ width: 700rpx;
+ padding: 0 25rpx;
+ background: #F7F7F7;
+}
+.btns {
+ display: flex;
+ justify-content: space-between;
+ font-size: 31rpx;
+ color: #000;
+ margin-bottom: 10rpx;
+ line-height: 90rpx;
+}
+.add-btn {
+ line-height: 80rpx;
+ background: #FFFFFF;
+ text-align: center;
+ border-radius: 40rpx;
+ font-size: 29rpx;
+ color: #000;
+ margin-bottom: 24rpx;
+}
+.fixed-bottom .order-all-price text {
+ flex: 1;
+ font-size: 36rpx;
+ color: #D62828;
+}
+.fixed-bottom .order-all-price {
+ flex: 1;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.fixed-bottom .order-btn {
+ width: 320rpx;
+ text-align: center;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ font-size: 36rpx;
+ font-weight: 500;
+ margin-left: 30rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ background: white;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 25rpx;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ z-index: 1;
+}
\ No newline at end of file
diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js
new file mode 100644
index 0000000..70f4fed
--- /dev/null
+++ b/pages/order/scene/index.js
@@ -0,0 +1,216 @@
+// pages/order/scene/index.js
+let app = getApp()
+import util from "../../../utils/util"
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ product:app.globalData.product,
+ productNum:1,
+ linkmanList:[],
+ date:"",
+ time:"",
+ remark:"",
+ singlePrice:0,
+ type:null,
+ coupon:app.globalData.couponInfo,
+ isLogin:false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ type:options.type
+ })
+ if(!app.globalData.product){
+ util.back();
+ return;
+ }
+ this.setData({
+ product:app.globalData.product,
+ singlePrice:app.globalData.product.sku.price
+ })
+ this.couponCom = this.selectAllComponents("#coupon")[0];
+ },
+ setLinkman:function(e){
+ let linkmanList = e.detail;
+ if(this.data.productNum!=linkmanList.length && this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ coupon:null
+ })
+ }
+ this.setData({
+ productNum:linkmanList.length==0?1:linkmanList.length,
+ linkmanList:linkmanList
+ })
+ },
+ add:function(){
+ if(this.data.product.sku.sku_model.traveller_limit_num!=0 && this.data.productNum==this.data.product.sku.sku_model.traveller_limit_num){
+ wx.showToast({
+ title: '出行人限购'+this.data.product.sku.sku_model.traveller_limit_num+"份",
+ icon:'none'
+ })
+ return;
+ }
+ this.setData({
+ productNum:this.data.productNum+1
+ })
+ },
+ minus:function(){
+ if(this.data.productNum==1) return;
+ if(this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ }
+ // this.couponCom = this.selectAllComponents("#coupon")
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ this.setData({
+ productNum:(this.data.productNum-1),
+ coupon:null
+ })
+ },
+ changeDate:function(e){
+ if(e.detail.price!=this.data.singlePrice && this.data.coupon) {
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ this.setData({
+ coupon:null
+ })
+ // this.couponCom = this.selectAllComponents("#coupon")
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+ }
+ this.setData({
+ date:e.detail,
+ singlePrice:e.detail.price
+ })
+ console.log(e.detail)
+ },
+ changeTime:function(e){
+ this.setData({
+ time:e.detail
+ })
+ },
+ changeRemark:function(e){
+ this.setData({
+ remark:e.detail.value
+ })
+ },
+ order:function(){
+ let linkmanList = this.data.linkmanList,productNum = this.data.productNum,date = this.data.date,time = this.data.time,remark=this.data.remark,product= this.data.product;
+ let linkmanIds=[];
+ if(linkmanList.length{
+ linkmanIds.push(item.id)
+ })
+ let data = {
+ coupon_id:this.data.coupon?this.data.coupon.id:null,
+ source:"WECHATXCX",
+ product_list: [{
+ type:product.product.type,
+ product_id:product.product.id,
+ sku_id:product.sku.id,
+ start_time:time.start_time,
+ end_time:time.end_time,
+ use_date:date.date,
+ visitors:linkmanIds.join(","),
+ remark:remark,
+ product_num:productNum
+ }]
+ }
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ if(!this.data.isLogin){
+ commonApi.user_post("token/check").then(res=>{
+ if(res.code==1){
+ this.setData({
+ isLogin:true
+ })
+ }
+ })
+ }
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/scene/index.json b/pages/order/scene/index.json
new file mode 100644
index 0000000..7514262
--- /dev/null
+++ b/pages/order/scene/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "date":"../components/date/index",
+ "contact":"../components/contact/index",
+ "coupon":"../components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/scene/index.wxml b/pages/order/scene/index.wxml
new file mode 100644
index 0000000..124d90d
--- /dev/null
+++ b/pages/order/scene/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+ {{product.product.title + product.sku.sku_name}}
+ 免费
+
+
+
+
+ 购票数量
+
+ {{productNum}}
+
+
+
+
+
+
+
+ 订单备注
+
+
+
+
+
+ 合计:¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}}
+ 提交订单
+
+
+ 立即预约
+
\ No newline at end of file
diff --git a/pages/order/scene/index.wxss b/pages/order/scene/index.wxss
new file mode 100644
index 0000000..0a7faaa
--- /dev/null
+++ b/pages/order/scene/index.wxss
@@ -0,0 +1,181 @@
+/* pages/.wxss */
+page {
+ background: #f6f6f6;
+}
+.product-info {
+ padding: 20rpx 47rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.product-title {
+ font-size: 33rpx;
+ color: #000;
+ font-weight: 500;
+}
+.product-price {
+ color: #D62828;
+ font-size: 27rpx;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.dates-boxes {
+ display: flex;
+ align-items: center;
+ padding: 31rpx 21rpx;
+ border-top: 1rpx solid #ccc;
+}
+.date-item {
+ width: 162rpx;
+ height: 97rpx;
+ border-radius: 10rpx;
+ border: 1rpx solid #333;
+ text-align: center;
+ font-size: 27rpx;
+ color: #000;
+ margin-right: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+.date-item.active {
+ border-color: #0B898E;
+ color: #fff;
+ background: #0B898E;
+}
+.date-item.disable {
+ border-color: #CCCCCC;
+ color: #666;
+}
+.date-item .price {
+ font-size: 25rpx;
+ color: #D62828;
+}
+.date-item.active .price {
+ color: #fff;
+}
+.date-item.disable .price {
+ color: #666;
+}
+.more-item {
+ width: 99rpx;
+ margin-right: 0;
+}
+.date-times {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin: 0 21rpx;
+ padding-top: 34rpx;
+ padding-bottom: 10rpx;
+ border-top: 1rpx dashed #ccc;
+ flex-wrap: wrap;
+}
+.date-time {
+ width: 315rpx;
+ line-height: 58rpx;
+ border: 1px solid #333;
+ border-radius: 10rpx;
+ text-align: center;
+ font-size: 25rpx;
+ flex-shrink: 0;
+ margin-bottom: 24rpx;
+ color: #000;
+}
+.date-time.disable {
+ border-color: #ccc;
+ color: #666666;
+}
+.date-time.active {
+ border-color: #0B898E;
+ background: #0B898E;
+ color: #fff;
+}
+.box-title .iconfont {
+ font-size: 28rpx;
+ flex-shrink: 0;
+}
+.number-box {
+ font-size: 29rpx;
+ font-weight: 500;
+ color: #000;
+ flex-shrink: 0;
+ width: 67rpx;
+ line-height: 49rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 20rpx;
+}
+
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ z-index: 1;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+}
+.yuyue-box {
+ height: 138rpx;
+ justify-content: center;
+}
+.fixed-btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ text-align: center;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.fixed-price-box {
+ margin-left: 25rpx;
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.fixed-price-box .price {
+ color: #D62828;
+ font-size: 36rpx;
+ margin-left: 10rpx;
+}
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+.box-title input {
+ flex: 1;
+ display: block;
+ font-size: 31rpx;
+ color: #666;
+ margin-left: 15rpx;
+ font-weight: 400;
+}
+.yuyue-btn {
+ width: 657rpx;
+ line-height: 78rpx;
+ border-radius: 39rpx;
+}
\ No newline at end of file
diff --git a/pages/order/show/index.js b/pages/order/show/index.js
new file mode 100644
index 0000000..266ff5b
--- /dev/null
+++ b/pages/order/show/index.js
@@ -0,0 +1,109 @@
+// pages/order/show/index.js
+let app = getApp();
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ times:[],
+ product:null,
+ dateindex:-1,
+ timeindex:-1
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let product = app.globalData.product,start_date = util.formatDate(new Date());
+ this.setData({
+ product:product
+ })
+ let end_date = util.formatDate(new Date(new Date(start_date.replace(/-/g,'/')).getTime() + 30 * 24 * 60 * 60 * 1000));
+ commonApi.user_post("show/get_show_sku_seats_price_by_date",{
+ sku_id:product.sku[0].id,
+ start_date:start_date,
+ end_date:end_date
+ }).then(res=>{
+ let dateindex = -1,timeindex=-1;
+ for(let i=0;i
+
+
+ {{product.title}}
+ {{product.subtitle}}
+
+
+ 场次
+
+ {{date.sale_date}}{{item.start_time}} ~ {{item.end_time}} {{item.is_ticket==1?'有票':'无票'}}
+
+
+
+
+
+ 下一步
+
\ No newline at end of file
diff --git a/pages/order/show/index.wxss b/pages/order/show/index.wxss
new file mode 100644
index 0000000..16b489c
--- /dev/null
+++ b/pages/order/show/index.wxss
@@ -0,0 +1,92 @@
+/* pages/order/show/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.order-top {
+ border-bottom: 1rpx solid #ccc;
+ padding: 30rpx 47rpx;
+
+}
+.order-name {
+ font-weight: 500;
+ color: #000;
+ font-size: 33rpx;
+}
+.order-subtitle {
+ margin-top: 20rpx;
+ font-size: 27rpx;
+ color: #666;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+ padding-bottom: 30rpx;
+}
+.box-title {
+ line-height: 113rpx;
+ border-bottom: 1rpx solid #ccc;
+ padding: 0 20rpx;
+}
+.order-line-item {
+ margin: 0 20rpx;
+ display: flex;
+ align-items: center;
+ border: 1rpx solid #333;
+ border-radius: 10rpx;
+ margin-top: 30rpx;
+ font-size: 27rpx;
+ padding: 0 22rpx;
+ line-height: 70rpx;
+ box-sizing: border-box;
+}
+.order-line-item text {
+ margin-right: 15rpx;
+}
+.order-line-item .state {
+ width: 78rpx;
+ line-height: 34rpx;
+ border: 1rpx solid;
+ border-radius: 17rpx;
+ box-sizing: border-box;
+ text-align: center;
+ font-size: 24rpx;
+ color: #D62828;
+}
+.order-line-item.disable .state {
+ color: #666;
+ border-color: #ccc;
+}
+.order-line-item.disable {
+ color: #666666;
+}
+.order-line-item.active .state {
+ color: #fff;
+}
+.order-line-item.active {
+ background: #0B898E;
+ border-color: #0B898E;
+ color: #fff;
+}
+.fixed-bottom {
+ height: 138rpx;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+.fixed-btn {
+ width: 657rpx;
+ line-height: 78rpx;
+ background: #D62828;
+ border-radius: 39rpx;
+ text-align: center;
+ color: #fff;
+ font-size: 33rpx;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/pages/order/showOrder/index.js b/pages/order/showOrder/index.js
new file mode 100644
index 0000000..e4f0baf
--- /dev/null
+++ b/pages/order/showOrder/index.js
@@ -0,0 +1,106 @@
+// pages/order/showOrder/index.js
+let app = getApp()
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ product:app.globalData.product,
+ contact:[],
+ coupon:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ product:app.globalData.product
+ })
+ },
+ setLinkman:function(e){
+ console.log(e)
+ this.setData({
+ contact:e.detail
+ })
+ },
+ order:function(){
+ let product = this.data.product,contact = this.data.contact;
+ if(contact.length!=product.seats.length){
+ wx.showToast({
+ title: '请选择'+product.seats.length+"个出行人",
+ icon:'none'
+ })
+ return;
+ }
+ let contactIds = [];
+ contact.map(item=>{
+ contactIds.push(item.id)
+ })
+ let data = {
+ coupon_id:this.data.coupon?this.data.coupon.id:null,
+ source:"WECHATXCX",
+ product_list:[{
+ "type" : "show",//演出
+ "product_id": product.id,
+ "sku_id": product.sku[0].id,
+ "use_date": product.timeInfo.sale_date,
+ "start_time": product.timeInfo.screen[0].start_time,
+ "end_time": product.timeInfo.screen[0].end_time,
+ "visitors": contactIds.join(","),
+ "product_num": product.seats.length,
+ "seats_ids":product.seats
+ }]
+ };
+ commonApi.user_post("order/create",{
+ data:JSON.stringify(data)
+ }).then(res=>{
+ console.log(res)
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ coupon:app.globalData.couponInfo
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/showOrder/index.json b/pages/order/showOrder/index.json
new file mode 100644
index 0000000..f6331a1
--- /dev/null
+++ b/pages/order/showOrder/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader",
+ "contact":"../components/contact/index",
+ "coupon":"../components/coupon/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/showOrder/index.wxml b/pages/order/showOrder/index.wxml
new file mode 100644
index 0000000..bf257c8
--- /dev/null
+++ b/pages/order/showOrder/index.wxml
@@ -0,0 +1,21 @@
+
+
+
+ {{product.title}}
+ {{product.subtitle}}
+ {{product.timeInfo.sale_date}} {{product.timeInfo.screen[0].start_time}} ~ {{product.timeInfo.screen[0].start_time}}
+
+ ¥{{product.timeInfo.price/100}}
+ x{{product.seats.length}}
+
+
+ {{item.x}}排{{item.y}}座
+
+
+
+
+
+
+ 订单金额:¥{{((product.timeInfo.price * product.seats.length - (coupon?coupon.activity.money:0))>0?(product.timeInfo.price * product.seats.length - (coupon?coupon.activity.money:0)):0) / 100}}
+ 提交订单
+
\ No newline at end of file
diff --git a/pages/order/showOrder/index.wxss b/pages/order/showOrder/index.wxss
new file mode 100644
index 0000000..5977d4b
--- /dev/null
+++ b/pages/order/showOrder/index.wxss
@@ -0,0 +1,101 @@
+/* pages/order/showOrder/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.order-top {
+ border-bottom: 1rpx solid #ccc;
+ padding: 30rpx 47rpx;
+}
+.order-name {
+ font-weight: 500;
+ color: #000;
+ font-size: 33rpx;
+}
+.order-subtitle {
+ margin-top: 20rpx;
+ font-size: 27rpx;
+ color: #666;
+}
+.show-datetime {
+ margin-top: 30rpx;
+ font-size: 29rpx;
+ color: #000;
+}
+.show-all-price {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-end;
+ font-size: 29rpx;
+ color: #666;
+ margin: 10rpx 0;
+}
+.show-all-price .all-price {
+ color: #D62828;
+ font-size: 33rpx;
+}
+.seat-list {
+ font-size: 27rpx;
+ color: #000;
+}
+.seat-list text {
+ margin-right: 20rpx;
+}
+.seat-list text:last-child {
+ margin-right: 0;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+}
+.fixed-btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ text-align: center;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+.price-box {
+ margin-left: 25rpx;
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+.price-box text {
+ color: #D62828;
+ font-size: 36rpx;
+ margin-left: 10rpx;
+}
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
\ No newline at end of file
diff --git a/pages/order/showSeat/index.js b/pages/order/showSeat/index.js
new file mode 100644
index 0000000..0c6855b
--- /dev/null
+++ b/pages/order/showSeat/index.js
@@ -0,0 +1,962 @@
+// pages/list/movieticket/list/seats/index.js
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+const seatTypeList = [
+ {
+ "name": "可选",
+ "type": "0",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image1.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "已选",
+ "type": "0-1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image0.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "已售",
+ "type": "0-2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image2.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "维修",
+ "type": "0-3",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image3.png",
+ "isShow": "1",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座可选",
+ "type": "1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image4.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座已选",
+ "type": "1-1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image5.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座已售",
+ "type": "1-2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image6.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣首座维修",
+ "type": "1-3",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image7.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座可选",
+ "type": "2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image8.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座已选",
+ "type": "2-1",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image9.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座已售",
+ "type": "2-2",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image10.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣次座维修",
+ "type": "2-3",
+ "seats": 1,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image11.png",
+ "isShow": "0",
+ "position": "up"
+ },
+ {
+ "name": "情侣座",
+ "type": "5",
+ "seats": 2,
+ "icon": "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/movie/image12.png",
+ "isShow": "1",
+ "position": "up"
+ }
+];
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ seatList: [],
+ selectedSeat: [],
+ hallName: undefined,
+ scaleValue: 1,
+ hidden: "hidden",
+ maxSelect: 4,
+ totalPrice: 0,
+ loadComplete: false,
+ timer: null,
+ options:null,
+ productInfo:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ productInfo:app.globalData.product
+ })
+ let that = this;
+ let sys = wx.getSystemInfoSync()
+ that.setData({
+ seatArea: sys.screenHeight - sys.statusBarHeight - (500 * sys.screenWidth / 750),
+ rpxToPx: sys.screenWidth / 750
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ let product = this.data.productInfo,timeInfo = product.timeInfo;
+ // 先解锁座位再锁定
+ commonApi.user_post("show/unlock_seat",{
+ sku_id:product.sku[0].id,
+ date:timeInfo.sale_date,
+ start_time:timeInfo.screen[0].start_time,
+ end_time:timeInfo.screen[0].end_time,
+ x:0,
+ y:0
+ }).then(res=>{
+ this.getInfo();
+ }).catch(err=>{
+ // this.getInfo();
+ })
+
+ //---这此替换成自己的接口请求成功后--end--
+ },
+ getInfo:function(){
+ let result,that = this;
+ let product = this.data.productInfo,timeInfo = product.timeInfo;
+ commonApi.user_post("show/get_show_sku_screen_seats_price_by_date",{
+ sku_id:product.sku[0].id,
+ date:timeInfo.sale_date,
+ start_time:timeInfo.screen[0].start_time,
+ end_time:timeInfo.screen[0].end_time
+ }).then(res=>{
+ let seatList = that.prosessSeatList({seatList:res.data.seats,max_left_px:0});
+ that.setData({
+ maxX:Number(res.data.x_max),
+ maxY:Number(res.data.y_max),
+ seatList: seatList,
+ seatTypeList: seatTypeList,
+ selectedSeat: [],
+ totalPrice: 0,
+ hidden: "hidden",
+ seatArea: this.data.seatArea,
+ maxSelect:res.data.traveller_limit_num==0?99999:res.data.traveller_limit_num
+ });
+ console.log(res)
+ that.prosessMaxSeat(seatList);
+ })
+ return;
+ console.log(product);
+
+
+ return;
+ wx.showLoading({
+ title: '加载中',
+ })
+ //计算X和Y坐标最大值
+
+ //计算左侧座位栏的数组
+ // that.seatToolArr()
+ //按每排生成座位数组对象
+ // that.creatSeatMap()
+ //确认最佳坐标座位
+ // that.creatBestSeat()
+ wx.hideLoading()
+ },
+ //解决官方bug
+ handleScale: function(e) {
+ if (this.data.timer) {
+ clearTimeout(this.data.timer)
+ }
+ let timer = setTimeout(() => {
+ this.setData({
+ seatArea: this.data.seatArea
+ });
+ }, 200)
+ },
+ setSchedule:function(e){
+ let item = e.currentTarget.dataset.item,options = {
+ show_id:item.show_id,
+ cinema_id:item.cinema_id
+ };
+ this.setData({
+ options:options
+ })
+ this.getInfo();
+ },
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+ /**
+ * 顶级顶部返回按钮时候
+ */
+ prosessSeatList: function(response) {
+ let resSeatList = response.seatList
+ resSeatList.forEach(element => {
+ console.log(element)
+ element.gRow = element.x;
+ element.gCol = element.y;
+ if(element.status!=0){
+ element.type = element.type+"-2";
+ }
+ else {
+ element.type = element.type + "";
+ }
+ // if(element.status=="-2" || element.status== '-1'){
+ // element.type = element.flag+"-3";
+ // }
+ let firstNumber = element.type.split("-")[0];
+ // 获取座位的类型的首字母
+ // 在原来的对象中加入两个属性 otherLoveSeatIndex 对应情侣座位的原数组下标 otherLoveSeatId 对应情侣座位的Id
+ element.otherLoveSeatIndex = null
+ element.otherLoveSeatId = null
+ // 座位的类型的首字母为 '1' 是情侣首座 处理情侣首座位
+ if (element.type == '1') {
+ for (const index in resSeatList) {
+ if (resSeatList[index].gRow === element.gRow &&
+ resSeatList[index].gCol === element.gCol + 1) {
+ element.otherLoveSeatIndex = index
+ element.otherLoveSeatId = resSeatList[index].id
+ }
+ }
+ }
+ // 座位的类型的首字母为 '2' 是情侣次座 处理情侣次座位
+ if (element.type == '2') {
+ for (const index in resSeatList) {
+ if (resSeatList[index].gRow === element.gRow &&
+ resSeatList[index].gCol === element.gCol - 1) {
+ element.otherLoveSeatIndex = index
+ element.otherLoveSeatId = resSeatList[index].id
+ }
+ }
+ }
+ // 加载座位的图标
+ let seatType = seatTypeList;
+ for (const key in seatType) {
+ // 加载每个座位的初始图标defautIcon 和 当前图标 nowIcon
+ if (element.type === seatType[key].type) {
+ element.nowIcon = seatType[key].icon
+ element.defautIcon = seatType[key].icon
+ }
+ // 根据首字母找到对应的被选中图标
+ if (firstNumber + '-1' === seatType[key].type) {
+ element.selectedIcon = seatType[key].icon
+ }
+ // 根据首字母找到对应的被选中图标
+ if (firstNumber + '-2' === seatType[key].type) {
+ element.soldedIcon = seatType[key].icon
+ }
+ // 根据首字母找到对应的被选中图标
+ if (firstNumber + '-3' === seatType[key].type) {
+ element.fixIcon = seatType[key].icon
+ }
+ }
+ // 如果座位是已经售出 和 维修座位 加入属性canClick 判断座位是否可以点击
+ if (element.defautIcon === element.soldedIcon || element.defautIcon === element.fixIcon) {
+ element.canClick = false
+ } else {
+ element.canClick = true
+ }
+ })
+ return resSeatList
+ },
+ //计算最大座位数,生成影厅图大小
+ prosessMaxSeat: function(value) {
+ // let seatList = value
+ // let maxY = 0;
+ // for (let i = 0; i < seatList.length; i++) {
+ // let tempY = seatList[i].gRow;
+ // if (parseInt(tempY) > parseInt(maxY)) {
+ // maxY = tempY;
+ // }
+ // }
+ // let maxX = 0;
+ // for (var i = 0; i < seatList.length; i++) {
+ // var tempX = seatList[i].gCol;
+ // if (parseInt(tempX) > parseInt(maxX)) {
+ // maxX = tempX;
+ // }
+ // }
+ let seatRealWidth = parseInt(this.data.maxX) * 70 * this.data.rpxToPx
+ let seatRealheight = parseInt(this.data.maxY) * 70 * this.data.rpxToPx
+ let seatScale = 1;
+ let seatScaleX = 1;
+ let seatScaleY = 1;
+ let seatAreaWidth = 630 * this.data.rpxToPx
+ let seatAreaHeight = this.data.seatArea - 200 * this.data.rpxToPx
+ if (seatRealWidth > seatAreaWidth) {
+ seatScaleX = seatAreaWidth / seatRealWidth
+ }
+ if (seatRealheight > seatAreaHeight) {
+ seatScaleY = seatAreaHeight / seatRealheight
+ }
+ if (seatScaleX < 1 || seatScaleY < 1) {
+ seatScale = seatScaleX < seatScaleY ? seatScaleX : seatScaleY
+ }
+ console.log(seatScale,this.data.rpxToPx)
+ this.setData({
+ // maxY: parseInt(maxY),
+ // maxX: parseInt(maxX),
+ seatScale: seatScale,
+ seatScaleHeight: seatScale * 70 * this.data.rpxToPx
+ });
+ },
+ // 座位左边栏的数组
+ seatToolArr: function() {
+ let seatToolArr = []
+ let yMax = this.data.maxY
+ let seatList = this.data.seatList
+ for (let i = 1; i <= yMax; i++) {
+ let el = ''
+ for (let j = 0; j < seatList.length; j++) {
+ if (parseInt(seatList[j].gRow) === i) {
+ el = seatList[j].row?seatList[j].row:seatList[j].row_name
+ }
+ }
+ seatToolArr.push(el)
+ }
+ this.setData({
+ seatToolArr: seatToolArr
+ })
+ },
+ back: function() {
+ wx.navigateBack({
+ delta: 1, // 回退前 delta(默认为1) 页面
+ })
+ },
+ // 点击每个座位触发的函数
+ clickSeat: function(event) {
+ let index = event.currentTarget.dataset.index;
+ if (this.data.seatList[index].canClick) {
+ if (this.data.seatList[index].nowIcon === this.data.seatList[index].selectedIcon) {
+ this.processSelected(index)
+ } else {
+ this.processUnSelected(index)
+ }
+ }
+ if (this.data.selectedSeat.length == 0) {
+ this.setData({
+ hidden: "hidden"
+ });
+ }
+
+ let _selectedSeatList = this.data.selectedSeat
+ let totalPrice = this.data.productInfo.timeInfo.price * _selectedSeatList.length;
+ // for (const key in _selectedSeatList) {
+ // console.log(_selectedSeatList[key])
+ // let price = parseInt(_selectedSeatList[key].price);
+ // totalPrice += price;
+ // }
+ this.setData({
+ totalPrice: totalPrice
+ })
+ },
+ // 处理已选的座位
+ processSelected: function(index) {
+ let _selectedSeatList = this.data.selectedSeat
+ let seatList = this.data.seatList
+ let otherLoveSeatIndex = seatList[index].otherLoveSeatIndex
+ if (otherLoveSeatIndex !== null) {
+ // 如果是情侣座位
+ // 改变这些座位的图标为初始图标
+ seatList[index].nowIcon = seatList[index].defautIcon
+ seatList[otherLoveSeatIndex].nowIcon = seatList[otherLoveSeatIndex].defautIcon
+ for (const key in _selectedSeatList) {
+ // 移除id一样的座位
+ if (_selectedSeatList[key].id === seatList[index].id) {
+ _selectedSeatList.splice(key, 1)
+ }
+ }
+ // 移除对应情侣座位
+ for (const key in _selectedSeatList) {
+ if (_selectedSeatList[key].id === seatList[otherLoveSeatIndex].id) {
+ _selectedSeatList.splice(key, 1)
+ }
+ }
+ } else {
+ // 改变这些座位的图标为初始图标 并 移除id一样的座位
+ seatList[index].nowIcon = seatList[index].defautIcon
+ for (const key in _selectedSeatList) {
+ if (_selectedSeatList[key].id === seatList[index].id) {
+ _selectedSeatList.splice(key, 1)
+ }
+ }
+ }
+ this.setData({
+ selectedSeat: _selectedSeatList,
+ seatList: seatList
+ })
+ },
+ // 处理未选择的座位
+ processUnSelected: function(index) {
+ let _selectedSeatList = this.data.selectedSeat
+ let seatList = this.data.seatList
+ let otherLoveSeatIndex = seatList[index].otherLoveSeatIndex
+ if (otherLoveSeatIndex !== null) {
+ // 如果选中的是情侣座位 判断选择个数不大于 maxSelect
+ if (_selectedSeatList.length >= this.data.maxSelect - 1) {
+ wx.showToast({
+ title: '最多只能选择' + this.data.maxSelect + '个座位哦~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 改变这些座位的图标为已选择图标
+ seatList[index].nowIcon = seatList[index].selectedIcon
+ seatList[otherLoveSeatIndex].nowIcon = seatList[otherLoveSeatIndex].selectedIcon
+ // 记录 orgIndex属性 是原seatList数组中的下标值
+ seatList[index].orgIndex = index
+ seatList[otherLoveSeatIndex].orgIndex = otherLoveSeatIndex
+ // 把选择的座位放入到已选座位数组中
+ let temp = { ...seatList[index]
+ }
+ let tempLove = { ...seatList[otherLoveSeatIndex]
+ }
+ _selectedSeatList.push(temp)
+ _selectedSeatList.push(tempLove)
+ } else {
+ // 如果选中的是非情侣座位 判断选择个数不大于 maxSelect
+ if (_selectedSeatList.length >= this.data.maxSelect) {
+ wx.showToast({
+ title: '最多只能选择' + this.data.maxSelect + '个座位哦~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 改变这些座位的图标为已选择图标
+ seatList[index].nowIcon = seatList[index].selectedIcon
+ // 记录 orgIndex属性 是原seatList数组中的下标值
+ seatList[index].orgIndex = index
+ // 把选择的座位放入到已选座位数组中
+ let temp = { ...seatList[index]
+ }
+ _selectedSeatList.push(temp)
+ }
+ this.setData({
+ selectedSeat: _selectedSeatList,
+ seatList: seatList,
+ hidden: ""
+ })
+ },
+ confirmHandle: function() {
+ let that = this
+ let _this = this.data
+ if (_this.selectedSeat.length === 0) {
+ wx.showToast({
+ title: '请至少选择一个座位~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 开始计算是否留下空位 ------------ 开始
+ let result = _this.selectedSeat.every(function(element, index, array) {
+ return that.checkSeat(element, _this.selectedSeat)
+ })
+ // 开始计算是否留下空位 ------------ 结束
+ if (!result) {
+ // 如果 result 为false
+ wx.showToast({
+ title: '请不要留下空位~',
+ icon: 'none',
+ duration: 2000
+ })
+ } else {
+ if (_this.totalPrice === 0) {
+ wx.showToast({
+ title: '锁座失败了~,金额为0',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 允许锁座
+ wx.showLoading({
+ title: '加载中',
+ })
+ that.createOrder()
+ }
+ },
+ // 检查每个座位是否会留下空位
+ checkSeat: function(element, selectedSeat) {
+ // 标准为 1.左右侧都必须保留 两格座位 + 最大顺延座位(也就是已选座位减去自身)
+ // 2.靠墙和靠已售的座位一律直接通过
+ const checkNum = 2 + selectedSeat.length - 1
+ const gRowBasic = element.gRow
+ const gColBasic = element.gCol
+ let otherLoveSeatIndex = element.otherLoveSeatIndex
+ if (otherLoveSeatIndex != null) {
+ // 如果是情侣座 不检测
+ return true
+ }
+ // 检查座位左侧
+ let left = this.checkSeatDirection(gRowBasic, gColBasic, checkNum, '-', selectedSeat)
+ // 如果左侧已经检查出是靠着过道直接 返回true
+ if (left === 'special') {
+ return true
+ }
+ // 检查座位右侧
+ let right = this.checkSeatDirection(gRowBasic, gColBasic, checkNum, '+', selectedSeat)
+ if (right === 'special') {
+ // 无论左侧是否是什么状态 检查出右侧靠着过道直接 返回true
+ return true
+ } else if (right === 'normal' && left === 'normal') {
+ // 如果左右两侧都有富裕的座位 返回true
+ return true
+ } else if (right === 'fail' || left === 'fail') {
+ // 如果左右两侧都是不通过检测 返回false
+ return false
+ }
+ return true
+ },
+ // 检查左右侧座位满足规则状态
+ checkSeatDirection: function(gRowBasic, gColBasic, checkNum, direction, selectedSeat) {
+ // 空位个数
+ let emptySeat = 0
+ let x = 1 // 检查位置 只允许在x的位置出现过道,已售,维修
+ for (let i = 1; i <= checkNum; i++) {
+ let iter // 根据 gRow gCol direction 找出检查座位左边按顺序排列的checkNum
+ if (direction === '-') {
+ iter = this.data.seatList.find(function(el) {
+ return el.gRow === gRowBasic && el.gCol === gColBasic - i
+ })
+ } else if (direction === '+') {
+ iter = this.data.seatList.find(function(el) {
+ return el.gRow === gRowBasic && el.gCol === gColBasic + i
+ })
+ }
+ if (x === i) {
+ if (iter === undefined) {
+ // 过道
+ return 'special'
+ }
+ if (iter.nowIcon === iter.soldedIcon || iter.nowIcon === iter.fixIcon) {
+ // 已售或者维修
+ return 'special'
+ }
+ let checkSelect = false
+ for (const index in selectedSeat) {
+ if (selectedSeat[index].id === iter.id) {
+ // 已选 顺延一位
+ x++
+ checkSelect = true
+ break;
+ }
+ }
+ if (checkSelect) {
+ continue
+ }
+ } else {
+ if (iter === undefined) {
+ // 过道
+ return 'fail'
+ }
+ if (iter.nowIcon === iter.soldedIcon ||
+ iter.nowIcon === iter.fixIcon) {
+ // 已售或者维修
+ return 'fail'
+ }
+ let checkSelect = false
+ for (const index in selectedSeat) {
+ if (selectedSeat[index].id === iter.id) {
+ return 'fail'
+ }
+ }
+ }
+ emptySeat++
+ if (emptySeat >= 2) {
+ return 'normal'
+ }
+ }
+ },
+ /**
+ * 点击确认选择开始生成订单
+ */
+ createOrder: function() {
+ let _this = this.data
+ var seats = []
+ let selectSeatInfo = _this.selectedSeat;
+ if (selectSeatInfo) {
+ for (var i = 0; i < selectSeatInfo.length; i++) {
+ seats.push({
+ "x":selectSeatInfo[i].x,
+ "y":selectSeatInfo[i].y
+ })
+ }
+ }
+ wx.showLoading({
+ title: '锁座中',
+ })
+ commonApi.user_post("show/lock_multi_seat",{
+ sku_id:_this.productInfo.sku[0].id,
+ date:_this.productInfo.timeInfo.sale_date,
+ start_time:_this.productInfo.timeInfo.screen[0].start_time,
+ end_time:_this.productInfo.timeInfo.screen[0].end_time,
+ seats:JSON.stringify(seats)
+ }).then(res=>{
+ console.log(res)
+ if(res.code==1){
+ let product = _this.productInfo;
+ product.seats = seats;
+ app.globalData.product = product;
+ wx.navigateTo({
+ url: '../showOrder/index',
+ })
+ }
+ })
+ return
+ },
+ //生成最佳座位
+ creatBestSeat: function() {
+ // 优先左侧
+ var bestX = parseInt(this.data.maxX / 2) + 1
+ // 四舍五入 0.618为黄金分割比例
+ var bestY = Math.round(this.data.maxY * 0.618)
+ this.setData({
+ bestX: bestX,
+ bestY: bestY,
+ loadComplete: true
+ })
+ },
+ // 根据seatList 生成一个类map的对象 key值为gRow坐标 value值为gRow为key值的数组
+ creatSeatMap: function() {
+ let seatList = this.data.seatList
+ console.log(seatList)
+ var obj = {}
+ for (let index in seatList) {
+ let seatRowList = seatList[index].gRow
+ if (seatRowList in obj) {
+ // 原本数组下标
+ seatList[index].orgIndex = index
+ obj[seatRowList].push(seatList[index])
+ } else {
+ let seatArr = []
+ // 原本数组下标
+ seatList[index].orgIndex = index
+ seatArr.push(seatList[index])
+ obj[seatRowList] = seatArr
+ }
+ }
+ console.log(obj)
+ setTimeout(()=>{
+ wx.hideLoading()
+ },1000)
+
+ this.setData({
+ seatMap: obj
+ })
+ },
+ // 快速选择座位函数
+ quickSeat: function(event) {
+ let value = parseInt(event.currentTarget.dataset.num);
+ let _self = this.data
+ let that = this
+ // 最优座位数组 里面包含了每排的最佳座位组
+ let bestSeatList = []
+ let bestRowSeat
+ for (let i = _self.maxY; i > 0; i--) {
+ // bestRowSeat为 gRow 为 i 的的所有座位对象
+ bestRowSeat = _self.seatMap[i]
+ if (bestRowSeat === undefined) {
+ continue
+ } else {
+ // 找到每排的最佳座位
+ let bestSeat = that.seachBestSeatByRow(bestRowSeat, value)
+ if (bestSeat != null) {
+ bestSeatList.push(bestSeat)
+ }
+ }
+ }
+ if (bestSeatList.length <= 0) {
+ wx.showToast({
+ title: '没有合适的座位~',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ let bestSeatListIndex = 0
+ // 递归每排的最优座位组 找出离中心点最近的最优座位组
+ bestSeatList.reduce(function(prev, cur, index, arr) {
+ if (Array.isArray(prev)) {
+ // 取中心点离 最好坐标 绝对值
+ let n = Math.abs((prev[0].gCol + prev[value - 1].gCol) / 2 - _self.bestX)
+ let m = Math.abs(prev[0].gRow - _self.bestY)
+ // 勾股定理
+ prev = Math.sqrt(Math.pow(n, 2) + Math.pow(m, 2))
+ }
+ // 取中心点离 最好坐标 绝对值
+ let x = Math.abs((cur[0].gCol + cur[value - 1].gCol) / 2 - _self.bestX)
+ let y = Math.abs(cur[0].gRow - _self.bestY)
+ // 勾股定理
+ let z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))
+ if (z >= prev) {
+ return prev
+ } else {
+ bestSeatListIndex = index
+ return z
+ }
+ })
+ // 最佳座位中包含情侣座位
+ let notEmitSeatArr = []
+ // 发送选择事件
+ for (const iterator of bestSeatList[bestSeatListIndex]) {
+ if (iterator.otherLoveSeatId !== null) {
+ let checkFor = false
+ for (const item of notEmitSeatArr) {
+ if (iterator.id === item) {
+ // 情侣座的另外一半不发送事件
+ checkFor = true
+ break
+ }
+ }
+ if (checkFor) {
+ continue
+ }
+ notEmitSeatArr.push(iterator.otherLoveSeatId)
+ }
+ that.processUnSelected(iterator.orgIndex)
+ }
+ let _selectedSeatList = _self.selectedSeat
+ let totalPrice = 0
+ for (const key in _selectedSeatList) {
+ let price = parseInt(_selectedSeatList[key].price);
+ totalPrice += price;
+ }
+ this.setData({
+ totalPrice: totalPrice
+ })
+ },
+ // 找寻每排的最佳座位数组
+ seachBestSeatByRow: function(rowSeatList, value) {
+ let effectiveSeatLeft = []
+ let effectiveSeatRight = []
+ let effectiveSeatMiddle = []
+ // 检查居中对齐包含最佳座位的
+ effectiveSeatMiddle = this.checkSeatMiddle(rowSeatList, value)
+ // 左边检查开始
+ effectiveSeatLeft = this.checkSeatWithDirection(rowSeatList, value, '-')
+ // 右边检查开始
+ effectiveSeatRight = this.checkSeatWithDirection(rowSeatList, value, '+')
+ // 如果这排中 包含最佳坐标有座位数满足 返回这批座位数组
+ if (effectiveSeatMiddle.length === value) {
+ return effectiveSeatMiddle
+ }
+ // 如果这排中 不包含最佳座位 但是左右两侧都有满足座位数 取离中心点近的方向座位数组
+ if (effectiveSeatLeft.length === value && effectiveSeatRight.length === value) {
+ return Math.abs(effectiveSeatLeft[0].gCol - this.data.bestX) > Math.abs(effectiveSeatRight[0].gCol - this.data.bestX) ? effectiveSeatRight : effectiveSeatLeft
+ } else {
+ // 否则 返回 左右两侧 某一侧满足的座位数组
+ if (effectiveSeatLeft.length === value) {
+ return effectiveSeatLeft
+ }
+ if (effectiveSeatRight.length === value) {
+ return effectiveSeatRight
+ }
+ return null
+ }
+ },
+ // 找到次排是否有快速选择座位数有效的数组 寻找的坐标为 最佳座位根据快速选择座位数 取左右两边正负座位数
+ checkSeatMiddle: function(rowSeatList, value) {
+ let effectiveSeat = []
+ let existLoveSeat = false
+ // 从负到整的值动态值
+ let activeValue = value > 2 ? value - 2 : value - 1
+ if (value === this.data.maxX) {
+ activeValue = activeValue - 1
+ } else if (value > this.data.maxX) {
+ // 快速选择座位数 大于影厅横向左边值 直接返回没有有效座位
+ return effectiveSeat
+ }
+ // 最佳座位根据快速选择座位数 取左右两边正负座位数
+ for (let j = -activeValue; j <= activeValue; j++) {
+ // 确认最佳座位状态
+ let iter = rowSeatList.find((el) => (parseInt(el.gCol) === this.data.bestX + j))
+ // 最佳座位
+ if (iter === undefined) {
+ break
+ }
+ if (iter.nowIcon === iter.soldedIcon || iter.nowIcon === iter.fixIcon) {
+ effectiveSeat = []
+ existLoveSeat = false
+ continue
+ } else {
+ if (iter.otherLoveSeatId !== null) {
+ existLoveSeat = true
+ }
+ effectiveSeat.push(iter)
+ }
+ }
+ if (effectiveSeat.length > value) {
+ // 最后找出居中座位数组后 由于会有已售和维修和过道的影响 在数组中 先删除后面的位置值 再删除前面位置值 直到值为value(快速选择座位数)
+ for (let i = 0; i < activeValue; i++) {
+ effectiveSeat.pop()
+ if (effectiveSeat.length === value) {
+ break
+ }
+ effectiveSeat.shift()
+ if (effectiveSeat.length === value) {
+ break
+ }
+ }
+ //预检
+ if (this.preCheckSeatMakeEmpty(effectiveSeat)) {
+ return []
+ }
+ } else if (effectiveSeat.length < value) {
+ return []
+ } else {
+ //预检
+ if (this.preCheckSeatMakeEmpty(effectiveSeat)) {
+ return []
+ }
+ }
+ // 如果最近座位组中存在情侣座
+ // 检查数组内情侣座必须成对出现 否则舍弃
+ if (existLoveSeat) {
+ if (!this.checkLoveSeatIsDouble(effectiveSeat)) {
+ return []
+ }
+ }
+ return effectiveSeat
+ },
+ // 找到次排是否有快速选择座位数有效的数组
+ checkSeatWithDirection: function(rowSeatList, value, direction) {
+ let activeValue = value
+ // 最多允许过道等于3 由于某些影厅 居中的位置不是座位 存在大部分的过道 导致无法选择到最佳座位
+ let roadDistance = 3
+ let effectiveSeat = []
+ let existLoveSeat = false
+ for (let j = 0; j < activeValue; j++) {
+ let iter
+ if (direction === '-') {
+ iter = rowSeatList.find((el) => (parseInt(el.gCol) === this.data.bestX - j))
+ } else if (direction === '+') {
+ iter = rowSeatList.find((el) => (parseInt(el.gCol) === this.data.bestX + j))
+ }
+ if (iter === undefined) {
+ activeValue++
+ roadDistance--
+ if (roadDistance <= 0) {
+ break
+ } else {
+ continue
+ }
+ }
+ if (iter.nowIcon === iter.soldedIcon || iter.nowIcon === iter.fixIcon) {
+ activeValue++
+ effectiveSeat = []
+ existLoveSeat = false
+ continue
+ } else {
+ if (iter.otherLoveSeatId !== null) {
+ existLoveSeat = true
+ }
+ effectiveSeat.push(iter)
+ }
+ if (effectiveSeat.length === value) {
+ //预检
+ if (this.preCheckSeatMakeEmpty(effectiveSeat)) {
+ activeValue++
+ effectiveSeat.shift()
+ continue
+ }
+ }
+ }
+ // 如果最近座位组中存在情侣座
+ // 检查数组内情侣座必须成对出现 否则舍弃
+ if (existLoveSeat) {
+ if (!this.checkLoveSeatIsDouble(effectiveSeat)) {
+ return []
+ }
+ }
+ return effectiveSeat
+ },
+ checkLoveSeatIsDouble: function(arr) {
+ // 检查数组内必须情侣座是否对出现 否则舍弃
+ var orgSet = new Set()
+ var loveSeatSet = new Set()
+ for (const iterator of arr) {
+ orgSet.add(iterator.id)
+ }
+ for (const iterator of arr) {
+ if (iterator.otherLoveSeatId !== null) {
+ loveSeatSet.add(iterator.otherLoveSeatId)
+ }
+ }
+ let beforelen = orgSet.size
+ let afterlen = new Set([...orgSet, ...loveSeatSet]).size
+ return beforelen === afterlen
+ },
+ //预检座位
+ preCheckSeatMakeEmpty(arr) {
+ let that = this
+ // 开始计算是否留下空位 ------------ 开始
+ let result = arr.every(function(element, index, array) {
+ return that.checkSeat(element, arr)
+ })
+ // 开始计算是否留下空位 ------------ 结束
+ return !result
+ }
+})
\ No newline at end of file
diff --git a/pages/order/showSeat/index.json b/pages/order/showSeat/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/order/showSeat/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/showSeat/index.wxml b/pages/order/showSeat/index.wxml
new file mode 100644
index 0000000..1b8e79c
--- /dev/null
+++ b/pages/order/showSeat/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+ {{productInfo.title}}
+ {{productInfo.timeInfo.screen[0].start_time}} ~ {{productInfo.timeInfo.screen[0].end_time}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 在线支付:
+ ¥{{totalPrice/100}}
+ 确认选座
+
\ No newline at end of file
diff --git a/pages/order/showSeat/index.wxss b/pages/order/showSeat/index.wxss
new file mode 100644
index 0000000..fdd5110
--- /dev/null
+++ b/pages/order/showSeat/index.wxss
@@ -0,0 +1,511 @@
+/* pages/list/movieticket/list/seats/index.wxss */
+/*
+*@zenghao 2018-06-12
+*/
+
+page {
+ background: #eee;
+}
+
+/*
+*上方影片名称样式
+*/
+
+.movieName {
+ font-size: 35rpx;
+ font-weight: 600;
+ margin-bottom: 10rpx;
+}
+
+/*
+*上方排期信息样式
+*/
+
+.planDetail {
+ color: #aaa;
+ font-size: 27rpx;
+}
+
+/*
+*上方影片,排期信息的父级
+*/
+
+.info {
+ width: 100%;
+ height: 80rpx;
+ background: #fff;
+ border-top: 1rpx solid #eee;
+ border-bottom: 1rpx solid #eee;
+ padding: 30rpx 30rpx;
+ position: relative;
+}
+
+.seatDemosBack {
+ background: #fff;
+}
+
+/*
+*座位样式的父级
+*/
+
+.seatDemos {
+ color: #aaa;
+ background: #fff;
+ position: relative;
+ margin: 0 auto;
+ width: 80%;
+ box-sizing: border-box;
+ font-size: 25rpx;
+ height: 70rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.areaSeatDemos {
+ width: 100%;
+ height: 80rpx;
+ position: fixed;
+ bottom: 100rpx;
+}
+
+.seatDemosScroll {
+ color: #aaa;
+ background: #fff;
+ width: 100%;
+ height: 100%;
+ font-size: 25rpx;
+ white-space: nowrap;
+}
+
+.seatDemosScrollItem {
+ height: 90rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ margin-left: 15px;
+ display: inline-block;
+ align-items: center;
+ margin-top: 25rpx;
+}
+
+.seatDemosScrollItem.Itemnormal image {
+ margin-right: 10rpx;
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: -30%;
+}
+
+/*
+*情侣座位的图片样式
+*/
+
+.seatDemosScrollItem.Itemlove image {
+ margin: 0;
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: -30%;
+}
+
+/*
+*情侣座位的字体样式
+*/
+
+.seatDemosScrollItem.Itemlove text {
+ margin-left: 10rpx;
+}
+
+.seatDemo image {
+ width: 45rpx;
+ height: 45rpx;
+}
+
+/*
+*普通座位的图片样式
+*/
+
+.seatDemoItem {
+ white-space: nowrap;
+ width: 45rpx;
+ display: block;
+}
+
+/*
+*情侣座位的图片样式
+*/
+
+.seatDemo {
+ display: flex;
+ align-items: center;
+}
+
+/*
+*情侣座位的字体样式
+*/
+
+.loveSeatDemo text {
+ margin-left: 10rpx;
+}
+
+/*
+*影厅图上方显示影厅名字区域
+*/
+
+.hallName {
+ width: 200rpx;
+ height: 0;
+ border-top: 40rpx solid #ccc;
+ border-right: 20rpx solid transparent;
+ border-left: 20rpx solid transparent;
+ line-height: 30rpx;
+ color: white;
+ position: absolute;
+ top: -100rpx;
+ z-index: 2;
+ left: 50%;
+ transform: translateX(-50%);
+ white-space: nowrap;
+}
+
+/*
+*影厅图上方显示影厅名字区域字体样式
+*/
+
+.hallName text {
+ font-size: 20rpx;
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ top: -35rpx;
+}
+
+/*
+*所有座位的区域
+*/
+
+.seatArea {
+ margin: 0 auto;
+ font-size: 10rpx;
+ position: relative;
+}
+
+/*
+*中轴线
+*/
+
+.alignLine {
+ position: absolute;
+ left: 50%;
+ height: 100%;
+ border-left: 1px dashed #aaa;
+ transform: translateX(-100%);
+}
+
+/*
+*选座区域普通座位的图片样式
+*/
+
+.normal {
+ position: relative;
+ /* margin: 10rpx; */
+ width: 100%;
+ height: 100%;
+}
+
+/*
+*选座区域情侣座位的图片样式
+*/
+
+.LoveSeat {
+ position: relative;
+ /* margin: 10rpx 0; */
+ width: 70rpx;
+ height: 70rpx;
+}
+
+/*
+*所有座位的图片样式下方透明可点击区域
+*/
+
+.seatTap {
+ position: absolute;
+}
+
+/*
+*情侣座位的图片样式下方透明可点击区域
+*/
+
+.LoveSeatTap {
+ position: absolute;
+ top: 0;
+ width: 70rpx;
+ height: 70rpx;
+}
+
+/*
+* 座位图限制区域
+*/
+
+movable-area {
+ background: #eee;
+ overflow: hidden;
+}
+
+/*
+* 座位图可移动区域(座位图)
+*/
+
+.movableOne {
+ box-sizing: border-box;
+ padding: 100rpx 60rpx;
+ color: #fff;
+}
+
+/*
+* 座位图可移动区域(左边座位排号栏)
+*/
+
+.movableTwo {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 1400rpx;
+ width: 30rpx;
+ padding: 100rpx 0;
+ color: #fff;
+}
+
+/*
+* (左边座位排号栏整体)
+*/
+
+.seatTool {
+ width: 30rpx;
+ padding: 100rpx 0;
+ opacity: 0.5;
+}
+
+.seatToolArea {
+ background: rgba(0, 0, 0, 0.2);
+ border-radius: 50rpx;
+}
+
+/*
+* (左边座位排号栏每一个块)
+*/
+
+.seatTag {
+ text-align: center;
+ color: rgba(0, 0, 0, 0.5);
+}
+
+/*
+*页面最下方确认选座区域
+*/
+
+.orderComfirm {
+ background: #fff;
+ position: fixed;
+ display: flex;
+ bottom: 0rpx;
+ width: 100%;
+ line-height: 100rpx;
+ z-index: 3;
+}
+
+/*
+*页面最下方价格区域
+*/
+
+.orderPrice {
+ text-indent: 30rpx;
+ color: black;
+ height: 100rpx;
+ width: 60%;
+}
+
+/*
+*页面最下方价格字体样式
+*/
+
+.orderPrice text {
+ color: red;
+}
+
+/*
+*页面最下方确认选座区域渐变色
+*/
+
+.comfirm {
+ font-weight: 900;
+ text-align: center;
+ color: white;
+ width: 100%;
+ background: linear-gradient(to right, #C26DFE, #6F50F5);
+ background: #D62828;
+ height: 100rpx;
+}
+
+/*
+*用户选中的座位区域
+*/
+
+.selectSeatInfo {
+ background: #fff;
+ position: fixed;
+ bottom: 100rpx;
+ height: 80rpx;
+ width: 100%;
+ padding: 10rpx 0;
+}
+
+/*
+*用户选中的座位详情滑块
+*/
+
+.scrollSeat {
+ height: 173rpx;
+ white-space: nowrap;
+}
+
+/*
+*每块用户选中的座位详情
+*/
+
+.scrollItem {
+ border: 1rpx solid #bbb;
+ border-radius: 10rpx;
+ width: 180rpx;
+ display: inline-block;
+ margin-left: 20rpx;
+ position: relative;
+}
+
+/*
+* 快速选座模块
+*/
+
+.quickItem {
+ width: 159rpx;
+ height: 173rpx;
+ background: #F5F5F5;
+ border-radius: 13rpx;
+ text-align: center;
+ display: inline-block;
+ margin-right: 28rpx;
+ position: relative;
+ font-size: 27rpx;
+ display: inline-flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+/*
+*每块用户选中的座位详情上方文字
+*/
+
+.scrollTextTop {
+ color: #555;
+ text-indent: 30rpx;
+ line-height: 25rpx;
+ font-size: 26rpx;
+ height: 25rpx;
+ margin-top: 10rpx;
+}
+
+/*
+*每块用户选中的座位详情下方文字
+*/
+
+.scrollTextBottom {
+ font-weight: 600;
+ font-size: 26rpx;
+ color: #ff005a;
+ text-indent: 40rpx;
+ height: 25rpx;
+ line-height: 25rpx;
+ margin: 10rpx 0;
+}
+
+/*
+*每块用户选中的座位详情关闭按钮
+*/
+
+.scrollItem image {
+ position: absolute;
+ z-index: 2;
+ width: 30rpx;
+ height: 30rpx;
+ right: 10rpx;
+ top: 50%;
+ transform: translateY(-50%);
+}
+
+.seatAreaTip {
+ position: relative;
+ width: 750rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+ font-size: 16rpx;
+ color: rgba(0, 0, 0, 0.1);
+ border-top: 1rpx dashed rgba(0, 0, 0, 0.1);
+}
+
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: white;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 25rpx;
+ flex-shrink: 29rpx;
+ color: #333;
+}
+.fixed-title {
+ font-size: 31rpx;
+ font-weight: 500;
+ color: #000;
+}
+.fixed-tip {
+ margin: 30rpx 0;
+ font-size: 27rpx;
+ color: #666;
+}
+.fixed-btn {
+ height: 78rpx;
+ line-height: 78rpx;
+ text-align: center;
+ background: #D62828;
+ color: #fff;
+ border-radius: 39rpx;
+ font-size: 33rpx;
+ font-weight: 500;
+ margin-top: 47rpx;
+}
+.quickItem.active {
+ background: rgba(214, 40, 40, 0.06);
+ border: 1rpx solid #D62828;
+ box-sizing: border-box;
+}
+.fixed-bottom .btn {
+ width: 267rpx;
+ line-height: 113rpx;
+ text-align: center;
+ color: #fff;
+ font-size: 36rpx;
+ font-weight: 500;
+ background: #D62828;
+}
+.fixed-bottom .price {
+ font-size: 36rpx;
+ font-weight: 500;
+ flex: 1;
+ margin: 0 10rpx;
+ color: #D62828;
+}
\ No newline at end of file
diff --git a/pages/pbService/appreciate/index.js b/pages/pbService/appreciate/index.js
new file mode 100644
index 0000000..cc6a963
--- /dev/null
+++ b/pages/pbService/appreciate/index.js
@@ -0,0 +1,162 @@
+// pages/pbService/appreciate/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ videoTags:[],
+ type:2,
+ picTags:[],
+ picTagId:null,
+ videoTagId:null,
+ page_no:1,
+ total:1,
+ list:[],
+ isTest:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("pbservice/Other/getClientConfig",{
+ unique_key:"wechatxcx"
+ }).then(res=>{
+ let data = JSON.parse(res.data)
+ this.setData({
+ isTest:data.isTest
+ })
+ })
+ // 获取视频的标签
+ commonApi._post("pbservice/Artpopulate/videoTags").then(res=>{
+ res.data.unshift({
+ CatalogName:"全部",
+ CatalogId:null
+ })
+ this.setData({
+ videoTags:res.data,
+ videoTagId:res.data[0].CatalogId
+ })
+ this.getList();
+ })
+ // 获取图片的标签
+ commonApi._post("pbservice/Artpopulate/imgTags").then(res=>{
+ res.data.unshift({
+ Name:"全部",
+ TagId:null
+ })
+ this.setData({
+ picTags:res.data,
+ picTagId:res.data[0].TagId
+ })
+ })
+ },
+ changeType:function(e){
+ let type = e.currentTarget.dataset.type;
+ this.setData({
+ type:type,
+ list:[],
+ page_no:1,
+ total:1,
+ picTagId:null,
+ videoTagId:null
+ })
+ this.getList();
+ },
+ search:function(e){
+ let id = e.currentTarget.dataset.id;
+ this.setData({
+ list:[],
+ page_no:1,
+ total:1
+ })
+ if(this.data.type==1){
+ this.setData({
+ videoTagId:id
+ })
+ }
+ else {
+ this.setData({
+ picTagId:id
+ })
+ }
+ this.getList()
+ },
+ getList:function(){
+ if(this.data.total{
+ let list = this.data.type==1?res.data.videolist:res.data.photolist;
+ console.log(this.data.type,res,list)
+ this.setData({
+ total:res.data.totalpage,
+ list:this.data.list.concat(list),
+ page_no:this.data.page_no+1
+ })
+ })
+ },
+ gotoDetail:function(e){
+ if(this.data.type==2) return;
+ let info = e.currentTarget.dataset.info;
+ info = JSON.stringify(info);
+ info = encodeURIComponent(info);
+ wx.navigateTo({
+ url: 'info/index?info='+info,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList();
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/appreciate/index.json b/pages/pbService/appreciate/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/appreciate/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/appreciate/index.wxml b/pages/pbService/appreciate/index.wxml
new file mode 100644
index 0000000..40053a9
--- /dev/null
+++ b/pages/pbService/appreciate/index.wxml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+ {{item.Name}}
+ {{item.CatalogName || item.Tag}}
+
+
\ No newline at end of file
diff --git a/pages/pbService/appreciate/index.wxss b/pages/pbService/appreciate/index.wxss
new file mode 100644
index 0000000..7ce2f70
--- /dev/null
+++ b/pages/pbService/appreciate/index.wxss
@@ -0,0 +1,96 @@
+/* pages/pbService/appreciate/index.wxss */
+page {
+ background: #EDEDED;
+}
+.appreciate-types {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 20rpx;
+}
+.top-menus {
+ height: 180rpx;
+ background: white;
+ position: fixed;
+ left: 0;
+ right: 0;
+}
+.appreciate-type {
+ width: 200rpx;
+ line-height: 60rpx;
+ background: #EDEDED;
+ border-radius: 30rpx;
+ text-align: center;
+ color: #333;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.appreciate-type.active {
+ background: #0B898E;
+ color: #fff;
+}
+.appreciate-type:nth-child(1){
+ margin-right: 80rpx;
+}
+.tags {
+ display: flex;
+ align-items: center;
+ margin: 0 30rpx;
+ margin-top: 10rpx;
+ height: 50rpx;
+ overflow-x: auto;
+}
+.tag {
+ font-size: 26rpx;
+ color: #333;
+ font-weight: 500;
+ position: relative;
+ margin-right: 60rpx;
+ flex-shrink: 0;
+}
+.tag.active {
+ font-weight: bold;
+ color: #0B898E;
+}
+.tag.active::after {
+ content: "!";
+ font-size: 0;
+ width: 30rpx;
+ height: 4rpx;
+ position: absolute;
+ left: 50%;
+ margin-left: -15rpx;
+ top: 50rpx;
+ background: #0B898E;
+}
+.list {
+ display: flex;
+ margin: 30rpx;
+ justify-content: space-between;
+ flex-wrap: wrap;
+}
+.item {
+ height: 340rpx;
+ width: 335rpx;
+ border-radius: 20rpx;
+ background: white;
+ overflow: hidden;
+ margin-bottom: 20rpx;
+}
+.item image {
+ height: 220rpx;
+ width: 100%;
+ display: block;
+}
+.item .title {
+ margin: 20rpx;
+ line-height: 29rpx;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: bold;
+}
+.subtitle {
+ color: #999;
+ font-size: 26rpx;
+ margin: 0 20rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/appreciate/info/index.js b/pages/pbService/appreciate/info/index.js
new file mode 100644
index 0000000..1464077
--- /dev/null
+++ b/pages/pbService/appreciate/info/index.js
@@ -0,0 +1,71 @@
+// pages/pbService/appreciate/info/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let info = decodeURIComponent(options.info);
+ info = JSON.parse(info)
+ this.setData({
+ info:info
+ })
+ console.log(info)
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/appreciate/info/index.json b/pages/pbService/appreciate/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/appreciate/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/appreciate/info/index.wxml b/pages/pbService/appreciate/info/index.wxml
new file mode 100644
index 0000000..32219bd
--- /dev/null
+++ b/pages/pbService/appreciate/info/index.wxml
@@ -0,0 +1,6 @@
+
+
+
+
+ {{info.Name}}
+
diff --git a/pages/pbService/appreciate/info/index.wxss b/pages/pbService/appreciate/info/index.wxss
new file mode 100644
index 0000000..f4421be
--- /dev/null
+++ b/pages/pbService/appreciate/info/index.wxss
@@ -0,0 +1,6 @@
+/* pages/pbService/appreciate/info/index.wxss */
+.name {
+ font-size: 30rpx;
+ color: #333;
+ margin: 20rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/bike/index.js b/pages/pbService/bike/index.js
new file mode 100644
index 0000000..095f5ee
--- /dev/null
+++ b/pages/pbService/bike/index.js
@@ -0,0 +1,175 @@
+// pages/pbService/bike/index.js
+let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
+let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height + systemInfo.statusBarHeight;
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ seachHeight:height,
+ location:{
+ latitude:"",
+ longitude:""
+ },
+ latitude:"",
+ longitude:"",
+ list:[],
+ types:["公共自行车","找厕所","停车场"],//都做一起了 根据type来分 默认就是自行车
+ type:0,
+ typeService:['pbservice/Ztfw/publicBycicle','pbservice/Ztfw/toilets','pbservice/Ztfw/park']
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ type:options.type?options.type:0
+ })
+ let that = this;
+ wx.getLocation({
+ altitude: 'altitude',
+ type: 'gcj02',
+ success: function (res) {
+ console.log(res)
+ that.setData({
+ latitude:res.latitude,
+ longitude:res.longitude,
+ location:{
+ latitude:res.latitude,
+ longitude:res.longitude
+ }
+ })
+ that.getList()
+ },
+ fail:function(err){
+ that.setData({
+ latitude:app.globalData.latitude,
+ longitude:app.globalData.longitude,
+ location:{
+ latitude:app.globalData.latitude,
+ longitude:app.globalData.longitude
+ }
+ })
+ that.getList()
+ }
+ })
+ },
+ getList:function(){
+ // return;
+ commonApi.user_post(this.data.typeService[this.data.type],{
+ point_type:"gaode",
+ lat:this.data.latitude,
+ lon:this.data.longitude
+ }).then(res=>{
+ let list = [];
+ if(this.data.type==2){
+ res.data = res.data.parklist;
+ }
+ res.data.map((item,index)=>{
+ let mapItem = {};
+ if(this.data.type==0){
+ item.showContent = item.name + "(" + item.address + ")";
+ mapItem.latitude = Number(item.gaodelat);
+ mapItem.longitude = Number(item.gaodelng);
+ }
+ else if(this.data.type==1){
+ item.showContent = item.poiname;
+ mapItem.latitude = Number(item.latitude);
+ mapItem.longitude = Number(item.longitude);
+ }
+ else if(this.data.type==2){
+ item.showContent = item.parkName + "(" + item.address + ")";
+ mapItem.latitude = Number(item.gaodelat);
+ mapItem.longitude = Number(item.gaodelon);
+ }
+ mapItem.id = index;
+ mapItem.info = item;
+ mapItem.iconPath = "https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/other/bike"+this.data.type+".png";
+ mapItem.width = 40;
+ mapItem.height=40;
+ if(mapItem.latitude<40){
+ list.push(mapItem)
+ }
+ })
+ this.setData({
+ list:list
+ })
+ console.log(res)
+ })
+ },
+ onTapMarker:function(e){
+ console.log(e)
+ let index = e.detail.markerId,list = this.data.list;
+ let item = list[index];
+ wx.showModal({
+ title:'到这去',
+ content:item.info.showContent,
+ success:function(res){
+ if(res.confirm){
+ wx.openLocation({
+ latitude: item.latitude,
+ longitude: item.longitude,
+ })
+ }
+ }
+ })
+ },
+ changeRegion:function(e){
+ if(e.type!='end') return;
+ console.log(e.detail.centerLocation)
+ this.setData(e.detail.centerLocation)
+ this.getList()
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/bike/index.json b/pages/pbService/bike/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/bike/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/bike/index.wxml b/pages/pbService/bike/index.wxml
new file mode 100644
index 0000000..8ae5670
--- /dev/null
+++ b/pages/pbService/bike/index.wxml
@@ -0,0 +1,4 @@
+
+
+
diff --git a/pages/pbService/bike/index.wxss b/pages/pbService/bike/index.wxss
new file mode 100644
index 0000000..a1349c1
--- /dev/null
+++ b/pages/pbService/bike/index.wxss
@@ -0,0 +1,10 @@
+/* pages/pbService/bike/index.wxss */
+.map {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/pages/pbService/bus/index.js b/pages/pbService/bus/index.js
new file mode 100644
index 0000000..7fc814f
--- /dev/null
+++ b/pages/pbService/bus/index.js
@@ -0,0 +1,124 @@
+// pages/pbService/bus/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ activeIndex:0,
+ info:[],
+ keywords:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let that = this;
+ wx.getLocation({
+ type: 'gcj02',
+ success:function(res){
+ commonApi._post("pbservice/Publicbus/nearbyStations",{
+ point_type:"gaode",
+ lat:res.latitude,
+ lon:res.longitude
+ }).then(res=>{
+ if(res.data && res.data.StandInfo){
+ res.data.StandInfo.map(item=>{
+ item.SCrossLines = item.SCrossLine?(item.SCrossLine+"").split(","):[];
+ })
+ that.setData({
+ list:res.data.StandInfo
+ })
+ that.getDetail()
+ }
+ console.log(res)
+ })
+ },
+ fail:function(){
+ wx.showToast({
+ title: '请开启定位授权后再试',
+ icon:'none'
+ })
+ }
+ })
+ },
+ showMore:function(e){
+ if(e.currentTarget.dataset.index==this.data.activeIndex){
+ this.setData({
+ activeIndex:-1,
+ info:[]
+ })
+ }
+ else {
+ this.setData({
+ activeIndex:e.currentTarget.dataset.index
+ })
+ this.getDetail();
+ }
+
+ },
+ getDetail:function(){
+ let index = this.data.activeIndex,list = this.data.list;
+ commonApi._post("pbservice/Publicbus/stationRealtimeInfo",{
+ sguid:list[index].SGuid,
+ noteguid:list[index].NoteGuid
+ }).then(res=>{
+ this.setData({
+ info:res.data.Status || []
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/bus/index.json b/pages/pbService/bus/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/bus/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/bus/index.wxml b/pages/pbService/bus/index.wxml
new file mode 100644
index 0000000..6a92216
--- /dev/null
+++ b/pages/pbService/bus/index.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+附近公交点
+
+
+
+ {{item.Name}}
+
+
+
+ {{item}}路
+
+
+
+ {{item.LName}}路
+
+ 开往 {{item.LDirection}}
+ {{item.Distince>0?(item.Distince==1?"进站":(item.Distince-1+"站")):(item.Distince==0?'已到站':'暂无车次')}}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/pbService/bus/index.wxss b/pages/pbService/bus/index.wxss
new file mode 100644
index 0000000..14a7b39
--- /dev/null
+++ b/pages/pbService/bus/index.wxss
@@ -0,0 +1,118 @@
+/* pages/pbService/bus/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.top-search {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ padding: 20rpx 0;
+}
+.search-box {
+ height: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 20rpx;
+ background: #ededed;
+ border-radius: 30rpx;
+ margin: 0 30rpx;
+}
+.search-box .iconfont {
+ color: #999999;
+ flex-shrink: 0;
+}
+.search-box input {
+ display: block;
+ flex: 1;
+ margin: 0 20rpx;
+ font-size: 26rpx;
+}
+.search-btn {
+ flex-shrink: 0;
+ width: 110rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #0B898E;
+ border-left: 1rpx solid #ccc;
+ line-height: 40rpx;
+}
+.text-tip {
+ background: white;
+ padding: 0 30rpx;
+ line-height: 65rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.box {
+ margin: 20rpx 30rpx;
+ padding: 0 20rpx;
+ background: white;
+ border-radius: 20rpx;
+}
+.box-title-box {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ line-height: 30rpx;
+ margin-bottom: 15rpx;
+}
+.box-title-box image {
+ width: 30rpx;
+ height: 30rpx;
+ flex-shrink: 0;
+ display: block;
+}
+.box-title {
+ flex: 1;
+ margin:15rpx;
+}
+.box-title-box .iconfont {
+ color: #999999;
+ font-size: 24rpx;
+}
+.bus-item {
+ margin: 20rpx 30rpx;
+ font-size: 26rpx;
+}
+.bus-name {
+ color: #333;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.bus-tip {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #888888;
+}
+.bus-state {
+ color: #0B898E;
+}
+.more-btn {
+ line-height: 86rpx;
+ border-top: 1rpx solid #d8d8d8;
+ text-align: center;
+ color: #0B898E;
+ font-size: 26rpx;
+ font-weight: 500;
+}
+.bus-names-list {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+}
+.bus-name-item {
+ flex-shrink: 0;
+ color: #0B898E;
+ font-size: 26rpx;
+ padding: 0 15rpx;
+ border: 2rpx solid;
+ font-weight: 500;
+ line-height: 40rpx;
+ border-radius: 20rpx;
+ box-sizing: border-box;
+ margin-right: 10rpx;
+ margin-bottom: 10rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/bus/lineinfo/index.js b/pages/pbService/bus/lineinfo/index.js
new file mode 100644
index 0000000..b41601e
--- /dev/null
+++ b/pages/pbService/bus/lineinfo/index.js
@@ -0,0 +1,83 @@
+// pages/pbService/bus/lineinfo/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ id:null,
+ start:[],
+ end:[],
+ now:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ this.getDetail()
+ },
+ getDetail:function(){
+ commonApi._post("pbservice/Publicbus/busLineDetail",{
+ line_id:this.data.id
+ }).then(res=>{
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/bus/lineinfo/index.json b/pages/pbService/bus/lineinfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/bus/lineinfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/bus/lineinfo/index.wxml b/pages/pbService/bus/lineinfo/index.wxml
new file mode 100644
index 0000000..2f76643
--- /dev/null
+++ b/pages/pbService/bus/lineinfo/index.wxml
@@ -0,0 +1,32 @@
+
+
+
+ {{info.LName}}路(4辆正在行驶)
+ {{info.LDirection}}
+ 首:{{info.LFStdFTime}} 末:{{info.LFStdETime}}
+
+
+
+
+
+ 始
+ {{item.SName}}
+
+
+ 终
+ {{item.SName}}
+
+
+
+ {{item.SName}}
+
+
+
+ {{item.SName}}
+ {{item.BusInfo}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/pbService/bus/lineinfo/index.wxss b/pages/pbService/bus/lineinfo/index.wxss
new file mode 100644
index 0000000..a84838c
--- /dev/null
+++ b/pages/pbService/bus/lineinfo/index.wxss
@@ -0,0 +1,92 @@
+/* pages/pbService/bus/lineinfo/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.line-top {
+ padding: 10rpx 30rpx;
+ background: white;
+}
+.line-name {
+ font-size: 30rpx;
+ color: #333;
+ font-weight: bold;
+}
+.line-name text {
+ font-size: 24rpx;
+ font-weight: 400;
+}
+.line-direction {
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ margin: 10rpx 0;
+}
+.line-direction image {
+ width: 40rpx;
+ height: 40rpx;
+ margin: 0 20rpx;
+ flex-shrink: 0;
+}
+.line-time {
+ color: #999999;
+ font-size: 26rpx;
+}
+.line-info {
+ margin: 20rpx 30rpx;
+ background: white;
+ border-radius: 20rpx;
+ padding: 20rpx;
+ position: relative;
+}
+.line-bg {
+ position: absolute;
+ top: 20rpx;
+ bottom: 20rpx;
+ width: 10rpx;
+ background: #0B898E;
+}
+.start-name {
+ padding-left: 50rpx;
+ font-size: 26rpx;
+ color: #666;
+ height: 120rpx;
+ position: relative;
+ line-height: 26rpx;
+}
+.start-icon {
+ position: absolute;
+ left: 0;
+ top: -10rpx;
+ width: 32rpx;
+ line-height: 32rpx;
+ background: #0B898E;
+ border-radius: 50%;
+ text-align: center;
+ font-size: 20rpx;
+ color: #fff;
+ margin-left: -11rpx;
+}
+.start-name image.arrow {
+ width: 10rpx;
+ height: 10rpx;
+ display: block;
+ position: absolute;
+ left: 0;
+ margin-top: 6rpx;
+}
+.start-name image.stop {
+ width: 40rpx;
+ height: 40rpx;
+ display: block;
+ position: absolute;
+ left: -15rpx;
+ margin-top: -7rpx;
+}
+.busfresh {
+ position: fixed;
+ right: 40rpx;
+ bottom: 40rpx;
+ width: 80rpx;
+ display: block;
+}
\ No newline at end of file
diff --git a/pages/pbService/bus/search/index.js b/pages/pbService/bus/search/index.js
new file mode 100644
index 0000000..13f0085
--- /dev/null
+++ b/pages/pbService/bus/search/index.js
@@ -0,0 +1,124 @@
+// pages/pbService/bus/search/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ keywords:"",
+ realKeywords:"",
+ type:null,
+ info:[],
+ carIndex:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ searchInput:function(e){
+ this.setData({
+ keywords:e.detail.value
+ })
+ },
+ search:function(){
+ if(!this.data.keywords){
+ wx.showToast({
+ title: '请输入搜索关键字',
+ icon:'none'
+ })
+ return;
+ }
+ this.setData({
+ realKeywords:this.data.keywords,
+ list:[],
+ page_no:1,
+ total:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ if(!this.data.realKeywords) return
+ commonApi._post("pbservice/Publicbus/search",{
+ keywords:this.data.realKeywords
+ }).then(res=>{
+ this.setData({
+ type:res.data.lines && res.data.lines.response.DataType=='QueryLineInfo'?'QueryLineInfo':'QueryStandNoteGUID',
+ list:res.data.lines && res.data.lines.response.DataType=='QueryLineInfo'?res.data.lines.response.LineInfo:res.data.stations.response.StandInfo
+ })
+ if(this.data.type=='QueryStandNoteGUID'){
+ this.getInfo()
+ }
+ })
+ },
+ selectIndex:function(e){
+ let list = this.data.list,index = e.currentTarget.dataset.index;
+ if(index==this.data.carIndex) return;
+ this.setData({
+ carIndex:index
+ })
+ this.getInfo()
+ },
+ getInfo:function(){
+ let list = this.data.list,index = this.data.carIndex
+ commonApi._post("pbservice/Publicbus/stationRealtimeInfo",{
+ sguid:list[index].SGuid,
+ noteguid:list[index].NoteGuid
+ }).then(res=>{
+ this.setData({
+ info:res.data.Status
+ })
+ })
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ // this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/bus/search/index.json b/pages/pbService/bus/search/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/bus/search/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/bus/search/index.wxml b/pages/pbService/bus/search/index.wxml
new file mode 100644
index 0000000..425a517
--- /dev/null
+++ b/pages/pbService/bus/search/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+ {{item.LName}}
+ {{item.LFStdName}} {{item.LEStdName}}
+
+
+
+
+
+
+
+ {{item.Name}} {{item.Direct}}
+
+ {{item.LName}}路
+
+ 开往 {{item.LDirection}}
+ {{item.Distince>0?(item.Distince==1?"进站":(item.Distince-1+"站")):'暂无车次'}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/pbService/bus/search/index.wxss b/pages/pbService/bus/search/index.wxss
new file mode 100644
index 0000000..e8da4a2
--- /dev/null
+++ b/pages/pbService/bus/search/index.wxss
@@ -0,0 +1,93 @@
+/* pages/pbService/bus/search/index.wxss */
+page {
+ background: #fff;
+}
+.top-search {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ padding: 20rpx 0;
+}
+.search-box {
+ height: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 20rpx;
+ background: #ededed;
+ border-radius: 30rpx;
+ margin: 0 30rpx;
+}
+.search-box .iconfont {
+ color: #999999;
+ flex-shrink: 0;
+}
+.search-box input {
+ display: block;
+ flex: 1;
+ margin: 0 20rpx;
+ font-size: 26rpx;
+}
+.search-btn {
+ flex-shrink: 0;
+ width: 110rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #0B898E;
+ border-left: 1rpx solid #ccc;
+ line-height: 40rpx;
+}
+.stop-item {
+ display: flex;
+ margin: 0 30rpx;
+ align-items: center;
+ min-height: 80rpx;
+ padding: 20rpx 0;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: bold;
+ border-bottom: 1rpx solid #ccc;
+}
+.stop-item image {
+ display: block;
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 22rpx;
+}
+.line-info {
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ font-weight: 500;
+ color: #333;
+ margin-top: 20rpx;
+}
+.line-info image {
+ width: 30rpx;
+ height: 30rpx;
+ margin: 0 20rpx;
+}
+.stop-item .iconfont {
+ color: #999999;
+ font-size: 24rpx;
+ flex-shrink: 0;
+}
+.bus-item {
+ margin: 20rpx 0;
+ font-size: 26rpx;
+}
+.bus-name {
+ color: #333;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.bus-tip {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #888888;
+}
+.bus-state {
+ color: #0B898E;
+}
\ No newline at end of file
diff --git a/pages/pbService/feiyi/index.js b/pages/pbService/feiyi/index.js
index b5ff99c..06f2ccf 100644
--- a/pages/pbService/feiyi/index.js
+++ b/pages/pbService/feiyi/index.js
@@ -17,7 +17,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- commonApi._post("Feiyi/getCategorys",{}).then(res=>{
+ commonApi._post("pbservice/Feiyi/getCategorys",{}).then(res=>{
res.data.unshift({
id:null,
class_name:"全部非遗目录"
@@ -41,7 +41,7 @@ Page({
getList:function(){
let list = this.data.list;
if(list.length>=this.data.total) return;
- commonApi._post("Feiyi/getList",{
+ commonApi._post("pbservice/Feiyi/getList",{
page_no:this.data.page_no,
page_num:10,
cate_id:this.data.types[this.data.typeIndex].id
diff --git a/pages/pbService/feiyi/index.json b/pages/pbService/feiyi/index.json
index 35cf02f..eb3533f 100644
--- a/pages/pbService/feiyi/index.json
+++ b/pages/pbService/feiyi/index.json
@@ -1,5 +1,6 @@
{
"usingComponents": {
- "title":"/pages/component/TitleHeader"
+ "title":"/pages/component/TitleHeader",
+ "common-image":"/pages/component/commonImage/index"
}
}
\ No newline at end of file
diff --git a/pages/pbService/feiyi/index.wxml b/pages/pbService/feiyi/index.wxml
index ff52877..8a49db4 100644
--- a/pages/pbService/feiyi/index.wxml
+++ b/pages/pbService/feiyi/index.wxml
@@ -7,7 +7,8 @@
-
+
+
{{item.title}}
{{item.protect_office}}
diff --git a/pages/pbService/feiyi/index.wxss b/pages/pbService/feiyi/index.wxss
index 1d733bc..ccbd097 100644
--- a/pages/pbService/feiyi/index.wxss
+++ b/pages/pbService/feiyi/index.wxss
@@ -27,6 +27,7 @@ page {
.feiyi-item image {
width: 200rpx;
height: 200rpx;
+ display: block;
flex-shrink: 0;
}
.feiyiinfo {
diff --git a/pages/pbService/feiyi/info/index.js b/pages/pbService/feiyi/info/index.js
index 9416645..d0a3ec6 100644
--- a/pages/pbService/feiyi/info/index.js
+++ b/pages/pbService/feiyi/info/index.js
@@ -14,7 +14,7 @@ Page({
*/
onLoad: function (options) {
let id = options.id;
- commonApi._post("Feiyi/getDetail",{
+ commonApi._post("pbservice/Feiyi/getDetail",{
id:id
}).then(res=>{
this.setData({
diff --git a/pages/pbService/feiyi/info/index.json b/pages/pbService/feiyi/info/index.json
index 35cf02f..eb3533f 100644
--- a/pages/pbService/feiyi/info/index.json
+++ b/pages/pbService/feiyi/info/index.json
@@ -1,5 +1,6 @@
{
"usingComponents": {
- "title":"/pages/component/TitleHeader"
+ "title":"/pages/component/TitleHeader",
+ "common-image":"/pages/component/commonImage/index"
}
}
\ No newline at end of file
diff --git a/pages/pbService/feiyi/info/index.wxml b/pages/pbService/feiyi/info/index.wxml
index 2f56419..cc7a9bb 100644
--- a/pages/pbService/feiyi/info/index.wxml
+++ b/pages/pbService/feiyi/info/index.wxml
@@ -2,7 +2,7 @@
-
+
{{info.title}}
{{info.protect_office}}
diff --git a/pages/pbService/gym/index.js b/pages/pbService/gym/index.js
new file mode 100644
index 0000000..0c2f16b
--- /dev/null
+++ b/pages/pbService/gym/index.js
@@ -0,0 +1,133 @@
+// pages/pbService/gym/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ types:[],
+ typeIndex:0,
+ list:[],
+ page_no:1,
+ total:1,
+ location:{
+ latitude:"31.307249",
+ longitude:"120.591426"
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ let that = this;
+ commonApi._post("pbservice/Gym/getGymTypes").then(res=>{
+ that.setData({
+ types:res.data.classifyList
+ })
+ wx.getLocation({
+ type: 'gcj02',
+ success:function(res){
+ that.setData({
+ location:res
+ })
+ that.getList()
+ },
+ fail:function(){
+ wx.showToast({
+ title: '请开启定位授权后重试',
+ icon:'none'
+ })
+ }
+ })
+
+ })
+
+ },
+ changeType:function(e){
+ this.setData({
+ typeIndex:e.detail.value,
+ list:[],
+ page_no:1,
+ total:1
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("pbservice/Gym/getGymsByClassify",{
+ page_no:this.data.page_no,
+ page_num:10,
+ // point_type:"gaode",
+ lon:this.data.location.longitude,
+ lat:this.data.location.latitude,
+ classify:this.data.types[this.data.typeIndex].cid
+ }).then(res=>{
+ res.data.subStadiumList.map(item=>{
+ if(item.distance && item.distance>=1000){
+ item.distance = item.distance/1000+"km";
+ }
+ else if(item.distance || item.distance==0){
+ item.distance = item.distance+"m";
+ }
+ })
+ this.setData({
+ list:list.concat(res.data.subStadiumList),
+ total:res.data.count,
+ page_no:this.data.page_no+1
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/gym/index.json b/pages/pbService/gym/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/gym/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/gym/index.wxml b/pages/pbService/gym/index.wxml
new file mode 100644
index 0000000..16d7c84
--- /dev/null
+++ b/pages/pbService/gym/index.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+ {{types[typeIndex].categoryName}}
+
+
+
+
+
+
+
+ {{item.mName}}-{{item.sName}}
+
+
+ {{item.open_time}}
+
+
+
+ {{item.address}}
+
+ {{item.distance}}
+
+
+
\ No newline at end of file
diff --git a/pages/pbService/gym/index.wxss b/pages/pbService/gym/index.wxss
new file mode 100644
index 0000000..1231884
--- /dev/null
+++ b/pages/pbService/gym/index.wxss
@@ -0,0 +1,79 @@
+/* pages/pbService/gym/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.feiyi-picker {
+ position: fixed;
+ left: 0;
+ right: 0;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #0B898E;
+ font-size: 26rpx;
+ font-weight: bold;
+ background: white;
+}
+.feiyi-picker .iconfont {
+ font-size: 24rpx;
+ margin-left: 10rpx;
+}
+.gym-item {
+ margin: 25rpx 30rpx;
+ height: 200rpx;
+ border-radius: 20rpx;
+ background: white;
+ display: flex;
+ justify-content: space-between;
+ overflow: hidden;
+}
+.gym-item image {
+ width: 200rpx;
+ height: 200rpx;
+ display: block;
+ flex-shrink: 0;
+}
+.gym-info {
+ width: 450rpx;
+ font-size: 26rpx;
+ color: #888;
+ margin-right: 20rpx;
+}
+.gym-name {
+ font-size: 30rpx;
+ color: #333;
+ line-height: 48rpx;
+ margin: 10rpx 0;
+}
+.gym-tip {
+ display: flex;
+ align-items: center;
+ width: 450rpx;
+ margin-bottom: 15rpx;
+}
+.gym-tip image {
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 12rpx;
+}
+.distance {
+ text-align: right;
+}
+.order-btn {
+ padding: 0 20rpx;
+ width: 100rpx;
+ box-sizing: border-box;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: fixed;
+ right: 30rpx;
+ bottom: 40rpx;
+ border-radius: 50%;
+ text-align: center;
+ font-size: 26rpx;
+ color: #fff;
+ background: #0B898E;
+}
\ No newline at end of file
diff --git a/pages/pbService/gym/info/index.js b/pages/pbService/gym/info/index.js
new file mode 100644
index 0000000..7607128
--- /dev/null
+++ b/pages/pbService/gym/info/index.js
@@ -0,0 +1,105 @@
+// pages/pbService/gym/info/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:1001,
+ page_no:1,
+ picList:[],
+ info:null,
+ list:[],
+ moreFlag:true,
+ html:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ commonApi._post("pbservice/Gym/getDetail",{
+ id:this.data.id
+ }).then(res=>{
+ this.setData({
+ picList:res.data.picList,
+ info:res.data.stadiumDetail
+ })
+ console.log(res)
+ })
+ this.getList()
+ },
+ getList:function(){
+ if(!this.data.moreFlag) return;
+ commonApi._post("pbservice/Gym/getGymTickets",{
+ id:this.data.id,
+ page_no:this.data.page_no,
+ page_num:10,
+ classify:2
+ }).then(res=>{
+ if(res.data.yearStrategyList.length<10){
+ this.setData({
+ moreFlag:false
+ })
+ }
+ this.setData({
+ list:this.data.list.concat(res.data.yearStrategyList),
+ page_no:this.data.page_no+1
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/gym/info/index.json b/pages/pbService/gym/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/gym/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/gym/info/index.wxml b/pages/pbService/gym/info/index.wxml
new file mode 100644
index 0000000..b15abb9
--- /dev/null
+++ b/pages/pbService/gym/info/index.wxml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{info.name}}
+ 开放时间:{{info.open_time}}
+ 联系方式:{{info.telephone}}
+ 地址:{{info.address}}
+
\ No newline at end of file
diff --git a/pages/pbService/gym/info/index.wxss b/pages/pbService/gym/info/index.wxss
new file mode 100644
index 0000000..2681782
--- /dev/null
+++ b/pages/pbService/gym/info/index.wxss
@@ -0,0 +1,24 @@
+/* pages/pbService/gym/info/index.wxss */
+.swiper,.swiper image {
+ width: 100%;
+ height: 360rpx;
+ display: block;
+}
+.info {
+ font-size: 26rpx;
+ padding: 20rpx 30rpx;
+ color: #333;
+}
+.info .title {
+ font-size: 30rpx;
+}
+.info-tip {
+ display: flex;
+ color: #888;
+ margin-top: 20rpx;
+}
+.info-tip text {
+ width: 130rpx;
+ color: #333;
+ flex-shrink: 0;
+}
\ No newline at end of file
diff --git a/pages/pbService/index.js b/pages/pbService/index.js
new file mode 100644
index 0000000..580563e
--- /dev/null
+++ b/pages/pbService/index.js
@@ -0,0 +1,94 @@
+// pages/pbService/index.js
+import commonApi from "../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+ gotoPath:function(e){
+ wx.navigateTo({
+ url: e.currentTarget.dataset.path,
+ })
+ },
+ gotoUrl:function(e){
+ let url = e.currentTarget.dataset.url;
+ app.globalData.weburl = url;
+ wx.navigateTo({
+ url:"/pages/pbService/web/index"
+ })
+ },
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+ garbage:function(){
+ wx.navigateToMiniProgram({
+ appId: 'wx13be821f3b1afed3',
+ path:'pages/home/home'
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/index.json b/pages/pbService/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml
new file mode 100644
index 0000000..d80077e
--- /dev/null
+++ b/pages/pbService/index.wxml
@@ -0,0 +1,82 @@
+
+
+
+ 游玩助手
+
+
+
+
+ 安全服务
+
+
+
+ 找厕所
+
+
+
+ 景区舒适度
+
+
+
+
+ 交通出行
+
+
+
+ 实时公交
+
+
+
+ 停车场
+
+
+
+ 公共自行车
+
+
+
+
+
+ 文体查询
+
+
+
+ 投资导引图
+
+
+
+ 非遗传承
+
+
+
+ 文保单位
+
+
+
+ 文物查询
+
+
+
+ 在线鉴赏
+
+
+
+ 借书还书
+
+
+
+ 体育场馆
+
+
+
+ 垃圾分类
+
+
+
+
\ No newline at end of file
diff --git a/pages/pbService/index.wxss b/pages/pbService/index.wxss
new file mode 100644
index 0000000..cef5192
--- /dev/null
+++ b/pages/pbService/index.wxss
@@ -0,0 +1,39 @@
+/* pages/pbService/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.pb-box {
+ margin: 35rpx 25rpx;
+ background: white;
+ border-radius: 13rpx;
+ padding: 0 25rpx;
+}
+.pb-title {
+ padding: 40rpx 0;
+ line-height: 32rpx;
+ font-size: 34rpx;
+ color: #333;
+ font-weight: 500;
+}
+.pb-list {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+}
+.pb-item {
+ flex-shrink: 0;
+ width: 25%;
+ color: #666;
+ font-size: 26rpx;
+ line-height: 24rpx;
+ margin-bottom: 45rpx;
+ padding-top: 12rpx;
+ text-align: center;
+}
+.pb-item image {
+ width: 60rpx;
+ height: 60rpx;
+ display: block;
+ margin: 0 auto;
+ margin-bottom: 26rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/library/bookinfo/index.js b/pages/pbService/library/bookinfo/index.js
new file mode 100644
index 0000000..d811642
--- /dev/null
+++ b/pages/pbService/library/bookinfo/index.js
@@ -0,0 +1,109 @@
+// pages/pbService/library/bookinfo/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let item = JSON.parse(decodeURIComponent(options.item))
+ this.setData({
+ info:item
+ })
+
+ },
+ getBook:function(){
+ commonApi.user_post("pbservice/Booking/loginNeedAuth").then(res=>{
+ if(res.code==1 && res.data && res.data.card_no){
+ let card_no = res.data.card_no;
+ commonApi.user_post("pbservice/Booking/deliveryCurrent",{
+ card_no:card_no
+ }).then(res=>{
+ if(res && res.data){
+ commonApi.user_post("pbservice/Booking/borrow",{
+ book_rec_no:this.data.info.bookRecNo,
+ card_no:card_no,
+ appartment_code:res.data.appartmentcode
+ }).then(r=>{
+ if(r.code==1){
+ wx.showToast({
+ title: '借阅成功',
+ icon:'success'
+ });
+ }
+ console.log(r)
+ })
+ }
+ else {
+ wx.showToast({
+ title: '请先设置默认取书点',
+ icon: 'none'
+ })
+ setTimeout(()=>{
+ wx.navigateTo({
+ url: '../getpoint/index?from=orderbook',
+ });
+ },1000)
+ }
+ })
+ }
+ })
+
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/library/bookinfo/index.json b/pages/pbService/library/bookinfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/library/bookinfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/library/bookinfo/index.wxml b/pages/pbService/library/bookinfo/index.wxml
new file mode 100644
index 0000000..ccade09
--- /dev/null
+++ b/pages/pbService/library/bookinfo/index.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+ {{info.title}}
+ 作者:{{info.author}}
+ 出版社:{{info.publisher}}
+ 出版时间:{{info.pubdate}}
+ ISBN:{{info.isbn}}
+
+
+
+ 简介
+ {{info.summary}}
+
+
+
+点击借阅
\ No newline at end of file
diff --git a/pages/pbService/library/bookinfo/index.wxss b/pages/pbService/library/bookinfo/index.wxss
new file mode 100644
index 0000000..d2af4ad
--- /dev/null
+++ b/pages/pbService/library/bookinfo/index.wxss
@@ -0,0 +1,57 @@
+/* pages/pbService/library/bookinfo/index.wxss */
+.info-top {
+ background: white;
+ display: flex;
+ padding: 20rpx 30rpx;
+ border-bottom: 20rpx solid #EDEDED;
+}
+.info-top .img-box {
+ width: 200rpx;
+ height: 200rpx;
+ text-align: center;
+ background: rgba(216, 216, 216, 0);
+ box-shadow: 0px 0px 8rpx 0rpx rgba(102, 102, 102, 0.3);
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.info-top .img-box image {
+ width: 152rpx;
+ height: 200rpx;
+ margin: 0 auto;
+}
+.info-top .info {
+ flex: 1;
+ margin-left: 20rpx;
+}
+.info .title,.content .title {
+ font-size: 30rpx;
+ color: #333;
+ margin-bottom: 10rpx;
+ font-weight: bold;
+}
+.info .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+ margin-bottom: 10rpx;
+ line-height: 34rpx;
+}
+.content {
+ padding: 30rpx;
+ color: #888;
+ font-size: 26rpx;
+}
+.btn {
+ display: inline-block;
+ width: 360rpx;
+ line-height: 80rpx;
+ text-align: center;
+ border-radius: 40rpx;
+ background: #0B898E;
+ color: #fff;
+ position: fixed;
+ bottom: 30rpx;
+ left: 50%;
+ margin-left: -180rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/pages/pbService/library/getpoint/index.js b/pages/pbService/library/getpoint/index.js
new file mode 100644
index 0000000..6c05dd7
--- /dev/null
+++ b/pages/pbService/library/getpoint/index.js
@@ -0,0 +1,155 @@
+// pages/pbService/library/getpoint/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ card_no:null,
+ now:null,
+ other:[],
+ from:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.from){
+ this.setData({
+ from:options.from
+ })
+ }
+ let that = this;
+ commonApi.user_post("pbservice/Booking/loginNeedAuth").then(res=>{
+ console.log(res)
+ if(res.code==1 && res.data && res.data.card_no){
+ let card_no = res.data.card_no;
+ this.setData({
+ card_no:card_no
+ })
+ commonApi.user_post("pbservice/Booking/deliveryCurrent",{
+ card_no:card_no
+ }).then(res=>{
+ if(res.code==1 && res.data){
+ this.setData({
+ now:res.data
+ })
+ }
+ })
+ // 获取当前地区的经纬度
+ wx.getLocation({
+ type: 'gcj02',
+ success: function (res) {
+ commonApi.user_post("pbservice/Booking/deliveryList",{
+ longitude:res.longitude,
+ latitude:res.latitude
+ }).then(res=>{
+ if(res.code==1 && res.data){
+ res.data.map(item=>{
+ if(item.distance>=1000){
+ item.distance = (item.distance/1000)+"km"
+ }
+ else {
+ item.distance = item.distance +"m";
+ }
+ })
+ that.setData({
+ other:res.data
+ })
+ }
+ })
+ },
+ fail:function(){
+ wx.showToast({
+ title: '请开启定位授权后重试',
+ icon:'none'
+ })
+ }
+ })
+
+ }
+ })
+ },
+ setDefault:function(e){
+ let item = e.currentTarget.dataset.item,index = e.currentTarget.dataset.index;
+ commonApi.user_post("pbservice/Booking/setDefaultDelivery",{
+ card_no:this.data.card_no,
+ appartment_code:item.appartmentCode,
+ district:item.districtCode
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '设置成功',
+ icon: 'success'
+ })
+ this.setData({
+ now:item
+ })
+ if(this.data.from=='orderbook'){
+ setTimeout(()=>{
+ wx.navigateBack()
+ },500)
+ }
+ }
+ })
+ },
+ gotoLocation:function(e){
+ let info = e.currentTarget.dataset.info;
+ wx.openLocation({
+ latitude:info.latitude,
+ longitude:info.longitude,
+ scale: 18
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/library/getpoint/index.json b/pages/pbService/library/getpoint/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/library/getpoint/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/library/getpoint/index.wxml b/pages/pbService/library/getpoint/index.wxml
new file mode 100644
index 0000000..d743ce5
--- /dev/null
+++ b/pages/pbService/library/getpoint/index.wxml
@@ -0,0 +1,17 @@
+
+
+
+ {{now.appartment}}
+ 地址:{{now.address}}
+ {{now.description}}
+ 是否开放:{{item.isopen==1?'是':'否'}}
+
+
+其他借书点
+
+ {{item.appartment}}距离{{item.distance}}
+ 地址:{{item.address}}
+ {{item.description}}
+ 是否开放:{{item.isopen==1?'是':'否'}}
+ 设为默认
+
diff --git a/pages/pbService/library/getpoint/index.wxss b/pages/pbService/library/getpoint/index.wxss
new file mode 100644
index 0000000..c3f246b
--- /dev/null
+++ b/pages/pbService/library/getpoint/index.wxss
@@ -0,0 +1,60 @@
+/* pages/pbService/library/getpoint/index.wxss */
+page {
+ background: white;
+}
+.item {
+ margin: 0 30rpx;
+ font-size: 26rpx;
+ color: #888;
+ position: relative;
+ line-height: 40rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.item:last-child {
+ border-bottom: none;
+}
+.title {
+ font-size: 30rpx;
+ color: #000;
+ font-weight: bold;
+ margin: 20rpx 0;
+}
+.title text {
+ font-size: 26rpx;
+ color: #888;
+ font-weight: 400;
+ margin-left: 10rpx;
+}
+.item image {
+ display: block;
+ position: absolute;
+ width: 80rpx;
+ right: 30rpx;
+ top: 50%;
+ margin-top: -40rpx;
+}
+.item .btn {
+ position: absolute;
+ right: 30rpx;
+ width: 160rpx;
+ line-height: 60rpx;
+ text-align: center;
+ background: rgba(11, 137, 142, 0);
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ color: #333;
+ top: 50%;
+ margin-top: -30rpx;
+}
+.other-tip {
+ line-height: 60rpx;
+ background: #ededed;
+ color: #333;
+ font-size: 26rpx;
+ padding: 0 30rpx;
+}
+
+.max-width {
+ width: 500rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/library/index.js b/pages/pbService/library/index.js
new file mode 100644
index 0000000..e025712
--- /dev/null
+++ b/pages/pbService/library/index.js
@@ -0,0 +1,140 @@
+// pages/pbService/library/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ type:1,
+ page_no:1,
+ total:1,
+ list:[],
+ keywords:'',
+ isSearch:false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ changeType:function(e){
+ let type = e.currentTarget.dataset.type;
+ this.setData({
+ type:type,
+ list:[],
+ page_no:1,
+ total:1,
+ isSearch:false
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ let service = this.data.type==1?'pbservice/Booking/newBookList':'pbservice/Booking/recommendBookList'
+ commonApi._post(service,{
+ page_no:this.data.page_no,
+ page_num:20
+ }).then(res=>{
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.rows),
+ page_no:this.data.page_no+1
+ })
+ })
+ },
+ gotoInfo:function(e){
+ let item = e.currentTarget.dataset.item;
+ item = encodeURIComponent(JSON.stringify(item));
+ wx.navigateTo({
+ url: 'bookinfo/index?item='+item,
+ })
+ },
+ changeKeyword:function(e){
+ this.setData({
+ keywords:e.detail.value
+ })
+ },
+ search:function(){
+ this.setData({
+ isSearch:true,
+ page_no:1,
+ list:[],
+ total:1
+ })
+ this.getSearchList();
+ },
+ getSearchList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("pbservice/Booking/searchBook",{
+ page_no:this.data.page_no,
+ page_num:20,
+ keywords:this.data.keywords
+ }).then(res=>{
+ this.setData({
+ page_no:this.data.page_no+1,
+ total:res.data.total,
+ list:list.concat(res.data.rows)
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ if(this.data.isSearch){
+ this.getSearchList()
+ }
+ else {
+ this.getList()
+ }
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/library/index.json b/pages/pbService/library/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/library/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/library/index.wxml b/pages/pbService/library/index.wxml
new file mode 100644
index 0000000..f21c147
--- /dev/null
+++ b/pages/pbService/library/index.wxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+ {{item.title}}
+ {{item.author}}
+
+
+
+
+ 当前借阅
+ 取书地点
+
\ No newline at end of file
diff --git a/pages/pbService/library/index.wxss b/pages/pbService/library/index.wxss
new file mode 100644
index 0000000..3ce4744
--- /dev/null
+++ b/pages/pbService/library/index.wxss
@@ -0,0 +1,125 @@
+/* pages/pbService/library/index.wxss */
+.top-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ padding: 20rpx 30rpx;
+ background: white;
+ height: 140rpx;
+}
+page {
+ background: #EDEDED;
+}
+.search-top {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 60rpx;
+ background: #EDEDED;
+ border-radius: 30rpx;
+ width: 690rpx;
+ font-size: 26rpx;
+ font-weight: 500;
+ margin-bottom: 30rpx;
+}
+.search-top .iconfont{
+ padding: 0 20rpx;
+ color: #999999;
+ font-size: 30rpx;
+ flex-shrink: 0;
+}
+.search-top input {
+ display: block;
+ flex: 1;
+}
+.search-btn {
+ width: 110rpx;
+ flex-shrink: 0;
+ text-align: center;
+ line-height: 40rpx;
+ border-left: 1rpx solid #ccc;
+ color: #0B898E;
+}
+.menus {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.menus .menu {
+ position: relative;
+}
+.menus .menu.active {
+ color: #0B898E;
+}
+.menus .menu.active::after {
+ content: "1";
+ font-size: 0;
+ position: absolute;
+ display: block;
+ width: 30rpx;
+ height: 4rpx;
+ background: #0B898E;
+ border-radius: 2rpx;
+ top: 100%;
+ left: 50%;
+ margin-left: -15rpx;
+ margin-top: 6rpx;
+}
+.menus .menu:nth-child(1){
+ margin-right: 240rpx;
+
+}
+.list {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ margin: 20rpx 10rpx;
+}
+.item {
+ margin-left: 20rpx;
+ margin-bottom: 20rpx;
+ width: 216rpx;
+ height: 340rpx;
+ background: #FFFFFF;
+ border-radius: 20rpx;
+ text-align: center;
+}
+.item image {
+ width: 159rpx;
+ height: 188rpx;
+ margin: 15rpx auto;
+ display: block;
+}
+.item .info {
+ text-align: left;
+ border-top: 1rpx solid #d8d8d8;
+ padding: 20rpx;
+}
+.item .info .title {
+ font-size: 26rpx;
+ color: #333;
+}
+.item .info .subtitle {
+ font-size: 26rpx;
+ color: #999;
+}
+.right-icons {
+ position: fixed;
+ right: 30rpx;
+ bottom: 40rpx;
+ color: #fff;
+ font-size: 26rpx;
+}
+.right-icons .right-icon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 60rpx;
+ height: 100rpx;
+ padding: 0 20rpx;
+ border-radius: 50%;
+ text-align: center;
+ background: #0B898E;
+}
\ No newline at end of file
diff --git a/pages/pbService/library/mybook/index.js b/pages/pbService/library/mybook/index.js
new file mode 100644
index 0000000..def08e5
--- /dev/null
+++ b/pages/pbService/library/mybook/index.js
@@ -0,0 +1,115 @@
+// pages/pbService/library/mybook/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ card_no:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi.user_post("pbservice/Booking/loginNeedAuth",{}).then(res=>{
+ if(res.code==1 && res.data && res.data.card_no){
+ let card_no = res.data.card_no
+ this.setData({
+ card_no:card_no
+ })
+ this.getList()
+ }
+ })
+
+ },
+ getList:function(){
+ commonApi.user_post("pbservice/Booking/currentBorrow",{
+ card_no:this.data.card_no
+ }).then(res=>{
+ this.setData({
+ list:res.data
+ })
+ })
+ },
+ cancel:function(e){
+ let item = e.currentTarget.dataset.item;
+ commonApi.user_post("pbservice/Booking/cancelBorrow",{
+ card_no:this.data.card_no,
+ item_id:item.itemid
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'none'
+ });
+ this.getList()
+ }
+ })
+ },
+ add:function(e){
+ let item = e.currentTarget.dataset.item;
+ commonApi.user_post("pbservice/Booking/renewBook",{
+ card_no:this.data.card_no,
+ bar_code:item.barcode
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '续借成功',
+ icon:'none'
+ });
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/library/mybook/index.json b/pages/pbService/library/mybook/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/library/mybook/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/library/mybook/index.wxml b/pages/pbService/library/mybook/index.wxml
new file mode 100644
index 0000000..6351043
--- /dev/null
+++ b/pages/pbService/library/mybook/index.wxml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+ {{item.title}}
+ 作者:{{item.author}}
+ 借阅时间:{{item.loandate}}
+ 到期时间:{{item.returndate}}
+ {{item.statusText}}
+
+ 取消借阅
+ 续借
+
+
+
diff --git a/pages/pbService/library/mybook/index.wxss b/pages/pbService/library/mybook/index.wxss
new file mode 100644
index 0000000..473c75c
--- /dev/null
+++ b/pages/pbService/library/mybook/index.wxss
@@ -0,0 +1,53 @@
+/* pages/pbService/library/mybook/index.wxss */
+.info-top {
+ background: white;
+ display: flex;
+ padding: 20rpx 0;
+ margin: 0 30rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.info-top .img-box {
+ width: 200rpx;
+ height: 200rpx;
+ text-align: center;
+ background: rgba(216, 216, 216, 0);
+ box-shadow: 0px 0px 8rpx 0rpx rgba(102, 102, 102, 0.3);
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.info-top .img-box image {
+ width: 152rpx;
+ height: 200rpx;
+ margin: 0 auto;
+}
+.info-top .info {
+ flex: 1;
+ margin-left: 20rpx;
+}
+.info .title,.content .title {
+ font-size: 30rpx;
+ color: #333;
+ margin-bottom: 10rpx;
+ font-weight: bold;
+}
+.info .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+ margin-bottom: 10rpx;
+ line-height: 34rpx;
+}
+.btns {
+ margin-top: 20rpx;
+ display: flex;
+}
+.btn {
+ width: 158rpx;
+ line-height: 58rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ text-align: center;
+ color: #333;
+ font-size: 26rpx;
+ margin-right: 20rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/sceneComfort/index.js b/pages/pbService/sceneComfort/index.js
new file mode 100644
index 0000000..cfc1294
--- /dev/null
+++ b/pages/pbService/sceneComfort/index.js
@@ -0,0 +1,154 @@
+// pages/pbService/sceneComfort/index.js
+const device = wx.getSystemInfoSync(),radio = device.windowWidth/750;
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ radio:radio,
+ comfortLevel:[],
+ comfortIndex:0,
+ areas:[],
+ areaIndex:0,
+ list:[],
+ pageNo:1,
+ total:1,
+ keywords:"",
+ areaObj:{},
+ comfortObj:{},
+ searchText:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("pbservice/Comfort/getComfortLevel").then(res=>{
+ let comfortObj = {}
+ res.data.map(item=>{
+ comfortObj[item.level] = {
+ name:item.desc,
+ color:item.color
+ };
+ })
+ res.data.unshift({
+ desc:"不选择"
+ })
+ this.setData({
+ comfortLevel:res.data,
+ comfortObj:comfortObj
+ })
+ })
+ commonApi._post('pbservice/Other/getSuzhouAreas').then(res=>{
+ let areaObj = {}
+ res.data.map(item=>{
+ areaObj[item.area_code] = item.area_name;
+ })
+ res.data.unshift({
+ area_name:"不选择"
+ })
+ this.setData({
+ areas:res.data,
+ areaObj:areaObj
+ })
+ })
+ this.getList();
+ },
+ changeArea:function(e){
+ this.setData({
+ areaIndex:e.detail.value,
+ list:[],
+ pageNo:1,
+ total:1
+ })
+ this.getList()
+ },
+ changeComfortLevel:function(e){
+ this.setData({
+ comfortIndex:e.detail.value,
+ list:[],
+ pageNo:1,
+ total:1
+ })
+ this.getList()
+ },
+ getList:function(){
+ if(this.data.total<=this.data.list.length) return;
+ commonApi._post("pbservice/Comfort/getComfort",{
+ scene_name:this.data.keywords,
+ comfort_level:this.data.comfortIndex>0?this.data.comfortLevel[this.data.comfortIndex].level:null,
+ area_key:this.data.areaIndex>0?this.data.areas[this.data.areaIndex].area_code:null,
+ page_no:this.data.pageNo,
+ page_num:10
+ }).then(res=>{
+ this.setData({
+ list:this.data.list.concat(res.data.rows),
+ total:res.data.total
+ })
+ })
+ },
+ search:function(){
+ this.setData({
+ keywords:this.data.searchText,
+ list:[],
+ pageNo:1,
+ total:1
+ })
+ this.getList()
+ },
+ inputKeyword:function(e){
+ this.setData({
+ searchText:e.detail.value
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/sceneComfort/index.json b/pages/pbService/sceneComfort/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/sceneComfort/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/sceneComfort/index.wxml b/pages/pbService/sceneComfort/index.wxml
new file mode 100644
index 0000000..e2a2d37
--- /dev/null
+++ b/pages/pbService/sceneComfort/index.wxml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{comfortIndex>0?comfortLevel[comfortIndex].desc:"舒适度"}}
+
+
+
+
+
+ {{areaIndex>0?areas[areaIndex].area_name:'区/县'}}
+
+
+
+
+
+ 舒适度:
+ {{item.desc}}
+
+
+
+
+ {{item.third_scene_name}}
+
+
+ {{areaObj[item.area]}}
+
+
+
+
+ {{comfortObj[item.comfort_level].name}}/{{item.ins_carry_capacity}}人
+
+
+ 更新时间:{{item.status_time}}
+ 当前舒适度/瞬时承载量
+
+
\ No newline at end of file
diff --git a/pages/pbService/sceneComfort/index.wxss b/pages/pbService/sceneComfort/index.wxss
new file mode 100644
index 0000000..b2ce37a
--- /dev/null
+++ b/pages/pbService/sceneComfort/index.wxss
@@ -0,0 +1,121 @@
+/* pages/pbService/sceneComfort/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.comfort-item {
+ margin: 30rpx;
+ background: white;
+ padding: 30rpx;
+ padding-top: 10rpx;
+ color: #333;
+ border-radius: 20rpx;
+}
+.scene-title {
+ font-size: 30rpx;
+ line-height: 48rpx;
+}
+.comfort-tip {
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ margin-top: 10rpx;
+ margin-bottom: 27rpx;
+}
+.comfort-tip image {
+ width: 30rpx;
+ margin-right: 7rpx;
+}
+.progress-item {
+ position: relative;
+
+}
+.progress-text {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 24rpx;
+ margin-right: 10rpx;
+}
+.other-tip {
+ font-size: 24rpx;
+ color: #888;
+ margin-top: 33rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.my-top-search {
+ position: fixed;
+ left: 0;
+ right: 0;
+ padding: 20rpx 30rpx;
+ background: #fff;
+ z-index: 1;
+ font-size: 26rpx;
+ color: #333;
+}
+.my-search-box {
+ height: 56rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 20rpx;
+ background: #EDEDED;
+ border-radius: 30rpx;
+}
+.my-search-box .iconfont {
+ color: #999999;
+ flex-shrink: 0;
+}
+.my-search-box input {
+ display: block;
+ flex: 1;
+ margin: 0 20rpx;
+ font-size: 26rpx;
+}
+.my-search-btn {
+ flex-shrink: 0;
+ width: 110rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #0B898E;
+ border-left: 1rpx solid #ccc;
+ line-height: 40rpx;
+}
+.picker {
+ display: flex;
+ align-items: center;
+}
+.picker text {
+ font-weight: bold;
+}
+.select-box {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 30rpx;
+ margin-bottom: 20rpx;
+ padding: 0 100rpx;
+}
+.picker .iconfont {
+ font-size: 16rpx;
+ color: #0B898E;
+ margin-left: 10rpx;
+}
+.comfort-levels {
+ display: flex;
+ align-items: center;
+ margin-top: 10rpx;
+}
+.comfort-level {
+ padding: 0 16rpx;
+ border-radius: 20rpx;
+ line-height: 38rpx;
+ border: 1rpx solid;
+ margin-right: 20rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/security/index.js b/pages/pbService/security/index.js
new file mode 100644
index 0000000..2c5301a
--- /dev/null
+++ b/pages/pbService/security/index.js
@@ -0,0 +1,71 @@
+// pages/pbService/security/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+ call:function(e){
+ let num = e.currentTarget.dataset.num;
+ wx.makePhoneCall({
+ phoneNumber: num,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/security/index.json b/pages/pbService/security/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/security/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/security/index.wxml b/pages/pbService/security/index.wxml
new file mode 100644
index 0000000..0befef3
--- /dev/null
+++ b/pages/pbService/security/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+ 报警电话:
+ 110
+
+ 拨打
+
+
+ 急救中心:
+ 120
+
+ 拨打
+
+
+ 火警:
+ 119
+
+ 拨打
+
diff --git a/pages/pbService/security/index.wxss b/pages/pbService/security/index.wxss
new file mode 100644
index 0000000..a2feb44
--- /dev/null
+++ b/pages/pbService/security/index.wxss
@@ -0,0 +1,32 @@
+/* pages/pbService/security/index.wxss */
+page {
+ background: #EDEDED;
+}
+.tel-item {
+ padding: 0 30rpx;
+ margin: 20rpx 30rpx;
+ background: white;
+ border-radius: 20rpx;
+ display: flex;
+ height: 120rpx;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.tel-item text {
+ flex-shrink: 0;
+ color: #0B898E;
+}
+.tel-item text.iconfont {
+ margin-right: 10rpx;
+}
+.tel-item view {
+ flex: 1;
+ margin: 0 20rpx;
+ font-weight: bold;
+}
+.tel-item text.tel-type {
+ width: 150rpx;
+ color: #333;
+}
\ No newline at end of file
diff --git a/pages/pbService/wbdw/index.js b/pages/pbService/wbdw/index.js
new file mode 100644
index 0000000..977c823
--- /dev/null
+++ b/pages/pbService/wbdw/index.js
@@ -0,0 +1,137 @@
+// pages/pbService/wbdw/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ areas:[],
+ areaIndex:0,
+ levels:[],
+ levelIndex:0,
+ name:"",
+ page_no:1,
+ list:[],
+ total:1
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getArea()
+ this.getLevels();
+ this.getList();
+ },
+ changeKeyword:function(e){
+ this.setData({
+ name:e.detail.value
+ })
+ },
+ search:function(){
+ this.setData({
+ page_no:1,
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ changeArea:function(e){
+ this.setData({
+ areaIndex:e.detail.value
+ })
+ this.search();
+ },
+ changeLevel:function(e){
+ this.setData({
+ levelIndex:e.detail.value
+ })
+ this.search();
+ },
+ getArea:function(){
+ commonApi._post("pbservice/Other/getSuzhouAreas",{}).then(res=>{
+ res.data.unshift({
+ area_code:"",
+ area_name:"全部区域"
+ })
+ this.setData({
+ areas:res.data
+ })
+ })
+ },
+ getLevels:function(){
+ commonApi._post("pbservice/Relicunit/getRelicunitLevel",{}).then(res=>{
+ res.data.unshift("全部级别")
+ this.setData({
+ levels:res.data
+ })
+ })
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("pbservice/Relicunit/getList",{
+ name:this.data.name,
+ area:this.data.areaIndex>0?this.data.areas[this.data.areaIndex].area_code:"",
+ level_name:this.data.levelIndex>0?this.data.levels[this.data.levelIndex]:"",
+ page_no:this.data.page_no,
+ page_num:10
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.rows),
+ total:res.data.total,
+ page_no:this.data.page_no+1
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList();
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/wbdw/index.json b/pages/pbService/wbdw/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/wbdw/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/wbdw/index.wxml b/pages/pbService/wbdw/index.wxml
new file mode 100644
index 0000000..ee12ac6
--- /dev/null
+++ b/pages/pbService/wbdw/index.wxml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.address}}
+
+
\ No newline at end of file
diff --git a/pages/pbService/wbdw/index.wxss b/pages/pbService/wbdw/index.wxss
new file mode 100644
index 0000000..3b0ad5d
--- /dev/null
+++ b/pages/pbService/wbdw/index.wxss
@@ -0,0 +1,116 @@
+/* pages/pbService/wbdw/index.wxss */
+.top-menus {
+ position: fixed;
+ left: 0;
+ right: 0;
+ padding: 20rpx 30rpx;
+ background: white;
+ height: 140rpx;
+}
+page {
+ background: #EDEDED;
+}
+.search-top {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 60rpx;
+ background: #EDEDED;
+ border-radius: 30rpx;
+ width: 690rpx;
+ font-size: 26rpx;
+ font-weight: 500;
+ margin-bottom: 30rpx;
+}
+.search-top .iconfont{
+ padding: 0 20rpx;
+ color: #999999;
+ font-size: 30rpx;
+ flex-shrink: 0;
+}
+.search-top input {
+ display: block;
+ flex: 1;
+}
+.search-btn {
+ width: 110rpx;
+ flex-shrink: 0;
+ text-align: center;
+ line-height: 40rpx;
+ border-left: 1rpx solid #ccc;
+ color: #0B898E;
+}
+.menus {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.menus .menu {
+ position: relative;
+}
+.menus .menu.active {
+ color: #0B898E;
+}
+.menus .menu.active::after {
+ content: "1";
+ font-size: 0;
+ position: absolute;
+ display: block;
+ width: 30rpx;
+ height: 4rpx;
+ background: #0B898E;
+ border-radius: 2rpx;
+ top: 100%;
+ left: 50%;
+ margin-left: -15rpx;
+ margin-top: 6rpx;
+}
+.menus .menu:nth-child(1){
+ margin-right: 240rpx;
+}
+.picker {
+ text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-weight: bold;
+ font-size: 26rpx;
+}
+.icon-xia {
+ font-size: 20rpx;
+ margin-left: 10rpx;
+}
+.picker.active {
+ color: #0B898E;
+}
+.item {
+ margin: 20rpx 30rpx;
+ overflow: hidden;
+ border-radius: 20rpx;
+ background: white;
+}
+.item .main-img {
+ display: block;
+ width: 100%;
+}
+.item .title {
+ margin: 10rpx 20rpx;
+ font-size: 30rpx;
+ font-weight: bold;
+ color: #333;
+}
+.item .location {
+ display: flex;
+ font-size: 26rpx;
+ color: #333;
+ padding-bottom: 20rpx;
+ margin: 0 20rpx;
+ line-height: 42rpx;
+}
+.item .location image {
+ width: 30rpx;
+ flex-shrink: 0;
+ margin-top: 6rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/wbdw/info/index.js b/pages/pbService/wbdw/info/index.js
new file mode 100644
index 0000000..ac8ca1d
--- /dev/null
+++ b/pages/pbService/wbdw/info/index.js
@@ -0,0 +1,74 @@
+// pages/pbService/wbdw/info/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:{}
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("pbservice/Relicunit/getDetail",{
+ id:options.id
+ }).then(res=>{
+ console.log(res)
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/wbdw/info/index.json b/pages/pbService/wbdw/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/wbdw/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/wbdw/info/index.wxml b/pages/pbService/wbdw/info/index.wxml
new file mode 100644
index 0000000..0abf918
--- /dev/null
+++ b/pages/pbService/wbdw/info/index.wxml
@@ -0,0 +1,13 @@
+
+
+
+
+ {{info.name}}
+ 地址:{{info.address}}
+ 年代:{{info.age}}
+ 等级:{{info.level_name}}
+
+ 文物介绍
+ {{info.introduction}}
+
+
\ No newline at end of file
diff --git a/pages/pbService/wbdw/info/index.wxss b/pages/pbService/wbdw/info/index.wxss
new file mode 100644
index 0000000..1bfadda
--- /dev/null
+++ b/pages/pbService/wbdw/info/index.wxss
@@ -0,0 +1,23 @@
+/* pages/pbService/wbdw/info/index.wxss */
+.main-img {
+ display: block;
+ width: 100%;
+
+}
+.content {
+ margin: 30rpx;
+ color: #333;
+}
+.title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 20rpx;
+}
+.subtitle {
+ margin-bottom: 10rpx;
+ font-size: 26rpx;
+}
+.detail {
+ margin-top: 40rpx;
+ font-size: 26rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/web/index.js b/pages/pbService/web/index.js
new file mode 100644
index 0000000..6690866
--- /dev/null
+++ b/pages/pbService/web/index.js
@@ -0,0 +1,63 @@
+// pages/pbService/web/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ webUrl:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ console.log(app.globalData.weburl)
+ this.setData({
+ webUrl:app.globalData.weburl
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/web/index.json b/pages/pbService/web/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/pbService/web/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/pbService/web/index.wxml b/pages/pbService/web/index.wxml
new file mode 100644
index 0000000..31b0cf7
--- /dev/null
+++ b/pages/pbService/web/index.wxml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/pages/pbService/web/index.wxss b/pages/pbService/web/index.wxss
new file mode 100644
index 0000000..3d9e18a
--- /dev/null
+++ b/pages/pbService/web/index.wxss
@@ -0,0 +1 @@
+/* pages/pbService/web/index.wxss */
\ No newline at end of file
diff --git a/pages/pbService/wwcx/index.js b/pages/pbService/wwcx/index.js
index 9151f5c..adaef31 100644
--- a/pages/pbService/wwcx/index.js
+++ b/pages/pbService/wwcx/index.js
@@ -24,21 +24,21 @@ Page({
*/
onLoad: function (options) {
// 文物类别
- commonApi._post("Relic/getRelicType",{}).then(res=>{
+ commonApi._post("pbservice/Relic/getRelicType",{}).then(res=>{
res.data.unshift("全部类别")
this.setData({
relicType:res.data
})
})
// 级别
- commonApi._post("Relic/getRelicLevel",{}).then(res=>{
+ commonApi._post("pbservice/Relic/getRelicLevel",{}).then(res=>{
res.data.unshift("全部文物等级")
this.setData({
levels:res.data
})
})
// 区域
- commonApi._post("Other/getSuzhouAreas",{}).then(res=>{
+ commonApi._post("pbservice/Other/getSuzhouAreas",{}).then(res=>{
console.log(res)
let areaName = {};
res.data.map(item=>{
@@ -104,7 +104,7 @@ Page({
getList:function(){
let list = this.data.list;
if(list.length>=this.data.total) return;
- let service = this.data.type==1?'Relic/getMovableRelicList':'Relic/getUnmovableRelicList';
+ let service = this.data.type==1?'pbservice/Relic/getMovableRelicList':'pbservice/Relic/getUnmovableRelicList';
let data = {
page_no:this.data.page_no,
page_num:10
diff --git a/pages/pbService/wwcx/index.wxml b/pages/pbService/wwcx/index.wxml
index 02551b4..16d5bb5 100644
--- a/pages/pbService/wwcx/index.wxml
+++ b/pages/pbService/wwcx/index.wxml
@@ -31,7 +31,7 @@
-
+
{{item.name}}
@@ -41,4 +41,4 @@
区域{{item.area?areaName[item.area]:'苏州'}}
历史年代{{item.age}}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/pbService/wwcx/info/index.js b/pages/pbService/wwcx/info/index.js
new file mode 100644
index 0000000..969d029
--- /dev/null
+++ b/pages/pbService/wwcx/info/index.js
@@ -0,0 +1,74 @@
+// pages/pbService/wbdw/info/index.js
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:{}
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("pbservice/Relic/getDetail",{
+ id:options.id
+ }).then(res=>{
+ console.log(res)
+ this.setData({
+ info:res.data
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/pbService/wwcx/info/index.json b/pages/pbService/wwcx/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/pbService/wwcx/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/pbService/wwcx/info/index.wxml b/pages/pbService/wwcx/info/index.wxml
new file mode 100644
index 0000000..6455027
--- /dev/null
+++ b/pages/pbService/wwcx/info/index.wxml
@@ -0,0 +1,13 @@
+
+
+
+
+ {{info.name}}
+ 藏于:{{info.collection_name}}
+ 等级:{{info.level_name}}
+ 历史年代:{{info.age}}
+
+ 文物介绍
+ {{info.introduction}}
+
+
\ No newline at end of file
diff --git a/pages/pbService/wwcx/info/index.wxss b/pages/pbService/wwcx/info/index.wxss
new file mode 100644
index 0000000..1bfadda
--- /dev/null
+++ b/pages/pbService/wwcx/info/index.wxss
@@ -0,0 +1,23 @@
+/* pages/pbService/wbdw/info/index.wxss */
+.main-img {
+ display: block;
+ width: 100%;
+
+}
+.content {
+ margin: 30rpx;
+ color: #333;
+}
+.title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 20rpx;
+}
+.subtitle {
+ margin-bottom: 10rpx;
+ font-size: 26rpx;
+}
+.detail {
+ margin-top: 40rpx;
+ font-size: 26rpx;
+}
\ No newline at end of file
diff --git a/pages/pbService/wwcx/search/index.js b/pages/pbService/wwcx/search/index.js
index 86536a2..c8a1944 100644
--- a/pages/pbService/wwcx/search/index.js
+++ b/pages/pbService/wwcx/search/index.js
@@ -31,7 +31,7 @@ Page({
getList:function(){
let list = this.data.list;
if(list.length>=this.data.total) return;
- let service = this.data.relicTypeIndex==0?'Relic/getMovableRelicList':'Relic/getUnmovableRelicList';
+ let service = this.data.relicTypeIndex==0?'pbservice/Relic/getMovableRelicList':'pbservice/Relic/getUnmovableRelicList';
let data = {
page_no:this.data.page_no,
page_num:10,
diff --git a/pages/pbService/wwcx/search/index.wxml b/pages/pbService/wwcx/search/index.wxml
index 955b1e9..3488a8e 100644
--- a/pages/pbService/wwcx/search/index.wxml
+++ b/pages/pbService/wwcx/search/index.wxml
@@ -14,7 +14,7 @@
-
+
{{item.name}}
@@ -24,4 +24,4 @@
区域{{item.area?areaName[item.area]:'苏州'}}
历史年代{{item.age}}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/search/index.js b/pages/search/index.js
new file mode 100644
index 0000000..5ca72a5
--- /dev/null
+++ b/pages/search/index.js
@@ -0,0 +1,128 @@
+// pages/search/index.js
+import commonApi from "../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ keyword:"",
+ keywords:[],
+ hot:[]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi._post("search/hot").then(res=>{
+ console.log(res)
+ this.setData({
+ hot:res.data
+ })
+ })
+ },
+ inputKeyword:function(e){
+ this.setData({
+ keyword:e.detail.value
+ })
+ },
+ delHis:function(){
+ this.setData({
+ keywords:[]
+ })
+ wx.removeStorageSync('sz_trip_keywords')
+ wx.showToast({
+ title: '删除成功',
+ icon:'success'
+ })
+ },
+ search:function(){
+ if(!this.data.keyword) {
+ wx.showToast({
+ title: '请输入关键字',
+ icon:'none'
+ })
+ return;
+ }
+ this.setHis(this.data.keyword);
+ wx.navigateTo({
+ url: 'list/index?keyword='+this.data.keyword,
+ })
+ },
+ searchHot:function(e){
+ let item = e.currentTarget.dataset.item;
+ this.setHis(item)
+ wx.navigateTo({
+ url: 'list/index?keyword='+item,
+ })
+ },
+ // 设置历史记录
+ setHis:function(keyword){
+ let keywords = this.data.keywords;
+ for(let i=0;i
+
+
+
+
+
+ 搜索
+
+
+
+搜索历史
+
+ {{item}}
+
+热门搜索
+
+
+ {{index+1}}
+ {{item.name}}
+
+
\ No newline at end of file
diff --git a/pages/search/index.wxss b/pages/search/index.wxss
new file mode 100644
index 0000000..15f239c
--- /dev/null
+++ b/pages/search/index.wxss
@@ -0,0 +1,105 @@
+/* pages/search/index.wxss */
+.my-top-search {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: #f0f0f0;
+ padding: 16rpx 0;
+ z-index: 1;
+}
+.my-search-box {
+ height: 56rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 20rpx;
+ background: #fff;
+ border-radius: 30rpx;
+ margin: 0 auto;
+ width: 560rpx;
+}
+.my-search-box .iconfont {
+ color: #999999;
+ flex-shrink: 0;
+}
+.my-search-box input {
+ display: block;
+ flex: 1;
+ margin: 0 20rpx;
+ font-size: 26rpx;
+}
+.my-search-btn {
+ flex-shrink: 0;
+ width: 110rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #0B898E;
+ border-left: 1rpx solid #ccc;
+ line-height: 40rpx;
+}
+.my-title-box {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin: 30rpx;
+}
+.my-title-box text:nth-child(1){
+ font-size: 32rpx;
+ color: #000;
+ font-weight: 500;
+}
+.keywords {
+ width: 690rpx;
+ display: flex;
+ align-items: center;
+ margin: 30rpx;
+ font-size: 24rpx;
+ flex-wrap: wrap;
+ color: #333;
+}
+.keyword {
+ max-width: 630rpx;
+ padding: 0 28rpx;
+ line-height: 42rpx;
+ border-radius: 21rpx;
+ margin-right: 22rpx;
+ margin-bottom: 22rpx;
+ background: #ececec;
+ flex-shrink: 0;
+}
+.icon-shanchu {
+ color: #999;
+}
+.hot-list {
+ margin: 30rpx;
+}
+.hot-item {
+ display: flex;
+ align-items: center;
+ border-bottom: 1rpx solid #ccc;
+ font-size: 29rpx;
+ height: 102rpx;
+ color: #000;
+}
+.hot-num {
+ width: 33rpx;
+ height: 33rpx;
+ line-height: 33rpx;
+ border-radius: 7rpx;
+ color: #0B898E;
+ font-size: 24rpx;
+ text-align: center;
+ margin-right: 10rpx;
+}
+.hot-list .hot-item:nth-child(1) .hot-num {
+ background: #E10A0A;
+ color: #fff;
+}
+.hot-list .hot-item:nth-child(2) .hot-num {
+ background: #F25E16;
+ color: #fff;
+}
+.hot-list .hot-item:nth-child(3) .hot-num {
+ background: #F29D16;
+ color: #fff;
+}
\ No newline at end of file
diff --git a/pages/search/list/index.js b/pages/search/list/index.js
new file mode 100644
index 0000000..42619d1
--- /dev/null
+++ b/pages/search/list/index.js
@@ -0,0 +1,211 @@
+// pages/search/list/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ typeIndex:0,
+ oldKeyword:"",
+ list:[],
+ total:1,
+ types:[{
+ name:"全部",
+ key:""
+ },
+ {
+ name:"景点",
+ key:"scenic"
+ },
+ {
+ name:"门票",
+ key:"ticket"
+ },
+ {
+ name:"线路",
+ key:"line"
+ },
+ {
+ name:"场馆",
+ key:"venue"
+ },
+ {
+ name:"特产",
+ key:"post"
+ },
+ {
+ name:"美食",
+ key:"food"
+ },
+ // {
+ // name:"酒店",
+ // key:"room"
+ // },
+ {
+ name:"活动",
+ key:"activity"
+ },
+ {
+ name:"游记",
+ key:"travels"
+ },
+ {
+ name:"卡券",
+ key:"coupon"
+ }],
+ lon:"",
+ lat:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ oldKeyword:options.keyword,
+ keyword:options.keyword
+ })
+ let _this = this;
+ wx.getLocation({
+ type: 'gcj02',
+ success:function(res){
+ _this.setData({
+ lon:res.longitude,
+ lat:res.latitude
+ })
+ console.log(res)
+ _this.getList()
+ },
+ fail:function(){
+ _this.getList()
+ }
+ })
+
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(item.type=='travels'){
+ // 游记做特殊处理 其他都按照原来的来
+ wx.navigateTo({
+ url: '/pages/info/strategyInfo/index?id='+item.s_id
+ })
+ }
+ else {
+ util.gotoDetail(item.ext);
+ }
+ },
+ changeType:function(e){
+ this.setData({
+ typeIndex:e.currentTarget.dataset.index,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ inputKeyword:function(e){
+ this.setData({
+ oldKeyword:e.detail.value
+ })
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("search/search",{
+ name:this.data.keyword,
+ offset:list.length,
+ limit:10,
+ lat:this.data.lat,
+ lon:this.data.lon,
+ type:this.data.types[this.data.typeIndex].key
+ }).then(res=>{
+ res.data.list.map(item=>{
+ if(item && item.ext && item.ext.display_tags){
+ item.ext.display_tags = item.ext.display_tags.split(",").splice(0,2)
+ }
+ else {
+ item.ext.display_tags = []
+ }
+ })
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ console.log(res)
+ })
+ },
+ search:function(){
+ if(!this.data.oldKeyword) {
+ wx.showToast({
+ title: '请输入搜索词',
+ icon:'none'
+ })
+ return;
+ }
+ let keyword = this.data.oldKeyword;
+ let keywords = wx.getStorageSync('sz_trip_keywords')?JSON.parse(wx.getStorageSync('sz_trip_keywords')):[];
+ for(let i=0;i
+
+
+
+
+
+ 搜索1
+
+
+ {{item.name}}
+
+
+
+
+
+
+ {{item.title}}
+
+
+ {{item.ext.subtitle}}
+
+
+ {{item.ext.user_name}}
+
+ {{item.ext.like_number}}
+
+ {{item.ext.view_number}}
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{item}}
+
+ {{item.ext.address}}
+
+ 距您直线距离{{item.ext.distance}}km
+
+ ¥{{item.ext.price/100}}起
+
+
+
+
+
+
+
+ {{item.title}}
+ {{item.ext.rate}}分月销{{item.ext.sales_number}}份
+
+ {{item}}
+
+
+
+ {{item.supplier_name}}
+ ¥{{item.ext.price/100}}起
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{item.ext.open_time}}
+ {{item.ext.scene_name}}
+
+
+
+
+
+
+
+ {{item.title}}
+
+ 简介:{{item.ext.content}}
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+ {{item}}
+
+ ¥{{item.ext.price/100}}起
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ 电话:{{item.ext.tel}}
+ 地址:{{item.ext.address}}
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{item.ext.subtitle || item.ext.sub_title}}
+
+ {{item}}
+
+ ¥{{item.ext.price/100}}起
+
+
+
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/search/list/index.wxss b/pages/search/list/index.wxss
new file mode 100644
index 0000000..547b428
--- /dev/null
+++ b/pages/search/list/index.wxss
@@ -0,0 +1,240 @@
+/* pages/search/list/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.my-top-search {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: #f0f0f0;
+ padding-top: 16rpx;
+ z-index: 1;
+}
+.my-search-box {
+ height: 56rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 20rpx;
+ background: #fff;
+ border-radius: 30rpx;
+ margin: 0 auto;
+ width: 560rpx;
+ margin-bottom: 16rpx;
+}
+.my-search-box .iconfont {
+ color: #999999;
+ flex-shrink: 0;
+}
+.my-search-box input {
+ display: block;
+ flex: 1;
+ margin: 0 20rpx;
+ font-size: 26rpx;
+}
+.my-search-btn {
+ flex-shrink: 0;
+ width: 110rpx;
+ text-align: center;
+ font-size: 26rpx;
+ color: #0B898E;
+ border-left: 1rpx solid #ccc;
+ line-height: 40rpx;
+}
+.search-types {
+ display: flex;
+ padding: 0 40rpx;
+ border-bottom: 1rpx solid #ccc;
+ line-height: 86rpx;
+ align-items: center;
+ font-size: 29rpx;
+ color: #333;
+ overflow-x: auto;
+}
+.search-type {
+ flex-shrink: 0;
+ margin-right: 66rpx;
+ position: relative;
+}
+.search-type.active {
+ color: #000;
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.search-type.active::after {
+ display: block;
+ position: absolute;
+ left: 50%;
+ margin-left: -23rpx;
+ width: 46rpx;
+ height: 5rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ content: "1";
+ font-size: 0;
+ bottom: 0;
+}
+/* 攻略 */
+.strategy-item {
+ padding: 28rpx 0;
+ border-bottom: 1rpx solid #ccc;
+}
+.strategy-title {
+ font-size: 33rpx;
+ font-weight: 500;
+ color: #000;
+ display: flex;
+ align-items: flex-start;
+}
+.strategy-subtitle {
+ font-size: 25rpx;
+ color: #666;
+ margin: 33rpx 0;
+}
+.strategy-title image {
+ display: block;
+ width: 60rpx;
+ margin-left: 10rpx;
+ flex-shrink: 0;
+}
+.strategy-bottom {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 20rpx;
+ color: #666;
+}
+.strategy-bottom image {
+ display: block;
+ flex-shrink: 0;
+ width: 34rpx;
+ height: 34rpx;
+ border-radius: 50%;
+ margin-right: 10rpx;
+}
+.strategy-bottom .strategy-author-name {
+ color: #999;
+ flex: 1;
+ width: 100%;
+}
+.strategy-bottom text {
+ flex-shrink: 0;
+}
+.strategy-bottom .iconfont {
+ margin-left: 40rpx;
+ flex-shrink: 0;
+ font-size: 30rpx;
+ margin-right: 8rpx;
+}
+.item {
+ margin: 0 25rpx;
+}
+.item>view {
+ border-bottom: 1rpx solid #ccc;
+}
+.product-item {
+ padding: 28rpx 0;
+ display: flex;
+ justify-content: space-between;
+}
+.product-item image {
+ width: 260rpx;
+ height: 227rpx;
+ border-radius: 11rpx;
+ flex-shrink: 0;
+}
+.product-info {
+ width: 410rpx;
+ flex-shrink: 0;
+}
+.product-title {
+ font-size: 33rpx;
+ color: #2f2f2f;
+ line-height: 44rpx;
+ height: 88rpx;
+ font-weight: 500;
+}
+.scene-tags {
+ display: flex;
+ color: #0B898E;
+ font-size: 20rpx;
+ line-height: 20rpx;
+ align-items: center;
+}
+.scene-tag {
+ position: relative;
+ margin-right: 30rpx;
+}
+.scene-tag::after {
+ position: absolute;
+ left: 0;
+ right: 0;
+ display: block;
+ font-size: 0;
+ z-index: -1;
+ content: "1";
+ bottom: 0;
+ height: 8rpx;
+ background: #DAF3E9;
+}
+.scene-address {
+ color: #A3A3A3;
+ font-size: 24rpx;
+ line-height: 26rpx;
+}
+.scene-address .iconfont {
+ margin-right: 4rpx;
+ font-size: 26rpx;
+}
+.price-box {
+ display: flex;
+ justify-content: space-between;
+ font-size: 24rpx;
+ color: #323232;
+ align-items: flex-end;
+}
+.price-box .textOver {
+ flex: 1;
+ margin-right: 10rpx;
+}
+.price {
+ flex-shrink: 0;
+ color: #D62828;
+}
+.price-box image {
+ width: 21rpx;
+ flex-shrink: 0;
+ margin-right: 10rpx;
+}
+.price text:nth-child(2){
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.price text:nth-child(3){
+ margin-left: 4rpx;
+ font-size: 20rpx;
+ color: #8D8D8D;
+}
+.sale-rate {
+ font-size: 24rpx;
+ color: #666;
+}
+.show-info {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ color: #999999;
+ font-size: 25rpx;
+ line-height: 45rpx;
+}
+.show-tag {
+ line-height: 31rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ box-sizing: border-box;
+ padding: 0 15rpx;
+ font-size: 20rpx;
+ margin-top: 10rpx;
+ margin-bottom: 10rpx;
+ margin-right: 13rpx;
+}
\ No newline at end of file
diff --git a/pages/user/address/add/index.js b/pages/user/address/add/index.js
index 5609d07..7186676 100644
--- a/pages/user/address/add/index.js
+++ b/pages/user/address/add/index.js
@@ -31,16 +31,20 @@ Page({
this.setData({
id:options.id || null
})
- common._post("regionNoLogin/getRegionList").then(res=>{
+ user._post("user/getAreas").then(res=>{
this.setData({
areaList: res.data
})
-
if(this.data.id){
// 获取当前收货地址详情
- user.user_post("memberNeedLoginController/getOneMemberConsignees",{id:this.data.id}).then(res=>{
- console.log(res)
- res.data.isDefault = res.data.isDefault==='DEFAULT';
+ user.user_post("user/getContactInfoById",{id:this.data.id}).then(res=>{
+ res.data.isDefault = res.data.isDefault=='1';
+ res.data.mobile = res.data.tel;
+ res.data.username = res.data.name;
+ res.data.address = res.data.detail_addr;
+ res.data.areaId = res.data.district_id;
+ res.data.cityId = res.data.city_id;
+ res.data.provinceId = res.data.province_id;
this.setData({
formData:res.data
})
@@ -261,16 +265,17 @@ Page({
return false;
}
var data = this.data.formData;
- data.provinceId = areaList.filter(item => item.name == province)[0].id;
- data.cityId = areaList.filter(item => item.name == city && item.pid == data.provinceId)[0].id;
- data.areaId = areaList.filter(item => item.name == area && item.pid == data.cityId)[0].id;
- data.isDefault = data.isDefault?'DEFAULT':'NORMAL';
- let service ="addMemberConsignees";
+ data.province_id = areaList.filter(item => item.name == province)[0].id;
+ data.city_id = areaList.filter(item => item.name == city && item.pid == data.province_id)[0].id;
+ data.district_id = areaList.filter(item => item.name == area && item.pid == data.city_id)[0].id;
+ data.is_default = data.isDefault?'1':'0';
+ data.detail_addr = data.address
+ let service ="addNewConsignee";
if(this.data.id){
- data.consigneesId = this.data.id;
- service ="updateMemberConsignees";
+ data.id = this.data.id;
+ service ="editConsignee";
}
- user.user_post("memberNeedLoginController/" + service,data).then(res=>{
+ user.user_post("user/" + service,data).then(res=>{
if(res.data){
wx.showToast({
title: '保存成功',
@@ -321,12 +326,5 @@ Page({
*/
onReachBottom: function () {
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
}
})
\ No newline at end of file
diff --git a/pages/user/address/add/index.wxss b/pages/user/address/add/index.wxss
index a053b3c..385dd6b 100644
--- a/pages/user/address/add/index.wxss
+++ b/pages/user/address/add/index.wxss
@@ -1,13 +1,18 @@
/* pages/user/address/add/index.wxss */
+page {
+ background: #f6f6f6;
+}
.input-box {
background: white;
- padding: 0 20rpx;
+ margin: 20rpx;
font-size: 28rpx;
+ padding: 0 25rpx;
+ border-radius: 10rpx;
}
.input-item {
display: flex;
align-items: center;
- height: 90rpx;
+ height: 106rpx;
justify-content: space-between;
border-bottom: 1rpx solid #EEE;
}
@@ -27,5 +32,5 @@
text-align: center;
color: white;
font-size: 36rpx;
- background:linear-gradient(0deg,rgba(0,179,129,1),rgba(92,192,95,1));
+ background: #D62828;
}
\ No newline at end of file
diff --git a/pages/user/address/index.js b/pages/user/address/index.js
index b35debf..dfc92c0 100644
--- a/pages/user/address/index.js
+++ b/pages/user/address/index.js
@@ -45,12 +45,13 @@ Page({
}
},
getList:function(){
- user.user_post("memberNeedLoginController/getMemberConsigneesList",{
- pageNo: this.data.pageNo,
- pageNum:10
+ user.user_post("user/getContactOrConsignee",{
+ contactType:"CONSIGNEE",
+ offset: this.data.list.length,
+ limit:10
}).then(res=>{
- let list = this.data.list.concat(res.data.data), isMore = true;
- if(list.length>=res.data.total){
+ let list = this.data.list.concat(res.data), isMore = true;
+ if(res.data.length<10){
isMore:false
}
this.setData({
@@ -70,23 +71,23 @@ Page({
// 设为默认
setDefault:function(e){
let item = e.currentTarget.dataset.item;
- let isDefault = item.isDefault==='NORMAL'?'DEFAULT':'NORMAL';
- item.isDefault = isDefault;
- item.consigneesId = item.id;
- user.user_post("memberNeedLoginController/updateMemberConsignees",item).then(res=>{
+ if(item.is_default==1) return;
+ user.user_post("user/setDefaultConsignee",{
+ id:item.id
+ }).then(res=>{
// 设置默认成功
let list = this.data.list;
- if(res.data){
+ if(res.code==1){
wx.showToast({
title: '操作成功!',
icon:"success"
});
list.map((i,index,arr)=>{
if(i.id==item.id){
- i.isDefault = item.isDefault;
+ i.is_default = 1;
}
else {
- i.isDefault = 'NORMAL';
+ i.is_default = 0;
}
})
this.setData({
@@ -118,8 +119,8 @@ Page({
success:function(res){
if (res.confirm){
// 确定删除
- user.user_post("memberNeedLoginController/deleteMemberConsignees", { consigneesId:id}).then(res=>{
- if(res.data){
+ user.user_post("user/delConsignee", { id:id}).then(res=>{
+ if(res.code==1){
wx.showToast({
title: '删除成功',
icon:'success'
@@ -176,12 +177,5 @@ Page({
if(this.data.isMore){
this.getList();
}
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
}
})
\ No newline at end of file
diff --git a/pages/user/address/index.wxml b/pages/user/address/index.wxml
index 8b589d3..e567691 100644
--- a/pages/user/address/index.wxml
+++ b/pages/user/address/index.wxml
@@ -4,24 +4,24 @@
- {{item.username}}
- {{item.mobile}}
+ {{item.name}}
+ {{item.tel}}
- {{item.provinceTitle+item.cityTitle+item.areaTitle+item.address}}
+ {{item.address}}
-
+
默认收货地址
- 编辑
+ 编辑
- 删除
+ 删除
diff --git a/pages/user/bindtel/index.js b/pages/user/bindtel/index.js
new file mode 100644
index 0000000..9769642
--- /dev/null
+++ b/pages/user/bindtel/index.js
@@ -0,0 +1,236 @@
+// pages/user/bindtel/index.js
+import util from "../../../utils/util.js"
+import user from "../../../utils/https/user.js"
+import https from "../../../utils/https.js"
+var app = getApp();
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ tel:"",
+ picCode:"",
+ code:"",
+ buttonText:"获取验证码",
+ sendFlag:true,
+ regToken:null,
+ codeId:null,
+ imgCodeInfo:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.changeImgCode();
+ this.setData({
+ regToken: options.regToken || null
+ })
+ },
+ cancel:function(){
+ wx.reLaunch({
+ url: '/pages/index/index',
+ })
+ },
+ changeImgCode:function(){
+ user._post("user/getCaptchaImg",{}).then(res=>{
+ console.log(res)
+ this.setData({
+ imgCodeInfo:res.data
+ })
+ })
+ },
+ // 一些input操作 为什么不是双向绑定啊 脑子疼
+ telInput:function(e){
+ this.setData({
+ tel:e.detail.value
+ })
+ },
+ codeInput:function(e){
+ this.setData({
+ code: e.detail.value
+ })
+ },
+ picCodeInput:function(e){
+ this.setData({
+ picCode: e.detail.value
+ })
+ },
+ // 获取验证码
+ getCode:function(){
+ // 如果已经在发送则不能继续发送验证码
+ if (!this.data.sendFlag){
+ return false;
+ }
+ if(!this.data.tel){
+ wx.showToast({
+ title: '请输入手机号',
+ icon:"none"
+ })
+ return false;
+ }
+ if(!util.isTel(this.data.tel)){
+ wx.showToast({
+ title: '请输入正确的手机号码',
+ icon: "none"
+ })
+ return false;
+ }
+ if(!this.data.picCode){
+ wx.showToast({
+ title: '请输入图形验证码',
+ icon:"none"
+ })
+ return false;
+ }
+ // 获取验证码则需要改变按钮的文字
+ this.setData({
+ buttonText:"发送中...",
+ sendFlag:false
+ })
+ let service = "user/getMobileCodeForChange",data={
+ mobile:this.data.tel,
+ captchaCode:this.data.picCode,
+ captchaCodeId:this.data.imgCodeInfo.id
+ },api = user.user_post;
+ if(this.data.regToken){
+ service="user/getMobileCodeForBind";
+ data.openid = this.data.regToken
+ api = user._post
+ }
+ api(service, data).then(res=>{
+ console.log('sendmsg',res)
+ if(res.code==1){
+ // 发送成功 即接口调用成功
+ this.setData({
+ buttonText: "发送成功",
+ sendFlag: false,
+ codeId: res.data.id
+ })
+ // 获取成功之后需要马上改变成倒计时
+ let time = 59;
+ var timer = setInterval(() => {
+ // 倒计时结束需要重置可发送验证码状态和按钮文字
+ if (time < 0) {
+ // 清除定时器
+ clearInterval(timer)
+ this.setData({
+ buttonText: "重新发送",
+ sendFlag: true
+ })
+ return false;
+ }
+ this.setData({
+ buttonText: time + "秒后重新发送"
+ })
+ time--;
+ }, 1000)
+ }
+ else {
+ this.setData({
+ buttonText: "重新发送",
+ sendFlag: true
+ })
+ }
+
+ })
+ // wx.navigateToMiniProgram({
+ // appId: 'wx5a3a7366fd07e119',
+ // path: '/pages/captcha/index',
+ // extraData: {
+ // appId: '2037722291'//您申请的验证码的 appId
+ // }
+ // })
+ },
+ // 绑定
+ submit:function(){
+ if(!this.data.code){
+ wx.showToast({
+ title: '请输入验证码',
+ icon: "none"
+ })
+ return false;
+ }
+ let service = "user/changeMobile",data={smsCode:this.data.code,mobile:this.data.tel,smsCodeId:this.data.codeId},api = user.user_post;
+ if(this.data.regToken){
+ service = "user/wxBindPhoneAndLogin"
+ data.openid = this.data.regToken
+ data.fromSource = "WECHATXCX"
+ api = user._post
+ }
+ api(service,data).then(res=>{
+ if(res.code==1){
+ // 绑定成功
+ wx.showToast({
+ title: this.data.regToken?"绑定成功":"更换",
+ icon: "success"
+ })
+ setTimeout(()=>{
+ wx.navigateBack({
+ delta:this.data.regToken?2:1
+ })
+ },500)
+ if(this.data.regToken){
+ https.set_logininfo(res);
+ }
+ // wx.setStorageSync("jstrip_userid", res.data.id)
+ // wx.setStorageSync("jstrip_token", res.data.token)
+ // wx.setStorageSync("jstrip_userInfo", res.data)
+ // app.globalData.userInfo = res.data;
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ // const captchaResult = app.globalData.captchaResult;
+ // app.globalData.captchaResult = null; // 验证码的票据为一次性票据,取完需要置空
+ // if (captchaResult && captchaResult.ret === 0) {
+ // // 将验证码的结果返回至服务端校验
+ // const ticket = captchaResult.ticket;
+ // const randstr = captchaResult.randstr;
+ // // 这个时候才可以获取验证码
+ // // 获取验证码接口
+ // // todo
+
+ // }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/bindtel/index.json b/pages/user/bindtel/index.json
new file mode 100644
index 0000000..27b6d1f
--- /dev/null
+++ b/pages/user/bindtel/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title-header": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/bindtel/index.wxml b/pages/user/bindtel/index.wxml
new file mode 100644
index 0000000..e4c4f58
--- /dev/null
+++ b/pages/user/bindtel/index.wxml
@@ -0,0 +1,24 @@
+
+
+
+
+
+ 手机号
+
+
+
+ 图形验证码
+
+
+
+
+
+ 验证码
+
+
+
+
+ {{regToken?'绑定':'保存修改'}}
+
+
+
\ No newline at end of file
diff --git a/pages/user/bindtel/index.wxss b/pages/user/bindtel/index.wxss
new file mode 100644
index 0000000..fdbbcda
--- /dev/null
+++ b/pages/user/bindtel/index.wxss
@@ -0,0 +1,41 @@
+/* pages/user/bindtel/index.wxss */
+.bind-box {
+ background: white;
+}
+.bind-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin: 0 20rpx;
+ height: 120rpx;
+ line-height: 120rpx;
+ font-size: 28rpx;
+ border-bottom: 1rpx solid #EEE;
+}
+.bind-item .weui-input {
+ flex: 1;
+}
+.bind-item-left {
+ width: 140rpx;
+}
+.bind-item image {
+ width: 200rpx;
+ height: 60rpx;
+}
+.btn {
+ margin:60rpx auto;
+ margin-top: 100rpx;
+ width: 360rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ background: #0B898E;
+ border-radius: 40rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 30rpx;
+ font-weight: 500;
+}
+.code-img {
+ width: 150rpx;
+ height: 60rpx;
+}
\ No newline at end of file
diff --git a/pages/user/cartlist/list.js b/pages/user/cartlist/list.js
new file mode 100644
index 0000000..10e262a
--- /dev/null
+++ b/pages/user/cartlist/list.js
@@ -0,0 +1,238 @@
+// pages/user/cartlist/list.js
+const device = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); // 获取设备信息
+const ratio = 750 / device.windowWidth;
+console.log(rect)
+const width = device.windowWidth // 示例为一个与屏幕等宽的正方形裁剪框
+let height = device.windowHeight;
+import commonApi from "../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ menuWidth:width - rect.right + rect.width + 6,
+ list:[],
+ allChecked:false,
+ allPrice:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList();
+ },
+ getList:function(){
+ commonApi.user_post("cart/get_list",{
+
+ }).then(res=>{
+ this.setData({
+ list:res.data
+ })
+ })
+ },
+ minus:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list;
+ let num = list[index].num;
+ if(num<=1) return;
+ num = num - 1;
+ list[index].num = num;
+ this.setData({
+ list:list
+ })
+ this.changeNumber(list[index])
+ this.updatePrice()
+ },
+ add:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list;
+ let num = list[index].num+1;
+ list[index].num = num;
+ this.setData({
+ list:list
+ })
+ this.changeNumber(list[index])
+ this.updatePrice()
+ },
+ select:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list;
+ if(list[index].product.flag!=1 || list[index].sku.flag!='on'){
+ wx.showToast({
+ title: '产品已下架',
+ icon:'none'
+ })
+ return;
+ }
+ list[index].checked = list[index].checked?false:true;
+ this.setData({
+ list:list
+ })
+ this.updatePrice()
+ },
+ selectAll:function(){
+ let list = this.data.list,allChecked = this.data.allChecked?false:true;
+ list.map(item=>{
+ if(item.sku.flag=='on' && item.product.flag==1){
+ item.checked = allChecked;
+ }
+ })
+ this.setData({
+ allChecked:allChecked,
+ list:list
+ })
+ this.updatePrice()
+ },
+ changeNumber(item){
+ commonApi.user_post("cart/update_sku",{
+ sku_id:item.sku.id,
+ num:item.num
+ }).then(res=>{
+ })
+ },
+ updatePrice:function(){
+ let list = this.data.list,price=0;
+ list.map(item=>{
+ if(item.checked){
+ price = price + item.sku.price * item.num;
+ }
+ })
+ this.setData({
+ allPrice:price
+ })
+ },
+ order:function(){
+ app.globalData.couponInfo = null;
+ let list = this.data.list,price=0,product=[];
+ list.map(item=>{
+ if(item.checked){
+ item.product.type="post";
+ product.push({
+ product:item.product,
+ sku:item.sku,
+ productNum:item.num
+ })
+ }
+ })
+ if(product.length==0) {
+ wx.showToast({
+ title: '请先选择产品',
+ icon: 'none'
+ })
+ return;
+ }
+ app.globalData.postProduct = product;
+ wx.navigateTo({
+ url: '/pages/order/postOrder/index?from=cart',
+ })
+ },
+ touchStart(e){//移动前点击的位置
+ console.log(e)
+ // 在开始触摸时将所有startTouchMove设置为flase,对当前的为true
+ this.data.list.forEach(cart =>{
+ if(cart.isTouchMove)//当istouchMove为true
+ cart.isTouchMove = false;//其它的对象都为false
+ })
+ this.setData({
+ startX: e.changedTouches[0].clientX,
+ startY: e.changedTouches[0].clientY,
+ list: this.data.list
+ })
+ },
+ touchmove(e){//移动的位置,用于计算用户滑动的弧度向左还是向右,移动了多少,可以确定删除功能的显示和隐藏
+ let index = e.currentTarget.dataset.index;
+ // 获取开始的x,y坐标
+ let startX = this.data.startX,
+ startY = this.data.startY;
+ // 获取移动的x,x坐标
+ let touchMoveX = e.changedTouches[0].clientX,
+ touchMoveY = e.changedTouches[0].clientY;
+ // 调用计算角度的方法,获取角度
+ var angel = this.angel({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY })
+ // 遍历cartArray
+ this.data.list.forEach((cart, i ) =>{
+ cart.isTouchMove = false;
+ // 滑动角度大于30,直接return 视为非滑动意思
+ if(Math.abs(angel) > 30) return;
+ // 匹配当前所点击的list和滑动的list
+ if(i == index){
+ // 匹配上后判断滑动方向
+ if (touchMoveX > startX){//左滑动隐藏删除
+ cart.isTouchMove = false;
+ }else{
+ cart.isTouchMove = true;
+ }
+ }
+ })
+ // 更新数据
+ this.setData({
+ list:this.data.list
+ })
+ },
+ angel(start,end){//计算滑动的角度
+ // console.log(start,end)
+ // 移动坐标减去对应的开始坐标
+ var _X = end.X - start.X,
+ _Y = end.Y - start.Y;
+ // 返回角度 Math.atan() 返回数字的正切值
+ return 360 * Math.atan(_Y / _X) / (2 * Math.PI)
+ },
+ del:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list;
+ commonApi.user_post("cart/del_sku",{
+ sku_id:list[index].sku_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '删除成功',
+ icon:"success"
+ })
+ list.splice(index,1);
+ this.setData({
+ list:list
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/cartlist/list.json b/pages/user/cartlist/list.json
new file mode 100644
index 0000000..18a9446
--- /dev/null
+++ b/pages/user/cartlist/list.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/cartlist/list.wxml b/pages/user/cartlist/list.wxml
new file mode 100644
index 0000000..e62d369
--- /dev/null
+++ b/pages/user/cartlist/list.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+ {{item.product.title}}
+
+ {{item.sku.sku_name}}
+ x{{item.num}}
+
+
+ {{item.sku.price/100}}
+
+ {{item.num}}
+
+
+ 已下架
+
+
+ 删除
+
+
+
+ 暂无内容
+
+
+
+
+ 合计:
+ ¥{{allPrice/100}}
+ 不含运费
+ 去下单
+
diff --git a/pages/user/cartlist/list.wxss b/pages/user/cartlist/list.wxss
new file mode 100644
index 0000000..6904e2d
--- /dev/null
+++ b/pages/user/cartlist/list.wxss
@@ -0,0 +1,160 @@
+/* pages/user/cartlist/list.wxss */
+.edit-btn {
+ font-size: 29rpx;
+ color: #000;
+ position: absolute;
+}
+page {
+ background: #f6f6f6;
+}
+.item {
+ display: flex;
+ padding: 40rpx 20rpx;
+ justify-content: space-between;
+ align-items: center;
+ transition: all 0.4s;
+ transform: translateX(180rpx);
+ margin-left: -180rpx;
+ flex-shrink: 0;
+ width: 660rpx;
+}
+.item.disable {
+ color: #999 !important;
+ opacity: 0.5;
+}
+.del {
+ background-color: #e4393c;
+ width: 180rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ height: 260rpx;
+ justify-content: center;
+ color: #fff;
+ transform: translateX(180rpx);
+ transition: all 0.4s;
+ flex-shrink: 0;
+ opacity: 0;
+ margin-left: 30rpx;
+ text-align: center;
+}
+.goods-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 10rpx;
+ overflow: hidden;
+}
+.touch-move-active .del,.touch-move-active .item {
+ -webkit-transform: translateX(0);
+ transform: translateX(0);
+ opacity: 1;
+}
+
+.icon-gou,.icon-quan {
+ color: #999999;
+ flex-shrink: 0;
+ font-size: 40rpx;
+}
+.item image {
+ margin: 0 25rpx;
+ flex-shrink: 0;
+ width: 173rpx;
+ height: 173rpx;
+ border-radius: 7rpx;
+}
+.item-info {
+ flex: 1;
+}
+.item-info .title {
+ font-size: 31rpx;
+ font-weight: 500;
+ color: #000;
+}
+.item-info .sku-title {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #666;
+ font-size: 27rpx;
+ margin-top: 10rpx;
+ margin-bottom: 20rpx;
+}
+.item-bottom {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-end;
+}
+.item-bottom .price {
+ color: #D62828;
+ font-size: 40rpx;
+ font-weight: 500;
+ flex: 1;
+ margin-right: 10rpx;
+}
+.item-bottom .price::before {
+ content: "¥";
+ font-size: 27rpx;
+ font-weight: 400;
+}
+.item-bottom .iconfont {
+ flex-shrink: 0;
+ font-size: 32rpx;
+ line-height: 50rpx;
+}
+.item-bottom .number {
+ flex-shrink: 0;
+ width: 67rpx;
+ line-height: 50rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 20rpx;
+}
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ height: 113rpx;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+ bottom: 0;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 27rpx;
+ color: #999;
+ padding-left: 40rpx;
+}
+.fixed-bottom .tip {
+ font-size: 29rpx;
+ color: #000;
+ font-weight: 500;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.bottom-price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: 500;
+ flex-shrink: 0;
+ margin-right: 20rpx;
+}
+.fixed-bottom .btn {
+ width: 267rpx;
+ line-height: 113rpx;
+ text-align: center;
+ background: #D62828;
+ color: #fff;
+ font-size: 36rpx;
+ flex-shrink: 0;
+ font-weight: 500;
+}
+.fixed-bottom .iconfont {
+ font-size: 42rpx;
+}
+.icon-gou {
+ color: #D62828;
+}
\ No newline at end of file
diff --git a/pages/user/coupon/index.js b/pages/user/coupon/index.js
new file mode 100644
index 0000000..c9d6425
--- /dev/null
+++ b/pages/user/coupon/index.js
@@ -0,0 +1,88 @@
+// pages/user/coupon/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ moreFlag:true,
+ index:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(!this.data.moreFlag) return;
+ commonApi.user_post("coupon/get_user_list",{
+ offset:list.length,
+ limit:10,
+ status:Number(this.data.index)+1
+ }).then(res=>{
+ if(res.data.length<10){
+ this.setData({
+ moreFlag:false
+ })
+ }
+ this.setData({
+ list:list.concat(res.data)
+ })
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ index:e.currentTarget.dataset.index,
+ list:[],
+ moreFlag:true
+ })
+ this.getList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ }
+})
\ No newline at end of file
diff --git a/pages/user/coupon/index.json b/pages/user/coupon/index.json
new file mode 100644
index 0000000..18a9446
--- /dev/null
+++ b/pages/user/coupon/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/coupon/index.wxml b/pages/user/coupon/index.wxml
new file mode 100644
index 0000000..a5e7c81
--- /dev/null
+++ b/pages/user/coupon/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+ 可使用
+ 已使用
+ 已失效
+
+
+
+
+ {{item.activity.name}}
+ ¥{{item.activity.money/100}}
+
+ 使用条件:全场可用
+ 有效期:{{item.activity.end_time}}
+ 优惠码:{{item.key}}
+ 使用规则
+
+
+
+前往领券中心
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/user/coupon/index.wxss b/pages/user/coupon/index.wxss
new file mode 100644
index 0000000..c8c1862
--- /dev/null
+++ b/pages/user/coupon/index.wxss
@@ -0,0 +1,109 @@
+/* pages/user/coupon/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.types {
+ position: fixed;
+ left: 0;
+ right: 0;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ font-size: 26rpx;
+ line-height: 43rpx;
+ color: #333;
+ background: white;
+ text-align: center;
+}
+.type-item {
+ position: relative;
+}
+.type-item.active {
+ color: #0B898E;
+ font-weight: bold;
+}
+.type-item.active::after {
+ content: "!";
+ font-size: 0;
+ width: 30rpx;
+ height: 4rpx;
+ background: #0B898E;
+ border-radius: 2rpx;
+ position: absolute;
+ display: block;
+ left: 50%;
+ margin-left: -15rpx;
+ top: 43rpx;
+}
+.coupon-item {
+ margin: 20rpx 30rpx;
+ background: url(https://fastadmin.oss-cn-shenzhen.aliyuncs.com/xcxImages/user/coupon.png) no-repeat;
+ background-size: 100% 100%;
+ height: 300rpx;
+ position: relative;
+ color: #999;
+}
+.coupon-item>view {
+ padding: 0 30rpx;
+}
+.coupon-item .title-box {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-top: 15rpx;
+ color: #999;
+ font-size: 30rpx;
+ font-weight: bold;
+}
+.coupon-item.active .title-box {
+ color: #D62828;
+}
+.coupon-item .title-box .title {
+ flex: 1;
+}
+.coupon-item.active .title-box .title {
+ color: #333;
+}
+.coupon-item .title-box .coupon-money {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.coupon-item .title-box .coupon-money text {
+ font-size: 48rpx;
+}
+.coupon-tip {
+ line-height: 45rpx;
+ font-size: 26rpx;
+}
+.coupon-item.active .coupon-tip {
+ color: #333;
+}
+.coupon-tip text {
+ color: #999999;
+}
+.coupon-rule {
+ line-height: 79rpx;
+ font-size: 26rpx;
+ position: absolute;
+ bottom: 0;
+}
+.coupon-rule .iconfont {
+ font-size: 28rpx;
+}
+.fixed-btn {
+ position: fixed;
+ left: 50%;
+ width: 360rpx;
+ line-height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ text-align: center;
+ font-size: 30rpx;
+ color: #222222;
+ margin-left: -180rpx;
+ bottom: 30rpx;
+}
+.fixed-btn text {
+ color: #0B898E;
+}
\ No newline at end of file
diff --git a/pages/user/couponCenter/index.js b/pages/user/couponCenter/index.js
new file mode 100644
index 0000000..08ab10d
--- /dev/null
+++ b/pages/user/couponCenter/index.js
@@ -0,0 +1,94 @@
+// pages/user/couponCenter/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ height:0,
+ key:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
+ let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
+ this.setData({
+ height:height + systemInfo.statusBarHeight
+ })
+ },
+ changeKey:function(e){
+ this.setData({
+ key:e.detail.value
+ })
+ },
+ getCoupon:function(){
+ commonApi.user_post("coupon/get_coupon",{
+ key:this.data.key
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '领取成功',
+ icon:'success'
+ })
+ setTimeout(()=>{
+ util.back()
+ },500)
+ return;
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/couponCenter/index.json b/pages/user/couponCenter/index.json
new file mode 100644
index 0000000..18a9446
--- /dev/null
+++ b/pages/user/couponCenter/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/couponCenter/index.wxml b/pages/user/couponCenter/index.wxml
new file mode 100644
index 0000000..7d1071f
--- /dev/null
+++ b/pages/user/couponCenter/index.wxml
@@ -0,0 +1,11 @@
+
+
+
+
+ 【兑换优惠券】
+
+ 卡密
+
+
+ 领取
+
\ No newline at end of file
diff --git a/pages/user/couponCenter/index.wxss b/pages/user/couponCenter/index.wxss
new file mode 100644
index 0000000..142e7b5
--- /dev/null
+++ b/pages/user/couponCenter/index.wxss
@@ -0,0 +1,52 @@
+/* pages/user/couponCenter/index.wxss */
+.bg-img {
+ position: absolute;
+ left: 0;
+ right: 0;
+ display: block;
+ width: 100%;
+ z-index: -1;
+}
+.content {
+ position: absolute;
+ left: 0;
+ right: 0;
+ display: block;
+ width: 100%;
+ bottom: 0;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+.coupon-title {
+ color: #4A3B35;
+ font-size: 53rpx;
+ font-weight: 600;
+ text-align: center;
+}
+.input-box {
+ display: flex;
+ margin: 50rpx;
+ color: #483A34;
+ font-size: 35rpx;
+ align-items: center;
+}
+.input-box input {
+ margin-left: 38rpx;
+ width: 420rpx;
+ /* height: 93rpx; */
+ line-height: 50rpx;
+ display: block;
+ background: white;
+ padding: 20rpx;
+}
+.btn {
+ width: 446rpx;
+ line-height: 85rpx;
+ background: #714000;
+ border-radius: 43rpx;
+ text-align: center;
+ color: #fff;
+ font-size: 33rpx;
+ margin: 100rpx auto;
+}
\ No newline at end of file
diff --git a/pages/user/email/index.js b/pages/user/email/index.js
new file mode 100644
index 0000000..9cf3bb7
--- /dev/null
+++ b/pages/user/email/index.js
@@ -0,0 +1,94 @@
+// pages/user/nickname/index.js
+import userApi from "../../../utils/https/user"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ email:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ userApi.user_post("user/getMyInfo",{}).then(res=>{
+ this.setData({
+ email:res.data.email
+ })
+ })
+ },
+ changeEmail:function(e){
+ this.setData({
+ email:e.detail.value
+ })
+ },
+ submit:function(){
+ if(!this.data.email){
+ wx.showToast({
+ title: '请输入邮箱',
+ icon: 'none'
+ })
+ return;
+ }
+ userApi.user_post("user/changeEmail",{
+ email: this.data.email
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '修改成功!',
+ icon:"success"
+ })
+ setTimeout(()=>{
+ wx.navigateBack({
+ complete: (res) => {},
+ })
+ },1000)
+ }
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/email/index.json b/pages/user/email/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/email/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/email/index.wxml b/pages/user/email/index.wxml
new file mode 100644
index 0000000..b3cb8cf
--- /dev/null
+++ b/pages/user/email/index.wxml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+保存修改
\ No newline at end of file
diff --git a/pages/user/email/index.wxss b/pages/user/email/index.wxss
new file mode 100644
index 0000000..8e0f9e4
--- /dev/null
+++ b/pages/user/email/index.wxss
@@ -0,0 +1,27 @@
+/* pages/user/nickname/index.wxss */
+.btn {
+ margin:60rpx auto;
+ margin-top: 100rpx;
+ width: 360rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ background: #0B898E;
+ border-radius: 40rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 30rpx;
+ font-weight: 500;
+}
+.item {
+ height: 120rpx;
+ display: flex;
+ align-items: center;
+ margin: 0 30rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.item input {
+ display: block;
+ flex: 1;
+ font-size: 30rpx;
+ color: #333;
+}
\ No newline at end of file
diff --git a/pages/user/likes/index.js b/pages/user/likes/index.js
new file mode 100644
index 0000000..3e901c1
--- /dev/null
+++ b/pages/user/likes/index.js
@@ -0,0 +1,227 @@
+// pages/user/likes/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ type:1,
+ list:[],
+ total:1
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList();
+ },
+ touchStart(e){//移动前点击的位置
+ // 在开始触摸时将所有startTouchMove设置为flase,对当前的为true
+ this.data.list.forEach(cart =>{
+ if(cart.isTouchMove)//当istouchMove为true
+ cart.isTouchMove = false;//其它的对象都为false
+ })
+ this.setData({
+ startX: e.changedTouches[0].clientX,
+ startY: e.changedTouches[0].clientY,
+ list: this.data.list
+ })
+ },
+ touchmove(e){//移动的位置,用于计算用户滑动的弧度向左还是向右,移动了多少,可以确定删除功能的显示和隐藏
+ let index = e.currentTarget.dataset.index;
+ // 获取开始的x,y坐标
+ let startX = this.data.startX,
+ startY = this.data.startY;
+ // 获取移动的x,x坐标
+ let touchMoveX = e.changedTouches[0].clientX,
+ touchMoveY = e.changedTouches[0].clientY;
+ // 调用计算角度的方法,获取角度
+ var angel = this.angel({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY })
+ // 遍历cartArray
+ this.data.list.forEach((cart, i ) =>{
+ cart.isTouchMove = false;
+ // 滑动角度大于30,直接return 视为非滑动意思
+ if(Math.abs(angel) > 30) return;
+ // 匹配当前所点击的list和滑动的list
+ if(i == index){
+ // 匹配上后判断滑动方向
+ if (touchMoveX > startX){//左滑动隐藏删除
+ cart.isTouchMove = false;
+ }else{
+ cart.isTouchMove = true;
+ }
+ }
+ })
+ // 更新数据
+ this.setData({
+ list:this.data.list
+ })
+ },
+ angel(start,end){//计算滑动的角度
+ // console.log(start,end)
+ // 移动坐标减去对应的开始坐标
+ var _X = end.X - start.X,
+ _Y = end.Y - start.Y;
+ // 返回角度 Math.atan() 返回数字的正切值
+ return 360 * Math.atan(_Y / _X) / (2 * Math.PI)
+ },
+ del1:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list;
+ commonApi.user_post("product/product_cancel_collection",{
+ product_id:list[index].product_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '删除成功',
+ icon:"success"
+ })
+ list.splice(index,1);
+ this.setData({
+ list:list
+ })
+ }
+ })
+ },
+ del2:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list;
+ commonApi.user_post("scene/scene_cancel_collection",{
+ scene_id:list[index].scene_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '删除成功',
+ icon:"success"
+ })
+ list.splice(index,1);
+ this.setData({
+ list:list
+ })
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ changeType:function(e){
+ this.setData({
+ type:e.currentTarget.dataset.type,
+ list:[],
+ total:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ let service = "scene/scene_collection_list",list = this.data.list;
+ if(list.length>=this.data.total) return;
+ if(this.data.type==1){
+ service = "product/get_product_collection_list"
+ }
+ commonApi.user_post(service,{
+ limit:10,
+ offset:list.length
+ }).then(res=>{
+ this.setData({
+ list:list.concat(res.data.list),
+ total:res.data.total
+ })
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ console.log(item)
+ let type = item.product?item.product.type:item.scene.type
+ switch(type){
+ case "ticket":
+ wx.navigateTo({
+ url: '/pages/info/sceneProductInfo/index?id='+item.product.scene_id
+ });
+ break;
+ case "scenic":
+ wx.navigateTo({
+ url: '/pages/info/sceneProductInfo/index?id='+item.scene.id
+ });
+ break;
+ case "food":
+ wx.navigateTo({
+ url: '/pages/info/foodProductInfo/index?id='+item.product.id
+ });
+ break;
+ case "room":
+ wx.navigateTo({
+ url: '/pages/info/hotelProductInfo/index?id='+item.scene.id
+ });
+ break;
+ case "hotel":
+ wx.navigateTo({
+ url: '/pages/info/hotelProductInfo/index?id='+(item.product.scene_id || item.scene.id)
+ });
+ break;
+ case "line":
+ wx.navigateTo({
+ url: '/pages/info/roadInfo/index?id='+item.product.id
+ });
+ break;
+ case "venue":
+ wx.navigateTo({
+ url: '/pages/info/museumInfo/index?id='+(item.product.scene_id || item.scene.id)
+ });
+ break;
+ case "show":
+ wx.navigateTo({
+ url: '/pages/info/showInfo/index?id='+item.product.id
+ });
+ break;
+ case "post":
+ wx.navigateTo({
+ url: '/pages/info/postProductInfo/index?id='+item.product.id
+ });
+ break;
+ case "coupon":
+ wx.navigateTo({
+ url: '/pages/info/cardInfo/index?id='+item.product.id
+ });
+ break;
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList();
+ }
+})
\ No newline at end of file
diff --git a/pages/user/likes/index.json b/pages/user/likes/index.json
new file mode 100644
index 0000000..18a9446
--- /dev/null
+++ b/pages/user/likes/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/likes/index.wxml b/pages/user/likes/index.wxml
new file mode 100644
index 0000000..50a91af
--- /dev/null
+++ b/pages/user/likes/index.wxml
@@ -0,0 +1,34 @@
+
+
+
+ 产品
+ 景点
+
+
+
+
+
+
+ {{item.product.title}}
+ ¥{{item.product.price/100}}
+ {{item.product.address}}
+
+
+ 删除
+
+
+
+
+
+ {{item.scene.title}}
+ ¥{{item.scene.price/100}}
+ {{item.scene.address}}
+
+
+ 删除
+
+
+
+
+ 暂无内容
+
\ No newline at end of file
diff --git a/pages/user/likes/index.wxss b/pages/user/likes/index.wxss
new file mode 100644
index 0000000..8c5f77e
--- /dev/null
+++ b/pages/user/likes/index.wxss
@@ -0,0 +1,117 @@
+/* pages/user/likes/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.types {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 86rpx;
+ position: fixed;
+ left: 0;
+ right: 0;
+ border-bottom: 1rpx solid #ccc;
+ font-size: 29rpx;
+ color: #333;
+ background: white;
+ z-index: 2;
+}
+.type {
+ position: relative;
+ width: calc(100% / 3);
+ text-align: center;
+ height: 86rpx;
+ line-height: 86rpx;
+}
+.type.active {
+ color: #000;
+ font-size: 33rpx;
+ font-weight: 500;
+}
+.type.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 46rpx;
+ height: 5rpx;
+ background: #0B898E;
+ border-radius: 3rpx;
+ left: 50%;
+ margin-left: -23rpx;
+ bottom: 0;
+}
+.item {
+ display: flex;
+ padding: 20rpx;
+ transition: all 0.4s;
+ justify-content: space-between;
+ transform: translateX(180rpx);
+ margin-left: -180rpx;
+}
+.item image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ margin-right: 18rpx;
+ flex-shrink: 0;
+}
+.right-info {
+ width: 490rpx;
+ height: 100rpx;
+}
+.right-info .title {
+ line-height: 29rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #333;
+}
+.right-info .price {
+ color: #D62828;
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-top: 23rpx;
+ line-height: 23rpx;
+}
+.right-info .location {
+ font-size: 26rpx;
+ color: #333;
+ margin-top: 29rpx;
+ font-weight: bold;
+ line-height: 30rpx;
+}
+.right-info .location .iconfont {
+ color: #0B898E;
+ margin-right: 6rpx;
+ font-size: 26rpx;
+}
+.del {
+ background-color: #e4393c;
+ width: 180rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ height: 200rpx;
+ justify-content: center;
+ color: #fff;
+ transform: translateX(180rpx);
+ transition: all 0.4s;
+ flex-shrink: 0;
+ opacity: 0;
+ margin-left: 30rpx;
+ text-align: center;
+}
+.goods-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin: 30rpx;
+ overflow: hidden;
+ background: white;
+ border-radius: 20rpx;
+}
+.touch-move-active .del,.touch-move-active .item {
+ -webkit-transform: translateX(0);
+ transform: translateX(0);
+ opacity: 1;
+}
\ No newline at end of file
diff --git a/pages/user/linkman/add/index.js b/pages/user/linkman/add/index.js
new file mode 100644
index 0000000..67707f6
--- /dev/null
+++ b/pages/user/linkman/add/index.js
@@ -0,0 +1,214 @@
+// pages/user/address/add/index.js
+import util from "../../../../utils/util.js"
+import user from "../../../../utils/https/user.js"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ isDefault:true,
+ region: [],
+ customItem: '',
+ typeItem:null,
+ formData:{
+ },
+ id:null, // 为null的时候是新增,否则是编辑
+ types:[],
+ safeBottom:app.globalData.safeBottom,
+ selectIndex:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id: options.id || null
+ })
+ // 获取证件列表
+ user.user_post("user/getCardTypeList", {}).then(r => {
+ console.log(r)
+ let data = [];
+ r.data.map(item=>{
+ data.push(item.title)
+ })
+ this.setData({
+ types: r.data,
+ typeList:data
+ })
+ if (this.data.id) {
+ user.user_post("user/getContactInfoById", { id: this.data.id }).then(res => {
+ res.data.isDefault = res.data.is_default == '1' ? true : false;
+ res.data.username = res.data.name;
+ res.data.mobile = res.data.tel;
+ res.data.idNumber = res.data.id_number;
+ this.setData({
+ formData: res.data,
+ idTypeId: res.data.idcard_type,
+ selectIndex:r.data.findIndex(item=>item.type == res.data.idcard_type && item.code == res.data.document_type)
+ })
+ })
+ }
+ })
+
+
+ // 如果id存在那么需要获取地址详情
+ },
+ // 设为默认
+ setDefault:function(e){
+ var formData = this.data.formData;
+ formData.isDefault = e.detail.value;
+ this.setData({
+ formData: formData
+ })
+ },
+ // 输入监听 不是双向绑定啊 绝望
+ nameInput:function(e){
+ var formData = this.data.formData;
+ formData.username = e.detail.value;
+ this.setData({
+ formData: formData
+ })
+ },
+ telInput:function(e){
+ var formData = this.data.formData;
+ formData.mobile = e.detail.value;
+ this.setData({
+ formData: formData
+ })
+ },
+ idNumberInput:function(e){
+ var formData = this.data.formData;
+ formData.idNumber = e.detail.value;
+ this.setData({
+ formData: formData
+ })
+ },
+ // 选择证件类型
+ selectType:function(e){
+ this.setData({
+ selectIndex:e.detail.value
+ })
+ // let data = [];
+ // for(let i=0;i{
+ if(res.code==1){
+ wx.showToast({
+ title: '保存成功!',
+ icon:"success",
+ success:function(){
+ util.back();
+ }
+ })
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/linkman/add/index.json b/pages/user/linkman/add/index.json
new file mode 100644
index 0000000..27b6d1f
--- /dev/null
+++ b/pages/user/linkman/add/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title-header": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/linkman/add/index.wxml b/pages/user/linkman/add/index.wxml
new file mode 100644
index 0000000..319b0b3
--- /dev/null
+++ b/pages/user/linkman/add/index.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ 姓名
+
+
+
+ 手机号
+
+
+
+ 证件类型
+
+
+ {{typeList[selectIndex]}}
+
+
+
+
+
+
+ 证件号
+
+
+
+ 设为默认
+
+
+
+ 保存
+
+
\ No newline at end of file
diff --git a/pages/user/linkman/add/index.wxss b/pages/user/linkman/add/index.wxss
new file mode 100644
index 0000000..84987f4
--- /dev/null
+++ b/pages/user/linkman/add/index.wxss
@@ -0,0 +1,49 @@
+/* pages/user/address/add/index.wxss */
+page {
+ background: #f0f0f0;
+}
+.input-box {
+ background: white;
+ padding: 0 20rpx;
+ font-size: 28rpx;
+ margin: 25rpx;
+ border-radius: 10px;
+}
+.input-item {
+ display: flex;
+ align-items: center;
+ height: 106rpx;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #EEE;
+}
+.input-label {
+ width: 140rpx;
+}
+.input-item .weui-input {
+ flex: 1;
+}
+.select-card {
+ display: flex;
+ align-items: center;
+ line-height: 90rpx;
+}
+.select-card .iconfont {
+ line-height: 90rpx;
+}
+.btn {
+ margin: 0 20rpx;
+ margin-top: 100rpx;
+ width: 700rpx;
+ margin-bottom: 30rpx;
+ line-height: 72rpx;
+ border-radius: 35rpx;
+ text-align: center;
+ color: white;
+ font-size: 36rpx;
+ background:#D62828;
+}
+.icon-xia {
+ margin-left: 10rpx;
+ color: #999;
+ font-size: 28rpx;
+}
\ No newline at end of file
diff --git a/pages/user/linkman/index.js b/pages/user/linkman/index.js
new file mode 100644
index 0000000..f5389e2
--- /dev/null
+++ b/pages/user/linkman/index.js
@@ -0,0 +1,185 @@
+// pages/user/address/index.js
+import user from "../../../utils/https/user.js"
+import util from "../../../utils/util.js"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ pageNo:1,
+ list:[],
+ isMore:true,
+ fromOrder:null,
+ safeBottom:app.globalData.safeBottom
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ fromOrder:options.from || null,
+ pid:options.pid || null,
+ sid:options.sid || null
+ })
+ },
+ // 如果是来自订单的点击选中联系人
+ setOrderLinkman:function(e){
+ console.log(this.data.fromOrder)
+ if(this.data.fromOrder=='order'){
+ let pid = this.data.pid,sid = this.data.sid;
+ app.globalData.shoppingCart.map((item,index,arr)=>{
+ if(item.baseInfo.id==pid && item.skuInfo.id==sid){
+ // 只有当产品id和规格id一致的时候才把联系人赋值进去
+ // 并且只有当这个联系人没有在选中的联系人中才需要赋值
+ let index = item.linkman.findIndex((l)=>l.id==e.currentTarget.dataset.item.id);
+ if(item.productNum<=item.linkman.length && index==-1){
+ item.linkman[item.linkman.length-1] = e.currentTarget.dataset.item
+ }
+ else if(index==-1){
+ item.linkman.push(e.currentTarget.dataset.item)
+ }
+ }
+ })
+ util.back()
+ }
+ else if(this.data.fromOrder=='CtripOrder'){
+ // 携程下单来的
+ app.globalData.product.linkman = e.currentTarget.dataset.item;
+ util.back();
+ }
+ },
+ getList: function () {
+ user.user_post("user/getContactOrConsignee", {
+ contactType:"CONTACT",
+ offset: this.data.list.length,
+ limit: 10
+ }).then(res => {
+ let list = this.data.list.concat(res.data),isMore = true;
+ if(res.data.length<10){
+ isMore = false;
+ }
+ this.setData({
+ list: list,
+ isMore: isMore
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ // 设为默认
+ setDefault:function(e){
+ let item = e.currentTarget.dataset.item;
+ if(item.is_default==1) return;
+ user.user_post("user/setDefaultContact",{contactId:item.id}).then(res=>{
+ // 设置默认成功
+ let list = this.data.list;
+ if(res.data){
+ wx.showToast({
+ title: '操作成功!',
+ icon:"success"
+ });
+ list.map((i,index,arr)=>{
+ if(i.id==item.id){
+ i.is_default = 1;
+ }
+ else {
+ i.is_default = '0';
+ }
+ })
+ this.setData({
+ list:list
+ })
+ }
+ })
+ },
+ // 删除单个地址
+ del: function (e) {
+ let that = this, id = e.currentTarget.dataset.id, index = e.currentTarget.dataset.index;
+ wx.showModal({
+ title: '提示',
+ content: '确定删除吗?',
+ success: function (res) {
+ if (res.confirm) {
+ // 确定删除
+ user.user_post("user/delContact", { contactId: id }).then(res => {
+ if (res.code==1) {
+ wx.showToast({
+ title: '删除成功',
+ icon: 'success'
+ })
+ let data = that.data.list;
+ data.splice(index, 1)
+ that.setData({
+ list: data
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ add: function (e) {
+ console.log(e)
+ if (e.target.dataset.id) {
+ wx.navigateTo({
+ url: './add/index?id=' + e.target.dataset.id
+ })
+ }
+ else {
+ wx.navigateTo({
+ url: './add/index?id='
+ })
+ }
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ list:[],
+ pageNo:1,
+ isMore:true
+ })
+ this.getList();
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ if(this.data.isMore){
+ this.getList();
+ }
+ }
+})
\ No newline at end of file
diff --git a/pages/user/linkman/index.json b/pages/user/linkman/index.json
new file mode 100644
index 0000000..27b6d1f
--- /dev/null
+++ b/pages/user/linkman/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title-header": "/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/linkman/index.wxml b/pages/user/linkman/index.wxml
new file mode 100644
index 0000000..1bd85d4
--- /dev/null
+++ b/pages/user/linkman/index.wxml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ {{item.name}}
+ {{item.tel}}
+
+ {{item.title}}:{{item.id_number}}
+
+
+
+
+ 默认
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+ 暂无联系人
+
+ 新增出游人
+
+
\ No newline at end of file
diff --git a/pages/user/linkman/index.wxss b/pages/user/linkman/index.wxss
new file mode 100644
index 0000000..3d32abf
--- /dev/null
+++ b/pages/user/linkman/index.wxss
@@ -0,0 +1,73 @@
+/* pages/user/address/index.wxss */
+.address-item {
+ background: white;
+ margin-bottom: 20rpx;
+ font-size: 28rpx;
+ color: #333
+}
+page {
+ background: white;
+}
+.address-item-top {
+ padding: 20rpx 30rpx;
+ border-bottom: 1rpx solid #E5E5E5;
+}
+.address-item-top-one {
+ display: flex;
+ font-size: 30rpx;
+ justify-content: space-between;
+ align-items: center;
+}
+.address-oprations {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ line-height: 60rpx;
+ font-size: 24rpx;
+ padding: 0 30rpx;
+}
+.address-oprations .address-oprations {
+ padding: 0
+}
+.address-oprations .address-oprations icon {
+ font-size: 20rpx;
+ color: #666;
+ margin-right: 10rpx;
+ line-height: 80rpx;
+}
+.address-oprations .address-oprations .icon-quan,.address-oprations .address-oprations .icon-gou {
+ font-size: 38rpx;
+ margin-right: 10rpx;
+}
+.address-oprations .address-oprations .icon-gou {
+ color: #5CC05F;
+}
+.btn {
+ margin: 0 25rpx;
+ margin-top: 100rpx;
+ width: 700rpx;
+ margin-bottom: 30rpx;
+ line-height: 72rpx;
+ border-radius: 35rpx;
+ text-align: center;
+ color: white;
+ font-size: 36rpx;
+ background:linear-gradient(0deg,rgba(0,179,129,1),rgba(92,192,95,1));
+}
+.address {
+ font-size: 24rpx;
+ color: #666;
+ margin-top: 20rpx;
+}
+.address-opration {
+ height: 46rpx;
+ border-radius: 23rpx;
+ border: 1rpx solid #999;
+ font-size: 24rpx;
+ line-height: 46rpx;
+ display: flex;
+ align-items: center;
+ padding: 0 20rpx;
+ margin-left: 10rpx;
+ color: #666;
+}
\ No newline at end of file
diff --git a/pages/user/nickname/index.js b/pages/user/nickname/index.js
new file mode 100644
index 0000000..c59689e
--- /dev/null
+++ b/pages/user/nickname/index.js
@@ -0,0 +1,94 @@
+// pages/user/nickname/index.js
+import userApi from "../../../utils/https/user"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ nickname:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ userApi.user_post("user/getMyInfo",{}).then(res=>{
+ this.setData({
+ nickname:res.data.nickname
+ })
+ })
+ },
+ changeNickname:function(e){
+ this.setData({
+ nickname:e.detail.value
+ })
+ },
+ submit:function(){
+ if(!this.data.nickname){
+ wx.showToast({
+ title: '请输入昵称',
+ icon: 'none'
+ })
+ return;
+ }
+ userApi.user_post("user/changeNickname",{
+ nickname: this.data.nickname
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '修改成功!',
+ icon:"success"
+ })
+ setTimeout(()=>{
+ wx.navigateBack({
+ complete: (res) => {},
+ })
+ },1000)
+ }
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/nickname/index.json b/pages/user/nickname/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/nickname/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/nickname/index.wxml b/pages/user/nickname/index.wxml
new file mode 100644
index 0000000..09aa0c9
--- /dev/null
+++ b/pages/user/nickname/index.wxml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+保存修改
\ No newline at end of file
diff --git a/pages/user/nickname/index.wxss b/pages/user/nickname/index.wxss
new file mode 100644
index 0000000..8e0f9e4
--- /dev/null
+++ b/pages/user/nickname/index.wxss
@@ -0,0 +1,27 @@
+/* pages/user/nickname/index.wxss */
+.btn {
+ margin:60rpx auto;
+ margin-top: 100rpx;
+ width: 360rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ background: #0B898E;
+ border-radius: 40rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 30rpx;
+ font-weight: 500;
+}
+.item {
+ height: 120rpx;
+ display: flex;
+ align-items: center;
+ margin: 0 30rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+.item input {
+ display: block;
+ flex: 1;
+ font-size: 30rpx;
+ color: #333;
+}
\ No newline at end of file
diff --git a/pages/user/order/activityOrderInfo/index.js b/pages/user/order/activityOrderInfo/index.js
new file mode 100644
index 0000000..f46cc3d
--- /dev/null
+++ b/pages/user/order/activityOrderInfo/index.js
@@ -0,0 +1,221 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ productState:app.globalData.productState,
+ pay_methods:app.globalData.pay_methods,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ id:null,
+ second:"",
+ minute:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ console.log(productState)
+ this.setData({
+ id:options.id
+ })
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ id:this.data.id
+ })
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ let state = ""
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
+ state = state + order.state
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/activityOrderInfo/index.json b/pages/user/order/activityOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/activityOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/activityOrderInfo/index.wxml b/pages/user/order/activityOrderInfo/index.wxml
new file mode 100644
index 0000000..dd103fc
--- /dev/null
+++ b/pages/user/order/activityOrderInfo/index.wxml
@@ -0,0 +1,96 @@
+
+
+
+
+
+{{productState[info.order_product_list[0].state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+
+ {{item.product_title}}
+ {{item.sku_name}}
+
+
+ ¥ {{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 商品总价
+ ¥{{info.total_money/100}}
+
+
+ 运费
+ ¥{{info.total_post_fee/100}}
+
+
+ 优惠券抵扣
+ -¥{{info.preference_money/100}}
+
+
+ 实付款
+ {{info.paid_money/100}}
+
+
+ 退款详情
+ 再次购买
+ 取消订单
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+
+ {{info.order_product_list[0].scene_detail.title}}
+
+ 日期:{{info.order_product_list[0].use_date}}
+
+
+ 时段:{{info.order_product_list[0].start_time}} ~ {{info.order_product_list[0].end_time}}
+
+
+ 地址:{{info.order_product_list[0].scene_detail.address}}
+
+
+
+ 订单信息
+
+ 姓名:{{(index!=0?'、':'')+item.name}}
+
+
+ 订单编号:{{info.order_id}}
+
+
+ 下单时间:{{info.create_time}}
+
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/activityOrderInfo/index.wxss b/pages/user/order/activityOrderInfo/index.wxss
new file mode 100644
index 0000000..c20a26f
--- /dev/null
+++ b/pages/user/order/activityOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/couponOrderInfo/index.js b/pages/user/order/couponOrderInfo/index.js
new file mode 100644
index 0000000..2ea1651
--- /dev/null
+++ b/pages/user/order/couponOrderInfo/index.js
@@ -0,0 +1,227 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ productState:app.globalData.productState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ id:null,
+ cardTypes:{}
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ commonApi.user_post("uservice/user/getCardTypeList").then(res=>{
+ let cardTypes = {};
+ res.data.map(item=>{
+ cardTypes[item.type]=item.title;
+ })
+ this.setData({
+ cardTypes:cardTypes
+ })
+ })
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ console.log(res)
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
+ order.fetch_no = order.fetch_no?order.fetch_no.split(","):[];
+ order.fetch_no = order.fetch_no.join("、");
+ order.consignee_info = order.consignee_info?JSON.parse(order.consignee_info):null;
+ })
+ this.setData({
+ isRefund:res.data.state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model,
+ })
+ this.getCodeImg()
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/couponOrderInfo/index.json b/pages/user/order/couponOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/couponOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/couponOrderInfo/index.wxml b/pages/user/order/couponOrderInfo/index.wxml
new file mode 100644
index 0000000..0b352e1
--- /dev/null
+++ b/pages/user/order/couponOrderInfo/index.wxml
@@ -0,0 +1,107 @@
+
+
+
+
+
+{{productState[info.order_product_list[0].state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+ {{item.product_title}}
+ {{item.sku_name}}
+
+
+ ¥ {{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 商品总价
+ ¥{{info.total_money/100}}
+
+
+ 运费
+ ¥{{info.total_post_fee/100}}
+
+
+ 优惠券抵扣
+ -¥{{info.preference_money/100}}
+
+
+ 实付款
+ {{info.paid_money/100}}
+
+
+ 退款详情
+ 再次购买
+ 取消订单
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+
+ 使用人
+
+
+ 姓名:{{item.name}}
+
+
+ 手机号:{{item.tel}}
+
+
+ {{cardTypes[item.idcard_type]}}:{{item.id_number}}
+
+
+ 取件码:{{info.order_product_list[0].fetch_no}}
+
+
+
+
+ 收货地址
+
+ 姓名:{{info.order_product_list[0].consignee_info.name}}
+
+
+ 手机号:{{info.order_product_list[0].consignee_info.tel}}
+
+
+ 详细地址:{{info.order_product_list[0].consignee_info.address}}
+
+
+
+ 订单信息
+
+ 订单编号:{{info.order_id}}
+
+
+ 下单时间:{{info.create_time}}
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/couponOrderInfo/index.wxss b/pages/user/order/couponOrderInfo/index.wxss
new file mode 100644
index 0000000..c20a26f
--- /dev/null
+++ b/pages/user/order/couponOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/foodOrderInfo/index.js b/pages/user/order/foodOrderInfo/index.js
new file mode 100644
index 0000000..64d5732
--- /dev/null
+++ b/pages/user/order/foodOrderInfo/index.js
@@ -0,0 +1,244 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+import util from "../../../../utils/util"
+let app = getApp(),timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:null,
+ info:null,
+ orderState:app.globalData.orderState,
+ productState:app.globalData.productState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ minute:"",
+ second:"",
+ pay_methods:app.globalData.pay_methods
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let productState = JSON.parse(JSON.stringify(app.globalData.productState));
+ productState.WAIT_USE="待使用";
+ this.setData({
+ id:options.id,
+ productState:productState
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ console.log(res)
+ let state = ""
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
+ state = state + order.state;
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer)
+ timer = null
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/foodOrderInfo/index.json b/pages/user/order/foodOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/foodOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/foodOrderInfo/index.wxml b/pages/user/order/foodOrderInfo/index.wxml
new file mode 100644
index 0000000..1897a28
--- /dev/null
+++ b/pages/user/order/foodOrderInfo/index.wxml
@@ -0,0 +1,113 @@
+
+
+
+
+
+{{productState[info.order_product_list[0].state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+
+
+
+ {{item.product_title}}
+ {{item.sku_name}}
+
+
+ ¥ {{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 商品总价
+ ¥{{info.total_money/100}}
+
+
+ 运费
+ ¥{{info.total_post_fee/100}}
+
+
+ 优惠券抵扣
+ -¥{{info.preference_money/100}}
+
+
+ 实付款
+ {{info.paid_money/100}}
+
+
+ 剩余时间:00:{{minute}}:{{second}}
+ 再次购买
+ 退款详情
+ 取消订单
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+ 商家信息
+
+ {{info.order_product_list[0].scene_detail.title}}
+
+
+ 商家电话:{{info.order_product_list[0].scene_detail.tel}}
+
+
+ 商家地址:{{info.order_product_list[0].scene_detail.address}}
+
+
+
+ 订单信息
+
+ 姓名:{{info.order_product_list[0].order_product_extend.reserve_username}}
+
+
+ 预留手机号:{{info.order_product_list[0].order_product_extend.reserve_mobile}}
+
+
+ 订单编号:{{info.order_id}}
+
+
+ 下单时间:{{info.create_time}}
+
+
+ 支付时间:{{info.pay_at}}
+
+
+ 支付方式:{{pay_methods[info.pay_method]}}
+
+
+
+ 使用说明
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/foodOrderInfo/index.wxss b/pages/user/order/foodOrderInfo/index.wxss
new file mode 100644
index 0000000..c0a17a4
--- /dev/null
+++ b/pages/user/order/foodOrderInfo/index.wxss
@@ -0,0 +1,289 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.btn.active1 {
+ background: #0B898E;
+ border-color: #0B898E;
+ color: #fff;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/hotelOrderInfo/index.js b/pages/user/order/hotelOrderInfo/index.js
new file mode 100644
index 0000000..bb2da1a
--- /dev/null
+++ b/pages/user/order/hotelOrderInfo/index.js
@@ -0,0 +1,249 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+import util from "../../../../utils/util"
+let app = getApp(),timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ minute:"",
+ second:"",
+ id:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ let state = "";
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ state = state + order.state
+ let extend = order.order_product_extend,start_date_text = extend.start_date.split("-"),end_date_text = extend.end_date.split("-");
+ extend.start_date_text = start_date_text[0]+"年"+start_date_text[1]+"月"+start_date_text[2]+"日";
+ extend.end_date_text = end_date_text[0]+"年"+end_date_text[1]+"月"+end_date_text[2]+"日";
+ extend.days = (new Date(extend.end_date.replace(/-/g,'/')).getTime() - new Date(extend.start_date.replace(/-/g,'/')).getTime()) / (24 * 60 * 60 * 1000)
+ extend.days = Math.round(extend.days);
+ order.order_product_extend = extend;
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer);
+ timer = null;
+ },
+ call:function(e){
+ let tel = e.currentTarget.dataset.tel;
+ wx.makePhoneCall({
+ phoneNumber: tel,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/hotelOrderInfo/index.json b/pages/user/order/hotelOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/hotelOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/hotelOrderInfo/index.wxml b/pages/user/order/hotelOrderInfo/index.wxml
new file mode 100644
index 0000000..b0be99c
--- /dev/null
+++ b/pages/user/order/hotelOrderInfo/index.wxml
@@ -0,0 +1,84 @@
+
+
+
+
+
+{{orderState[info.state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+ 库存有限,请尽快完成付款
+ 您的订单已取消,您可以通过苏州文旅总入口再次预订
+ 预定已成功,祝您出游愉快
+ 订单号:{{info.order_id}}
+
+
+ ¥{{info.paid_money/100}}
+ 费用明细
+
+
+
+ 剩余时间:00:{{minute}}:{{second}}
+ 退款详情
+ 再次购买
+ 取消预订
+ 取消预订
+ 去评价
+ 再次购买
+ 立即支付
+
+
+
+
+
+ {{item.scene_detail.title}}
+ 地址:{{item.scene_detail.address}}
+
+
+
+ {{item.scene_detail.tel}}
+
+
+ {{info.order_product_list[0].sku_name}} {{info.order_product_list[0].order_product_extend.days}}晚
+ {{info.order_product_list[0].order_product_extend.start_date_text}}{{info.order_product_list[0].order_product_extend.days}}晚{{info.order_product_list[0].order_product_extend.end_date_text}}
+ {{info.order_product_list[0].sku_model.bed_type}} | {{info.order_product_list[0].sku_model.breakfast}} | {{info.order_product_list[0].sku_model.area}} | {{info.order_product_list[0].sku_model.max_room_num}}人入住
+
+
+
+ 出行人
+
+
+ 姓名: {{info.order_product_list[0].order_product_extend.customer_name}}
+
+
+
+ 手机号: {{info.order_product_list[0].order_product_extend.reserve_mobile}}
+
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/hotelOrderInfo/index.wxss b/pages/user/order/hotelOrderInfo/index.wxss
new file mode 100644
index 0000000..c20a26f
--- /dev/null
+++ b/pages/user/order/hotelOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/lineOrderInfo/index.js b/pages/user/order/lineOrderInfo/index.js
new file mode 100644
index 0000000..d1a9ea0
--- /dev/null
+++ b/pages/user/order/lineOrderInfo/index.js
@@ -0,0 +1,249 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+import util from "../../../../utils/util"
+let app = getApp(),timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ minute:"",
+ second:"",
+ id:"",
+ cardTypes:{}
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ commonApi.user_post("uservice/user/getCardTypeList").then(res=>{
+ let cardTypes = {};
+ res.data.map(item=>{
+ cardTypes[item.type]=item.title;
+ })
+ this.setData({
+ cardTypes:cardTypes
+ })
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ console.log(res)
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ let state = "";
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ state = state + order.state;
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer)
+ timer = null
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/lineOrderInfo/index.json b/pages/user/order/lineOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/lineOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/lineOrderInfo/index.wxml b/pages/user/order/lineOrderInfo/index.wxml
new file mode 100644
index 0000000..2b64c97
--- /dev/null
+++ b/pages/user/order/lineOrderInfo/index.wxml
@@ -0,0 +1,98 @@
+
+
+
+
+
+{{orderState[info.state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+
+
+ 库存有限,请尽快完成付款
+ 您的订单已取消,您可以通过苏州文旅总入口再次预订
+ 预定已成功,祝您出游愉快
+ 订单号:{{info.order_id}}
+
+
+ ¥{{info.paid_money/100}}
+ 费用明细
+
+
+
+ 剩余时间:00:{{minute}}:{{second}}
+ 再次购买
+ 退款详情
+ 再次购买
+ 取消预订
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+
+
+
+
+ {{info.order_product_list[0].product_title}}
+ 出行日期:{{info.order_product_list[0].use_date}}
+
+
+
+
+
+ {{item.sku_name}}
+ ¥{{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 出行人
+
+ {{item.sku_name}} {{index+1}}
+
+
+
+
+ 姓名: {{item.name}}
+
+
+
+ {{cardTypes[item.idcard_type]}}:{{item.id_number}}
+
+
+
+ 手机号: {{item.tel}}
+
+
+
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/lineOrderInfo/index.wxss b/pages/user/order/lineOrderInfo/index.wxss
new file mode 100644
index 0000000..c20a26f
--- /dev/null
+++ b/pages/user/order/lineOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/list.js b/pages/user/order/list.js
new file mode 100644
index 0000000..8c0ce03
--- /dev/null
+++ b/pages/user/order/list.js
@@ -0,0 +1,201 @@
+// pages/user/order/list.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ keywords:"",
+ orderState:app.globalData.orderState,
+ type:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ type:options.type
+ })
+ this.getList()
+ },
+ changeKeyword:function(e){
+ this.setData({
+ keywords:e.detail.value
+ })
+ },
+ refundInfo:function(e){
+ let id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: 'refundInfo/index?id='+id,
+ })
+ },
+ gotoComment:function(e){
+ let id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: '/pages/order/comment/index?id='+id,
+ })
+ },
+ // 再次预定
+ order:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.orderMoreTime(item)
+ },
+ pay:function(e){
+ let id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: '/pages/order/pay/index?id='+id,
+ })
+ },
+ search:function(){
+ this.setData({
+ realKeyword:this.data.keywords,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi.user_post("order/list",{
+ state:this.data.type,
+ offset:this.data.list.length,
+ limit:10,
+ keywords:this.data.keywords
+ }).then(res=>{
+ res.data.list.map(item=>{
+ let orderNum = 0;
+ item.order_product_list.map(order=>{
+ orderNum = orderNum + order.product_num;
+ })
+ item.orderNum = orderNum;
+ })
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.list)
+ })
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.gotoOrder(item)
+ },
+ changeType:function(e){
+ let type = e.currentTarget.dataset.type;
+ this.setData({
+ type:type,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ refund:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list,item = list[index],that = this;
+ wx.showModal({
+ title:"提示",
+ content:"确定取消吗?",
+ success:function(res){
+ if(res.confirm){
+ // 确定取消
+ commonApi.user_post("order/refund",{
+ order_id:item.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '已取消',
+ icon:'success'
+ })
+ if(that.data.type){
+ list.splice(index,1);
+ }
+ else {
+ list[index].state='WAIT_REFUND';
+ }
+ that.setData({
+ list:list
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ cancel:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list,item = list[index],that = this;
+ wx.showModal({
+ title:"提示",
+ content:"确定取消吗?",
+ success:function(res){
+ if(res.confirm){
+ // 确定取消
+ commonApi.user_post("order/close",{
+ order_id:item.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '已取消',
+ icon:'success'
+ })
+ if(that.data.type){
+ list.splice(index,1);
+ }
+ else {
+ list[index].state='CLOSED';
+ }
+ that.setData({
+ list:list
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/list.json b/pages/user/order/list.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/list.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/list.wxml b/pages/user/order/list.wxml
new file mode 100644
index 0000000..7d5271b
--- /dev/null
+++ b/pages/user/order/list.wxml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ 搜索
+
+
+ 全部
+ 待付款
+ 待确认
+ 待发货
+ 待出行
+ 待收货
+
+ 退款退货
+
+
+
+
+
+ 订单号:{{item.order_id}}
+ {{orderState[item.state]}}
+
+
+
+ {{item.product_model=='movie'?item.product_title:(item.product_title+item.sku_name)}}
+
+ ¥{{item.product_price/100}}
+ x{{item.product_num}}
+
+
+ 共{{item.orderNum}}件商品合计 ¥{{item.total_money/100}}
+
+ 再次购买
+ 立即评价
+ 取消预订
+ 取消预订
+ 退款详情
+ 立即支付
+
+
+
+
+ 还没有订单,赶快去下单吧~
+
\ No newline at end of file
diff --git a/pages/user/order/list.wxss b/pages/user/order/list.wxss
new file mode 100644
index 0000000..2d1b215
--- /dev/null
+++ b/pages/user/order/list.wxss
@@ -0,0 +1,167 @@
+/* pages/user/order/list.wxss */
+page {
+ background: #f6f6f6;
+}
+.fixed-top {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ padding: 0 30rpx;
+ padding-top: 20rpx;
+}
+.types {
+ display: flex;
+ align-items: center;
+ line-height: 50rpx;
+ height: 95rpx;
+ color: #333;
+ font-size: 26rpx;
+ overflow-x: auto;
+}
+.type-item {
+ position: relative;
+ margin-right: 60rpx;
+ flex-shrink: 0;
+}
+.type-item.active {
+ color: #0B898E;
+ font-weight: bold;
+}
+.type-item.active::after {
+ display: block;
+ font-size: 0;
+ content: "1";
+ width: 30rpx;
+ height: 4rpx;
+ background: #0B898E;
+ border-radius: 2rpx;
+ left: 50%;
+ position: absolute;
+ margin-left: -15rpx;
+ top: 100%;
+}
+.order-item {
+ margin: 20rpx 30rpx;
+ background: white;
+ border-radius: 20rpx;
+}
+.order-top {
+ display: flex;
+ padding: 0 20rpx;
+ height: 80rpx;
+ align-items: center;
+ border-bottom: 1rpx solid #d8d8d8;
+ font-size: 26rpx;
+ color: #888;
+ justify-content: space-between;
+}
+.order-top .status {
+ color: #D62828;
+}
+.order-info {
+ display: flex;
+ padding: 20rpx;
+ justify-content: space-between;
+ color: #333333;
+ font-size: 26rpx;
+}
+.order-info image {
+ flex-shrink: 0;
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+}
+.order-info .sku-title {
+ flex: 1;
+ margin: 0 20rpx;
+ line-height: 40rpx;
+ height: 80rpx;
+}
+.sku-tips {
+ text-align: right;
+ flex-shrink: 0;
+ line-height: 40rpx;
+}
+.sku-tips .sku-price {
+ margin-bottom: 10rpx;
+}
+.total {
+ text-align: right;
+ margin-right: 20rpx;
+}
+.total .all-price {
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ padding: 20rpx;
+ align-items: center;
+}
+.btn {
+ width: 158rpx;
+ line-height: 58rpx;
+ background: #fff;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ text-align: center;
+ font-size: 26rpx;
+ margin-left: 20rpx;
+ color: #333;
+}
+.active.btn {
+ background: #FC9132;
+ border-color: #FC9132;
+ color: #fff;
+}
+.search-box {
+ display: flex;
+ margin: 0 30rpx;
+ background: #EDEDED;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding-left: 20rpx;
+ font-size: 26rpx;
+ align-items: center;
+ justify-content: space-between;
+}
+.search-box .iconfont {
+ color: #999999;
+ font-size: 30rpx;
+ flex-shrink: 0;
+}
+.search-box input {
+ flex: 1;
+ margin: 0 15rpx;
+}
+.search-box .search-btn {
+ width: 110rpx;
+ text-align: center;
+ line-height: 40rpx;
+ color: #0B898E;
+ flex-shrink: 0;
+ font-size: 26rpx;
+ border-left: 1rpx solid #ccc;
+}
+.empty-box {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ font-size: 26rpx;
+ color: #888;
+ text-align: center;
+ z-index: -1;
+}
+.empty-box image {
+ width: 260rpx;
+ display: block;
+ margin-bottom: 20rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/movieOrderInfo/index.js b/pages/user/order/movieOrderInfo/index.js
new file mode 100644
index 0000000..5b87f67
--- /dev/null
+++ b/pages/user/order/movieOrderInfo/index.js
@@ -0,0 +1,240 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+import util from "../../../../utils/util"
+let app = getApp(),timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ productState:app.globalData.productState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ id:null,
+ minute:"",
+ second:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ let state = ""
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
+ state = state + order.state;
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer);
+ timer = null
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/movieOrderInfo/index.json b/pages/user/order/movieOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/movieOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/movieOrderInfo/index.wxml b/pages/user/order/movieOrderInfo/index.wxml
new file mode 100644
index 0000000..2d12012
--- /dev/null
+++ b/pages/user/order/movieOrderInfo/index.wxml
@@ -0,0 +1,153 @@
+
+
+
+
+
+{{productState[info.order_product_list[0].state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+
+
+
+ {{item.product_title}}
+ {{info.order_product_list[0].order_product_extend.seats_list}}
+
+
+ ¥ {{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 商品总价
+ ¥{{info.total_money/100}}
+
+
+ 运费
+ ¥{{info.total_post_fee/100}}
+
+
+ 优惠券抵扣
+ -¥{{info.preference_money/100}}
+
+
+ 实付款
+ {{info.paid_money/100}}
+
+
+ 再次购买
+ 退款详情
+ 取消订单
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+ 影片/演出信息
+
+
+ 时间:{{info.order_product_list[0].use_date}}
+ {{info.order_product_list[0].order_product_extend.use_time}}
+ {{info.order_product_list[0].start_time}}
+
+
+
+ 播放厅:{{info.order_product_list[0].order_product_extend.schedules_name}}
+
+
+ 座位:{{info.order_product_list[0].order_product_extend.seats_list}}
+
+
+
+ 出行人
+
+
+
+ 姓名: {{item.name}}
+
+
+
+ 身份证号:{{item.id_number}}
+
+
+
+ 手机号: {{item.tel}}
+
+
+
+
+
+ 商家信息
+
+ {{info.order_product_list[0].scene_detail.title}}
+
+
+ 商家电话:{{info.order_product_list[0].scene_detail.tel}}
+
+
+ 商家地址:{{info.order_product_list[0].scene_detail.address}}
+
+
+
+ 订单信息
+
+ 订单编号:{{info.order_id}}
+
+
+ 下单时间:{{info.create_time}}
+
+
+ 支付时间:{{info.pay_at}}
+
+
+ 支付方式:{{pay_methods[info.pay_method]}}
+
+
+
+
+
+ {{info.order_product_list[0].product_title}}
+
+ 日期:{{info.order_product_list[0].use_date}}
+
+
+
+ 时段:{{info.order_product_list[0].start_time}} ~ {{info.order_product_list[0].end_time}}
+
+
+
+ 地址:{{info.order_product_list[0].product_address}}
+
+
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/movieOrderInfo/index.wxss b/pages/user/order/movieOrderInfo/index.wxss
new file mode 100644
index 0000000..36a80fc
--- /dev/null
+++ b/pages/user/order/movieOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ min-height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/museumOrderInfo/index.js b/pages/user/order/museumOrderInfo/index.js
new file mode 100644
index 0000000..1b918d4
--- /dev/null
+++ b/pages/user/order/museumOrderInfo/index.js
@@ -0,0 +1,222 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ productState:app.globalData.productState,
+ pay_methods:app.globalData.pay_methods,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ id:null,
+ minute:"",
+ second:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ let state = ""
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
+ state = state + order.state;
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer);
+ timer = null
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/museumOrderInfo/index.json b/pages/user/order/museumOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/museumOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/museumOrderInfo/index.wxml b/pages/user/order/museumOrderInfo/index.wxml
new file mode 100644
index 0000000..becc8f2
--- /dev/null
+++ b/pages/user/order/museumOrderInfo/index.wxml
@@ -0,0 +1,99 @@
+
+
+
+
+
+{{productState[info.order_product_list[0].state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+ {{item.product_title}}
+ {{item.sku_name}}
+
+
+ ¥ {{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 商品总价
+ ¥{{info.total_money/100}}
+
+
+ 运费
+ ¥{{info.total_post_fee/100}}
+
+
+ 优惠券抵扣
+ -¥{{info.preference_money/100}}
+
+
+ 实付款
+ {{info.paid_money/100}}
+
+
+ 退款详情
+ 再次购买
+ 取消订单
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+
+ {{info.order_product_list[0].scene_detail.title}}
+
+ 日期:{{info.order_product_list[0].use_date}}
+
+
+ 时段:{{info.order_product_list[0].start_time}} ~ {{info.order_product_list[0].end_time}}
+
+
+ 地址:{{info.order_product_list[0].scene_detail.address}}
+
+
+
+ 订单信息
+
+ 姓名:{{(index!=0?'、':'')+item.name}}
+
+
+ 订单编号:{{info.order_id}}
+
+
+ 下单时间:{{info.create_time}}
+
+
+ 支付时间:{{info.pay_at}}
+
+
+ 支付方式:{{pay_methods[info.pay_method]}}
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/museumOrderInfo/index.wxss b/pages/user/order/museumOrderInfo/index.wxss
new file mode 100644
index 0000000..c20a26f
--- /dev/null
+++ b/pages/user/order/museumOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/postOrderInfo/index.js b/pages/user/order/postOrderInfo/index.js
new file mode 100644
index 0000000..1d01bdf
--- /dev/null
+++ b/pages/user/order/postOrderInfo/index.js
@@ -0,0 +1,248 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+import util from "../../../../utils/util"
+let app = getApp(),timer;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ orderState:app.globalData.orderState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ minute:"",
+ second:"",
+ id:null,
+ pay_methods:app.globalData.pay_methods
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ copy:function(e){
+ wx.setClipboardData({
+ data: e.currentTarget.dataset.num,
+ success: function (res) {
+ wx.showToast({
+ title: '复制成功',
+ icon:'success'
+ })
+ }
+ })
+ },
+ getCodeImg:function(){
+ let code = "111";
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ console.log(res)
+ }
+ })
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定退款吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ console.log(res)
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ let state = "";
+ res.data.stateNums = {}
+ res.data.order_product_list.map(order=>{
+ if(res.data.stateNums[order.state]){
+ res.data.stateNums[order.state]++;
+ }
+ else {
+ res.data.stateNums[order.state] = 1;
+ }
+ order.consignee_info = order.consignee_info?JSON.parse(order.consignee_info):null;
+ state = state + order.state;
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer)
+ timer = null;
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/postOrderInfo/index.json b/pages/user/order/postOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/postOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/postOrderInfo/index.wxml b/pages/user/order/postOrderInfo/index.wxml
new file mode 100644
index 0000000..607ba79
--- /dev/null
+++ b/pages/user/order/postOrderInfo/index.wxml
@@ -0,0 +1,94 @@
+
+
+
+
+{{!isRefund && info.stateNums.WAIT_DELIVERY>0?"已发货":(!isRefund && info.stateNums.WAIT_POST>0?"待发货":orderState[info.state])}}
+
+ 您的退款已成功,退款金额预计在1-7个工作日内退还到您支付的账户
+ 您已成功发起退款申请,请耐心等待
+ 请在00:{{minute}}:{{second}}内支付,逾期订单将自动取消
+ 等待商家发货
+ 商家已发货
+ {{info.order_product_list[0].consignee_info.name}}{{info.order_product_list[0].consignee_info.tel}}
+ {{info.order_product_list[0].consignee_info.address}}
+
+
+
+
+
+ {{item.product_title}}
+ {{item.sku_name}}
+
+
+ ¥ {{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 商品总价
+ ¥{{info.total_money/100}}
+
+
+ 运费
+ {{info.total_post_fee?("¥"+info.total_post_fee/100):"包邮"}}
+
+
+ 优惠券抵扣
+ -¥{{info.preference_money/100}}
+
+
+ 实付款
+ {{info.paid_money/100}}
+
+
+ 剩余时间:00:{{minute}}:{{second}}
+ 再次购买
+ 退款详情
+ 确认收货
+ 申请退款
+ 取消订单
+ 去评价
+ 立即支付
+
+
+
+
+ 订单信息
+
+ 订单编号:{{info.order_id}}
+
+
+ 下单时间:{{info.create_time}}
+
+
+ 支付时间:{{info.pay_at}}
+
+
+ 支付方式:{{pay_methods[info.pay_method]}}
+
+
+ 快递公司:
+
+ {{item.express_name}}
+
+
+
+ 快递单号:
+
+ {{item.courier_number}}复制
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/postOrderInfo/index.wxss b/pages/user/order/postOrderInfo/index.wxss
new file mode 100644
index 0000000..aae5492
--- /dev/null
+++ b/pages/user/order/postOrderInfo/index.wxss
@@ -0,0 +1,284 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ /* border-bottom: 1rpx solid #d8d8d8; */
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 530rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/refundInfo/index.js b/pages/user/order/refundInfo/index.js
new file mode 100644
index 0000000..2f5f625
--- /dev/null
+++ b/pages/user/order/refundInfo/index.js
@@ -0,0 +1,77 @@
+// pages/user/order/refundInfo/index.js
+import commonApi from "../../../../utils/https/common"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null,
+ state:app.globalData.orderState
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ commonApi.user_post("order/refund_detail",{
+ order_id:options.id
+ }).then(res=>{
+ res.data.list.reverse()
+ this.setData({
+ info:res.data
+ })
+ console.log(res)
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/refundInfo/index.json b/pages/user/order/refundInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/refundInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/refundInfo/index.wxml b/pages/user/order/refundInfo/index.wxml
new file mode 100644
index 0000000..b850981
--- /dev/null
+++ b/pages/user/order/refundInfo/index.wxml
@@ -0,0 +1,28 @@
+
+
+
+ {{state[info.order.state]}}
+ {{info.remark}}
+
+ 退款金额
+ ¥{{info.refund_money/100}}
+
+
+ 支付渠道
+ {{info.pay_method}}
+
+
+
+
+ 退款流程
+
+
+
+
+
+ {{item.remark}}
+ {{item.create_time}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/order/refundInfo/index.wxss b/pages/user/order/refundInfo/index.wxss
new file mode 100644
index 0000000..c48d5cf
--- /dev/null
+++ b/pages/user/order/refundInfo/index.wxss
@@ -0,0 +1,68 @@
+/* pages/user/order/refundInfo/index.wxss */
+.top-box {
+ padding: 10rpx 30rpx;
+ font-size: 30rpx;
+ color: #333;
+}
+.order-state {
+ color: #0B898E;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.state-tip {
+ color: #888888;
+ font-size: 26rpx;
+ margin-bottom: 20rpx;
+}
+.top-item {
+ height: 57rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.blank {
+ height: 20rpx;
+ background: #EDEDED;
+}
+.top-title {
+ font-weight: bold;
+ margin-bottom: 50rpx;
+ padding-top: 10rpx;
+}
+.box {
+ position: relative;
+}
+.box-line {
+ position: absolute;
+ top: 20rpx;
+ bottom: 0;
+ width: 2rpx;
+ margin-left: 10rpx;
+ background: #CCCCCC;
+ z-index: -1;
+}
+.box-item {
+ display: flex;
+ margin-bottom: 60rpx;
+}
+.box-item .circle {
+ width: 20rpx;
+ height: 20rpx;
+ border-radius: 50%;
+ background: #ccc;
+ margin-top: 10rpx;
+}
+.box-item .circle.active {
+ background: #0B898E;
+}
+.state-text {
+ font-weight: 500;
+ line-height: 42rpx;
+ margin-bottom: 10rpx;
+ color: #333;
+}
+.box-info {
+ font-size: 24rpx;
+ color: #888;
+ margin-left: 25rpx;
+}
\ No newline at end of file
diff --git a/pages/user/order/sceneOrderInfo/index.js b/pages/user/order/sceneOrderInfo/index.js
new file mode 100644
index 0000000..ebecd64
--- /dev/null
+++ b/pages/user/order/sceneOrderInfo/index.js
@@ -0,0 +1,250 @@
+// pages/user/order/sceneOrderInfo/index.js
+import commonApi from "../../../../utils/https/common"
+import userApi from "../../../../utils/https/user"
+import QRCode from '../../../../utils/weapp-qrcode.js'
+import util from '../../../../utils/util'
+let app = getApp(),timer
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:null,
+ info:null,
+ orderState:app.globalData.orderState,
+ productState:app.globalData.productState,
+ product_model:null,
+ isRefund:false,
+ feeInfoFlag:false,
+ codeIndex:0,
+ codeImgs:[],
+ minute:0,
+ second:0,
+ cardTypes:{}
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ id:options.id
+ })
+ userApi.user_post("user/getCardTypeList").then(res=>{
+ let cardTypes = {};
+ res.data.map(item=>{
+ cardTypes[item.type]=item.title;
+ })
+ this.setData({
+ cardTypes:cardTypes
+ })
+ })
+ },
+ getCodeImg:function(){
+ let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
+ qrcode.map((item,index)=>{
+ if(item.use_url){
+ codeImgs.push(item.use_url);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ else {
+ new QRCode('damocode'+index,{
+ text: item.use_code,
+ width: 300 * radio,
+ height: 300 * radio,
+ padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
+ correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
+ callback: (res) => {
+ codeImgs.push(res.path);
+ if(codeImgs.length==qrcode.length){
+ that.setData({
+ codeImgs:codeImgs
+ })
+ }
+ }
+ })
+ }
+ })
+ },
+ prevCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ if(codeIndex==0){
+ this.setData({
+ codeIndex:qrcode.length-1
+ })
+ }
+ else {
+ this.setData({
+ codeIndex:codeIndex-1
+ })
+ }
+ },
+ nextCodeImg:function(){
+ let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
+ codeIndex = codeIndex + 1;
+ if(codeIndex==qrcode.length){
+ codeIndex = 0;
+ }
+ this.setData({
+ codeIndex:codeIndex
+ })
+ },
+ showFeeInfo:function(){
+ this.setData({
+ feeInfoFlag:!this.data.feeInfoFlag
+ })
+ },
+ close:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/close",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "CLOSED";
+ info.order_product_list.map(item=>{
+ item.state='CLOSED'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ refund:function(){
+ let _this = this,info = _this.data.info;
+ wx.showModal({
+ title:'提示',
+ content:"确定取消吗",
+ success:function(res){
+ if(res.confirm){
+ commonApi.user_post("order/refund",{
+ order_id:info.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '取消成功',
+ icon:'success'
+ })
+ info.state = "WAIT_REFUND";
+ info.order_product_list.map(item=>{
+ item.state='WAIT_REFUND'
+ })
+ _this.setData({
+ info:info
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ daojishi:function(time){
+ let now = new Date().getTime();
+ if(now>time){
+ clearTimeout(timer);
+ timer = null;
+ util.back();
+ return;
+ }
+ let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
+ this.setData({
+ minute:util.formatNumber(minute),
+ second:util.formatNumber(second)
+ })
+ timer = setTimeout(()=>{
+ this.daojishi(time);
+ },1000)
+ },
+ // 查看苏康码
+ gotoSku:function(){
+ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
+ console.log(res)
+ app.globalData.weburl = res.data.url;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index'
+ })
+ return;
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ commonApi.user_post("order/query",{
+ order_id:this.data.id
+ }).then(res=>{
+ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
+ let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
+ this.daojishi(time);
+ }
+ let state = ""
+ res.data.order_product_list.map(order=>{
+ order.qrcode.map(item=>{
+ item.stateText = app.globalData.codeState[item.state];
+ })
+ order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
+ state = state + order.state;
+ })
+ this.setData({
+ isRefund:state.indexOf("REFUND")!=-1,
+ info:res.data,
+ product_model:res.data.order_product_list[0].product_model
+ })
+ this.getCodeImg()
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+ clearTimeout(timer)
+ timer = null
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/sceneOrderInfo/index.json b/pages/user/order/sceneOrderInfo/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/sceneOrderInfo/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/sceneOrderInfo/index.wxml b/pages/user/order/sceneOrderInfo/index.wxml
new file mode 100644
index 0000000..497c4d8
--- /dev/null
+++ b/pages/user/order/sceneOrderInfo/index.wxml
@@ -0,0 +1,96 @@
+
+
+
+
+
+{{productState[info.order_product_list[0].state]}}
+
+
+
+
+
+
+
+ {{info.order_product_list[0].qrcode[codeIndex].use_code_display_text}}:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ 核销码:{{info.order_product_list[0].qrcode[codeIndex].use_code}}
+ {{info.order_product_list[0].qrcode[codeIndex].stateText}} {{codeIndex+1}}/{{codeImgs.length}}
+
+
+
+
+
+
+ 库存有限,请尽快完成付款
+ 您的订单已取消,您可以通过苏州文旅总入口再次预订
+ 预定已成功,祝您出游愉快
+ 订单号:{{info.order_id}}
+
+
+ ¥{{info.paid_money/100}}
+ 费用明细
+
+
+
+ 剩余时间:00:{{minute}}:{{second}}
+ 再次购买
+ 退款详情
+ 取消预订
+ 取消预订
+ 去评价
+ 立即支付
+
+
+
+
+
+
+ {{item.product_title}}
+ 出行日期:{{item.use_date}}
+
+
+
+
+ {{item.sku_name}}
+ x{{item.product_num}}
+
+
+
+ 出行人
+
+
+
+ 姓名: {{item.name}}
+
+
+
+ {{cardTypes[item.idcard_type]}}:{{item.id_number}}
+
+
+
+ 手机号: {{item.tel}}
+
+
+
+
+
+ 使用说明
+
+
+
+
+ 联系客服
+
+
+
+
+ 费用明细
+
+ 商品总价¥{{info.total_money/100}}
+ 优惠券抵扣-¥{{info.preference_money/100}}
+ 订单实付¥{{info.paid_money/100}}
+
+
\ No newline at end of file
diff --git a/pages/user/order/sceneOrderInfo/index.wxss b/pages/user/order/sceneOrderInfo/index.wxss
new file mode 100644
index 0000000..91d860c
--- /dev/null
+++ b/pages/user/order/sceneOrderInfo/index.wxss
@@ -0,0 +1,289 @@
+/* pages/user/order/sceneOrderInfo/index.wxss */
+.top-bg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 280rpx;
+ background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.state-text {
+ margin: 20rpx 30rpx;
+ line-height: 100rpx;
+ color: #fff;
+ font-size: 48rpx;
+}
+.box {
+ padding: 20rpx;
+ background: white;
+ border-radius: 20rpx;
+ margin: 20rpx 30rpx;
+}
+.product-info {
+ display: flex;
+ justify-content: space-between;
+ color: #333;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+ margin-bottom: 10rpx;
+}
+.product-info image {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+ flex-shrink: 0;
+}
+.title-box {
+ flex: 1;
+ margin: 0 20rpx;
+}
+.title-box .title {
+ font-size: 30rpx;
+ width: 100%;
+ margin-bottom: 10rpx;
+}
+.title-box .subtitle {
+ color: #888888;
+ font-size: 26rpx;
+}
+.price-box-tip {
+ text-align: right;
+}
+.detail-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ min-height: 45rpx;
+ color: #333;
+ font-size: 26rpx;
+}
+.all-total-item {
+ font-weight: bold;
+ height: 70rpx;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.all-total-item .price {
+ color: #D62828;
+ font-size: 36rpx;
+}
+.all-total-item .price::before {
+ content: "¥";
+ font-size: 26rpx;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ height: 103rpx;
+ font-size: 26rpx;
+}
+.btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ background: #fff;
+ text-align: center;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ text-align: center;
+ margin-left: 20rpx;
+}
+.btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.box-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 10rpx;
+}
+.scene-box {
+ display: flex;
+ justify-content: space-between;
+}
+.scene-box-left {
+ width: 400rpx;
+ font-size: 26rpx;
+ color: #333;
+}
+.scene-box-right {
+ flex-shrink: 0;
+ font-size: 24rpx;
+ color: #999;
+ text-align: right;
+}
+.scene-box-right .price {
+ color: #D62828;
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.scene-btns {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ margin-top: 50rpx;
+}
+.scene-btn {
+ width: 160rpx;
+ line-height: 60rpx;
+ box-sizing: border-box;
+ border: 1rpx solid #d8d8d8;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.scene-rest-time {
+ flex: 1;
+ text-align: left;
+ font-size: 26rpx;
+ font-weight: bold;
+}
+.scene-btn.active {
+ color: #fff;
+ background: #FC9132;
+ border-color: #FC9132;
+}
+.scene-btn.active1 {
+ background: #0B898E;
+ border-color: #0B898E;
+ color: #fff;
+}
+.bottom-btn {
+ display: flex;
+ width: 360rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 40rpx;
+ justify-content: center;
+ align-items: center;
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ margin: 20rpx auto;
+}
+.bottom-btn image {
+ width: 40rpx;
+ margin-right: 10rpx;
+}
+.line {
+ margin: 10rpx 0;
+ height: 1rpx;
+ background: #d8d8d8;
+}
+.mask-title {
+ text-align: center;
+ padding-top: 30rpx;
+ margin-bottom: 60rpx;
+ font-weight: 500;
+}
+.mask-item {
+ margin: 0 40rpx;
+ margin-bottom: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.icon-close {
+ position: absolute;
+ right: 20rpx;
+ top: 30rpx;
+}
+.code-box {
+ text-align: center;
+ height: 440rpx;
+ position: relative;
+}
+.code-box .iconfont {
+ position: absolute;
+ color: #0B898E;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ width: 50rpx;
+ left: 40rpx;
+ text-align: center;
+ margin-top: 125rpx;
+}
+.code-box .iconfont.icon-you {
+ left: auto;
+ right: 40rpx;
+ top: 20rpx;
+}
+.code-img {
+ width: 300rpx;
+ height: 300rpx;
+ display: block;
+ margin: 0 auto;
+ position: absolute;
+ left: -1000rpx;
+ top: -400rpx;
+}
+.code-state {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 30rpx;
+}
+.code-text {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: 500;
+ margin: 25rpx;
+}
+.code-btn {
+ width: 220rpx;
+ line-height: 60rpx;
+ background: #FFFFFF;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #333;
+ margin: 0 auto;
+}
+.hotel-tel-box {
+ line-height: 80rpx;
+ border-top: 1rpx solid #D8D8D8;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-top: 20rpx;
+}
+.hotel-tel-box .iconfont {
+ margin-right: 20rpx;
+ font-size: 34rpx;
+}
+.hotel-tips {
+ display: flex;
+ align-items: center;
+ font-size: 24rpx;
+ color: #999;
+}
+.hotel-tips .hotel-days-num {
+ width: 70rpx;
+ font-size: 20rpx;
+ line-height: 30rpx;
+ border: 1rpx solid #0B898E;
+ border-radius: 15rpx;
+ text-align: center;
+ color: #0B898E;
+ margin: 0 20rpx;
+ text-align: center;
+ box-sizing: border-box;
+}
+.hotel-tips .hotel-date {
+ font-size: 26rpx;
+ color: #333;
+ margin-right: 6rpx;
+}
+.hotel-tip {
+ font-size: 24rpx;
+ color: #999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/profile/index.js b/pages/user/profile/index.js
index ab309ae..8774ede 100644
--- a/pages/user/profile/index.js
+++ b/pages/user/profile/index.js
@@ -2,18 +2,22 @@
let app = getApp();
import util from "../../../utils/util"
import WeCropper from '../../../we-cropper/we-cropper.min.js';
-const device = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); // 获取设备信息
-const ratio = 750 / device.windowWidth;
+import userApi from "../../../utils/https/user"
+let device = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); // 获取设备信息
const width = device.windowWidth // 示例为一个与屏幕等宽的正方形裁剪框
-let height = device.windowHeight - ((rect.top - device.statusBarHeight) * 2 + rect.height);
+let menuHeight = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
+let height = device.windowHeight - menuHeight;
Page({
/**
* 页面的初始数据
*/
data: {
+ menuWidth:width - rect.right + rect.width + 6,
+ info:null,
today:"2020-10-11",
sexes:['男','女'],
+ birthday:"",
sexIndex:0,
cropperOpt: {
id: 'cropper', // 用于手势操作的canvas组件标识符
@@ -31,21 +35,26 @@ Page({
height: 320 // 裁剪框高度
}
},
- showCropper:false
+ showCropper:false,
+ avatar:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- const {
+ let {
cropperOpt
} = this.data,that = this;
- this.cropper = new WeCropper(cropperOpt);
+ cropperOpt.height = device.screenHeight - menuHeight;
+ cropperOpt.cut.y = (height - 320) / 2;
+ console.log(cropperOpt,menuHeight,device)
let today = new Date();
this.setData({
- today:util.formatDate(today)
+ today:util.formatDate(today),
+ cropperOpt:cropperOpt
})
+ this.cropper = new WeCropper(cropperOpt);
},
// 插件通过touchStart、touchMove、touchEnd方法来接收事件对象。
touchStart(e) {
@@ -59,8 +68,35 @@ Page({
this.cropper.touchEnd(e)
},
changeSex:function(e){
- this.setData({
- sexIndex:e.detail.value
+
+ userApi.user_post("user/changeSex",{
+ sex:Number(e.detail.value)+1
+ }).then(res=>{
+ if(res.code==1){
+ this.setData({
+ sexIndex:e.detail.value
+ })
+ wx.showToast({
+ title: '修改成功',
+ icon: 'success'
+ })
+ }
+ })
+ },
+ bindDateChange:function(e){
+ let birthday = e.detail.value;
+ userApi.user_post("user/changeBirthday",{
+ birthday:birthday
+ }).then(res=>{
+ if(res.code==1){
+ this.setData({
+ birthday:birthday
+ })
+ wx.showToast({
+ title: '修改成功',
+ icon: 'success'
+ })
+ }
})
},
// 自定义裁剪页面的布局中,可以重新选择图片
@@ -87,32 +123,29 @@ Page({
// tempFilePath 为裁剪后的图片临时路径
console.log(tempFilePath)
if (tempFilePath) {
- let userid= wx.getStorageSync('jstrip_userid');
wx.uploadFile({
- url: 'https://api.jszhwlpt.com/guns-cloud-file/fileFront/upload', //这里是上传的服务器地址
+ url: 'https://api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址
filePath: tempFilePath,
header:{
- userId: userid,
- Authorization: wx.getStorageSync('jstrip_token'),
- },
- formData:{
- appName:"miniprogram",
- fileType:0,
- userId: userid,
+ token: wx.getStorageSync('jstrip_token'),
},
name: "file",
success: function (res) {
console.log(res)
var res = JSON.parse(res.data);
- let userInfo = that.data.userInfo
- userInfo.headimgurl = res.data.fileFinalUrl;
- that.updateInfo({headimgurl:res.data.fileFinalUrl}).then(res=>{
- wx.hideLoading();
- })
- that.setData({
- showCropper: false,
- userInfo: userInfo
+ let avatar = res.data.url;
+ userApi.user_post("user/changeAvatar",{
+ avatarUrl:avatar
+ }).then(res=>{
+ if(res.code==1){
+ wx.hideLoading();
+ that.setData({
+ showCropper: false,
+ avatar: avatar
+ })
+ }
})
+
},
fail:function(res){
wx.hideLoading();
@@ -137,7 +170,18 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
-
+ userApi.user_post("user/getMyInfo",{}).then(res=>{
+ this.setData({
+ info:res.data,
+ avatar:res.data.avatar,
+ birthday:res.data.birthday
+ })
+ if(res.data.gender==2){
+ this.setData({
+ sexIndex:1
+ })
+ }
+ })
},
/**
@@ -166,12 +210,5 @@ Page({
*/
onReachBottom: function () {
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
}
})
\ No newline at end of file
diff --git a/pages/user/profile/index.wxml b/pages/user/profile/index.wxml
index f8218f6..a7f1673 100644
--- a/pages/user/profile/index.wxml
+++ b/pages/user/profile/index.wxml
@@ -1,28 +1,31 @@
-
+
+ 完成
+
+
头像
-
-
+
+
-
+
昵称
-
+ {{info.nickname}}
-
-
+
+
邮箱
-
+ {{info.email}}
-
-
+
+
手机号
-
+ {{info.mobile}}
-
+
性别
@@ -34,12 +37,12 @@
-
+
生日
-
+
- {{date}}
+ {{birthday}}
diff --git a/pages/user/profile/index.wxss b/pages/user/profile/index.wxss
index 64dfc80..3c1fa84 100644
--- a/pages/user/profile/index.wxss
+++ b/pages/user/profile/index.wxss
@@ -23,7 +23,7 @@
flex-shrink: 0;
}
.profile-item .info image {
- display: block;
+ display: inline-block;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
@@ -34,14 +34,24 @@
left: 0;
}
.cropper-buttons{
-position: absolute;
-bottom: 0;
-height: 80rpx;
-z-index: 111;
-display: flex;
-width: 100%;
-left: 0;
-align-items: center;
-justify-content: center;
-background: rgba(0, 0, 0, 0.86)
+ position: absolute;
+ bottom: 0;
+ height: 80rpx;
+ z-index: 111;
+ display: flex;
+ width: 100%;
+ left: 0;
+ align-items: center;
+ justify-content: center;
+ background: rgba(0, 0, 0, 0.86)
+}
+.submit-upload {
+ position: absolute;
+ right: 0;
+ font-size: 24rpx;
+ color: #0B898E;
+}
+.picker {
+ width: 100%;
+ min-height: 30rpx;
}
\ No newline at end of file
diff --git a/pages/user/service/index.js b/pages/user/service/index.js
new file mode 100644
index 0000000..c5656d4
--- /dev/null
+++ b/pages/user/service/index.js
@@ -0,0 +1,106 @@
+// pages/user/service/index.js
+import commonApi from "../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ tags:[],
+ types:[],
+ typeId:null,
+ list:[],
+ total:1,
+ page_no:1,
+ typename:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ // 获取问题标签
+ commonApi._post("ics/getTags").then(res=>{
+ console.log(res)
+ this.setData({
+ tags:res.data
+ })
+ })
+ // 获取问题分类
+ commonApi._post("ics/getType").then(res=>{
+ this.setData({
+ types:res.data,
+ typeId:res.data[0].id,
+ typename:res.data[0].type_name
+ })
+ this.getList();
+ })
+ },
+ changeType:function(e){
+ this.setData({
+ typeId:e.currentTarget.dataset.type,
+ typename:e.currentTarget.dataset.typename,
+ list:[],
+ total:1,
+ page_no:1
+ })
+ this.getList();
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi._post("ics/getQuestionByTypeId",{
+ type_id:this.data.typeId,
+ page_no:1,
+ page_num:10
+ }).then(res=>{
+ this.setData({
+ list:res.data.rows,
+ total:res.data.total,
+ page_no:this.data.page_no+1
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ // this.getList()
+ }
+})
\ No newline at end of file
diff --git a/pages/user/service/index.json b/pages/user/service/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/service/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/service/index.wxml b/pages/user/service/index.wxml
new file mode 100644
index 0000000..d5b1b2f
--- /dev/null
+++ b/pages/user/service/index.wxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ 你好,欢迎来到苏州,您可点击以下问题列表自助查询相关信息
+
+
+
+ {{item.tag_name}}
+
+
+
+
+
+
+ 常见问题
+
+ {{item.type_name}}
+
+
+ {{item.question_name}}
+
+
+ 更多{{typename}}问题 >
+
diff --git a/pages/user/service/index.wxss b/pages/user/service/index.wxss
new file mode 100644
index 0000000..795f383
--- /dev/null
+++ b/pages/user/service/index.wxss
@@ -0,0 +1,111 @@
+/* pages/user/service/index.wxss */
+.top-box {
+ padding: 20rpx 30rpx;
+ padding-bottom: 50rpx;
+ background: #0B898E;
+}
+.welcome-box {
+ display: flex;
+ align-items: flex-start;
+ margin-bottom: 60rpx;
+}
+.welcome-box image {
+ width: 80rpx;
+ height: 80rpx;
+ border-radius: 50%;
+ flex-shrink: 0;
+}
+.welcome-bg {
+ background: white;
+ padding: 20rpx 30rpx;
+ font-size: 26rpx;
+ font-weight: 500;
+ color: #333;
+ flex: 1;
+ margin-left: 30rpx;
+ border-radius: 10rpx;
+}
+.type-item {
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ background: white;
+ padding: 0 32rpx;
+ color: #0B898E;
+ font-size: 26rpx;
+ margin-right: 20rpx;
+ font-weight: bold;
+ flex-shrink: 0;
+}
+.welcome-box .type-item:last-child {
+ margin-right: 0;
+}
+.content {
+ margin: 25rpx 34rpx;
+}
+.all-title {
+ font-size: 30rpx;
+ font-weight: bold;
+ color: #333;
+}
+.types-list {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #333;
+ display: flex;
+ overflow-x: auto;
+ border-bottom: 1rpx solid #ccc;
+ align-items: center;
+ height: 112rpx;
+}
+.type {
+ flex-shrink: 0;
+ margin: 0 60rpx;
+ line-height: 60rpx;
+ position: relative;
+}
+.type.active {
+ color: #0B898E;
+ font-weight: bold;
+}
+.type.active::after {
+ content: "1";
+ font-size: 0;
+ display: block;
+ position: absolute;
+ width: 40rpx;
+ height: 6rpx;
+ border-radius: 3rpx;
+ background: #0B898E;
+ left: 50%;
+ margin-left: -20rpx;
+ bottom: 0;
+}
+.ques-item {
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.ques-name {
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ flex: 1;
+}
+.ques-item .iconfont {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.more-btn {
+ text-align: center;
+ width: 300rpx;
+ line-height: 60rpx;
+ background: rgba(11, 137, 142, 0);
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ margin: 30rpx auto;
+ font-size: 26rpx;
+ color: #0B898E;
+ font-weight: 500;
+}
\ No newline at end of file
diff --git a/pages/user/service/info/index.js b/pages/user/service/info/index.js
new file mode 100644
index 0000000..b12d0d6
--- /dev/null
+++ b/pages/user/service/info/index.js
@@ -0,0 +1,133 @@
+// pages/user/service/info/index.js
+import commonApi from "../../../../utils/https/common"
+import util from "../../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ info:null
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.id){
+ commonApi.user_post("ics/getQuestionDetail",{
+ id:options.id
+ }).then(res=>{
+ if(!res.data.useful_info) res.data.useful_info = {};
+ this.setData({
+ info:res.data
+ })
+ })
+ }
+ else {
+ util.back()
+ }
+ },
+ showService:function(){
+ wx.showModal({
+ title: '提示',
+ content: '呼叫人工客服\n0512-66555111',
+ confirmColor:"#0B898E",
+ success (res) {
+ if (res.confirm) {
+ wx.makePhoneCall({
+ phoneNumber: '0512-66555111',
+ })
+ } else if (res.cancel) {
+ }
+ }
+ })
+ },
+ zan:function(){
+ let info = this.data.info;
+ commonApi.user_post("ics/useful",{
+ id:info.id
+ }).then(res=>{
+ if(res.code==1){
+ if(info.useful_info && info.useful_info.is_useful===0){
+ // 如果已经点了没用 那么原来点的没用的数量要减1
+ info.unuseful_num--;
+ }
+ info.useful_info = res.data;
+ console.log(info.useful_info)
+ info.useful_num = info.useful_info.is_useful==1?(info.useful_num+1):(info.useful_num-1);
+
+ this.setData({
+ info:info
+ })
+ wx.showToast({
+ title: '操作成功',
+ icon: 'success'
+ })
+ }
+ })
+ },
+ unzan:function(){
+ let info = this.data.info;
+ commonApi.user_post("ics/unuseful",{
+ id:info.id
+ }).then(res=>{
+ if(res.code==1){
+ if(info.useful_info && info.useful_info.is_useful==1){
+ // 如果已经点了没用 那么原来点的没用的数量要减1
+ info.useful_num--;
+ }
+ info.useful_info = res.data
+ info.unuseful_num = info.useful_info.is_useful===0?(info.unuseful_num+1):(info.unuseful_num-1);
+ this.setData({
+ info:info
+ })
+ wx.showToast({
+ title: '操作成功',
+ icon: 'success'
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/service/info/index.json b/pages/user/service/info/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/service/info/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/service/info/index.wxml b/pages/user/service/info/index.wxml
new file mode 100644
index 0000000..d32bb37
--- /dev/null
+++ b/pages/user/service/info/index.wxml
@@ -0,0 +1,15 @@
+
+
+
+ {{info.question_name}}
+ {{info.answer}}
+ 以上答案是否解决您的问题? 有用({{info.useful_num>99?'99+':info.useful_num}}) 没用({{info.unuseful_num>99?'99+':info.unuseful_num}})
+
+
+ 可能您还想问
+
+ {{item.question_name}}
+
+
+ 没找到想要的答案?一键呼唤人工客服
+
\ No newline at end of file
diff --git a/pages/user/service/info/index.wxss b/pages/user/service/info/index.wxss
new file mode 100644
index 0000000..8b5e6ef
--- /dev/null
+++ b/pages/user/service/info/index.wxss
@@ -0,0 +1,67 @@
+/* pages/user/service/info/index.wxss */
+page {
+ background: #f6f6f6;
+}
+.ques-ans-box {
+ background: white;
+ padding: 15rpx 30rpx;
+ margin-bottom: 20rpx;
+}
+.ques-title {
+ color: #0B898E;
+ font-size: 30rpx;
+ font-weight: bold;
+ margin-bottom: 20rpx;
+}
+.ques-content {
+ font-size: 26rpx;
+ color: #333;
+ margin-bottom: 130rpx;
+}
+.ques-tip {
+ color: #888888;
+ font-size: 26rpx;
+}
+.ques-tip .active {
+ color: red;
+}
+.other-title {
+ border-bottom: 1rpx solid #d8d8d8;
+ padding-bottom: 15rpx;
+ margin-bottom: 0;
+ color: #333;
+}
+.ques-item {
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.ques-name {
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ flex: 1;
+}
+.ques-item .iconfont {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.more-btn {
+ text-align: center;
+ width: 520rpx;
+ line-height: 60rpx;
+ background: rgba(11, 137, 142, 0);
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ margin: 30rpx auto;
+ font-size: 26rpx;
+ font-weight: 500;
+}
+.more-btn text {
+ color: #0B898E;
+}
+.icon-zan.zhuan {
+ transform: rotate(180deg);
+}
\ No newline at end of file
diff --git a/pages/user/service/list/index.js b/pages/user/service/list/index.js
new file mode 100644
index 0000000..fcfc267
--- /dev/null
+++ b/pages/user/service/list/index.js
@@ -0,0 +1,128 @@
+// pages/user/service/list/index.js
+import util from "../../../../utils/util"
+import commonApi from "../../../../utils/https/common"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ typeid:null,
+ tagid:null,
+ list:[],
+ total:1,
+ page_no:1,
+ keyword:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.tagid){
+ this.setData({
+ tagid:options.tagid
+ })
+ }
+ else if(options.typeid){
+ this.setData({
+ typeid:options.typeid
+ })
+ }
+ else {
+ util.back();
+ return;
+ }
+ this.getList();
+ },
+ changeKeyword:function(e){
+ this.setData({
+ keyword:e.detail.value
+ })
+ },
+ search:function(){
+ this.setData({
+ list:[],
+ total:1,
+ page_no:1
+ })
+ this.getList();
+ },
+ showService:function(){
+ wx.showModal({
+ title: '提示',
+ content: '呼叫人工客服\n0512-66555111',
+ confirmColor:"#0B898E",
+ success (res) {
+ if (res.confirm) {
+ wx.makePhoneCall({
+ phoneNumber: '0512-66555111',
+ })
+ } else if (res.cancel) {
+ }
+ }
+ })
+ },
+ getList:function(){
+ let service = "ics/getQuestionByTypeId",data={
+ type_id:this.data.typeid,
+ tag_id:this.data.tagid,
+ page_no:this.data.page_no,
+ page_num:10,
+ keywords:this.data.keyword
+ },list = this.data.list;
+ if(list.length>=this.data.total) return;
+ if(this.data.tagid){
+ service="ics/getQuestionByTagId"
+ }
+ commonApi._post(service,data).then(res=>{
+ this.setData({
+ list:list.concat(res.data.rows),
+ total:res.data.total,
+ page_no:this.data.page_no+1
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ }
+})
\ No newline at end of file
diff --git a/pages/user/service/list/index.json b/pages/user/service/list/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/service/list/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/service/list/index.wxml b/pages/user/service/list/index.wxml
new file mode 100644
index 0000000..10726a0
--- /dev/null
+++ b/pages/user/service/list/index.wxml
@@ -0,0 +1,12 @@
+
+
+
+
+
+ 搜索
+
+
+ {{item.question_name}}
+
+
+没找到想要的答案?一键呼唤人工客服
\ No newline at end of file
diff --git a/pages/user/service/list/index.wxss b/pages/user/service/list/index.wxss
new file mode 100644
index 0000000..b81cefe
--- /dev/null
+++ b/pages/user/service/list/index.wxss
@@ -0,0 +1,61 @@
+/* pages/user/service/list/index.wxss */
+.search-box {
+ display: flex;
+ height: 60rpx;
+ border-radius: 30rpx;
+ background: #ededed;
+ justify-content: space-between;
+ align-items: center;
+ margin: 20rpx 30rpx;
+ font-size: 26rpx;
+}
+.search-box .iconfont {
+ color: #999999;
+ font-size: 30rpx;
+ margin-left: 20rpx;
+ flex-shrink: 0;
+}
+.search-box input {
+ flex: 1;
+ margin: 0 15rpx;
+}
+.search-box .btn {
+ width: 110rpx;
+ text-align: center;
+ border-left: 1rpx solid #ccc;
+ line-height: 40rpx;
+ color: #0B898E;
+ font-weight: 500;
+}
+.ques-item {
+ margin: 0 30rpx;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #d8d8d8;
+}
+.ques-name {
+ font-size: 30rpx;
+ color: #333;
+ font-weight: 500;
+ flex: 1;
+}
+.ques-item .iconfont {
+ flex-shrink: 0;
+ margin-left: 20rpx;
+}
+.more-btn {
+ text-align: center;
+ width: 520rpx;
+ line-height: 60rpx;
+ background: rgba(11, 137, 142, 0);
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ margin: 30rpx auto;
+ font-size: 26rpx;
+ font-weight: 500;
+}
+.more-btn text {
+ color: #0B898E;
+}
\ No newline at end of file
diff --git a/pages/user/user.js b/pages/user/user.js
index f0baf1b..3f249fb 100644
--- a/pages/user/user.js
+++ b/pages/user/user.js
@@ -1,11 +1,13 @@
// pages/user/user.js
+import userApi from "../../utils/https/user"
Page({
/**
* 页面的初始数据
*/
data: {
- height:0
+ height:0,
+ info:null
},
/**
@@ -16,6 +18,7 @@ Page({
this.setData({
height:rect.top+rect.height
})
+
},
/**
@@ -29,7 +32,11 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
-
+ userApi.user_post("user/getMyInfo").then(res=>{
+ this.setData({
+ info:res.data
+ })
+ })
},
/**
@@ -58,12 +65,5 @@ Page({
*/
onReachBottom: function () {
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
}
})
\ No newline at end of file
diff --git a/pages/user/user.wxml b/pages/user/user.wxml
index ed03c47..d13da0f 100644
--- a/pages/user/user.wxml
+++ b/pages/user/user.wxml
@@ -2,65 +2,69 @@
-
-
+
+
- user内马尔
- id:1222
+ {{info.nickname}}
+ id:{{info.id}}
-
-
+
+
我的订单
全部订单
-
+
-
+
待付款
-
-
-
- 已付款
-
-
+
+
+
+ 待发货
+
+
+
+ 待出行
+
+
+
+ 待收货
+
+
- 待点评
-
-
-
- 已完成
-
-
+ 待评价
+
+
退货/退款
-
+
-
+
购物车
-
-
+
+
在线客服
-
-
+
+
我的卡券
-
-
+
+
我的收藏
-
-
+
+
+
实名认证
-
+
-
+
出游人信息
-
+
收货地址
diff --git a/pages/user/user.wxss b/pages/user/user.wxss
index 688a33d..1dc496c 100644
--- a/pages/user/user.wxss
+++ b/pages/user/user.wxss
@@ -21,6 +21,7 @@ page {
height: 100rpx;
border-radius: 50%;
flex-shrink: 0;
+ margin-right: 20rpx;
}
.userinfo {
flex: 1;
@@ -33,6 +34,10 @@ page {
font-weight: bold;
margin-bottom: 15rpx;
}
+.username image {
+ width: 31rpx;
+ margin-left: 20rpx;
+}
.user-box {
margin: 0 30rpx;
margin-bottom: 20rpx;
@@ -61,12 +66,13 @@ page {
.user-order-types {
display: flex;
align-items: center;
- padding-bottom: 47rpx;
+ flex-wrap: wrap;
}
.user-order-type {
- width: 20%;
+ width: 25%;
text-align: center;
font-size: 27rpx;
+ margin-bottom: 30rpx;
}
.user-order-type image {
width: 60rpx;
diff --git a/pages/user/verify/index.js b/pages/user/verify/index.js
new file mode 100644
index 0000000..e1419d6
--- /dev/null
+++ b/pages/user/verify/index.js
@@ -0,0 +1,102 @@
+// pages/user/verify/index.js
+import commonApi from "../../../utils/https/common"
+import util from "../../../utils/util"
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id_number:"",
+ name:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+ verify:function(){
+ if(!this.data.name){
+ wx.showToast({
+ title: '请输入姓名',
+ icon:'none'
+ })
+ return;
+ }
+ if(!this.data.id_number){
+ wx.showToast({
+ title: '请输入身份证号',
+ icon:'none'
+ })
+ return;
+ }
+ commonApi.user_post("pbservice/Ztfw/realnameCertificate",{
+ id_card:this.data.id_number,
+ realname:this.data.name
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '认证成功',
+ icon:'success'
+ })
+ setTimeout(()=>{
+ util.back()
+ },1000)
+ }
+ })
+ },
+ changeName:function(e){
+ this.setData({
+ name:e.detail.value
+ })
+ },
+ changeId:function(e){
+ this.setData({
+ id_number:e.detail.value
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/verify/index.json b/pages/user/verify/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/verify/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/verify/index.wxml b/pages/user/verify/index.wxml
new file mode 100644
index 0000000..0c61cfb
--- /dev/null
+++ b/pages/user/verify/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ 姓名:
+
+
+
+ 身份证号:
+
+
+ 实名认证
+
diff --git a/pages/user/verify/index.wxss b/pages/user/verify/index.wxss
new file mode 100644
index 0000000..c8cee8a
--- /dev/null
+++ b/pages/user/verify/index.wxss
@@ -0,0 +1,45 @@
+/* pages/user/verify/index.wxss */
+.bgimg {
+ position: absolute;
+ left: 0;
+ right: 0;
+ width: 100%;
+ display: block;
+ z-index: -1;
+}
+page {
+ background: #f6f6f6;
+}
+.top-box {
+ margin: 100rpx 30rpx;
+ background: white;
+ border-radius: 20rpx;
+ padding: 20rpx 45rpx;
+}
+.item {
+ display: flex;
+ border-bottom: 1rpx solid #d8d8d8;
+ height: 120rpx;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 30rpx;
+ color: #333;
+}
+.item input {
+ flex: 1;
+ margin-left: 20rpx;
+}
+.item text {
+ width: 150rpx;
+ flex-shrink: 0;
+}
+.btn {
+ text-align: center;
+ width: 360rpx;
+ color: #fff;
+ font-size: 30rpx;
+ margin: 120rpx auto;
+ line-height: 80rpx;
+ background: #0B898E;
+ border-radius: 40rpx;
+}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index 9180d26..7322a96 100644
--- a/project.config.json
+++ b/project.config.json
@@ -27,7 +27,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.14.0",
- "appid": "wx59d43bb179141c53",
+ "appid": "wx4bb7b6050831f585",
"projectname": "%E8%8B%8F%E5%B7%9E%E6%96%87%E6%97%85",
"debugOptions": {
"hidedInDevtools": []
@@ -44,13 +44,35 @@
"current": -1,
"list": []
},
+ "plugin": {
+ "current": -1,
+ "list": []
+ },
"game": {
"currentL": -1,
"list": []
},
- "miniprogram": {
+ "gamePlugin": {
"current": -1,
"list": []
+ },
+ "miniprogram": {
+ "current": -1,
+ "list": [
+ {
+ "id": 0,
+ "name": "pages/user/bindtel/index",
+ "pathName": "pages/user/bindtel/index",
+ "query": "id=0000000000LINELINEINFO18082257199008",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "景区舒适度",
+ "pathName": "pages/pbService/sceneComfort/index",
+ "scene": null
+ }
+ ]
}
}
}
\ No newline at end of file
diff --git a/utils/filter.wxs b/utils/filter.wxs
index 6bd2c8e..2e01844 100644
--- a/utils/filter.wxs
+++ b/utils/filter.wxs
@@ -2,9 +2,7 @@ var formateRichText = function(str){
if(!str){
return "";
}
-
var reg = getRegExp("
{
const obj = {
url,
@@ -22,9 +23,9 @@ function _get(url,data) {
method: 'GET',
success: (res) => {
if (res.statusCode == 200) {
- if (res.data.code != 200) {
+ if (res.data.code != 1) {
wx.showToast({
- title: res.data.message,
+ title: res.data.msg,
icon: "none",
duration:2000
})
@@ -60,12 +61,12 @@ function _post(url,data={}) {
wx.showLoading({ title: '加载中', mask: true });
url = baseUrl + url;
// 如果有order
- if(data && data.order){
- data.order = orders[data.order];
- if(data.order=='sale_price' || data.order == 'distance' || data.order=='price'){
- data.sort = "asc";
- }
- }
+ // if(data && data.order){
+ // data.order = orders[data.order];
+ // if(data.order=='sale_price' || data.order == 'distance' || data.order=='price'){
+ // data.sort = "asc";
+ // }
+ // }
return new Promise((resolved, rejected) => {
const obj = {
url,
@@ -98,19 +99,19 @@ function user_post(url,data={}){
wx.showLoading({ title: '加载中', mask: true });
url = baseUrl + url;
var header = Object.assign({
- Authorization:token,
+ token:token,
userId:userId
},{
'context-type': 'application/json'
})
// 如果有order
// 排序
- if(data && data.order){
- data.order = orders[data.order];
- if(data.order=='sale_price' || data.order == 'distance' || data.order=='price'){
- data.sort = "asc";
- }
- }
+ // if(data && data.order){
+ // data.order = orders[data.order];
+ // if(data.order=='sale_price' || data.order == 'distance' || data.order=='price'){
+ // data.sort = "asc";
+ // }
+ // }
return new Promise((resolved, rejected) => {
// 判断是否登录
// 没有登录就跳转到登录页面
@@ -137,14 +138,38 @@ function user_post(url,data={}){
wx.removeStorageSync("jstrip_userInfo");
checkLogin();
}
- else if (res.data.code != 200 && res.data.message) {
+ else if(res.data.code==4005){
+ wx.navigateTo({
+ url: '/pages/user/verify/index',
+ })
+ return;
+ }
+ else if (res.data.code != 1 && res.data.msg) {
wx.showToast({
- title: res.data.message,
+ title: res.data.msg,
icon: "none",
duration:2000
})
}
if(res.statusCode == 200){
+ if(url.indexOf('order/create')!=-1 && res.data.code==1 && res.data.data){
+ // 下单成功
+ if(res.data.data.pay_status==1){
+ // 0元直接付款成功
+ wx.navigateTo({
+ url:"/pages/user/order/list"
+ })
+ // util.gotoOrder(res.data.data)
+ // // wx.navigateTo({
+ // // url: '/pages/user/order/sceneOrderInfo/index?id='+res.data.data.order_id,
+ // // })
+ }
+ else {
+ wx.navigateTo({
+ url: '/pages/order/pay/index?id='+res.data.data.order_id,
+ })
+ }
+ }
resolved(res.data);
}
else {
@@ -194,8 +219,8 @@ const checkLogin = () => {
success: r => {
wx.getUserInfo({
success: function (res) {
- userApi._post("memberNoLoginController/wechatLogin", { code: r.code, encryptedData: res.encryptedData, iv: res.iv, loginType: 3 }).then(r => {
- if (r.code != 200) {
+ userApi._post("user/wxLogin", { code: r.code, encryptedData: res.encryptedData, iv: res.iv, loginType: 3 }).then(r => {
+ if (r.code != 1) {
// 请求失败
back()
}
@@ -204,9 +229,9 @@ const checkLogin = () => {
}
// r.data.isBind是false的时候去绑定手机号 该用户没有注册过
// 已经注册的用户返回userinfo
- else if (r.data.isBind === false && page[page.length-1].route!='pages/user/bindtel/index') {
+ else if (r.data.isBindMobile === 0 && page[page.length-1].route!='pages/user/bindtel/index') {
wx.navigateTo({
- url: '/pages/user/bindtel/index?regToken=' + r.data.regToken,
+ url: '/pages/user/bindtel/index?regToken=' + r.data.openid,
})
}
}).catch(err => {
diff --git a/utils/https/common.js b/utils/https/common.js
index 234dd47..87d723e 100644
--- a/utils/https/common.js
+++ b/utils/https/common.js
@@ -1,4 +1,4 @@
-const baseUrl = "pbservice/";
+const baseUrl = "/";
const app = getApp();
import baseHttp from "../https.js";
const _get = (url, data) => {
diff --git a/utils/util.js b/utils/util.js
index 94be106..717429c 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -28,6 +28,13 @@ const isTel = tel => {
return true;
}
}
+const dateToText = (date) => {
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
+ let dates = [year, month, day].map(formatNumber);
+ return dates[1]+"月"+dates[2]+'日';
+}
const setTitleBarColor = color => {
if(color==1){
wx.setNavigationBarColor({
@@ -142,6 +149,167 @@ const checkLocation = function(){
})
})
}
+const gotoDetail = (item) =>{
+ console.log(item)
+ switch(item.type){
+ case "ticket":
+ // 产品 产品票务
+ wx.navigateTo({
+ url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id)
+ })
+ break;
+ case "hotel":
+ // 产品 酒店
+ wx.navigateTo({
+ url: '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id)
+ })
+ break;
+ case "post":
+ // 产品 产品发货的
+ wx.navigateTo({
+ url: '/pages/info/postProductInfo/index?id='+item.id
+ })
+ break;
+ case "line":
+ // 产品 线路
+ wx.navigateTo({
+ url: '/pages/info/roadInfo/index?id='+item.id
+ })
+ break;
+ case "coupon":
+ // 产品 卡券
+ wx.navigateTo({
+ url: '/pages/info/cardInfo/index?id='+item.id
+ })
+ break;
+ case "show":
+ // 产品 演出
+ wx.navigateTo({
+ url: '/pages/info/showInfo/index?id='+item.id
+ })
+ break;
+ case "food":
+ // 产品 美食
+ wx.navigateTo({
+ url: '/pages/info/foodProductInfo/index?id='+item.id
+ })
+ break;
+ case "activity":
+ // 活动
+ wx.navigateTo({
+ url: '/pages/info/activityInfo/index?id='+item.act_calendar_id
+ })
+ break;
+ case "movie":
+ // 产品 电影票
+ wx.navigateTo({
+ url: '/pages/list/movieticket/list/info/index?id='+item.third_id+'&title='+item.title
+ })
+ break;
+ case "cinema":
+ // 产品 电影票
+ wx.navigateTo({
+ url: '/pages/list/movieticket/list/cinema/index?id='+item.third_id+'&title='+item.title
+ })
+ break;
+ case "scenic":
+ // 场景 景点
+ wx.navigateTo({
+ url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id)
+ })
+ break;
+ case "room":
+ // 场景 酒店
+ wx.navigateTo({
+ url: '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id)
+ })
+ break;
+ case "venue":
+ // 场景 场馆
+ wx.navigateTo({
+ url: '/pages/info/museumInfo/index?id='+(item.scene_id || item.id)
+ })
+ break;
+ }
+}
+const orderMoreTime = function(item){
+ if(item && item.order_product_list && item.order_product_list[0]){
+ let info = item.order_product_list[0];
+ if(info.product_model=='movie'){
+ wx.navigateTo({
+ url: '/pages/list/movieticket/index',
+ })
+ }
+ else if(info.product_model=='activity'){
+ wx.navigateTo({
+ url: '/pages/info/activityInfo/index?id='+info.activity_id
+ })
+ }
+ else {
+ info.type = info.product_model;
+ if(info.product_id){
+ info.id = info.product_id;
+ gotoDetail(info)
+ }
+ }
+ }
+}
+const gotoOrder = function(item){
+ if(item.order_product_list[0].product_model=='ticket'){
+ wx.navigateTo({
+ url: 'sceneOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='food'){
+ wx.navigateTo({
+ url: 'foodOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='activity'){
+ wx.navigateTo({
+ url: 'activityOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='venue'){
+ wx.navigateTo({
+ url: 'museumOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='hotel'){
+ wx.navigateTo({
+ url: 'hotelOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='line'){
+ wx.navigateTo({
+ url: 'lineOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='movie' || item.order_product_list[0].product_model=='show'){
+ wx.navigateTo({
+ url: 'movieOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='post'){
+ wx.navigateTo({
+ url: 'postOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+ if(item.order_product_list[0].product_model=='coupon'){
+ wx.navigateTo({
+ url: 'couponOrderInfo/index?id='+item.order_id,
+ })
+ return;
+ }
+}
module.exports = {
formatTime: formatTime,
formatNumber: formatNumber,
@@ -150,5 +318,9 @@ module.exports = {
base64src: base64src,
back: back,
formatDate:formatDate,
- checkLocation:checkLocation
+ checkLocation:checkLocation,
+ dateToText:dateToText,
+ gotoDetail:gotoDetail,
+ gotoOrder:gotoOrder,
+ orderMoreTime:orderMoreTime
}