Преглед изворни кода

老人列表样式调整,
添加左滑刷脸激活按钮

nanMing пре 1 година
родитељ
комит
e16b02d17d
4 измењених фајлова са 1233 додато и 1185 уклоњено
  1. 244 247
      pages/index/index.vue
  2. 685 692
      pages/lr/info.vue
  3. 167 123
      pages/lr/list.vue
  4. 137 123
      pages/lr/shxxList.vue

+ 244 - 247
pages/index/index.vue

@@ -1,258 +1,255 @@
 <template>
-	<view class="container">
-		<view>
-			<text class="phoneText global-font">Hello,{{userInfo.nickName}}</text>
-		</view>
-
-		<view class="bannerBox">
-			<swiper class="swiper-box" :interval="interval" autoplay indicator-dots indicator-color="#C7C7C7"
-				indicator-active-color="#1aad19">
-				<swiper-item v-for="(item, index) in bannerList" :key="index">
-					<image src="../../static/images/banner2.png" class="imgItem" @click="bannerItemClick(item)"></image>
-				</swiper-item>
-			</swiper>
-		</view>
-
-		<view class="btnBox">
-			<image class="btnImg" src="../../static/images/lrzc.png" @click="btnClick(0)" /> 
-			<image class="btnImg img2" src="../../static/images/jsjz.png" @click="btnClick(1)" />
-		</view>
-
-		<view>
-			<uni-card class="daiban">
-				<uni-section type="line" title="待办事项">
-					<template v-slot:right>
-						<text @click="toList">更多 ></text>
-					</template>
-
-					<uni-list>
-						<uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
-							 :note="item.sqyy"
-							thumbSize="lg" :showArrow="false" >
-							<template v-slot:header>
-								<image :src="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" style="width: 10vw;height: 5vh;margin-right: 2vw;border-radius: 50%;"></image>
-							</template>
-							<template v-slot:footer>
-							<!-- 	<view v-if="item.lzzt == '0'"
-									style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/caogao.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-									<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
-									<text v-else>{{item.createTime.substring(0,8) }}</text>
-									<text>{{item.lrSpyj || '无'}}</text>
-								</view> -->
-								<view v-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'"
-									style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/daishenhe.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-									<text>{{item.sqsj.substring(0,8) }}</text>
-									<text>{{item.lrSpyj || '无'}}</text>
-								</view>
-							<!-- 	<view v-else-if="item.lzzt == '3'"
-									style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/tongguo.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-									<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
-									<text v-else>{{item.createTime.substring(0,8) }}</text>
-									<text>{{item.lrSpyj || '无'}}</text>
-								</view>
-								<view v-else-if="item.lzzt == '4'"
-									style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/jujue.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-									<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
-									<text v-else>{{item.createTime.substring(0,8) }}</text>
-									<text>{{item.lrSpyj || '无'}}</text>
-								</view> -->
-
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</uni-section>
-			</uni-card>
-		</view>
-
-
-
-	</view>
+  <view class="container">
+    <view>
+      <text class="phoneText global-font">Hello,{{userInfo.nickName}}</text>
+    </view>
+
+    <view class="bannerBox">
+      <swiper class="swiper-box" :interval="interval" autoplay indicator-dots indicator-color="#C7C7C7" indicator-active-color="#1aad19">
+        <swiper-item v-for="(item, index) in bannerList" :key="index">
+          <image src="../../static/images/banner2.png" class="imgItem" @click="bannerItemClick(item)"></image>
+        </swiper-item>
+      </swiper>
+    </view>
+
+    <view class="btnBox">
+      <image class="btnImg" src="../../static/images/lrzc.png" @click="btnClick(0)" />
+      <image class="btnImg img2" src="../../static/images/jsjz.png" @click="btnClick(1)" />
+    </view>
+
+    <view>
+      <uni-card class="daiban">
+        <uni-section type="line" title="待办事项">
+          <template v-slot:right>
+            <text @click="toList">更多 ></text>
+          </template>
+
+          <uni-list>
+            <uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm" :note="item.sqyy" thumbSize="lg" :showArrow="false">
+              <template v-slot:header>
+                <image :src="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head"
+                  style="width: 10vw;height: 5vh;margin-right: 2vw;border-radius: 50%;"></image>
+              </template>
+              <template v-slot:footer>
+                <view v-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'" class="item-right">
+                  <text>{{item.sqsj.substring(0,8) }}</text>
+                  <image class="item-img" src="@/static/images/daishenhe.png" mode=""></image>
+                  <!-- <text>{{item.lrSpyj || '无'}}</text> -->
+                </view>
+              </template>
+            </uni-list-item>
+          </uni-list>
+        </uni-section>
+      </uni-card>
+    </view>
+
+
+
+  </view>
 </template>
 
 <script>
