From ef3c4053a33ebc416e240aa01213813eac870f7e Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 15 Jan 2021 23:33:41 +0800
Subject: [PATCH] 1

---
 pages/membershipCard/index.js            |   90 +++++++++
 pages/purchaseRecords/index.wxml         |   43 ++++
 pages/membershipCard/index.json          |    3 
 pages/purchaseRecords/index.wxss         |   66 ++++++
 pages/customerCenter/customerCenter.js   |   13 +
 app.json                                 |    6 
 app.js                                   |    4 
 pages/purchaseRecords/detail.js          |   66 ++++++
 pages/purchaseRecords/detail.json        |    3 
 pages/customerCenter/customerCenter.wxml |   10 +
 pages/membershipCard/index.wxss          |   50 +++++
 pages/purchaseRecords/index.json         |    3 
 pages/membershipCard/index.wxml          |   17 +
 pages/purchaseRecords/detail.wxss        |   56 +++++
 pages/purchaseRecords/detail.wxml        |   34 +++
 project.config.json                      |    5 
 pages/purchaseRecords/index.js           |   78 +++++++
 17 files changed, 540 insertions(+), 7 deletions(-)

diff --git a/app.js b/app.js
index c201d3e..3fe9a23 100644
--- a/app.js
+++ b/app.js
@@ -6,11 +6,11 @@
     //  baseUrl: "https://xcxhive2.jyymatrix.cc",
     
     //测试环境
-    // baseUrl :   "https://testhive.jyymatrix.cc",
+    baseUrl :   "https://testhive.jyymatrix.cc",
 
 
     //本地环境
-   baseUrl : "http://localhost:8080",
+   //baseUrl : "http://localhost:8080",
 
   //登录后获得的token
   loginToken: "",
diff --git a/app.json b/app.json
index 7f59503..a188011 100644
--- a/app.json
+++ b/app.json
@@ -48,7 +48,11 @@
     "pages/index-back/index",
     "pages/miaosha/msOrder",
     "pages/yuyue/shopOrder",
-    "pages/yuyue/showYyInfo"
+    "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/project.config.json b/project.config.json
index 8bef61b..44d8fa1 100644
--- a/project.config.json
+++ b/project.config.json
@@ -23,12 +23,13 @@
     "compileHotReLoad": false,
     "useMultiFrameRuntime": true,
     "useApiHook": true,
-    "useApiHostProcess": false,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
     },
+    "enableEngineNative": false,
     "bundle": false,
     "useIsolateContext": true,
     "useCompilerModule": true,
@@ -40,7 +41,7 @@
   },
   "compileType": "miniprogram",
   "libVersion": "1.9.98",
-  "appid": "wx5cc58f796224af61",
+  "appid": "wx94ea32d31eec8904",
   "projectname": "%E8%9C%82%E5%B7%A2%E7%BE%8E%E4%B8%9A",
   "isGameTourist": false,
   "simulatorType": "wechat",

--
Gitblit v1.9.1