Kaynağa Gözat

feat: show qrcode dialog

wangyuan 2 yıl önce
ebeveyn
işleme
3ed7b7c4c5

+ 2 - 1
app.json

@@ -17,7 +17,8 @@
     "pages/set/set",
     "pages/openArea/openArea",
     "pages/rechargeRecord/rechargeRecord",
-    "pages/myAppointment/myAppointment"
+    "pages/myAppointment/myAppointment",
+    "pages/myFile/myFile"
   ],
   "usingComponents": {
     "van-icon": "@vant/weapp/icon/index",

+ 6 - 1
pages/my/my.js

@@ -28,7 +28,12 @@ Page({
   onShow() {
 
   },
-
+  /* 我的档案 */
+  handleMyFile () {
+    wx.navigateTo({
+      url: '/pages/myFile/myFile',
+    })
+  },
   /**
    * 我的预约
    */

+ 2 - 2
pages/my/my.wxml

@@ -24,7 +24,7 @@
         </view>
         <view class="desc">我的地址</view>
       </view>
-      <view class="act-item dangan" data-index="1">
+      <view class="act-item dangan" data-index="1" bindtap="handleMyFile">
         <view class="icon">
           <image class="image-icon" src="./../../imaes/dangan@2x.png"></image>
         </view>
@@ -42,7 +42,7 @@
         <view class="icon">
           <image class="image-icon" src="./../../imaes/jilu@2x.png"></image>
         </view>
-        <view class="desc">充值记录</view>
+        <view class="desc">我的记录</view>
       </view>
       <view class="act-item baogao" data-index="4">
         <view class="icon">

+ 66 - 0
pages/myFile/myFile.js

@@ -0,0 +1,66 @@
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    vanoverlayshow: false,
+    qrcodeDialog: false,
+    fileList: [
+      {
+        name: '范一岚',
+        date: '1995/12'
+      }
+    ]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  handleConfirm() {
+    this.setData({ vanoverlayshow: false })
+  },
+
+  /**
+   * 新建档案
+   */
+  handleAddFile() {
+    // this.setData({ vanoverlayshow: true })
+  },
+
+  /**
+   * 管理档案
+   */
+  handleFile() {
+    wx.navigateTo({
+      url: '/pages/handleFile/handleFile',
+    })
+  },
+  handleShowQRCode () {
+    this.setData({
+      qrcodeDialog: true
+    })
+  }
+})

+ 3 - 0
pages/myFile/myFile.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "我的档案"
+}

+ 46 - 0
pages/myFile/myFile.wxml

@@ -0,0 +1,46 @@
+<!--pages/allFile/allFile.wxml-->
+<view class="myfile-content">
+  <view class="main-content">
+    <view class="file-item ittflex-jcb" wx:for="{{fileList}}" wx:key="index">
+      <view class="f-left ittflex-jcs">
+        <view class="f-avatar"></view>
+        <view class="f-user">
+          <view class="fu-top ittflex-jcs">
+            <text class="fu-name">{{item.name}}</text>
+            <view class="suer-sex ittflex">
+              <image class="img" src="../../imaes/nan@2x.png"></image>
+            </view>
+          </view>
+          <view class="fu-bottom fu-date">{{item.date}}</view>
+        </view>
+        <view class="f-qrcode ittflex" bindtap="handleShowQRCode">
+          <image class="qrcode-item" src="../../imaes/erweima@2x.png"></image>
+        </view>
+      </view>
+      <view class="f-right ittflex">
+        <!-- <text class="report-text">已有2份报告</text> -->
+        <text class="report-text report-text-fail">还未产生报告</text>
+      </view>
+    </view>
+    <view class="actions ittflex-jcb">
+      <view class="handle-btn manage-btn ittflex" bindtap="handleFile">管理</view>
+      <view class="handle-btn itt-btn">新建档案</view>
+    </view>
+  </view>
+  <van-overlay show="{{ vanoverlayshow }}">
+      <view class="wrapper ittflex">
+        <view class="model">
+          <view class="top-title">建档人数已达上限</view>
+          <view class="bottom-action ittflex">
+            <view class="btn w-confirm-btn ittflex" bindtap="handleConfirm">确定</view>
+          </view>
+        </view>
+      </view>
+    </van-overlay>
+    <van-dialog use-slot closeOnClickOverlay showConfirmButton="{{false}}" show="{{ qrcodeDialog }}">
+    <view class="qrcode">
+      <image class="qrcode-src" src="../../imaes/erweima@2x.png" />
+    </view>
+  </van-dialog>
+</view>
+

+ 126 - 0
pages/myFile/myFile.wxss

@@ -0,0 +1,126 @@
+.myfile-content {
+  width: 100%;
+  height: 100%;
+  background-color: #f7f7f7;
+  overflow-y: auto;
+  position: relative;
+}
+.main-content {
+  width: 690rpx;
+  /* min-height: 100%; */
+  margin: 0 auto;
+  padding-bottom: 180rpx;
+}
+.file-item {
+  width: 100%;
+  height: 160rpx;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+  margin-top: 20rpx;
+}
+.f-left {
+  width: 70%;
+  height: 100%;
+}
+.f-avatar {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
+  background-color: var(--maincolor);
+  margin: 0 14rpx 0 20rpx;
+}
+.f-right {
+  width: 30%
+}
+.report-text {
+  padding: 20rpx;
+  font-size: 26rpx;
+  font-weight: 400;
+  color: var(--maincolor);
+}
+.report-text-fail {
+  color: #999999;
+}
+.fu-name {
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #333333;
+  margin-right: 12rpx;
+}
+.suer-sex {
+  width: 30rpx;
+  height: 30rpx;
+}
+.img {
+  width: 30rpx;
+  height: 30rpx;
+}
+.fu-date {
+  font-size: 26rpx;
+  font-weight: 400;
+  color: #999999;
+}
+.f-qrcode {
+  width: 80rpx;
+  height: 80rpx;
+  margin-left: 20rpx;
+}
+.qrcode-item {
+  width: 60rpx;
+  height: 60rpx;
+}
+.actions {
+  width: 690rpx;
+  height: 80rpx;
+  position: fixed;
+  bottom: 80rpx;
+  background-color: #f7f7f7;
+}
+.handle-btn {
+  width: 324rpx;
+  height: 80rpx;
+  border-radius: 10rpx;
+}
+.manage-btn {
+  border: 1rpx solid #333333;
+  font-size: 26rpx;
+  font-weight: 400;
+  color: #333333;
+}
+.wrapper {
+  height: 100%;
+}
+.model {
+  width: 540rpx;
+  height: 208rpx;
+  background: #FFFFFF;
+  border-radius: 24rpx;
+}
+.top-title {
+  font-size: 34rpx;
+  font-weight: bold;
+  color: #333333;
+  text-align: center;
+  height: 118rpx;
+  line-height: 118rpx;
+  border-bottom: 1rpx solid #DDDDDD;
+  box-sizing:border-box;
+}
+.btn {
+  width: 270rpx;
+  height: 90rpx;
+  box-sizing: border-box;
+  font-size: 34rpx;
+  color: #333333;
+}
+.w-confirm-btn {
+  font-weight: bold;
+}
+.qrcode {
+  width: 100%;
+  height: 620rpx;
+}
+.qrcode-src {
+  width: 100%;
+  height: 100%;
+}

+ 1 - 1
project.config.json

@@ -43,7 +43,7 @@
       "disablePlugins": [],
       "outputPath": ""
     },
-    "ignoreUploadUnusedFiles": true
+    "ignoreUploadUnusedFiles": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.19.4",