From 0556e2bfdf6e9424ef6ef12abe08fc9d7b44cf1b Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Sat, 16 Jan 2021 08:54:05 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/jyyforjava/hive-xcx
---
pages/yuyue/order.wxml | 32 +
pages/yuyue/choseService.wxml | 41 +
pages/membershipCard/index.json | 3
pages/yuyue/choseService.wxss | 9
pages/yuyue/order.js | 64 ++-
pages/customerCenter/customerCenter.js | 13
pages/purchaseRecords/detail.js | 66 +++
pages/yuyue/choseService.js | 47 -
pages/customerCenter/customerCenter.wxml | 10
pages/membershipCard/index.wxss | 50 ++
pages/purchaseRecords/index.json | 3
pages/yuyue/yyInfo.js | 7
pages/membershipCard/index.wxml | 17 +
pages/yuyue/showYyInfo.js | 121 +++++++
pages/purchaseRecords/detail.wxss | 56 +++
pages/purchaseRecords/detail.wxml | 34 ++
pages/yuyue/khyuyue.js | 1
pages/yuyue/showYyInfo.json | 3
pages/membershipCard/index.js | 90 +++++
pages/purchaseRecords/index.wxml | 43 ++
pages/purchaseRecords/index.wxss | 66 +++
pages/yuyue/khyuyue.wxml | 2
pages/yuyue/showYyInfo.wxml | 69 ++++
app.json | 9
pages/yuyue/showYyInfo.wxss | 46 ++
pages/purchaseRecords/detail.json | 3
pages/yuyue/yyInfo.wxml | 4
pages/purchaseRecords/index.js | 78 ++++
28 files changed, 883 insertions(+), 104 deletions(-)
diff --git a/app.json b/app.json
index b6b0c0f..76b6168 100644
--- a/app.json
+++ b/app.json
@@ -3,7 +3,6 @@
"pages/index/index",
"pages/service/service",
"pages/groupbuy/groupDetails",
-
"pages/customerCenter/customerCenter",
"pages/yuyue/khyuyue",
"pages/yuyue/choseShop",
@@ -48,8 +47,12 @@
"pages/miaosha/msDetails",
"pages/index-back/index",
"pages/miaosha/msOrder",
- "pages/yuyue/shopOrder"
-
+ "pages/yuyue/shopOrder",
+ "pages/yuyue/showYyInfo",
+ "pages/membershipCard/index",
+ "pages/purchaseRecords/index",
+ "pages/purchaseRecords/detail"
+
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/customerCenter/customerCenter.js b/pages/customerCenter/customerCenter.js
index 89d993a..b76e7d9 100644
--- a/pages/customerCenter/customerCenter.js
+++ b/pages/customerCenter/customerCenter.js
@@ -68,12 +68,21 @@
url: '/pages/welcome/welcome?url=/pages/customerCenter/customerCenter',
})
},
- myCollect(e){
+ myCollect(e){
wx.navigateTo({
url: '/pages/yuyue/order?status=0',
})
},
-
+ linkToMembershipCard(){
+ wx.navigateTo({
+ url: '/pages/membershipCard/index'
+ })
+ },
+ linkToBuyList(){
+ wx.navigateTo({
+ url: '/pages/purchaseRecords/index'
+ })
+ },
onStatusEvent(e) {
var status = e.currentTarget.dataset.status;
wx.navigateTo({
diff --git a/pages/customerCenter/customerCenter.wxml b/pages/customerCenter/customerCenter.wxml
index 6212f3c..658d1a9 100644
--- a/pages/customerCenter/customerCenter.wxml
+++ b/pages/customerCenter/customerCenter.wxml
@@ -48,6 +48,16 @@
</view>
</view>
<view class='section'>
+ <view class="collected form_groun" bindtap='linkToBuyList'>
+ <view class="iconfont iconxiangmu"></view>
+ <text>购买记录</text>
+ <view class="iconfont iconright"></view>
+ </view>
+ <view class="collected form_groun" bindtap="linkToMembershipCard">
+ <view class="iconfont iconyouhuiquan"></view>
+ <text>我的卡项</text>
+ <view class="iconfont iconright"></view>
+ </view>
<view class="collected form_groun" bindtap='myCollect'>
<view class="iconfont iconshijian"></view>
<text>我的预约</text>
diff --git a/pages/membershipCard/index.js b/pages/membershipCard/index.js
new file mode 100644
index 0000000..d575d4c
--- /dev/null
+++ b/pages/membershipCard/index.js
@@ -0,0 +1,90 @@
+// pages/membershipCard/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list: [{
+ cardName: '会员卡',
+ realMoney: 100,
+ giftMoney: 200,
+ failTime: '2022-12-12'
+ },
+ {
+ cardName: '会员卡',
+ realMoney: 100,
+ giftMoney: 200,
+ failTime: '2022-12-12'
+ },
+ {
+ cardName: '会员卡',
+ realMoney: 100,
+ giftMoney: 200,
+ failTime: '2022-12-12'
+ },
+ {
+ cardName: '会员卡',
+ realMoney: 100,
+ giftMoney: 200,
+ failTime: '2022-12-12',
+ status: 2
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/membershipCard/index.json b/pages/membershipCard/index.json
new file mode 100644
index 0000000..4aadd14
--- /dev/null
+++ b/pages/membershipCard/index.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText":"我的卡项"
+}
\ No newline at end of file
diff --git a/pages/membershipCard/index.wxml b/pages/membershipCard/index.wxml
new file mode 100644
index 0000000..b535c63
--- /dev/null
+++ b/pages/membershipCard/index.wxml
@@ -0,0 +1,17 @@
+<!--pages/membershipCard/index.wxml-->
+<view class="container">
+ <view class="list-item-bg {{item.status==2?'failure':''}}" wx:for="{{list}}" wx:for-item="item">
+ <view class="list-item">
+ <view class="list-header">
+ <text class="name">{{item.cardName}}</text>
+ </view>
+ <view class="list-content">
+ ¥{{item.realMoney}}
+ </view>
+ <view class="list-footer">
+ <text>赠送金额 ¥ {{item.giftMoney}}</text>
+ <text>有效期:{{item.failTime}}</text>
+ </view>
+ </view>
+ </view>
+ </view>
diff --git a/pages/membershipCard/index.wxss b/pages/membershipCard/index.wxss
new file mode 100644
index 0000000..5823732
--- /dev/null
+++ b/pages/membershipCard/index.wxss
@@ -0,0 +1,50 @@
+/* pages/membershipCard/index.wxss */
+.container{
+ padding: 10px 10px;
+}
+.list-item-bg{
+ border-radius: 10px;
+}
+.list-item{
+ color: #FFFFFF;
+ font-size: 12px;
+ padding: 18px 18px;
+ margin-bottom: 10px;
+}
+.list-item-bg:nth-child(2n+1){
+ background: url(https://filehive2.jyymatrix.cc/uploadeFile/image/899a19b6bec5cddc50179f183ba138b628cf94b3/20210115/caf0e1ae46f642abb2eaca2cc6b5ca35.png) no-repeat;
+ background-size: 100% 100%;
+}
+.list-item-bg:nth-child(2n+2){
+ background: url(https://filehive2.jyymatrix.cc/uploadeFile/image/899a19b6bec5cddc50179f183ba138b628cf94b3/20210115/f772fa5855504d348a4c28e0c08a6636.png) no-repeat;
+ background-size: 100% 100%;
+}
+.list-item-bg:nth-child(1){
+ background: url(https://filehive2.jyymatrix.cc/uploadeFile/image/899a19b6bec5cddc50179f183ba138b628cf94b3/20210115/2f2bd25e651c457db0d7079b93aea700.png) no-repeat;
+ background-size: 100% 100%;
+}
+.list-item-bg.failure{
+ background: url(https://filehive2.jyymatrix.cc/uploadeFile/image/899a19b6bec5cddc50179f183ba138b628cf94b3/20210115/58ef5387167f40b3b3ed015d6752402e.png) no-repeat;
+ background-size: 100% 100%;
+ opacity: 0.8;
+}
+.list-header{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.list-header .name{
+ font-size: 14pt;
+ font-weight: bold;
+ color: #FFFFFF;
+}
+.list-content{
+ padding: 20px 0;
+ font-size: 20pt;
+ line-height: 30px;
+}
+.list-footer{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
\ No newline at end of file
diff --git a/pages/purchaseRecords/detail.js b/pages/purchaseRecords/detail.js
new file mode 100644
index 0000000..fc7f51b
--- /dev/null
+++ b/pages/purchaseRecords/detail.js
@@ -0,0 +1,66 @@
+// pages/purchaseRecords/detail.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/purchaseRecords/detail.json b/pages/purchaseRecords/detail.json
new file mode 100644
index 0000000..1981a84
--- /dev/null
+++ b/pages/purchaseRecords/detail.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText":"购买记录详情"
+}
\ No newline at end of file
diff --git a/pages/purchaseRecords/detail.wxml b/pages/purchaseRecords/detail.wxml
new file mode 100644
index 0000000..eb11849
--- /dev/null
+++ b/pages/purchaseRecords/detail.wxml
@@ -0,0 +1,34 @@
+<view>
+ <view class="list-item">
+ <view class="list-header">
+ <view>
+ <view class="name">肽妍星海店</view>
+ <view class="number">订单编号:N20201211164653</view>
+ </view>
+ <text>已付款</text>
+ </view>
+ <view class="list-content">
+ <view class="list-content-row">
+ <text>深层清洁 x 1</text>
+ <text>¥23</text>
+ </view>
+ <view class="list-content-row">
+ <text>深层清洁 x 1</text>
+ <text>¥23</text>
+ </view>
+ <view class="pay-info">
+ <view><text>微信:102</text></view>
+ <view><text>储值卡:102</text></view>
+ <view>
+ <text class="gray">总价 ¥23.23</text>
+ <text class="ml-10 gray">优惠¥23</text>
+ <text class="ml-10">实付款¥10</text>
+ </view>
+ </view>
+ </view>
+ <view class="list-footer">
+ <view><text>购买时间:2020-08-23 12:33</text></view>
+ <view class="mt-5"><text>下单顾问:李贝</text></view>
+ </view>
+ </view>
+</view>
diff --git a/pages/purchaseRecords/detail.wxss b/pages/purchaseRecords/detail.wxss
new file mode 100644
index 0000000..3250cfa
--- /dev/null
+++ b/pages/purchaseRecords/detail.wxss
@@ -0,0 +1,56 @@
+
+.list-item{
+ background: #FFFFFF;
+ border-radius: 4px;
+ margin: 10px;
+ color: #3a3f3f;
+ border: 1px solid #EDEAF4;
+ padding: 0 10px;
+}
+.list-item text{
+ font-size: 10pt;
+}
+.list-header{
+ display: flex;
+ justify-content: space-between;
+ padding: 10px 0;
+ font-size: 10pt;
+ border-bottom: 1px solid #EDEAF4;
+}
+.list-header .name{
+ font-size: 11pt;
+}
+.list-header .number{
+ color: #aeaeae;
+ font-size: 10pt;
+ margin-top: 5px;
+}
+.list-content{
+ padding: 10px 0;
+}
+.list-content-row{
+ display: flex;
+ justify-content: space-between;
+ line-height: 28px;
+}
+.pay-info{
+ text-align: right;
+ line-height: 26px;
+}
+.list-footer{
+ padding: 12px 0;
+ border-top: 1px solid #EDEAF4;
+}
+.list-footer text{
+ font-size: 9pt;
+ color: #666666;
+}
+.ml-10{
+ margin-left: 10px;
+}
+.mt-5{
+ margin-top: 5px;
+}
+.gray{
+ color: #aeaeae;
+}
\ No newline at end of file
diff --git a/pages/purchaseRecords/index.js b/pages/purchaseRecords/index.js
new file mode 100644
index 0000000..2489fdb
--- /dev/null
+++ b/pages/purchaseRecords/index.js
@@ -0,0 +1,78 @@
+// pages/purchaseRecords/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ currentIndex:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ onTabsItemEvent(e) {
+ var index = e.currentTarget.dataset.index;
+
+ this.setData({
+ currentIndex: index
+ })
+ },
+ toDetail(){
+ wx.navigateTo({
+ url: '/pages/purchaseRecords/detail'
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/purchaseRecords/index.json b/pages/purchaseRecords/index.json
new file mode 100644
index 0000000..4d4bb18
--- /dev/null
+++ b/pages/purchaseRecords/index.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText":"购买记录"
+}
\ No newline at end of file
diff --git a/pages/purchaseRecords/index.wxml b/pages/purchaseRecords/index.wxml
new file mode 100644
index 0000000..93274cb
--- /dev/null
+++ b/pages/purchaseRecords/index.wxml
@@ -0,0 +1,43 @@
+<!--pages/purchaseRecords/index.wxml-->
+<view>
+ <view class='tabs_box'>
+ <view class="tabs_item {{currentIndex==0?'selected':''}}" bindtap='onTabsItemEvent' data-index="">
+ 全部
+ </view>
+ <view class="tabs_item {{currentIndex==1?'selected':''}}" bindtap='onTabsItemEvent' data-index="1">
+ 待付款
+ </view>
+ <view class="tabs_item {{currentIndex==2?'selected':''}}" bindtap='onTabsItemEvent' data-index="2">
+ 已付款
+ </view>
+ <view class="tabs_item {{currentIndex==3?'selected':''}}" bindtap='onTabsItemEvent' data-index="3">
+ 欠款
+ </view>
+ </view>
+ <view>
+ <view class="list-item" bindtap='toDetail'>
+ <view class="list-header">
+ <view>
+ <view class="name">肽妍星海店</view>
+ <view class="number">订单编号:N20201211164653</view>
+ </view>
+ <text>已付款</text>
+ </view>
+ <view class="list-content">
+ <view class="list-content-row">
+ <text>深层清洁 x 1</text>
+ <text>¥23</text>
+ </view>
+ <view class="list-content-row">
+ <text>深层清洁 x 1</text>
+ <text>¥23</text>
+ </view>
+ </view>
+ <view class="list-footer">
+ <text class="gray">总价 ¥23.23</text>
+ <text class="ml-10 gray">优惠¥23</text>
+ <text class="ml-10">实付款¥10</text>
+ </view>
+ </view>
+ </view>
+</view>
diff --git a/pages/purchaseRecords/index.wxss b/pages/purchaseRecords/index.wxss
new file mode 100644
index 0000000..b99faa0
--- /dev/null
+++ b/pages/purchaseRecords/index.wxss
@@ -0,0 +1,66 @@
+.tabs_box {
+ display: flex;
+ color: #999;
+
+ line-height: 60rpx;
+ width: 95%;margin: auto;
+ background: #FFFFFF
+}
+.tabs_box>view {
+ text-align: center;
+ font-size: 26rpx;
+ width: 25%;
+ padding: 20rpx 0;
+}
+.selected {
+ height: 100%;
+ color: #00c085;
+ font-size: 30rpx;
+ border-bottom: 2rpx solid #00c085;
+}
+.list-item{
+ background: #FFFFFF;
+ border-radius: 4px;
+ margin: 10px;
+ color: #3a3f3f;
+ border: 1px solid #EDEAF4;
+ padding: 0 10px;
+}
+.list-item text{
+ font-size: 10pt;
+}
+.list-header{
+ display: flex;
+ justify-content: space-between;
+ padding: 10px 0;
+ font-size: 10pt;
+ border-bottom: 1px solid #EDEAF4;
+}
+.list-header .name{
+ font-size: 11pt;
+}
+.list-header .number{
+ color: #aeaeae;
+ font-size: 10pt;
+ margin-top: 5px;
+}
+.list-content{
+ padding: 12px 0;
+}
+.list-content-row{
+ display: flex;
+ justify-content: space-between;
+ line-height: 28px;
+}
+.list-footer{
+ display: flex;
+ justify-content: flex-end;
+ padding: 12px 0;
+ border-top: 1px solid #EDEAF4;
+}
+.ml-10{
+ margin-left: 10px;
+}
+.gray{
+ color: #aeaeae;
+}
\ No newline at end of file
diff --git a/pages/yuyue/choseService.js b/pages/yuyue/choseService.js
index f8827c5..0021fdf 100644
--- a/pages/yuyue/choseService.js
+++ b/pages/yuyue/choseService.js
@@ -9,7 +9,8 @@
*/
data: {
cates: [{ attrName: "全部", attrCode:""}],
- serviceList:[],
+ composeProj:[],
+ proj:[],
cateIndex:0,
offset: 0,
limit:10,
@@ -34,34 +35,24 @@
onLoad: function (options) {
var _this=this;
//加载分类
- util.request({
- api: api.productAttribute.getByCode + app.shopInfo.id+"/service",
- callback:function(data){
- var cates = _this.data.cates.concat(data.rows);
- _this.setData({
- cates: cates
- });
- _this.loadService();
- }
- });
+ _this.loadService();
},
loadService:function(){
var _this = this;
- var categoryId = _this.data.cates[_this.data.cateIndex].attrId;
- var serviceList = _this.data.serviceList;
-
+ var userInfo= getApp().userInfo;
+ var phoneNumber=userInfo.phoneNumber;
util.request({
- api: api.goods.searchGoods,
- data: { categoryId: categoryId, isService: 1, offset: _this.data.offset,limit:_this.data.limit},
- callback:function(data){
- for (var i = 0; i < data.rows.length; i++) {
- serviceList.push(data.rows[i])
- }
+ api:'/wxapi/yuyue/getUserPro/'+phoneNumber,
+
+ callback:function(data){
+ var composeProj=data.mapInfo.proj.composeProj;
+ var proj=data.mapInfo.proj.proj;
_this.setData({
- serviceList: serviceList,
+ composeProj: composeProj,
+ proj:proj
});
}
});
@@ -69,20 +60,14 @@
// 上拉加载
onReachBottom: function () {
- var _this = this;
- var offset = _this.data.offset;
- var limit = _this.data.limit;
- _this.setData({
- offset: offset + limit
- });
- this.loadService();
+
},
chooseService:function(e){
- var index=e.currentTarget.dataset.index;
- var service =this.data.serviceList[index];
- wx.setStorageSync('chooseService', service);
+ var item=e.currentTarget.dataset.pro;
+
+ wx.setStorageSync('chooseService', item);
wx.navigateBack({
delta: 1,
});
diff --git a/pages/yuyue/choseService.wxml b/pages/yuyue/choseService.wxml
index 77c80c6..98d3f4d 100644
--- a/pages/yuyue/choseService.wxml
+++ b/pages/yuyue/choseService.wxml
@@ -1,34 +1,47 @@
-<scroll-view class="top" scroll-x>
-
-
+<!--
<block wx:for="{{cates}}" wx:key >
<view class="cate-item active" wx:if="{{index==cateIndex}}" >{{item.attrName}}</view>
<view class="cate-item " wx:if="{{index!=cateIndex}}" bindtap="chooseCate" data-index="{{index}}" >{{item.attrName}}</view>
</block>
-
-</scroll-view>
+-->
<scroll-view scroll-y >
-
- <view class="service-wrap" wx:for="{{serviceList}}" wx:key bindtap="chooseService"
- data-index="{{index}}" >
+ <block >
+ <view class="cate-item " >已购套餐/项目</view>
+</block>
+<view wx:for="{{composeProj}}" wx:for-item="tc" >
+ <view class="service-wrap" wx:for="{{tc.proj}}" wx:key bindtap="chooseService"
+ data-pro="{{item}}" >
<view class="inner-wrap">
<view class="content-wrap" >
- <image mode="aspectFit" src="{{item.imgMobile}}"></image>
<view class="m-info" >
- <view class="title">{{item.title}}</view>
- <!-- <view class="price">¥{{item.price}}</view> -->
+ <view class="title">{{item.name}}</view>
</view>
<view class="s-info">
- <text class="s-time">约{{item.serviceTime}}分钟</text>
+ <text class="s-time">约{{item.timeLength}}分钟</text>
<text class="iconfont iconright"></text>
</view>
</view>
</view>
- </view>
+</view>
+</view>
+<view class="service-wrap" wx:for="{{proj}}" wx:key bindtap="chooseService"
+ data-pro="{{item}}" >
+ <view class="inner-wrap">
+ <view class="content-wrap" >
+ <view class="m-info" >
+ <view class="title">{{item.name}}</view>
+ </view>
+ <view class="s-info">
+ <text class="s-time">约{{item.timeLength}}分钟</text>
+ <text class="iconfont iconright"></text>
+ </view>
+ </view>
+ </view>
+</view>
-
+
</scroll-view>
\ No newline at end of file
diff --git a/pages/yuyue/choseService.wxss b/pages/yuyue/choseService.wxss
index 059608a..2150775 100644
--- a/pages/yuyue/choseService.wxss
+++ b/pages/yuyue/choseService.wxss
@@ -10,14 +10,14 @@
}
.cate-item{
- height: 30px;
+ height:40px;
overflow: hidden;
padding: 5px 10px;
color: #999;
- display: inline-block;
line-height: 40px;
+text-align: center;
font-size: 14px;
-
+background: #f7f7f7;
}
.service-wrap{
@@ -26,9 +26,6 @@
border-radius: 5px;
background: #fff;
overflow:hidden;
-}
-.service-wrap:first-of-type{
- margin-top:50px;
}
diff --git a/pages/yuyue/khyuyue.js b/pages/yuyue/khyuyue.js
index 3d569ac..8feea3d 100644
--- a/pages/yuyue/khyuyue.js
+++ b/pages/yuyue/khyuyue.js
@@ -344,7 +344,6 @@
if (!this.data.unneededMasseuse) {
serviceOrder['staffInfo'] = this.data.masseuse;
}
- debugger
wx.setStorageSync("serviceOrder", serviceOrder);
wx.navigateTo({
diff --git a/pages/yuyue/khyuyue.wxml b/pages/yuyue/khyuyue.wxml
index d4affcd..c8afdef 100644
--- a/pages/yuyue/khyuyue.wxml
+++ b/pages/yuyue/khyuyue.wxml
@@ -37,7 +37,7 @@
<view class="itemBox" wx:if="{{isLogin && hasChooseService}}" bindtap="chooseService" >
<view class="iconfont iconxiangmu ic fl"></view>
- <text class="shop fl">{{service.title}} </text>
+ <text class="shop fl">{{service.name}} </text>
<view class="iconfont iconright fr"></view>
<!--<text class="info fr">¥{{service.price}}</text>-->
</view>
diff --git a/pages/yuyue/order.js b/pages/yuyue/order.js
index e4c57ac..55a2942 100644
--- a/pages/yuyue/order.js
+++ b/pages/yuyue/order.js
@@ -5,8 +5,8 @@
data: {
currentIndex: 0,
orderList: [],
- limit: 8,
- offset: 0,
+ pageSize: 8,
+ pageNum: 1,
refresh: false,
orderShow: false,
// hiddenData:true
@@ -52,7 +52,7 @@
this.setData({
currentIndex: index,
- offset: 0
+ pageNum: 0
})
this.getOrderInfo(index);
},
@@ -61,15 +61,15 @@
getOrderInfo: function(index) {
var _this = this;
- var limit = _this.data.limit;
- var offset = _this.data.offset;
- var status=index=="0"?"":index;
+ var pageSize = _this.data.pageSize;
+ var pageNum = _this.data.pageNum;
+ var status=this.data.currentIndex;
util.request({
api: api.yuyue.getServiceOrderList,
data: {
- "limit": limit,
- "status": status,
- "offset": offset
+ "pageSize": pageSize,
+ "vipStatus": status,
+ "pageNum": pageNum
},
callback: function(data) {
console.log("订单信息")
@@ -81,10 +81,12 @@
if (orderList.length == 0) {
_this.setData({
orderShow: true,
+ noMore:true
})
} else {
_this.setData({
- orderShow: false
+ orderShow: false,
+ noMore:false
})
}
}
@@ -108,14 +110,13 @@
if (sm.confirm) {
util.request({
- api: api.yuyue.cancelOrderById,
+ api: api.yuyue.cancelOrderById+"/"+id,
data: { id: id},
callback: function (data) {
wx.showToast({
title: '取消成功',
success: function () {
- debugger
- _this.getOrderInfo(0);
+ _this.getOrderInfo(index);
}
})
}
@@ -157,7 +158,7 @@
var _this = this;
var id = e.currentTarget.dataset.id;
wx.navigateTo({
- url: '/pages/yuyue/yyInfo?model=2&id=' + id,
+ url: '/pages/yuyue/showYyInfo?id=' + id,
})
},
@@ -165,29 +166,36 @@
onReachBottom: function() {
var _this = this;
- var limit = _this.data.limit;
- var offset = _this.data.offset + limit;
+ var pageSize = _this.data.pageSize;
+ var pageNum = _this.data.pageNum + 1;
var orderList = _this.data.orderList;
- var index = _this.data.currentIndex;
- var status = index == "0" ? "" : index;
+ var status = _this.data.currentIndex;
_this.setData({
- offset: offset
+ pageNum: pageNum
});
util.request({
api: api.yuyue.getServiceOrderList,
data: {
- "limit": limit,
- "status": status,
- "offset": offset
+ "pageSize": pageSize,
+ "vipStatus": status,
+ "pageNum": pageNum
},
callback: function(data) {
- for (var i = 0; i < data.rows.length; i++) {
- orderList.push(data.rows[i]);
- }
- _this.setData({
- orderList: orderList
- });
+ if(data.rows.length>0){
+ for (var i = 0; i < data.rows.length; i++) {
+ orderList.push(data.rows[i]);
+ }
+ _this.setData({
+ orderList: orderList
+ });
+ }else{
+ _this.setData({
+ noMore:true
+ })
+ }
+
+
}
});
diff --git a/pages/yuyue/order.wxml b/pages/yuyue/order.wxml
index 52cab3b..e01539b 100644
--- a/pages/yuyue/order.wxml
+++ b/pages/yuyue/order.wxml
@@ -2,33 +2,38 @@
<view class='tabs_box'>
- <view class="tabs_item {{currentIndex==0?'selected':''}}" bindtap='onTabsItemEvent' data-index="">
+ <view class="tabs_item {{currentIndex==0?'selected':''}}" bindtap='onTabsItemEvent' data-index="0">
全部
</view>
<view class="tabs_item {{currentIndex==1?'selected':''}}" bindtap='onTabsItemEvent' data-index="1">
- 待服务
+ 待确认
</view>
<view class="tabs_item {{currentIndex==2?'selected':''}}" bindtap='onTabsItemEvent' data-index="2">
- 已完成
+ 进行中
</view>
<view class="tabs_item {{currentIndex==3?'selected':''}}" bindtap='onTabsItemEvent' data-index="3">
+ 待评价
+ </view>
+ <view class="tabs_item {{currentIndex==4?'selected':''}}" bindtap='onTabsItemEvent' data-index="4">
+ 已评价
+ </view>
+ <view class="tabs_item {{currentIndex==5?'selected':''}}" bindtap='onTabsItemEvent' data-index="5">
已取消
</view>
-
</view>
<view class="order-container" wx:if="{{!orderShow}}">
<view class="order-list radius" wx:for="{{orderList}}" wx:key="ids" data-id="{{item.id}}" bindtap='intoDetail'>
<view class='order-top'>
- <text class='grey'>订单编号:{{item.orderNo}}</text>
- <text class='explain'>{{item.dicMap.status}}</text>
+ <text class='grey'>订单编号:{{item.serviceNo}}</text>
+ <text class='explain'>{{item.shopName}}</text>
</view>
<view class='order-middle'>
- <image src='{{item.shopProduct.imgMobile}}' class='order-image' mode="aspectFit"></image>
+ <image src='{{proj.imgMobile}}' class='order-image' mode="aspectFit"></image>
<view class='order-info'>
- <view class='name'>{{item.shopProduct.title}}</view>
- <view class='grey norms'>{{item.shopInfo.shopName}} </view>
+ <view wx:for="{{item.projs}}" wx:for-item="proj" class='name'>{{proj.projName}}</view>
+
<view class="goods-group">
<!-- <view class='price'>¥{{item.shopProduct.price}}</view>-->
</view>
@@ -37,12 +42,19 @@
<view class='order-bottom'>
- <text class='cancel-order' wx:if="{{item.status == 1}}" data-index="{{index}}" data-id="{{item.id}}" capture-catch:touchstart='cancelOrder'>取消订单</text>
+ <text class='cancel-order' wx:if="{{item.status == 9}}" data-index="{{index}}" data-id="{{item.id}}" capture-catch:touchstart='cancelOrder'>取消订单</text>
</view>
</view>
</view>
+ <!-- 没有更多数据 -->
+ <view class='text-center pd-10' wx:if="{{noMore}}">
+ <view>
+ <text class="color_gray font-12">没有更多了~</text>
+ </view>
+ </view>
+
</view>
diff --git a/pages/yuyue/showYyInfo.js b/pages/yuyue/showYyInfo.js
new file mode 100644
index 0000000..04e1020
--- /dev/null
+++ b/pages/yuyue/showYyInfo.js
@@ -0,0 +1,121 @@
+const app = getApp()
+var util = require('../../utils/util.js');
+var api = require('../../utils/service-api.js');
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ console.log(options);
+ var _this = this;
+ //查看已有订单
+ util.request({
+ api: api.yuyue.getServiceOrderById + options.id,
+ callback: function(data) {
+
+ _this.setData({
+ serviceOrder: data.mapInfo.detail,
+ shopInfo:data.mapInfo.shopInfo
+ })
+ }
+ });
+ },
+
+ cancel: function() {
+ console.log("cancel");
+ var _this = this;
+ wx.showModal({
+ title: '提示',
+ content: '确定要取消吗?',
+ success: function(sm) {
+ if (sm.confirm) {
+ var id = _this.data.serviceOrder.id;
+ util.request({
+ api: api.yuyue.cancelOrderById,
+ data: { id: id },
+ callback: function(data) {
+ wx.showToast({
+ title: '取消成功',
+ success: function() {
+ wx.navigateBack({});
+ }
+ })
+ }
+ });
+ }
+ }
+ })
+
+ },
+
+
+ backKhyuyue: function() {
+
+ 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/yuyue/showYyInfo.json b/pages/yuyue/showYyInfo.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/yuyue/showYyInfo.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/yuyue/showYyInfo.wxml b/pages/yuyue/showYyInfo.wxml
new file mode 100644
index 0000000..f23f5fe
--- /dev/null
+++ b/pages/yuyue/showYyInfo.wxml
@@ -0,0 +1,69 @@
+<scroll-view scroll-y>
+
+<view class="itemWrap" wx:if="{{model!=0}}">
+ <view class="lable">
+ <text class="iconfont icondianpu"></text>
+ <text >订单状态</text>
+ </view>
+ <view class="info">{{serviceOrder.status}}</view>
+ <view class="info-s">订单编号:{{serviceOrder.serviceNo}}</view>
+ </view>
+
+
+ <view class="itemWrap">
+ <view class="lable">
+ <text class="iconfont icondianpu"></text>
+ <text >门店地址</text>
+ </view>
+ <view class="info">{{shopInfo.shopName}}</view>
+ <view class="info-s">{{shopInfo.shopAddr}}</view>
+ </view>
+
+ <view class="itemWrap">
+ <view class="lable">
+ <text class="iconfont icondianpu"></text>
+ <text >预约到店时间</text>
+ </view>
+ <view class="info">{{serviceOrder.yyTime}}</view>
+ <view class="info-s">服务时长约{{serviceOrder.totalTime}}分钟</view>
+ </view>
+
+<view class="itemWrap">
+ <view class="lable">
+ <text class="iconfont icondianpu"></text>
+ <text >服务和技师</text>
+ </view>
+ <view wx:for="{{serviceOrder.items}}" >
+ <view class="info">{{item.name}}</view>
+ <view class="info-s">{{item.beautyName}}</view>
+ </view>
+ </view>
+<form bindsubmit="submitYuyue" >
+
+<view class="itemWrap" wx:if="{{model==0}}">
+ <view class="lable">
+ <text class="iconfont icondianpu"></text>
+ <text >到店人</text>
+ </view>
+ <view class="forms" >
+ <input placeholder="请输入到店人名称" value="{{serviceOrder.vipName}}"name="vipName" ></input>
+ <input placeholder="请输入联系电话" value="{{serviceOrder.phone}}" name="tel" ></input>
+ <input placeholder="备注" value="{{serviceOrder.remark}}" name="remark" ></input>
+ </view>
+ </view>
+
+
+
+
+
+
+<view bindtap="backKhyuyue" class=" bgbtn " >
+ 返回
+</view>
+
+</form>
+
+
+
+
+</scroll-view>
\ No newline at end of file
diff --git a/pages/yuyue/showYyInfo.wxss b/pages/yuyue/showYyInfo.wxss
new file mode 100644
index 0000000..dc35481
--- /dev/null
+++ b/pages/yuyue/showYyInfo.wxss
@@ -0,0 +1,46 @@
+.itemWrap{
+ width: 90%;
+ margin: 20px auto;
+ overflow: hidden;
+}
+.iconfont{
+ margin-right:5px;
+}
+
+.lable{
+ color: #aeaeae;
+ font-size: 14px;
+
+
+}
+.info{
+ font-size: 16px;
+ margin: 15px 0px 5px 10px;
+
+}
+
+.info-s{
+ font-size: 12px;
+ margin-left: 10px;
+}
+
+.forms{
+ background: #fff;
+ border-radius: 5px;
+ height: 400rpx;
+ width: 100%;
+ margin-top: 20px;
+ padding: 15px
+}
+.forms input{
+ display: block;
+ width: 90%;
+ float: left;
+ height: 50px;
+ font-size:14px;
+ border-bottom: 1px solid #efefef;
+}
+
+.forms input:nth-child(3){
+ border-bottom:none;
+}
\ No newline at end of file
diff --git a/pages/yuyue/yyInfo.js b/pages/yuyue/yyInfo.js
index cdd7de6..fc70eee 100644
--- a/pages/yuyue/yyInfo.js
+++ b/pages/yuyue/yyInfo.js
@@ -143,16 +143,11 @@
api: api.yuyue.createServiceOrder,
data: orderInfo,
callback: function (data) {
- var id = data.rows[0].id;
wx.redirectTo({
- url: '/pages/yuyue/yySuccess?id=' + id,
+ url: '/pages/yuyue/order',
})
}
});
-
-
-
-
},
diff --git a/pages/yuyue/yyInfo.wxml b/pages/yuyue/yyInfo.wxml
index f399473..cf4685a 100644
--- a/pages/yuyue/yyInfo.wxml
+++ b/pages/yuyue/yyInfo.wxml
@@ -25,7 +25,7 @@
<text >预约到店时间</text>
</view>
<view class="info">{{serviceOrder.time}}</view>
- <view class="info-s">服务时长约{{serviceOrder.shopProduct.serviceTime}}分钟</view>
+ <view class="info-s">服务时长约{{serviceOrder.shopProduct.timeLength}}分钟</view>
</view>
<view class="itemWrap">
@@ -33,7 +33,7 @@
<text class="iconfont icondianpu"></text>
<text >服务和技师</text>
</view>
- <view class="info">{{serviceOrder.shopProduct.title}}
+ <view class="info">{{serviceOrder.shopProduct.name}}
<!-- <text class="price fr">¥{{serviceOrder.shopProduct.price}}</text> -->
</view>
<view class="info-s">{{serviceOrder.staffInfo.staffName}}</view>
--
Gitblit v1.9.1