-	import {
-		getToken,
-		getUser
-	} from '@/common/auth.js'
-	import {
-		decryptRowData_ECB,
-		decryptData_ECB
-	} from '@/common/sm4.js'
-	import {
-		updateKhjbxx,
-		infoKhjbxx,
-		ListKhjbxx,
-		ListKhShxx
-	} from '@/api/kh.js'
-	export default {
-		data() {
-			return {
-				interval: 3000,
-				bannerList: [{
-					image: '../../static/image/banner2.png'
+  import {
+    getToken,
+    getUser
+  } from '@/common/auth.js'
+  import {
+    decryptRowData_ECB,
+    decryptData_ECB
+  } from '@/common/sm4.js'
+  import {
+    updateKhjbxx,
+    infoKhjbxx,
+    ListKhjbxx,
+    ListKhShxx
+  } from '@/api/kh.js'
+  export default {
+    data() {
+      return {
+        interval: 3000,
+        bannerList: [{
+          image: '../../static/image/banner2.png'
 				}],
-				lrInfo: {},
-				// 人员信息
-				userInfo: {},
-				userType: '',
-				form: {
-					pageNum: 1,
-					pageSize: 4,
-					createUserId: ''
-				},
-				dataList: [],
-				total: 0,
-			}
-		},
-		onShow() {
-			// 老人07、员工04、监管06
-			this.userInfo = getUser()
-			this.userType = this.userInfo.userType
-			if (this.userType == '07') {
-				this.info(this.userInfo.userId)
-			} else {
-				this.form.createUserId = this.userInfo.userId
-			}
-			this.dataList = []
-			this.getDaiBanList()
-		},
-		methods: {
-			getDaiBanList() {
-				// ListKhjbxx(this.form).then(res => {
-				// 	if (res.code == 200) {
-				// 		this.total = res.total
-				// 		let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
-				// 			"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
-				// 			"yhzh", "khmc"
-				// 		], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
-				// 		if (list) this.dataList.push(...list)
-				// 	}
-				// })
-				
-				
-				ListKhShxx(this.form).then(res => {
-					if (res.code == 200) {
-						this.total = res.total
-						// let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
-						// 	"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
-						// 	"yhzh", "khmc"
-						// ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
-						let list = res.rows
-						this.dataList.push(...list)
-					}
-				})
-			},
-			toList() {
-				// 待办事项(他给老人注册、他给老人维护)  会员维护  结算记账(食堂)
-				// 登录不获取openid
-				uni.navigateTo({
-					url: '/pages/lr/shxxList'
-				})
-			},
-			info(id) {
-				infoKhjbxx(id).then(res => {
-					if (res.code == 200) {
-						this.lrInfo = decryptData_ECB(res.data, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
+        lrInfo: {},
+        // 人员信息
+        userInfo: {},
+        userType: '',
+        form: {
+          pageNum: 1,
+          pageSize: 4,
+          createUserId: ''
+        },
+        dataList: [],
+        total: 0,
+      }
+    },
+    onShow() {
+      // 老人07、员工04、监管06
+      this.userInfo = getUser()
+      this.userType = this.userInfo.userType
+      if (this.userType == '07') {
+        this.info(this.userInfo.userId)
+      } else {
+        this.form.createUserId = this.userInfo.userId
+      }
+      this.dataList = []
+      this.getDaiBanList()
+    },
+    methods: {
+      getDaiBanList() {
+        // ListKhjbxx(this.form).then(res => {
+        // 	if (res.code == 200) {
+        // 		this.total = res.total
+        // 		let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
+        // 			"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
+        // 			"yhzh", "khmc"
+        // 		], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
+        // 		if (list) this.dataList.push(...list)
+        // 	}
+        // })
+
+        ListKhShxx(this.form).then(res => {
+          if (res.code == 200) {
+            this.total = res.total
+            // let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
+            // 	"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
+            // 	"yhzh", "khmc"
+            // ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
+            let list = res.rows
+            this.dataList.push(...list)
+          }
+        })
+      },
+      toList() {
+        // 待办事项(他给老人注册、他给老人维护)  会员维护  结算记账(食堂)
+        // 登录不获取openid
+        uni.navigateTo({
+          url: '/pages/lr/shxxList'
+        })
+      },
+      info(id) {
+        infoKhjbxx(id).then(res => {
+          if (res.code == 200) {
+            this.lrInfo = decryptData_ECB(res.data, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
 							"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
 							"yhzh", "khmc"
 						], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5]);
-					}
-				})
-			},
-			btnClick(index) {
-				// if (index == 1 && this.userType != '04') {
-				if (index == 1) {
-					uni.showToast({
-						icon: 'none',
-						title: '该功能暂未开放'
-					})
-				} else {
-					// let baseUrl = '/pages/lr/base?info=' + JSON.stringify(this.lrInfo)
-					// let url = index == 0 ? baseUrl : '/pages/test/index'
-					// uni.navigateTo({
-					// 	url: url
-					// })
-					
-					
-					let baseUrl = '/pages/info/add-files'
-					uni.navigateTo({
-						url: baseUrl
-					})
-					
-				}
-
-				
-
-			}
-		}
-	}
+          }
+        })
+      },
+      btnClick(index) {
+        // if (index == 1 && this.userType != '04') {
+        if (index == 1) {
+          uni.showToast({
+            icon: 'none',
+            title: '该功能暂未开放'
+          })
+        } else {
+          // let baseUrl = '/pages/lr/base?info=' + JSON.stringify(this.lrInfo)
+          // let url = index == 0 ? baseUrl : '/pages/test/index'
+          // uni.navigateTo({
+          // 	url: url
+          // })
+
+
+          let baseUrl = '/pages/info/add-files'
+          uni.navigateTo({
+            url: baseUrl
+          })
+
+        }
+
+
+
+      }
+    }
+  }
 </script>
 
-<style scoped>
-	.container {
-		display: flex;
-		flex-direction: column;
-		height: 100vh;
-		width: 100vw;
-		background: linear-gradient(to bottom, #07bf61 0%, #fff 30%, #F8FCFF 100%);
-	}
-
-	/* 轮播图 */
-	.bannerBox {
-		width: 100vw;
-	}
-
-	.swiper-box {
-		height: 19vh;
-		margin: 7vh 2vh 20px;
-	}
-
-
-	.imgItem {
-		width: 100%;
-		height: 100%;
-	}
-
-	.swiper-box swiper-item {
-		border-radius: 15px;
-		overflow: hidden;
-	}
-
-	.phoneText {
-		position: absolute;
-		margin-top: 2vh;
-		margin-left: 5vw;
-		width: 80vw;
-		height: 2vh;
-		font-size: 14px;
-		color: white;
-		font-weight: 700;
-		line-height: 2vh;
-		text-align: left;
-		vertical-align: top;
-	}
-
-
-
-	/* 按钮 */
-	.btnBox {
-		/* width: 90%; */
-		display: flex;
-		margin: 1vh 19px;
-	}
-
-	.btnImg {
-		width: 49%;
-		height: 16vh;
-	}
-
-	.img2 {
-		margin-left: 2%;
-	}
-
-	.daiban {
-		position: fixed;
-		left: 4px;
-		right: 4px;
-	}
+<style lang="scss" scoped>
+  .item-right {
+    width: 60px;
+    display: flex;
+    flex-direction: column;
+    background-position: left;
+    background-size: 58px 58px;
+    background-repeat: no-repeat;
+    position: relative;
+    font-size: 14px;
+
+    .item-img {
+      position: absolute;
+      right: -5px;
+      bottom: -10px;
+      height: 40px;
+      width: 40px;
+    }
+  }
+
+  .container {
+    display: flex;
+    flex-direction: column;
+    height: 100vh;
+    width: 100vw;
+    background: linear-gradient(to bottom, #07bf61 0%, #fff 30%, #F8FCFF 100%);
+  }
+
+  /* 轮播图 */
+  .bannerBox {
+    width: 100vw;
+  }
+
+  .swiper-box {
+    height: 19vh;
+    margin: 7vh 2vh 20px;
+  }
+
+
+  .imgItem {
+    width: 100%;
+    height: 100%;
+  }
+
+  .swiper-box swiper-item {
+    border-radius: 15px;
+    overflow: hidden;
+  }
+
+  .phoneText {
+    position: absolute;
+    margin-top: 2vh;
+    margin-left: 5vw;
+    width: 80vw;
+    height: 2vh;
+    font-size: 14px;
+    color: white;
+    font-weight: 700;
+    line-height: 2vh;
+    text-align: left;
+    vertical-align: top;
+  }
+
+
+
+  /* 按钮 */
+  .btnBox {
+    /* width: 90%; */
+    display: flex;
+    margin: 1vh 19px;
+  }
+
+  .btnImg {
+    width: 49%;
+    height: 16vh;
+  }
+
+  .img2 {
+    margin-left: 2%;
+  }
+
+  .daiban {
+    position: fixed;
+    left: 4px;
+    right: 4px;
+  }
 </style>

Разлика између датотеке није приказан због своје велике величине
+ 685 - 692
pages/lr/info.vue


+ 167 - 123
pages/lr/list.vue

@@ -1,133 +1,177 @@
 <template>
-	<view>
-		<uni-card>
-			<uni-search-bar :radius="100" @confirm="search" placeholder="请输入姓名搜索" v-model="form.lrZjhm"></uni-search-bar>
-			<uni-list>
-				<uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
-					:to="'/pages/lr/info?id='+ item.id"
-					:thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.lrCydh" thumbSize="lg" :showArrow="false">
-					<template v-slot:footer>
-						<view v-if="item.lzzt == '0'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/caogao.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
-							<text v-else>{{item.createTime.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-						<view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/daishenhe.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
-							<text v-else>{{item.createTime.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-						<view v-else-if="item.lzzt == '3'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/tongguo.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
-							<text v-else>{{item.createTime.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-						<view v-else-if="item.lzzt == '4'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/jujue.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
-							<text v-else>{{item.createTime.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-					</template>
-				</uni-list-item>
-			</uni-list>
-			<uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
-		</uni-card>
-	</view>
+  <view>
+    <uni-card>
+      <uni-search-bar :radius="100" @confirm="search" placeholder="请输入姓名搜索" v-model="form.lrZjhm"></uni-search-bar>
+      <uni-list>
+        <uni-swipe-action>
+          <!-- 草稿和拒绝状态需要刷脸激活,其他状态不需要 -->
+          <uni-swipe-action-item v-for="(item,index) in dataList" :key="index" :disabled="item.lzzt !== '0' && item.lzzt !== '4'"
+            :right-options="options" @click="swipeClick(item.id)">
+            <uni-list-item :to="'/pages/lr/info?id='+ item.id" :title="item.lrXm"
+              :thumb="item.lrTx ? config.baseUrl+item.lrTx : config.baseUrl+config.head" :note="item.lrCydh" thumbSize="lg" :showArrow="false">
+              <template v-slot:footer>
+                <view v-if="item.lzzt == '0'" class="item-right">
+                  <text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
+                  <text v-else>{{item.createTime.substring(0,8) }}</text>
+                  <image class="item-img" src="@/static/images/caogao.png" mode=""></image>
+                  <!-- <text>{{item.lrSpyj || '无'}}</text> -->
+                </view>
+                <view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'" class="item-right">
+                  <text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
+                  <text v-else>{{item.createTime.substring(0,8) }}</text>
+                  <image class="item-img" src="@/static/images/daishenhe.png" mode=""></image>
+                </view>
+                <view v-else-if="item.lzzt == '3'" class="item-right">
+                  <text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
+                  <text v-else>{{item.createTime.substring(0,8) }}</text>
+                  <image class="item-img" src="@/static/images/tongguo.png" mode=""></image>
+                </view>
+                <view v-else-if="item.lzzt == '4'" class="item-right">
+                  <text v-if="item.jssj">{{item.jssj.substring(0,8) }}</text>
+                  <text v-else>{{item.createTime.substring(0,8) }}</text>
+                  <image class="item-img" src="@/static/images/jujue.png" mode=""></image>
+                </view>
+              </template>
+            </uni-list-item>
+          </uni-swipe-action-item>
+        </uni-swipe-action>
+
+      </uni-list>
+      <uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
+    </uni-card>
+  </view>
 </template>
 
 <script>
-	import {
-		getToken,
-		getUser
-	} from '@/common/auth.js'
-	import {
-		ListKhjbxx
-	} from '@/api/kh.js'
-	import {
-		decryptRowData_ECB
-	} from '@/common/sm4.js'
-	export default {
-		components: {},
-		data() {
-			return {
-				status: 'more',
-				form: {
-					pageNum: 1,
-					pageSize: 10,
-					// createUserId: ''
-				},
-				dataList: [],
-				total: 0,
-			}
-		},
-		mounted() {
-			this.userInfo = getUser()
-			if (this.userInfo.userType != '07') {
-				this.form.createUserId = this.userInfo.userId
-			}
-			this.getList()
-		},
-		created() {},
-		onLoad: function(options) {
-			// setTimeout(function() {
-			// 	console.log('start pulldown');
-			// }, 1000);
-			// uni.startPullDownRefresh();
-		},
-		onPullDownRefresh() {
-			this.dataList = []
-			this.form.pageNum = 1
-			this.form.pageSize = 10
-			this.getList()
-		},
-		onReachBottom() {
-			if (this.dataList.length < this.total) {
-				this.form.pageNum += 1
-				this.getList()
-			}
-		},
-		methods: {
-			search() {
-				this.dataList = []
-				this.form.pageNum = 1
-				this.form.pageSize = 10
-				this.getList()
-			},
-			clickLoadMore(e) {
-				this.status = 'loading'
-				if (this.dataList.length < this.total) {
-					this.form.pageNum += 1
-					this.getList()
-				} else {
-					this.status = 'no-more'
-				}
-			},
-			getList() {
-				ListKhjbxx(this.form).then(res => {
-					if (res.code == 200) {
-						this.total = res.total
-						let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
+  import {
+    getToken,
+    getUser
+  } from '@/common/auth.js'
+  import { ListKhjbxx, GetUrl } from '@/api/kh.js'
+  import {
+    decryptRowData_ECB
+  } from '@/common/sm4.js'
+
+  export default {
+    components: {},
+    data() {
+      return {
+        status: 'more',
+        form: {
+          pageNum: 1,
+          pageSize: 10,
+          // createUserId: ''
+        },
+        dataList: [],
+        options: [
+          {
+            text: '刷脸激活',
+            style: {
+              backgroundColor: '#28d87d'
+            }
+          }
+        ],
+        total: 0,
+      }
+    },
+    mounted() {
+      this.userInfo = getUser()
+      if (this.userInfo.userType != '07') {
+        this.form.createUserId = this.userInfo.userId
+      }
+      this.getList()
+    },
+    created() {},
+    onLoad: function(options) {
+      // setTimeout(function() {
+      // 	console.log('start pulldown');
+      // }, 1000);
+      // uni.startPullDownRefresh();
+    },
+    onPullDownRefresh() {
+      this.dataList = []
+      this.form.pageNum = 1
+      this.form.pageSize = 10
+      this.getList()
+    },
+    onReachBottom() {
+      if (this.dataList.length < this.total) {
+        this.form.pageNum += 1
+        this.getList()
+      }
+    },
+    methods: {
+      swipeClick(id) {
+        let param = {
+          id: id,
+          url: this.config.redirectUrl,
+        }
+        GetUrl(param).then(res => {
+          console.log("1111111", res);
+          if (res.code == 200) {
+            window.open(res.data.url, '_self');
+          } else {
+            toast('该功能暂未开放')
+            // uni.navigateBack()
+          }
+
+        })
+      },
+      search() {
+        this.dataList = []
+        this.form.pageNum = 1
+        this.form.pageSize = 10
+        this.getList()
+      },
+      clickLoadMore(e) {
+        this.status = 'loading'
+        if (this.dataList.length < this.total) {
+          this.form.pageNum += 1
+          this.getList()
+        } else {
+          this.status = 'no-more'
+        }
+      },
+      getList() {
+        ListKhjbxx(this.form).then(res => {
+          if (res.code == 200) {
+            this.total = res.total
+            let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
 							"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
 							"yhzh", "khmc"
 						], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
-						this.dataList.push(...list)
-						uni.stopPullDownRefresh();
-						if (this.dataList.length < this.total) {
-							this.status = 'more'
-						} else if (this.dataList.length == this.total) {
-							this.status = 'no-more'
-						}
-					}
-				})
-			}
-		},
-		watch: {},
-	}
+            this.dataList.push(...list)
+            uni.stopPullDownRefresh();
+            if (this.dataList.length < this.total) {
+              this.status = 'more'
+            } else if (this.dataList.length == this.total) {
+              this.status = 'no-more'
+            }
+          }
+        })
+      }
+    },
+    watch: {},
+  }
 </script>
 
-<style>
+<style lang="scss" scoped>
+  .item-right {
+    width: 60px;
+    display: flex;
+    flex-direction: column;
+    background-position: left;
+    background-size: 58px 58px;
+    background-repeat: no-repeat;
+    position: relative;
+    font-size: 14px;
+
+    .item-img {
+      position: absolute;
+      right: -5px;
+      bottom: -10px;
+      height: 40px;
+      width: 40px;
+    }
+  }
 </style>

+ 137 - 123
pages/lr/shxxList.vue

@@ -1,130 +1,144 @@
 <template>
-	<view>
-		<uni-card>
-			<uni-search-bar :radius="100" @confirm="search" placeholder="请输入身份证号或手机号搜索" v-model="form.lrZjhm"></uni-search-bar>
-			<uni-list>
-				<uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
-					:thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.sqyy"
-					thumbSize="lg" :showArrow="false">
-					<template v-slot:footer>
-						<view v-if="item.lzzt == '0'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/caogao.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text>{{item.sqsj.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-						<view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/daishenhe.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text>{{item.sqsj.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-						<view v-else-if="item.lzzt == '3'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/tongguo.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text>{{item.sqsj.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-						<view v-else-if="item.lzzt == '4'"
-							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/jujue.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
-							<text>{{item.sqsj.substring(0,8) }}</text>
-							<text>{{item.lrSpyj || '无'}}</text>
-						</view>
-					</template>
-				</uni-list-item>
-			</uni-list>
-			<uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
-		</uni-card>
-	</view>
+  <view>
+    <uni-card>
+      <uni-search-bar :radius="100" @confirm="search" placeholder="请输入身份证号或手机号搜索" v-model="form.lrZjhm"></uni-search-bar>
+      <uni-list>
+        <uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
+          :thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.sqyy" thumbSize="lg" :showArrow="false">
+          <template v-slot:footer>
+            <view v-if="item.lzzt == '0'" class="item-right">
+              <text>{{item.sqsj.substring(0,8) }}</text>
+              <image class="item-img" src="@/static/images/caogao.png" mode=""></image>
+              <!-- <text>{{item.lrSpyj || '无'}}</text> -->
+            </view>
+            <view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'" class="item-right">
+              <text>{{item.sqsj.substring(0,8) }}</text>
+              <image class="item-img" src="@/static/images/daishenhe.png" mode=""></image>
+            </view>
+            <view v-else-if="item.lzzt == '3'" class="item-right">
+              <text>{{item.sqsj.substring(0,8) }}</text>
+              <image class="item-img" src="@/static/images/tongguo.png" mode=""></image>
+            </view>
+            <view v-else-if="item.lzzt == '4'" class="item-right">
+              <text>{{item.sqsj.substring(0,8) }}</text>
+              <image class="item-img" src="@/static/images/jujue.png" mode=""></image>
+            </view>
+          </template>
+        </uni-list-item>
+      </uni-list>
+      <uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
+    </uni-card>
+  </view>
 </template>
 
 <script>
-	import {
-		getToken,
-		getUser
-	} from '@/common/auth.js'
-	import {
-		ListKhjbxx,
-		ListKhShxx
-	} from '@/api/kh.js'
-	import {
-		decryptRowData_ECB
-	} from '@/common/sm4.js'
-	export default {
-		components: {},
-		data() {
-			return {
-				status: 'more',
-				form: {
-					pageNum: 1,
-					pageSize: 10,
-					lrId: ''
-				},
-				dataList: [],
-				total: 0,
-			}
-		},
-		mounted() {
-			this.userInfo = getUser()
-			if (this.userInfo.userType == '07') {
-				this.info(this.userInfo.userId)
-			} else {
-				this.form.createUserId = this.userInfo.userId
-			}
-			this.getList()
-		},
-		created() {},
-		onLoad: function(options) {
-			this.form.lrId = options.lrId
-		},
-		onPullDownRefresh() {
-			this.dataList = []
-			this.form.pageNum = 1
-			this.form.pageSize = 10
-			this.getList()
-		},
-		onReachBottom() {
-			if (this.dataList.length < this.total) {
-				this.form.pageNum += 1
-				this.getList()
-			}
-		},
-		methods: {
-			search() {
-				this.dataList = []
-				this.form.pageNum = 1
-				this.form.pageSize = 10
-				this.getList()
-			},
-			clickLoadMore(e) {
-				this.status = 'loading'
-				if (this.dataList.length < this.total) {
-					this.form.pageNum += 1
-					this.getList()
-				} else {
-					this.status = 'no-more'
-				}
-			},
-			getList() {
-				ListKhShxx(this.form).then(res => {
-					if (res.code == 200) {
-						this.total = res.total
-						// let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
-						// 	"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
-						// 	"yhzh", "khmc"
-						// ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
-						let list = res.rows
-						this.dataList.push(...list)
-						uni.stopPullDownRefresh();
-						if (this.dataList.length < this.total) {
-							this.status = 'more'
-						} else if (this.dataList.length == this.total) {
-							this.status = 'no-more'
-						}
-					}
-				})
-			}
-		},
-		watch: {},
-	}
+  import {
+    getToken,
+    getUser
+  } from '@/common/auth.js'
+  import {
+    ListKhjbxx,
+    ListKhShxx
+  } from '@/api/kh.js'
+  import {
+    decryptRowData_ECB
+  } from '@/common/sm4.js'
+  export default {
+    components: {},
+    data() {
+      return {
+        status: 'more',
+        form: {
+          pageNum: 1,
+          pageSize: 10,
+          lrId: ''
+        },
+        dataList: [],
+        total: 0,
+      }
+    },
+    mounted() {
+      this.userInfo = getUser()
+      if (this.userInfo.userType == '07') {
+        this.info(this.userInfo.userId)
+      } else {
+        this.form.createUserId = this.userInfo.userId
+      }
+      this.getList()
+    },
+    created() {},
+    onLoad: function(options) {
+      this.form.lrId = options.lrId
+    },
+    onPullDownRefresh() {
+      this.dataList = []
+      this.form.pageNum = 1
+      this.form.pageSize = 10
+      this.getList()
+    },
+    onReachBottom() {
+      if (this.dataList.length < this.total) {
+        this.form.pageNum += 1
+        this.getList()
+      }
+    },
+    methods: {
+      search() {
+        this.dataList = []
+        this.form.pageNum = 1
+        this.form.pageSize = 10
+        this.getList()
+      },
+      clickLoadMore(e) {
+        this.status = 'loading'
+        if (this.dataList.length < this.total) {
+          this.form.pageNum += 1
+          this.getList()
+        } else {
+          this.status = 'no-more'
+        }
+      },
+      getList() {
+        ListKhShxx(this.form).then(res => {
+          if (res.code == 200) {
+            this.total = res.total
+            // let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
+            // 	"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
+            // 	"yhzh", "khmc"
+            // ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
+            let list = res.rows
+            this.dataList.push(...list)
+            uni.stopPullDownRefresh();
+            if (this.dataList.length < this.total) {
+              this.status = 'more'
+            } else if (this.dataList.length == this.total) {
+              this.status = 'no-more'
+            }
+          }
+        })
+      }
+    },
+    watch: {},
+  }
 </script>
 
-<style>
+<style lang="scss" scoped>
+  .item-right {
+    width: 60px;
+    display: flex;
+    flex-direction: column;
+    background-position: left;
+    background-size: 58px 58px;
+    background-repeat: no-repeat;
+    position: relative;
+    font-size: 14px;
+
+    .item-img {
+      position: absolute;
+      right: -5px;
+      bottom: -10px;
+      height: 40px;
+      width: 40px;
+    }
+  }
 </style>