Browse Source

Merge branch 'deploy_0106' of chelingzhu-web/zxyj-channe-mini-html into master

lilei 4 years ago
parent
commit
21858a67f9

+ 1 - 1
App.vue

@@ -1,6 +1,6 @@
 <script>
 	const uat_URL = 'https://lese.test.sxzxyj.net/gc-channel/' // 预发布
-	// const uat_URL = 'http://192.168.16.105:8303/gc-channel/' // 本地
+	// const uat_URL = 'http://192.168.16.104:8303/gc-channel/' // 本地
 	const pro_URL = 'https://lese.sxzxyj.net/gc-channel/'  // 生产
 	const buildType = 1 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url

+ 30 - 0
api/delivery.js

@@ -0,0 +1,30 @@
+import axios from '@/libs/axios.js';
+
+// 根据电子秤设备查找网点及兑换规则信息
+export const findBySrcDeviceNo = params => {
+  return axios.request({
+    url: `steelyard/findBySrcDeviceNo/${params.srcDeviceCode}`,
+    method: 'get'
+  })
+};
+
+// 投放记录列表查询
+export const getDeliveryLog = params => {
+	let url = `deliveryLog/query/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	return axios.request({
+		url: url,
+		method: 'post',
+		data: params
+	})
+};
+
+// 保存投放称重结果
+export const saveDelivery = params => {
+	return axios.request({
+	  url: `deliveryLog/delivery`,
+	  method: 'post',
+	  data: params
+	})
+}

+ 2 - 3
api/login.js

@@ -2,15 +2,14 @@ import axios from '@/libs/axios.js';
 
 export const login = params => {
   return axios.request({
-    url: `login`,
+    url: 'login',
     method: 'post',
 	data: params
   },true)
 };
 export const logout = params => {
   return axios.request({
-    url: `logout`,
-    data: params,
+    url:'logout',
     method: 'get'
   })
 };

+ 1 - 1
libs/axios.js

@@ -55,7 +55,7 @@ const request = (opts, hasToken) => {
 						}
 					}
 					else{
-						if(ret.status == 500){
+						if(ret.status == 500 || ret.status == 900){
 							if(opts.url.indexOf("store/validateStoreAndDevice")<0&&opts.url.indexOf("couponReceives/findUsableCoupon")<0){
 								uni.showToast({
 									icon:'none',

+ 56 - 15
pages.json

@@ -10,13 +10,21 @@
 			}
 		},
 		{
-			"path": "pages/index/index", // 首页
+		    "path" : "pages/index/index", // 首页
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "垃圾投放",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+			"path": "pages/hexiao/index",
 			"style": {
-				"navigationBarTitleText": "乐色助手",
+				"navigationBarTitleText": "交易记录",
 				"enablePullDownRefresh": false
 			}
 		},
-		
 		{
 			"path": "pages/userCenter/index",
 			"style": {
@@ -67,6 +75,33 @@
             }
             
         }
+        ,{
+            "path" : "pages/userAuth/userAuth",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "投放称重",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/tdRecord/tdRecord",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "投递记录",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/help/help",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "蓝牙使用帮助",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
@@ -85,17 +120,23 @@
 		"backgroundColor": "#ffffff",
 		"fontSize": "14px",
 		"list": [
-		{
-			"pagePath": "pages/index/index",
-			"iconPath": "static/tabbar/record.png",
-			"selectedIconPath": "static/tabbar/record-active.png",
-			"text": "交易记录"
-		},
-		{
-			"pagePath": "pages/userCenter/index",
-			"iconPath": "static/tabbar/user.png",
-			"selectedIconPath": "static/tabbar/user-active.png",
-			"text": "我的"
-		}]
+			{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabbar/dzicheng.png",
+				"selectedIconPath": "static/tabbar/dzicheng-active.png",
+				"text": "垃圾投放"
+			},
+			{
+				"pagePath": "pages/hexiao/index",
+				"iconPath": "static/tabbar/record.png",
+				"selectedIconPath": "static/tabbar/record-active.png",
+				"text": "交易记录"
+			},
+			{
+				"pagePath": "pages/userCenter/index",
+				"iconPath": "static/tabbar/user.png",
+				"selectedIconPath": "static/tabbar/user-active.png",
+				"text": "我的"
+			}]
 	}
 }

+ 45 - 0
pages/help/help.vue

@@ -0,0 +1,45 @@
+<template>
+	<view class="content">
+		<view class="title">使用步骤:</view>
+		<view>1.使用前先打开手机蓝牙开关(苹果手机还需打开系统设置->微信->蓝牙开关)。</view>
+		<view>2.点击投放称重按钮或绑定电子秤按钮。</view>
+		<view>3.开始搜索电子秤,搜索到设备后会显示出来。</view>
+		<view>4.点击开始连接设备。</view>
+		<view>5.等待设备连接成功后,点击投放称重按钮(苹果手机此时需要扫描电子秤的二维码),进入用户认证页面。</view>
+		<view>6.在用户认证页面输入手机号码并选择投递类型,点击下一步到称重页面。</view>
+		<view>7.此时可将物品放在电子秤上,等待数据稳定后,点击提交按钮确认数据无误后确定提交。</view>
+		<view>8.提交成功后,可在我的->投递记录中查看数据。</view>
+		<view class="title">注意事项:</view>
+		<view>1.部分手机需要开启定位服务(苹果手机还需检查系统设置->微信->蓝牙开关是否开启),蓝牙才能连接上。</view>
+		<view>2.如果出现长时间连接不上情况,请检查是否有其它手机已经连接电子秤,或重启电子秤后再点击按钮重新连接。</view>
+		<view>3.如果手机搜索不到电子秤,请检查微信版本是否最新版本,如不是请更新版本后再试。</view>
+		<view>4.如果以上方法都不行,请联系技术人员,请告知手机型号及系统版本,以便查找问题。</view>
+		<view>5.每次称重结束后,记得取下物品,避免重复称重。</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	padding: 50rpx;
+	background: #F8F8F8;
+	> view{
+		padding: 15rpx 0;
+	}
+	.title{
+		font-weight: 900;
+	}
+}
+</style>

+ 311 - 0
pages/hexiao/index.vue

@@ -0,0 +1,311 @@
+<template>
+	<view class="homePage-container">
+		<!-- 筛选弹框 -->
+		<search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
+		<view class="homePage-head">
+			<view class="head-con">
+				<text class="homePage-tit">交易记录</text>
+				<view class="total-con">
+					总计:
+					<text class="goleNum">{{ldTotal}}</text>
+					<image src="/static/ledou.png" class="ld-icon"></image>
+				</view>
+			</view>
+			<image class="filter-icon" src="@/static/filter.png" @tap="openScreen=true"></image>
+		</view>
+		<scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
+			<!-- 列表数据 -->
+			<view class="cell-item-con">
+				<view class="cell-item" v-for="(item, index) in listdata" :key="index">
+					<view class="cell-item-c">
+						<view class="cell-item-label">交易时间</view>
+						<view class="cell-item-main">{{item.createDate}}</view>
+					</view>
+					<view class="cell-item-c">
+						<view class="cell-item-label">支付账户</view>
+						<view class="cell-item-main">{{item.customerMobile}}</view>
+					</view>
+					<view class="cell-item-c">
+						<view class="cell-item-label">交易数量(个)</view>
+						<view :class="['cell-item-main', item.changeType=='ADD' ? 'red' : 'blue']">{{item.changeType=='ADD' ? '+' : item.changeType=='SUB' ? '-' : ''}}{{ item.changeNum }}</view>
+					</view>
+					<view class="cell-item-c">
+						<view class="cell-item-label">备注</view>
+						<view class="cell-item-main">{{item.remarks ? item.remarks : '--'}}</view>
+					</view>
+					<view class="cell-item-c handle-con">
+						<view class="cell-item-label">操作</view>
+						<view class="cell-item-main">
+							<u-button size="mini" v-if="item.changeType=='ADD' && item.cancelFlag==0" class="handle-btn" hover-class="none" :custom-style="customBtnStyle" @click="revokeFun(item)">撤销单据</u-button>
+							<text v-if="item.changeType=='ADD' && item.cancelFlag==1" style="color: #909399;">单据已撤销</text>
+							<text v-if="item.changeType=='SUB'" style="color: #909399;">扫码支付撤销</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
+			<view class="loadmore">
+				<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+			</view>
+		</scroll-view>
+		
+		<view class="footer-bar">
+			<u-button shape="circle" @click="openQuery" size="medium" type="warning">用户乐豆查询/核销</u-button>
+		</view>
+	</view>
+</template>
+<script>
+	import searchModal from './searchModal.vue'
+	import { getUserInfo } from '@/api/user.js'
+	import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
+	export default {
+		components: { searchModal },
+		data() {
+			return {
+				listdata: [],
+				pageNo: 1,  //  当前页码
+				pageSize: 10,  //  每页条数
+				total: 0,  //  数据总条数
+				noDataText: '暂无数据',  //  列表请求状态提示语
+				status: 'loadmore',  //  加载中状态
+				openScreen: false,  //  是否打开筛选
+				searchForm: {  //  查询条件
+					beginDate: '',  //  创建时间默认筛选近7天
+					endDate: '',  //  创建时间默认筛选近7天
+					customerMobile: ''  //  支付账户
+				},
+				customBtnStyle: {  //  撤销单据  自定义按钮样式
+					borderColor: '#2ab4e5',
+					backgroundColor: '#2ab4e5',
+					color: '#fff'
+				},
+				scrollTop: 0,  //  滚动条位置
+				ldTotal: 0  //  乐豆总计数
+			}
+		},
+		onShow() {
+			this.openScreen = false  //  关闭筛选框
+			this.refresh({})
+			this.getUserInfo()
+		},
+		methods:{
+			//  获取用户信息
+			getUserInfo(){
+				getUserInfo().then(res => {
+					if(res.status == 200){
+						this.$u.vuex('vuex_userData', res.data);
+					}
+				})
+			},
+			openQuery(){
+				uni.navigateTo({
+					url: "/pages/userCenter/leDouQuery"
+				})
+			},
+			//  总计
+			getGoldLogTotal(){
+				GoldLogTotal({
+					beginDate: this.searchForm.beginDate,
+					endDate: this.searchForm.endDate,
+					customerMobile: this.searchForm.customerMobile
+				}).then(res => {
+					if(res.status == 200){
+						this.ldTotal = res.data ? res.data.changeNum : 0
+					}else{
+						this.ldTotal = 0
+					}
+				})
+			},
+			// 获取查询参数 刷新列表
+			refresh(params){
+				this.searchForm = params
+				this.listdata = []
+				this.total = 0
+				this.searchHandle(1)
+				this.getGoldLogTotal()
+			},
+			//  撤销单据
+			revokeFun(row){
+				const _this = this
+				uni.showModal({
+				  title: '提示',
+				  content: '撤销单据后乐豆将全部退回给原支付账号,确认撤销吗?',
+				  success(res) {
+				    if (res.confirm) {
+				      GoldLogCancel({ id: row.id }).then(ret => {
+						  if(ret.status == 200){
+							  uni.showToast({ title: ret.message, icon: 'none' })
+							  _this.searchHandle(1)
+						  }
+					  })
+				    }
+				  }
+				})
+			},
+			// 搜索查询
+			searchHandle (pageNo) {
+				this.status = "loading"
+				pageNo ? this.pageNo = pageNo : null
+				getGoldLogList({
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					beginDate: this.searchForm.beginDate,
+					endDate: this.searchForm.endDate,
+					customerMobile: this.searchForm.customerMobile
+				}).then(res => {
+					if (res.status == 200) {
+						if(this.pageNo>1){
+							this.listdata = this.listdata.concat(res.data.list || [])
+						}else{
+							this.listdata = res.data.list || []
+							this.scrollTop = 0
+						}
+						this.total = res.data.count || 0
+						this.noDataText = '暂无数据'
+					} else {
+						this.noDataText = res.message
+						this.listdata = []
+						this.total = 0
+					}
+					this.status = "loadmore"
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.listdata.length < this.total){
+					this.pageNo += 1
+					this.searchHandle()
+				}else{
+					uni.showToast({ title: '已经到底了', icon: 'none' })
+					this.status = "nomore"
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.homePage-container {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		padding: 102rpx 0;
+		.footer-bar{
+			width: 100%;
+			display: flex;
+			align-items: center;
+			height: 102rpx;
+			justify-content: center;
+			padding: 0 10%;
+			position: fixed;
+			bottom: 0;
+			left: 0;
+		}
+		// 筛选菜单
+		.homePage-head{
+			font-size: 30rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 9;
+			padding: 26rpx 30rpx;
+			background-color: #fff;
+			box-shadow: 0rpx 0rpx 14rpx rgba(0,0,0,.05);
+			width: 100%;
+			border-top: 10rpx solid #f8f8f8;
+			.head-con{
+				flex-grow: 1;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.homePage-tit{
+					color: #040301;
+				}
+				.total-con{
+					color: #040301;
+					.goleNum{
+						color: #eb0000;
+						font-size: 30rpx;
+						font-weight: bold;
+					}
+					.ld-icon{
+						width: 30rpx;
+						height: 30rpx;
+						margin: 0 0 0 10rpx;
+						vertical-align: middle;
+					}
+				}
+			}
+			.filter-icon{
+				flex-shrink: 0;
+				width: 36rpx;
+				height: 36rpx;
+				padding-left: 20rpx;
+			}
+		}
+		//  列表
+		.scroll-con{
+			flex: 1;
+			// height: calc(100% - 40);
+			overflow: auto;
+		}
+		//  列表样式
+		.cell-item-con{
+			margin: 20rpx;
+			.cell-item{
+				background-color: #fff;
+				color: #606266;
+				padding: 0 30rpx;
+				margin-bottom: 20rpx;
+				border-radius: 16rpx;
+				font-size: 28rpx;
+				box-shadow: 3rpx 3rpx 5rpx #eee;
+				.cell-item-c{
+					display: flex;
+					justify-content: space-between;
+					padding: 18rpx 0;
+					border-bottom: 1rpx solid #f2f2f2;
+					.cell-item-label{
+						flex-shrink: 0;
+						width: 200rpx;
+						color: #303133;
+					}
+					.cell-item-main{
+						flex-grow: 1;
+						text-align: right;
+						.handle-btn{
+							border-color: #fcbd71!important;
+							background-color: #fcbd71!important;
+						}
+					}
+					.blue {
+						color: #1890FF;
+					}
+					.green {
+						color: #16b50e;
+					}
+					.red {
+						color: red;
+					}
+					&:last-child{
+						border: none;
+					}
+				}
+				.handle-con{
+					align-items: center;
+					// margin-top: 10rpx;
+					// padding-top: 18rpx;
+					// padding: 0;
+				}
+			}
+		}
+		
+	}
+</style>

+ 0 - 0
pages/index/searchModal.vue → pages/hexiao/searchModal.vue


+ 1189 - 0
pages/index/bg.less

@@ -0,0 +1,1189 @@
+<!-- 背景动画 -->
+		<view class="windmill">
+			<view class="windmill__sun"></view>
+			<view class="windmill__slice-4">
+				<view></view>
+			</view>
+			<view class="windmill__slice-3">
+				<view class="windmill__tree-left"></view>
+				<view class="windmill__tree-right"></view>
+			</view>
+			<view class="windmill__slice-2">
+				<view class="windmill__tree-right"></view>
+				<view class="windmill__tree-middle"></view>
+				<view class="windmill__tree-left"></view>
+				</view><view class="windmill__clouds">
+				<view class="windmill__cloud"></view>
+				<view class="windmill__cloud"></view>
+				<view class="windmill__cloud"></view>
+				<view class="windmill__cloud"></view>
+				<view class="windmill__cloud"></view>
+				<view class="windmill__cloud"></view>
+			</view>
+			<!-- <view class="windmill__windmill">
+				<view class="windmill__blades">
+					<view class="windmill__blade"></view>
+					<view class="windmill__blade"></view>
+					<view class="windmill__blade"></view>
+					<view class="windmill__blade"></view>
+				</view>
+			</view> -->
+			<view class="windmill__snowflakes">
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+				<view class="windmill__snowflake"></view>
+			</view>
+		</view>
+
+.windmill {
+	position: absolute;
+	width: 100%;
+	height: 100vh;
+	margin: auto;
+	overflow: hidden;
+	background: #649ECD;
+	left: 0;
+	top: 0;
+	z-index: 100;
+}
+
+.windmill__sun {
+	position: absolute;
+	height: 30px;
+	width: 30px;
+	top: 6%;
+	left: 20%;
+	border-radius: 100%;
+	background: #B6E2FF;
+	box-shadow: 0 0 300px 80px #B6E2FF, 0 0 200px 40px #B6E2FF, 0 0 50px 10px #B6E2FF;
+}
+
+.windmill__slice-4 {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 179px;
+	left: 105px;
+	border-left: 300px solid transparent;
+	border-right: 300px solid transparent;
+	border-bottom: 250px solid #649ECD;
+}
+
+.windmill__slice-4:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 55px;
+	left: -70px;
+	border-left: 180px solid transparent;
+	border-right: 180px solid transparent;
+	border-bottom: 195px solid #649ECD;
+}
+
+.windmill__slice-4:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 80px;
+	left: 60px;
+	border-left: 120px solid transparent;
+	border-right: 120px solid transparent;
+	border-bottom: 170px solid #649ECD;
+}
+
+.windmill__slice-4 div {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 95px;
+	left: -392px;
+	border-left: 170px solid transparent;
+	border-right: 170px solid transparent;
+	border-bottom: 155px solid #649ECD;
+}
+
+.windmill__slice-4 div:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 20px;
+	left: -115px;
+	border-left: 150px solid transparent;
+	border-right: 150px solid transparent;
+	border-bottom: 135px solid #649ECD;
+}
+
+.windmill__slice-4 div:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -38px;
+	left: -105px;
+	border-left: 220px solid transparent;
+	border-right: 220px solid transparent;
+	border-bottom: 195px solid #649ECD;
+}
+
+.windmill__slice-3 {
+	position: absolute;
+	width: 0;
+	height: 0;
+	bottom: 0;
+	left: -15px;
+	border-left: 320px solid transparent;
+	border-right: 320px solid transparent;
+	border-bottom: 150px solid #6096C4;
+}
+
+.windmill__slice-3:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 23px;
+	left: -78px;
+	border-left: 3px solid transparent;
+	border-right: 3px solid transparent;
+	border-bottom: 15px solid #6096C4;
+}
+
+.windmill__slice-3:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 31px;
+	left: 89px;
+	border-left: 3px solid transparent;
+	border-right: 3px solid transparent;
+	border-bottom: 15px solid #6096C4;
+}
+
+.windmill__slice-3 .windmill__tree-right {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 2px;
+	left: 33px;
+	border-left: 5px solid transparent;
+	border-right: 5px solid transparent;
+	border-bottom: 20px solid #6096C4;
+	opacity: .5;
+}
+
+.windmill__slice-3 .windmill__tree-right:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 15px;
+	left: 36px;
+	border-left: 7px solid transparent;
+	border-right: 7px solid transparent;
+	border-bottom: 25px solid #6096C4;
+}
+
+.windmill__slice-3 .windmill__tree-right:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -2px;
+	left: -19px;
+	border-left: 4px solid transparent;
+	border-right: 4px solid transparent;
+	border-bottom: 16px solid #6096C4;
+}
+
+.windmill__slice-3 .windmill__tree-left {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -4px;
+	left: -30px;
+	border-left: 5px solid transparent;
+	border-right: 5px solid transparent;
+	border-bottom: 20px solid #6096C4;
+}
+
+.windmill__slice-3 .windmill__tree-left:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 11px;
+	left: -12px;
+	border-left: 3px solid transparent;
+	border-right: 3px solid transparent;
+	border-bottom: 15px solid #6096C4;
+}
+
+.windmill__slice-3 .windmill__tree-left:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 19px;
+	left: -46px;
+	border-left: 4px solid transparent;
+	border-right: 4px solid transparent;
+	border-bottom: 20px solid #6096C4;
+}
+
+.windmill__slice-2 {
+	position: absolute;
+	width: 0;
+	height: 0;
+	bottom: 0;
+	left: 205px;
+	border-left: 250px solid transparent;
+	border-right: 250px solid transparent;
+	border-bottom: 110px solid #508BB3;
+}
+
+.windmill__slice-2:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 13px;
+	left: 46px;
+	border-left: 2px solid transparent;
+	border-right: 2px solid transparent;
+	border-bottom: 10px solid #508BB3;
+}
+
+.windmill__slice-2:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 10px;
+	left: 39px;
+	border-left: 3px solid transparent;
+	border-right: 3px solid transparent;
+	border-bottom: 12px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-right {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 6px;
+	left: -45px;
+	border-left: 4px solid transparent;
+	border-right: 4px solid transparent;
+	border-bottom: 17px #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-right:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -16px;
+	left: 13px;
+	border-left: 6px solid transparent;
+	border-right: 6px solid transparent;
+	border-bottom: 24px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-right:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -11px;
+	left: 26px;
+	border-left: 3px solid transparent;
+	border-right: 3px solid transparent;
+	border-bottom: 15px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-middle {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 26px;
+	left: -88px;
+	border-left: 4px solid transparent;
+	border-right: 4px solid transparent;
+	border-bottom: 15px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-middle:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -13px;
+	left: 7px;
+	border-left: 5px solid transparent;
+	border-right: 5px solid transparent;
+	border-bottom: 24px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-middle:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -18px;
+	left: 21px;
+	border-left: 5px solid transparent;
+	border-right: 5px solid transparent;
+	border-bottom: 28px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-left {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 41px;
+	left: -151px;
+	border-left: 7px solid transparent;
+	border-right: 7px solid transparent;
+	border-bottom: 30px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-left:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 2px;
+	left: 8px;
+	border-left: 5px solid transparent;
+	border-right: 5px solid transparent;
+	border-bottom: 20px solid #508BB3;
+}
+
+.windmill__slice-2 .windmill__tree-left:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -10px;
+	left: 19px;
+	border-left: 7px solid transparent;
+	border-right: 7px solid transparent;
+	border-bottom: 28px solid #508BB3;
+}
+
+.windmill__slice-1 {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 190px;
+	left: 0px;
+	border-right: 400px solid transparent;
+	border-bottom: 315px solid #14222D;
+}
+
+.windmill__slice-1:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 150px;
+	left: 390px;
+	border-left: 230px solid transparent;
+	border-right: 520px solid transparent;
+	border-bottom: 175px solid #14222D;
+}
+
+.windmill__slice-1:before {
+	content: '';
+	position: absolute;
+	width: 400px;
+	height: 80px;
+	top: 240px;
+	left: 180px;
+	border-radius: 100% 100% 0 0;
+	background: #14222D;
+}
+
+.windmill__slice-1 .windmill__tree-right {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 112px;
+	left: 747px;
+	border-left: 26px solid transparent;
+	border-right: 26px solid transparent;
+	border-bottom: 120px solid #14222D;
+}
+
+.windmill__slice-1 .windmill__tree-right:after {
+	content: '';
+	position: absolute;
+	width: 10px;
+	height: 20px;
+	top: 60px;
+	left: -49px;
+	background: #14222D;
+}
+
+.windmill__slice-1 .windmill__tree-right:before {
+	content: '';
+	position: absolute;
+	width: 50px;
+	height: 50px;
+	top: 14px;
+	left: -69px;
+	background: #14222D;
+	border-radius: 50% 0 50% 50%;
+	transform: rotate(-45deg);
+}
+
+.windmill__slice-1 .windmill__tree-left {
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -42px;
+	left: 40px;
+	border-left: 26px solid transparent;
+	border-right: 26px solid transparent;
+	border-bottom: 120px solid #14222D;
+}
+
+.windmill__slice-1 .windmill__tree-left:after {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 187px;
+	left: 461px;
+	border-left: 20px solid transparent;
+	border-right: 20px solid transparent;
+	border-bottom: 80px solid #14222D;
+}
+
+.windmill__slice-1 .windmill__tree-left:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: 88px;
+	left: 47px;
+	border-left: 16px solid transparent;
+	border-right: 16px solid transparent;
+	border-bottom: 75px solid #14222D;
+}
+
+.windmill__clouds {
+	position: absolute;
+}
+
+.windmill__cloud {
+	position: absolute;
+	width: 200px;
+	height: 40px;
+	border-radius: 40px;
+	background: #B6E2FF;
+	opacity: .3;
+}
+
+.windmill__cloud:before {
+	content: '';
+	position: absolute;
+	top: -20px;
+	left: 30px;
+	width: 100px;
+	height: 30px;
+	border-radius: 20px;
+	background: #B6E2FF;
+}
+
+.windmill__cloud:after {
+	content: '';
+	position: absolute;
+	top: -30px;
+	left: 70px;
+	width: 100px;
+	height: 50px;
+	border-radius: 50px;
+	background: #B6E2FF;
+}
+
+.windmill__cloud:nth-child(1) {
+	top: 140px;
+	left: 150px;
+	animation: cloud 58s linear infinite;
+	animation-delay: -20s;
+}
+
+.windmill__cloud:nth-child(2) {
+	top: 210px;
+	left: 30px;
+	transform: scale(0.4);
+	animation: cloud 60s linear infinite;
+	animation-delay: -12s;
+}
+
+.windmill__cloud:nth-child(3) {
+	top: 270px;
+	left: 650px;
+	transform: scale(0.3);
+	animation: cloud 62s linear infinite;
+	animation-delay: -10s;
+}
+
+.windmill__cloud:nth-child(4) {
+	top: 260px;
+	left: 360px;
+	transform: scale(0.8);
+	animation: cloud 64s linear infinite;
+	animation-delay: -30s;
+}
+
+.windmill__cloud:nth-child(5) {
+	top: 90px;
+	left: 500px;
+	transform: scale(0.5);
+	animation: cloud 56s linear infinite;
+	animation-delay: -25s;
+}
+
+.windmill__cloud:nth-child(6) {
+	top: 140px;
+	left: 710px;
+	transform: scale(0.7);
+	animation: cloud 60s linear infinite;
+	animation-delay: -50s;
+}
+
+.windmill__windmill {
+	position: absolute;
+	bottom: -30px;
+	left: 50px;
+	width: 75px;
+	border-style: solid;
+	border-color: #1e3b52 transparent;
+	border-width: 0 10px 135px;
+}
+
+.windmill__windmill:after {
+	content: '';
+	position: absolute;
+	width: 8px;
+	height: 8px;
+	top: 7px;
+	left: 25px;
+	transform: rotate(45deg);
+	background: #B6E2FF;
+}
+
+.windmill__windmill:before {
+	content: '';
+	position: absolute;
+	width: 0;
+	height: 0;
+	top: -48px;
+	left: -12px;
+	border-left: 40px solid transparent;
+	border-right: 40px solid transparent;
+	border-bottom: 50px solid #153650;
+}
+
+.windmill__blades {
+	position: absolute;
+	top: 6px;
+	left: 30px;
+	animation: blades 12s linear infinite;
+}
+
+.windmill__blade {
+	position: absolute;
+	height: 80px;
+	width: 24px;
+	border: 2px solid #14222D;
+}
+
+.windmill__blade:after {
+	content: '';
+	position: absolute;
+	top: 15px;
+	left: -2px;
+	height: 14px;
+	width: 24px;
+	border: 2px solid #14222D;
+}
+
+.windmill__blade:before {
+	content: '';
+	position: absolute;
+	top: 47px;
+	left: -2px;
+	height: 14px;
+	width: 24px;
+	border: 2px solid #14222D;
+}
+
+.windmill__blade:nth-child(1) {
+	top: -84px;
+	left: -13px;
+}
+
+.windmill__blade:nth-child(2) {
+	bottom: -84px;
+	left: -13px;
+}
+
+.windmill__blade:nth-child(3) {
+	transform: rotate(90deg);
+	top: -43px;
+	left: -56px;
+}
+
+.windmill__blade:nth-child(4) {
+	transform: rotate(90deg);
+	top: -43px;
+	left: 28px;
+}
+
+.windmill__snowflakes {
+	position: absolute;
+}
+
+.windmill__snowflake {
+	position: absolute;
+	background: #B6E2FF;
+	transform: rotate(45deg);
+	top: -200px;
+	animation: snowflake 30s linear infinite;
+	opacity: .5;
+}
+
+.windmill__snowflake:before {
+	content: '';
+	position: absolute;
+	background: #B6E2FF;
+}
+
+.windmill__snowflake:after {
+	content: '';
+	position: absolute;
+	background: #B6E2FF;
+}
+
+.windmill__snowflake:nth-child(1) {
+	height: 5px;
+	width: 5px;
+	left: 100px;
+	animation-delay: 20s;
+}
+
+.windmill__snowflake:nth-child(1):before {
+	height: 7px;
+	width: 7px;
+	left: -15px;
+	top: 137px;
+}
+
+.windmill__snowflake:nth-child(1):after {
+	height: 5px;
+	width: 5px;
+	left: 40px;
+	top: 320px;
+}
+
+.windmill__snowflake:nth-child(2) {
+	height: 5px;
+	width: 5px;
+	left: 200px;
+	animation-delay: 10s;
+}
+
+.windmill__snowflake:nth-child(2):before {
+	height: 5px;
+	width: 5px;
+	left: -157px;
+	top: 226px;
+}
+
+.windmill__snowflake:nth-child(2):after {
+	height: 6px;
+	width: 6px;
+	left: -51px;
+	top: 381px;
+}
+
+.windmill__snowflake:nth-child(3) {
+	height: 5px;
+	width: 5px;
+	left: 300px;
+}
+
+.windmill__snowflake:nth-child(3):before {
+	height: 6px;
+	width: 6px;
+	left: -155px;
+	top: 186px;
+}
+
+.windmill__snowflake:nth-child(3):after {
+	height: 5px;
+	width: 5px;
+	left: -57px;
+	top: 109px;
+}
+
+.windmill__snowflake:nth-child(4) {
+	height: 8px;
+	width: 8px;
+	left: 400px;
+	animation-delay: 14s;
+}
+
+.windmill__snowflake:nth-child(4):before {
+	height: 8px;
+	width: 8px;
+	left: -96px;
+	top: 215px;
+}
+
+.windmill__snowflake:nth-child(4):after {
+	height: 6px;
+	width: 6px;
+	left: -206px;
+	top: 71px;
+}
+
+.windmill__snowflake:nth-child(5) {
+	height: 7px;
+	width: 7px;
+	left: 500px;
+	animation-delay: -24s;
+}
+
+.windmill__snowflake:nth-child(5):before {
+	height: 7px;
+	width: 7px;
+	left: -244px;
+	top: 96px;
+}
+
+.windmill__snowflake:nth-child(5):after {
+	height: 7px;
+	width: 7px;
+	left: 100px;
+	top: 217px;
+}
+
+.windmill__snowflake:nth-child(6) {
+	height: 8px;
+	width: 8px;
+	left: 600px;
+}
+
+.windmill__snowflake:nth-child(6):before {
+	height: 8px;
+	width: 8px;
+	left: 110px;
+	top: 150px;
+}
+
+.windmill__snowflake:nth-child(6):after {
+	height: 8px;
+	width: 8px;
+	left: 30px;
+	top: 276px;
+}
+
+.windmill__snowflake:nth-child(7) {
+	height: 6px;
+	width: 6px;
+	left: 700px;
+	animation-delay: -22s;
+}
+
+.windmill__snowflake:nth-child(7):before {
+	height: 6px;
+	width: 6px;
+	left: 247px;
+	top: 220px;
+}
+
+.windmill__snowflake:nth-child(7):after {
+	height: 6px;
+	width: 6px;
+	left: 143px;
+	top: 306px;
+}
+
+.windmill__snowflake:nth-child(8) {
+	height: 6px;
+	width: 6px;
+	left: 800px;
+	animation-delay: -17s;
+}
+
+.windmill__snowflake:nth-child(8):before {
+	height: 6px;
+	width: 6px;
+	left: 10px;
+	top: 343px;
+}
+
+.windmill__snowflake:nth-child(8):after {
+	height: 8px;
+	width: 8px;
+	left: -105px;
+	top: 239px;
+}
+
+.windmill__snowflake:nth-child(9) {
+	height: 7px;
+	width: 7px;
+	left: 900px;
+}
+
+.windmill__snowflake:nth-child(9):before {
+	height: 8px;
+	width: 8px;
+	left: 133px;
+	top: 211px;
+}
+
+.windmill__snowflake:nth-child(9):after {
+	height: 5px;
+	width: 5px;
+	left: -65px;
+	top: 243px;
+}
+
+.windmill__snowflake:nth-child(10) {
+	height: 7px;
+	width: 7px;
+	left: 1000px;
+	animation-delay: 17s;
+}
+
+.windmill__snowflake:nth-child(10):before {
+	height: 7px;
+	width: 7px;
+	left: -119px;
+	top: 207px;
+}
+
+.windmill__snowflake:nth-child(10):after {
+	height: 7px;
+	width: 7px;
+	left: 166px;
+	top: 4px;
+}
+
+.windmill__snowflake:nth-child(11) {
+	height: 4px;
+	width: 4px;
+	left: 150px;
+	animation-delay: -22s;
+}
+
+.windmill__snowflake:nth-child(11):before {
+	height: 7px;
+	width: 7px;
+	left: -117px;
+	top: 259px;
+}
+
+.windmill__snowflake:nth-child(11):after {
+	height: 9px;
+	width: 9px;
+	left: 230px;
+	top: 81px;
+}
+
+.windmill__snowflake:nth-child(12) {
+	height: 7px;
+	width: 7px;
+	left: 250px;
+}
+
+.windmill__snowflake:nth-child(12):before {
+	height: 6px;
+	width: 6px;
+	left: -17px;
+	top: 226px;
+}
+
+.windmill__snowflake:nth-child(12):after {
+	height: 8px;
+	width: 8px;
+	left: 33px;
+	top: 64px;
+}
+
+.windmill__snowflake:nth-child(13) {
+	height: 5px;
+	width: 5px;
+	left: 350px;
+	animation-delay: 19s;
+}
+
+.windmill__snowflake:nth-child(13):before {
+	height: 7px;
+	width: 7px;
+	left: -138px;
+	top: 192px;
+}
+
+.windmill__snowflake:nth-child(13):after {
+	height: 7px;
+	width: 7px;
+	left: 241px;
+	top: 20px;
+}
+
+.windmill__snowflake:nth-child(14) {
+	height: 4px;
+	width: 4px;
+	left: 450px;
+	animation-delay: 15s;
+}
+
+.windmill__snowflake:nth-child(14):before {
+	height: 7px;
+	width: 7px;
+	left: -173px;
+	top: 222px;
+}
+
+.windmill__snowflake:nth-child(14):after {
+	height: 5px;
+	width: 5px;
+	left: 236px;
+	top: 27px;
+}
+
+.windmill__snowflake:nth-child(15) {
+	height: 7px;
+	width: 7px;
+	left: 550px;
+}
+
+.windmill__snowflake:nth-child(15):before {
+	height: 7px;
+	width: 7px;
+	left: -131px;
+	top: 241px;
+}
+
+.windmill__snowflake:nth-child(15):after {
+	height: 7px;
+	width: 7px;
+	left: 426px;
+	top: 128px;
+}
+
+.windmill__snowflake:nth-child(16) {
+	height: 5px;
+	width: 5px;
+	left: 650px;
+	animation-delay: 22s;
+}
+
+.windmill__snowflake:nth-child(16):before {
+	height: 7px;
+	width: 7px;
+	left: -154px;
+	top: 232px;
+}
+
+.windmill__snowflake:nth-child(16):after {
+	height: 6px;
+	width: 6px;
+	left: 126px;
+	top: 123px;
+}
+
+.windmill__snowflake:nth-child(17) {
+	height: 5px;
+	width: 5px;
+	left: 750px;
+	animation-delay: -8s;
+}
+
+.windmill__snowflake:nth-child(17):before {
+	height: 7px;
+	width: 7px;
+	left: -178px;
+	top: 284px;
+}
+
+.windmill__snowflake:nth-child(17):after {
+	height: 6px;
+	width: 6px;
+	left: 150px;
+	top: 208px;
+}
+
+.windmill__snowflake:nth-child(18) {
+	height: 5px;
+	width: 5px;
+	left: 850px;
+}
+
+.windmill__snowflake:nth-child(18):before {
+	height: 7px;
+	width: 7px;
+	left: -165px;
+	top: 247px;
+}
+
+.windmill__snowflake:nth-child(18):after {
+	height: 6px;
+	width: 6px;
+	left: 110px;
+	top: 216px;
+}
+
+.windmill__snowflake:nth-child(19) {
+	height: 5px;
+	width: 5px;
+	left: 950px;
+	animation-delay: -13s;
+}
+
+.windmill__snowflake:nth-child(19):before {
+	height: 7px;
+	width: 7px;
+	left: -14px;
+	top: 362px;
+}
+
+.windmill__snowflake:nth-child(19):after {
+	height: 6px;
+	width: 6px;
+	left: 226px;
+	top: 243px;
+}
+
+.windmill__snowflake:nth-child(20) {
+	height: 5px;
+	width: 5px;
+	left: 50px;
+	animation-delay: -9s;
+}
+
+.windmill__snowflake:nth-child(20):before {
+	height: 7px;
+	width: 7px;
+	left: -194px;
+	top: 255px;
+}
+
+.windmill__snowflake:nth-child(20):after {
+	height: 6px;
+	width: 6px;
+	left: 246px;
+	top: 233px;
+}
+
+.windmill__snowflake:nth-child(21) {
+	height: 7px;
+	width: 7px;
+	left: 600px;
+}
+
+.windmill__snowflake:nth-child(21):before {
+	height: 7px;
+	width: 7px;
+	left: -248px;
+	top: 218px;
+}
+
+.windmill__snowflake:nth-child(21):after {
+	height: 6px;
+	width: 6px;
+	left: 133px;
+	top: 101px;
+}
+
+.windmill__snowflake:nth-child(22) {
+	height: 5px;
+	width: 5px;
+	left: 800px;
+	animation-delay: -11s;
+}
+
+.windmill__snowflake:nth-child(22):before {
+	height: 7px;
+	width: 7px;
+	left: -44px;
+	top: 342px;
+}
+
+.windmill__snowflake:nth-child(22):after {
+	height: 6px;
+	width: 6px;
+	left: 126px;
+	top: 123px;
+}
+
+/* Анимации */
+@keyframes blades {
+	100% {
+		transform: rotate(-360deg);
+	}
+}
+
+@keyframes cloud {
+	0% {
+		transform: translateX(750px);
+	}
+
+	100% {
+		transform: translateX(-450px);
+	}
+}
+
+@keyframes snowflake {
+	0% {
+		transform: rotate(45deg) translateX(0) translateY(116px);
+	}
+
+	20% {
+		transform: rotate(45deg) translateX(-10px) translateY(232px);
+	}
+
+	40% {
+		transform: rotate(45deg) translateX(-50px) translateY(348px);
+	}
+
+	60% {
+		transform: rotate(45deg) translateX(-150px) translateY(464px);
+	}
+
+	80% {
+		transform: rotate(45deg) translateX(-100px) translateY(580px);
+	}
+
+	100% {
+		transform: rotate(45deg) translateX(-50px) translateY(700px);
+	}
+}

+ 575 - 257
pages/index/index.vue

@@ -1,94 +1,95 @@
 <template>
-	<view class="homePage-container">
-		<!-- 筛选弹框 -->
-		<search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
-		<view class="homePage-head">
-			<view class="head-con">
-				<text class="homePage-tit">交易记录</text>
-				<view class="total-con">
-					总计:
-					<text class="goleNum">{{ldTotal}}</text>
-					<image src="/static/ledou.png" class="ld-icon"></image>
+	<view class="bg">
+		<view class="bgimg">
+			<u-image width="622rpx" height="953rpx" src="/static/ldbg.png"></u-image>
+		</view>
+		<!-- 称重 -->
+		<view class="content">
+			<view @click="toHelp" class="tdrecord">使用帮助</view>
+			<view class="cz-box" @click="toWork">
+				<view :class="loading?'turn':''">
+					<u-image width="100rpx" height="100rpx" src="/static/chengzhong.png"></u-image>
+					<view class="tits">投放称重</view>
 				</view>
 			</view>
-			<image class="filter-icon" src="@/static/filter.png" @tap="openScreen=true"></image>
-		</view>
-		<scroll-view class="scroll-con" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
-			<!-- 列表数据 -->
-			<view class="cell-item-con">
-				<view class="cell-item" v-for="(item, index) in listdata" :key="index">
-					<view class="cell-item-c">
-						<view class="cell-item-label">交易时间</view>
-						<view class="cell-item-main">{{item.createDate}}</view>
-					</view>
-					<view class="cell-item-c">
-						<view class="cell-item-label">支付账户</view>
-						<view class="cell-item-main">{{item.customerMobile}}</view>
-					</view>
-					<view class="cell-item-c">
-						<view class="cell-item-label">交易数量(个)</view>
-						<view :class="['cell-item-main', item.changeType=='ADD' ? 'red' : 'blue']">{{item.changeType=='ADD' ? '+' : item.changeType=='SUB' ? '-' : ''}}{{ item.changeNum }}</view>
-					</view>
-					<view class="cell-item-c">
-						<view class="cell-item-label">备注</view>
-						<view class="cell-item-main">{{item.remarks ? item.remarks : '--'}}</view>
-					</view>
-					<view class="cell-item-c handle-con">
-						<view class="cell-item-label">操作</view>
-						<view class="cell-item-main">
-							<u-button size="mini" v-if="item.changeType=='ADD' && item.cancelFlag==0" class="handle-btn" hover-class="none" :custom-style="customBtnStyle" @click="revokeFun(item)">撤销单据</u-button>
-							<text v-if="item.changeType=='ADD' && item.cancelFlag==1" style="color: #909399;">单据已撤销</text>
-							<text v-if="item.changeType=='SUB'" style="color: #909399;">扫码支付撤销</text>
-						</view>
+			<view class="bindDev" @click="toInit">
+				{{statusStr}}
+			</view>
+			<view class="devList">
+				<view v-for="item in deviceList" :key="item.deviceId">
+					<view class="names">
+						<view>设备名称:{{item.name}}</view>
+						<view class="texts">MAC:{{item.deviceId}}</view>
 					</view>
+					<view class="btns" @click="connectBlue(item)" v-if="!connectStatus">点击连接</view>
+					<view class="btns" @click="closeBlue('连接已断开,请重新连接设备')" v-else>断开连接</view>
 				</view>
 			</view>
-			<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
-			<view class="loadmore">
-				<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
-			</view>
-		</scroll-view>
-		
-		<view class="footer-bar">
-			<u-button shape="circle" @click="openQuery" size="medium" type="primary">用户乐豆查询/核销</u-button>
 		</view>
 	</view>
 </template>
+
 <script>
-	import searchModal from './searchModal.vue'
+	import {getLookUpDatas} from '@/api/data.js'
 	import { getUserInfo } from '@/api/user.js'
-	import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
 	export default {
-		components: { searchModal },
 		data() {
 			return {
-				listdata: [],
-				pageNo: 1,  //  当前页码
-				pageSize: 10,  //  每页条数
-				total: 0,  //  数据总条数
-				noDataText: '暂无数据',  //  列表请求状态提示语
-				status: 'loadmore',  //  加载中状态
-				openScreen: false,  //  是否打开筛选
-				searchForm: {  //  查询条件
-					beginDate: '',  //  创建时间默认筛选近7天
-					endDate: '',  //  创建时间默认筛选近7天
-					customerMobile: ''  //  支付账户
-				},
-				customBtnStyle: {  //  撤销单据  自定义按钮样式
-					borderColor: '#2ab4e5',
-					backgroundColor: '#2ab4e5',
-					color: '#fff'
-				},
-				scrollTop: 0,  //  滚动条位置
-				ldTotal: 0  //  乐豆总计数
+				deviceList:[], // 设备列表
+				deviceId: null,
+				iosMac: null,
+				connectedDeviceId: '',
+				services: [],
+				readsId:'',
+				writeId:'',
+				notifyServicweId: '',
+				writeDatas: '',
+				balanceData: '',
+				hexstr: '',
+				statusStr: '绑定电子秤',
+				connectStatus: false ,// 设备连接状态
+				loading: false ,// 正在连接
 			}
 		},
+		onLoad() {
+			let _this = this
+			uni.$on('blueReConnect',function(){
+				uni.showLoading({
+					mask: true,
+					title: '正在重连中...'
+				})
+				_this.connectBlue()
+			})
+			
+			// 系统信息
+			const sysinfo = uni.getSystemInfoSync();
+			this.platform = sysinfo.platform
+			console.log(sysinfo,'sysinfo')
+		},
 		onShow() {
-			this.openScreen = false  //  关闭筛选框
-			this.refresh({})
+			// 获取订单状态数据字典
+			// this.getCodeList('RUBBISH_TYPE','vuex_rubbishType')
 			this.getUserInfo()
+			uni.getSetting({
+				success(res) {
+					if(!res.authSetting['scope.userLocation']){
+						uni.authorize({
+						    scope: 'scope.userLocation',
+						    success() {
+								console.log('scope.userLocation success')
+						    },
+							fail(res) {
+								console.log('scope.userLocation fail')
+							}
+						})
+					}
+				}
+			})
+		},
+		onUnload() {
+			uni.$off('blueReConnect')
 		},
-		methods:{
+		methods: {
 			//  获取用户信息
 			getUserInfo(){
 				getUserInfo().then(res => {
@@ -97,215 +98,532 @@
 					}
 				})
 			},
-			openQuery(){
+			// 获取数据字典
+			getCodeList(code,key) {
+				getLookUpDatas({
+					type: code
+				}).then(res => {
+					if (res.status == 200) {
+						this.$u.vuex(key, res.data)
+					}
+				})
+			},
+			// 使用帮助
+			toHelp(){
 				uni.navigateTo({
-					url: "/pages/userCenter/leDouQuery"
+					url: '/pages/help/help'
 				})
 			},
-			//  总计
-			getGoldLogTotal(){
-				GoldLogTotal({
-					beginDate: this.searchForm.beginDate,
-					endDate: this.searchForm.endDate,
-					customerMobile: this.searchForm.customerMobile
-				}).then(res => {
-					if(res.status == 200){
-						this.ldTotal = res.data ? res.data.changeNum : 0
+			// 去认证用户并开始称重
+			toWork(){
+				let _this = this
+				// 连接成功
+				if(this.connectStatus){
+					// ios 设备无法获取mac地址,请手动扫描电子秤的MAC条形码
+					if(this.platform == 'ios'&&this.iosMac==null){
+						uni.showModal({
+								title:'提示',
+								content: '苹果手机无法获取mac地址,请扫描电子秤的MAC二维码',
+								confirmText: '去扫描',
+								complete(e) {
+									if(e.confirm){
+										uni.scanCode({
+											success(res) {
+												console.log(res)
+												_this.iosMac = res.result
+												uni.navigateTo({
+													url: '/pages/userAuth/userAuth?macAddress=' + _this.iosMac + '&id=' + _this.deviceId
+												})
+											}
+										})
+									}
+								}
+							})
 					}else{
-						this.ldTotal = 0
+						// 安卓系统直接跳转
+						uni.navigateTo({
+							url: '/pages/userAuth/userAuth?macAddress=' + (this.platform == 'ios' ? _this.iosMac : _this.deviceId) + '&id=' + _this.deviceId
+						})
+					}
+				}else{
+					let hasDev = this.deviceList.length
+					if(!this.loading){
+						uni.showModal({
+							title:'提示',
+							content:hasDev ? '请先连接设备':'请先绑定设备',
+							confirmText: hasDev ? '确定':'去绑定',
+							complete(e) {
+								console.log(e)
+								if(e.confirm){
+									if(hasDev == 1){
+										_this.connectBlue(_this.deviceList[0])
+									}
+									if(hasDev == 0){
+										_this.toInit()
+									}
+								}
+							}
+						})
 					}
+					uni.getBluetoothDevices({
+					  success(res) {
+					    console.log(res,'getBluetoothDevices')
+					  }
+					})
+				}
+			},
+			// 初始化蓝牙
+			toInit(){
+				let _this = this
+				if(this.connectStatus || this.deviceList.length > 0 || this.loading){
+					return
+				}
+				uni.openBluetoothAdapter({
+				  success(res) {
+				    console.log(res, 'openBluetoothAdapter success')
+					_this.loading = true
+					setTimeout(()=>{
+						_this.toFindDev()
+					},500)
+				  },
+				  fail(err){
+					  console.log(err,'openBluetoothAdapter error')
+					  _this.loading = false
+					  uni.showModal({
+					  	title:'提示',
+					  	content: _this.platform == 'ios' ? '请开启蓝牙(如果已开启,还是无法使用,请打开系统设置->微信->蓝牙开关再试)' : '请开启手机蓝牙',
+					  	showCancel: false,
+					  	complete(e) {
+					  		console.log(e)
+					  		_this.statusStr = '请开启手机蓝牙'
+					  	}
+					  })
+				  }
 				})
+				_this.onBluetoothAdapterStateChange()
 			},
-			// 获取查询参数 刷新列表
-			refresh(params){
-				this.searchForm = params
-				this.listdata = []
-				this.total = 0
-				this.searchHandle(1)
-				this.getGoldLogTotal()
+			toFindDev(){
+				let _this = this
+				_this.statusStr = '开始搜寻附近的电子秤,请确认设备已开启'
+				uni.getBluetoothAdapterState({
+				  success(res) {
+				    console.log(res)
+					if(res.available){
+						// 开始搜寻附近的蓝牙外围设备
+						_this.startBluetoothDevicesDiscovery()
+					}else{
+						_this.statusStr = '请开启手机蓝牙'
+					}
+				  },
+				  fail(err) {
+					  console.log(err)
+				  }
+				})
 			},
-			//  撤销单据
-			revokeFun(row){
-				const _this = this
-				uni.showModal({
-				  title: '提示',
-				  content: '撤销单据后乐豆将全部退回给原支付账号,确认撤销吗?',
+			// 监听蓝牙状态
+			onBluetoothAdapterStateChange(){
+				let _this = this
+				// 监听蓝牙适配器状态变化事件
+				uni.onBluetoothAdapterStateChange(function (res) {
+				  console.log(res,'适配器变化')
+				  if(!res.available){
+					// 关闭连接
+					_this.loading = false
+					if(_this.connectedDeviceId){
+						_this.closeBlue('蓝牙已关闭,请开启手机蓝牙')
+					}else{
+						_this.statusStr = '蓝牙已关闭,请开启手机蓝牙'
+					}
+				  }else{
+					if(!res.discovering && !_this.loading){
+						_this.statusStr = _this.connectedDeviceId ? '蓝牙已启用,请连接设备':'蓝牙已启用,请绑定设备'
+					}
+				  }
+				})
+			},
+			startBluetoothDevicesDiscovery(){
+				let _this = this
+				uni.startBluetoothDevicesDiscovery({
+				  services: [],
 				  success(res) {
-				    if (res.confirm) {
-				      GoldLogCancel({ id: row.id }).then(ret => {
-						  if(ret.status == 200){
-							  uni.showToast({ title: ret.message, icon: 'none' })
-							  _this.searchHandle(1)
-						  }
-					  })
+				    console.log(res,'startBluetoothDevicesDiscovery')
+				  },
+				  fail(res){
+					  console.log(res,'startBluetoothDevicesDiscovery error')
+				  }
+				})
+				
+				// 监听寻找到新设备的事件
+				uni.onBluetoothDeviceFound(function (res) {
+				  console.log(res,'onBluetoothDeviceFound')
+				  let devices = res.devices.filter(item => item.name == 'FAYA')
+				  const hasDev = _this.deviceList.find(item => item.deviceId == res.devices[0].deviceId)
+				  console.log(devices,hasDev,'devices list')
+				  if(devices.length&&!hasDev){
+					  _this.statusStr = '已发现设备'
+					  _this.deviceList = _this.deviceList.concat(res.devices)
+					  _this.loading = false
+				  }
+				})
+			},
+			// 连接蓝牙设备
+			connectBlue(item){
+				if(this.connectStatus){
+					return
+				}
+				// ios 的deviceid 不是真正的mac 地址
+				if(item){
+					this.deviceId = item.deviceId
+				}
+				this.statusStr = '正在连接设备...'
+				this.loading = true
+				this.createBLEConnection()
+			},
+			// 断开蓝牙设备
+			closeBlue(msg){
+				let _this = this
+				uni.closeBLEConnection({
+				    deviceId: _this.connectedDeviceId,
+				    success: function(res) {
+						console.log(res,msg)
+						_this.connectedDeviceId = null
+						_this.statusStr = msg
+						_this.connectStatus = false
+				    },
+				    fail(res) {
+						console.log(res)
 				    }
+				})
+			},
+			// 开始连接指定设备
+			createBLEConnection(){
+				let _this = this
+				uni.createBLEConnection({
+				  // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
+				  deviceId:this.deviceId,
+				  success(res) {
+				    console.log(res)
+					_this.connectedDeviceId = _this.deviceId
+					// 获取连接设备的service服务
+					setTimeout(()=>{
+						_this.getBLEDeviceServices()
+					},1000)
+				  },
+				  fail(err) {
+					  console.log(err,'createBLEConnection error')
+					  _this.statusStr = '连接失败,请检查蓝牙是否开启后重试'
+					  _this.connectStatus = false
+					  _this.loading = false
+					  uni.$emit('blueConnectCallback',0)
+					  uni.hideLoading()
 				  }
 				})
 			},
-			// 搜索查询
-			searchHandle (pageNo) {
-				this.status = "loading"
-				pageNo ? this.pageNo = pageNo : null
-				getGoldLogList({
-					pageNo: this.pageNo,
-					pageSize: this.pageSize,
-					beginDate: this.searchForm.beginDate,
-					endDate: this.searchForm.endDate,
-					customerMobile: this.searchForm.customerMobile
-				}).then(res => {
-					if (res.status == 200) {
-						if(this.pageNo>1){
-							this.listdata = this.listdata.concat(res.data.list || [])
-						}else{
-							this.listdata = res.data.list || []
-							this.scrollTop = 0
+			// 获取连接设备的service服务
+			getBLEDeviceServices(){
+				let _this = this
+				uni.getBLEDeviceServices({
+				  // 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
+				  deviceId: _this.deviceId,
+				  success(res) {
+				    console.log('device services:', res.services)
+					// _this.statusStr = '获取连接设备的service服务成功'
+					_this.services = res.services
+					/* 获取连接设备的所有特征值 */
+					setTimeout(()=>{
+						_this.getBLEDeviceCharacteristics()
+					},500)
+					// 停止搜索
+					uni.stopBluetoothDevicesDiscovery({
+						success: function(res) {
+							console.log(res, '停止搜索')
+						}
+					})
+				  }
+				})
+			},
+			// 获取连接设备的所有特征值
+			getBLEDeviceCharacteristics(){
+				let _this = this
+				this.notifyServicweId = this.services[1].uuid
+				uni.getBLEDeviceCharacteristics({
+					deviceId: this.connectedDeviceId,
+					serviceId: this.notifyServicweId,
+					success: function(res) {
+						console.log(res)
+						// _this.statusStr = '获取连接设备的所有特征值成功'
+						for (let i = 0; i < res.characteristics.length; i++) {
+							let properties = res.characteristics[i].properties
+							// 读id
+							if(properties.notify&&!properties.read&&!properties.write){
+								_this.readsId = res.characteristics[i].uuid
+							}
+							// 写id
+							if(!properties.notify&&!properties.read&&properties.write){
+								_this.writeId = res.characteristics[i].uuid
+							}
+							console.log(_this.readsId,_this.writeId, '蓝牙特征值 ==========')
+							// 启用低功耗蓝牙设备特征值变化时的 notify 功能
+							setTimeout(()=>{
+								_this.notifyBLECharacteristicValueChange()
+							},500)
 						}
-						this.total = res.data.count || 0
-						this.noDataText = '暂无数据'
-					} else {
-						this.noDataText = res.message
-						this.listdata = []
-						this.total = 0
+					},
+					fail: function(res) {
+						console.log(res)
 					}
-					this.status = "loadmore"
 				})
 			},
-			// scroll-view到底部加载更多
-			onreachBottom() {
-				if(this.listdata.length < this.total){
-					this.pageNo += 1
-					this.searchHandle()
-				}else{
-					uni.showToast({ title: '已经到底了', icon: 'none' })
-					this.status = "nomore"
-				}
-			}
+			// 启用低功耗蓝牙设备特征值变化时的 notify 功能
+			 notifyBLECharacteristicValueChange() { 
+				let that = this;
+				uni.notifyBLECharacteristicValueChange({
+					state: true,
+					deviceId: that.connectedDeviceId,
+					serviceId: that.notifyServicweId,
+					characteristicId: that.readsId,
+					success(res) {
+						console.log(res,'notifyBLECharacteristicValueChange')
+						that.statusStr = '连接成功,请投放称重'
+						if(!that.connectStatus){
+							uni.$emit('blueConnectCallback',1)
+							that.connectStatus = true
+							uni.hideLoading()
+							that.toWork()
+						}
+						that.loading = false
+						
+						/*用来监听手机蓝牙设备的数据变化*/
+						uni.onBLECharacteristicValueChange(function(res) {
+							// console.log(res,'read data')
+							that.balanceData = that.buf2string(res.value)
+							that.$u.vuex('vuex_balanceData',that.balanceData)
+						})
+						// 该方法回调中可以用于处理连接意外断开等异常情况
+						uni.onBLEConnectionStateChange(function (res) {
+						  // console.log(`device ${res.deviceId} state has changed, connected: ${res.connected}`)
+						  if(!res.connected&&that.connectedDeviceId){
+							  uni.$emit('blueConnectClose',res)
+							  that.statusStr = '连接已断开,请检查蓝牙或电子秤是否开启'
+							  that.connectStatus = false
+							  that.loading = false
+						  }
+						})
+					},
+					fail(res) {
+						console.log(res, '启用低功耗蓝牙设备监听失败')
+						that.statusStr = '连接失败,请点击重试'
+						that.closeConnect()
+					}
+				})
+			},
+			/*转换成需要的格式*/
+		    buf2string(buffer) {
+				let arr = Array.prototype.map.call(new Uint8Array(buffer), x => x)
+				return arr.map((char, i) => {
+					return String.fromCharCode(char);
+				}).join('');
+			},
+			receiveData(buf) {
+					return this.hexCharCodeToStr(this.ab2hex(buf))
+			},
+			/*转成二进制*/
+			ab2hex (buffer) {
+			  let hexArr = Array.prototype.map.call(
+				  new Uint8Array(buffer), function (bit) {
+					  return ('00' + bit.toString(16)).slice(-2)
+				  }
+			  )
+			  return hexArr.join('')
+			},
+			/*转成可展会的文字*/
+			hexCharCodeToStr(hexCharCodeStr) {
+			  let trimedStr = hexCharCodeStr.trim();
+			  let rawStr = trimedStr.substr(0, 2).toLowerCase() === '0x' ? trimedStr.substr(2) : trimedStr;
+			  let len = rawStr.length;
+			  let curCharCode;
+			  let resultStr = [];
+			  for (let i = 0; i < len; i = i + 2) {
+				  curCharCode = parseInt(rawStr.substr(i, 2), 16);
+				  resultStr.push(String.fromCharCode(curCharCode));
+			  }
+			  return resultStr.join('');
+			},
+			// 发送数据
+			sendData(str) {
+			    let that = this;
+			    let dataBuffer = new ArrayBuffer(3)
+			    let dataView = new DataView(dataBuffer)
+			     
+				dataView.setUint8(0, 0x02)
+				dataView.setUint8(1, 0x41)
+				dataView.setUint8(2, 0x03)
+			    let dataHex = that.ab2hex(dataBuffer);
+			    this.writeDatas = that.hexCharCodeToStr(dataHex);
+			    uni.writeBLECharacteristicValue({
+			        deviceId: that.connectedDeviceId,
+			        serviceId: that.notifyServicweId,
+			        characteristicId: that.writeId,
+			        value: dataBuffer,
+			        success: function (res) {
+			            console.log('发送数据成功:' + that.writeDatas)
+			        },
+			        fail: function (res) {
+						console.log('发送失败:' + res)
+			        },
+			        complete: function (res) {
+			        }
+			    })
+			},
+			 // 断开设备连接
+			closeConnect() {
+				let that = this;
+			    if (that.connectedDeviceId) {
+			        uni.closeBLEConnection({
+			            deviceId: that.connectedDeviceId,
+			            success: function(res) {
+							console.log(res)
+							that.deviceId = null
+							that.iosMac = null
+							that.closeBluetoothAdapter()
+			            },
+			            fail(res) {
+							console.log(res)
+			            }
+			        })
+			    } else {
+			        that.closeBluetoothAdapter()
+			    }
+			},
+			// 关闭蓝牙模块
+			closeBluetoothAdapter() {
+				let that = this;
+			    uni.closeBluetoothAdapter({
+			        success: function(res) {
+						console.log(res,'closeBluetoothAdapter')
+						that.connectStatus = false
+						that.loading = false
+						that.balanceData = ''
+						that.deviceList = []
+						that.deviceId = null
+						that.iosMac = null
+			        },
+			        fail: function(err) {
+			        }
+			    })
+			},
+		},
+		onUnload() {
+			this.closeConnect()
+		},
+		onShareAppMessage() {
+		},
+		onShareTimeline() {
 		}
 	}
 </script>
 
-<style lang="scss">
-	page{
-		height: 100%;
+<style lang="less">
+	// @import url("bg.less");
+	.bg{
+		height: 100vh;
+		width: 100%;
+		position: relative;
+		background-color: #015a50;
 	}
-	.homePage-container {
+	.bgimg{
+		position: absolute;
+		z-index: 100;
 		width: 100%;
-		height: 100%;
+		height: 100vh;
+		top: 0;
+		left: 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.content{
 		display: flex;
+		align-items: center;
+		justify-content: center;
 		flex-direction: column;
-		padding: 102rpx 0;
-		.footer-bar{
-			width: 100%;
-			display: flex;
-			align-items: center;
-			height: 102rpx;
-			justify-content: center;
-			padding: 0 10%;
-			position: fixed;
-			bottom: 0;
-			left: 0;
-		}
-		// 筛选菜单
-		.homePage-head{
-			font-size: 30rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			position: fixed;
-			top: 0;
-			left: 0;
-			z-index: 9;
-			padding: 26rpx 30rpx;
-			background-color: #fff;
-			box-shadow: 0rpx 0rpx 14rpx rgba(0,0,0,.05);
-			width: 100%;
-			border-top: 10rpx solid #f8f8f8;
-			.head-con{
-				flex-grow: 1;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				.homePage-tit{
-					color: #040301;
-				}
-				.total-con{
-					color: #040301;
-					.goleNum{
-						color: #eb0000;
-						font-size: 30rpx;
-						font-weight: bold;
-					}
-					.ld-icon{
-						width: 30rpx;
-						height: 30rpx;
-						margin: 0 0 0 10rpx;
-						vertical-align: middle;
-					}
-				}
-			}
-			.filter-icon{
-				flex-shrink: 0;
-				width: 36rpx;
-				height: 36rpx;
-				padding-left: 20rpx;
-			}
-		}
-		//  列表
-		.scroll-con{
-			flex: 1;
-			// height: calc(100% - 40);
-			overflow: auto;
-		}
-		//  列表样式
-		.cell-item-con{
-			margin: 20rpx;
-			.cell-item{
-				background-color: #fff;
-				color: #606266;
-				padding: 0 30rpx;
-				margin-bottom: 20rpx;
-				border-radius: 16rpx;
-				font-size: 28rpx;
-				box-shadow: 3rpx 3rpx 5rpx #eee;
-				.cell-item-c{
-					display: flex;
-					justify-content: space-between;
-					padding: 18rpx 0;
-					border-bottom: 1rpx solid #f2f2f2;
-					.cell-item-label{
-						flex-shrink: 0;
-						width: 200rpx;
-						color: #303133;
-					}
-					.cell-item-main{
-						flex-grow: 1;
-						text-align: right;
-						.handle-btn{
-							border-color: #fcbd71!important;
-							background-color: #fcbd71!important;
-						}
-					}
-					.blue {
-						color: #1890FF;
-					}
-					.green {
-						color: #16b50e;
-					}
-					.red {
-						color: red;
-					}
-					&:last-child{
-						border: none;
-					}
-				}
-				.handle-con{
-					align-items: center;
-					// margin-top: 10rpx;
-					// padding-top: 18rpx;
-					// padding: 0;
-				}
-			}
-		}
-		
+		height: 100vh;
+		width: 100%;
+		position: absolute;
+		z-index: 1000;
+	}
+	.tdrecord{
+		position: absolute;
+		right: 0;
+		top: 5%;
+		background: rgba(255,255,255,0.6);
+		border-radius: 150rpx 0 0 150rpx;
+		box-shadow: 2rpx 2rpx 6rpx rgba(0,0,0,0.4);
+		padding: 15rpx 20rpx 15rpx 30rpx;
+		font-size: 26rpx;
+	}
+	.cz-box{
+		text-align: center;
+		background: #01c9b2;
+		border-radius: 300rpx;
+		box-shadow: 3rpx 3rpx 10rpx rgba(0,0,0,0.4);
+	}
+	.cz-box > view{
+		width: 250rpx;
+		height: 250rpx;
+		padding: 50rpx 50rpx 30rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+	}
+	.tits{
+		padding: 20rpx 0;
+		color: #FFFFFF;
+	}
+	.devList{
+		width: 80%;
+		padding:10rpx 30rpx;
+		max-height: 50vh;
+		overflow: auto;
+	}
+	.bindDev{
+		margin: 20rpx 0;
+		padding: 15rpx 40rpx;
+		background: rgba(19,22,30,0.8);
+		box-shadow: 2rpx 2rpx 8rpx rgba(0,0,0,0.2);
+		border-radius: 100rpx;
+		color: #FFFFFF;
+	}
+	.devList > view{
+		display: flex;
+		align-items: center;
+		color: #666666;
+		border-radius: 20rpx;
+		background: rgba(255,255,255,0.8);
+		box-shadow: 2rpx 2rpx 5rpx rgba(0,0,0,0.2);
+		margin-bottom: 20rpx;
+	}
+	.devList > view .names{
+		flex-grow: 1;
+		padding: 15rpx 40rpx;
+	}
+	.devList > view .texts{
+		font-size: 24rpx;
+	}
+	.devList > view .btns{
+		text-align: center;
+		padding: 15rpx 20rpx;
+		color: #ff5500;
+	}
+	.turn{
+		animation:turn 1s linear infinite;
+	}
+	@keyframes turn{
+	  0%{-webkit-transform:rotate(0deg);}
+	  25%{-webkit-transform:rotate(90deg);}
+	  50%{-webkit-transform:rotate(180deg);}
+	  75%{-webkit-transform:rotate(270deg);}
+	  100%{-webkit-transform:rotate(360deg);}
 	}
 </style>

+ 1 - 1
pages/ledouHexiao/hexiaoSuccess.vue

@@ -24,7 +24,7 @@
 		methods: {
 			toPage(){
 				uni.reLaunch({
-					url:'/pages/index/index'
+					url:'/pages/hexiao/index'
 				})
 			}
 		}

+ 197 - 0
pages/tdRecord/searchModal.vue

@@ -0,0 +1,197 @@
+<template>
+	<!-- 待办单查询 -->
+	<div class="modal-content">
+		<u-popup v-model="isShow" class="search-popup" mode="right" @close="handleClose" length="85%">
+			<view class="search-title">筛选</view>
+			<u-form class="form-content" :model="form" ref="uForm" label-width="150">
+				<u-form-item label="投递时间" prop="time" class="form-item">
+					<u-input clearable v-model="form.time" disabled placeholder="请选择投递时间区间" class="form-item-inp" @click="openPicker" />
+					<u-icon v-show="form.time.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearTime"></u-icon>
+				</u-form-item>
+				<u-form-item label="投递用户" prop="customerMobile" class="form-item"><u-input v-model="form.customerMobile" :maxlength="11" placeholder="请输入用户手机号" /></u-form-item>
+			</u-form>
+			<view class="uni-list-btns">
+				<u-button class="handle-btn search-btn" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+				<u-button class="handle-btn" size="medium" hover-class="none" @click="resetForm">重置</u-button>
+			</view>
+		</u-popup>
+		<!-- 时间选择器 -->
+		<w-picker
+			class="date-picker"
+			:visible.sync="showPicker"
+			mode="range"
+			:current="true"
+			fields="day"
+			@confirm="onSelected($event, 'range')"
+			@cancel="showPicker = false"
+			ref="date"
+		></w-picker>
+	</div>
+</template>
+
+<script>
+import wPicker from '@/components/w-picker/w-picker.vue'
+export default {
+	components: { wPicker },
+	props: {
+		visible: {
+			type: Boolean,
+			default: false
+		},
+		defaultParams: {  //  默认筛选条件
+			type: Object,
+			default: () => {
+				return {};
+			}
+		}
+	},
+	watch: {
+		visible(newValue, oldValue) {
+			if (newValue) {
+				this.isShow = newValue
+			}
+		},
+		isShow(newValue, oldValue) {
+			if (newValue) {
+			} else {
+				this.init()
+				this.$emit('close')
+			}
+		}
+	},
+	data() {
+		return {
+			customBtnStyle: {  //  自定义按钮样式
+				borderColor: '#2ab4e5',
+				backgroundColor: '#2ab4e5',
+				color: '#fff'
+			},
+			isShow: this.visible, // 显示隐藏
+			showPicker: false, // 是否显示时间弹窗
+			form: {
+				time: '', // 发起时间区间
+				customerMobile: '', // 门店名称
+			},
+			beginDate: null, // 开始时间
+			endDate: null // 结束时间
+		};
+	},
+	mounted() {
+		this.init()
+	},
+	methods: {
+		//  初始化数据
+		init(){
+			if(this.defaultParams.beginDate && this.defaultParams.endDate){
+				this.form.time = this.defaultParams.beginDate + ' ~ ' + this.defaultParams.endDate
+			}
+			this.beginDate = this.defaultParams.beginDate ? this.defaultParams.beginDate : ''
+			this.endDate = this.defaultParams.endDate ? this.defaultParams.endDate : ''
+			this.form.customerMobile = this.defaultParams.customerMobile ? this.defaultParams.customerMobile : ''
+		},
+		//  清空创建时间
+		clearTime(){
+			this.form.time = ''
+			this.beginDate = ''
+			this.endDate = ''
+		},
+		// 关闭弹窗
+		handleClose() {
+			this.isShow = false
+		},
+		// 打开时间选择弹框
+		openPicker() {
+			this.showPicker = true
+		},
+		// 确认日期选择
+		onSelected(v) {
+			this.form.time = v.value[0] + ' ~ ' + v.value[1]
+			this.beginDate = v.value[0]
+			this.endDate = v.value[1]
+			this.showPicker = false
+		},
+		// 查询
+		handleSearch() {
+			let params = {
+				beginDate: this.beginDate,
+				endDate: this.endDate,
+				customerMobile: this.form.customerMobile,
+			};
+			this.$emit('refresh', params)
+			this.isShow = false
+		},
+		// 重置
+		resetForm() {
+			this.$refs.uForm.resetFields()
+			this.$emit('refresh', {})
+			this.isShow = false
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.modal-content {
+	position: relative;
+}
+.search-popup {
+	.search-title {
+		text-align: center;
+		padding: 18upx 22upx;
+		color: #333;
+		border-bottom: 1px solid #eee;
+	}
+	.form-content {
+		display: block;
+		padding: 0 20upx;
+		box-sizing: content-box;
+		.status-item {
+			width: 30%;
+			text-align: center;
+			line-height: 60upx;
+			background-color: #F8F8F8;
+			color: #333;
+			border-radius: 6upx;
+			font-size: 24upx;
+			margin: 0 10upx;
+		}
+		.active {
+			background-color: #ffaa00;
+			color: #fff;
+		}
+		.form-item-inp{
+			display: inline-block;
+			width: 88%;
+			vertical-align: top;
+		}
+	}
+	.uni-list {
+		margin: 20upx;
+		.uni-list-cell {
+			display: flex;
+			align-items: center;
+			border-bottom: 1px dashed #eeeeee;
+			.uni-list-cell-db {
+				flex: 1;
+			}
+			.uni-input {
+				height: 2.5em;
+				line-height: 2.5em;
+			}
+		}
+	}
+	.uni-list-btns {
+		display: flex;
+		padding: 20upx;
+		margin-top: 200rpx;
+		.handle-btn {
+			font-size: 28upx;
+			margin: 0 30upx;
+			width: 100%;
+			flex: 1;
+		}
+	}
+}
+.date-picker {
+}
+</style>

+ 196 - 0
pages/tdRecord/tdRecord.vue

@@ -0,0 +1,196 @@
+<template>
+	<view class="content">
+		<!-- 筛选弹框 -->
+		<search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
+		<view class="page-head" @click="openScreen=true">
+			<text>筛选</text>
+			<image class="filter-icon" src="@/static/filter.png"></image>
+		</view>
+		<scroll-view class="list" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
+			<view class="list-box" v-for="item in listdata" :key="item.id">
+				<view class="list-time">{{item.deliveryTime}}</view>
+				<view class="list-cons">
+					<view class="list-imgs">
+						<u-image width="80rpx" height="80rpx" :src="`/static/${item.rubbishType}.png`"></u-image>
+						<view class="cls-names">{{item.rubbishTypeDictValue}}</view>
+					</view>
+					<view class="list-md">
+						<view>
+							<text class="red">{{item.rubbishWeight}}</text> 克
+						</view>
+						<view>{{item.customerMobile}}</view>
+					</view>
+					<view class="list-end">
+						<text class="red">{{item.goldNum}}</text>
+						<u-image width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+					</view>
+				</view>
+			</view>
+			<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
+			<view class="loadmore">
+				<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import searchModal from './searchModal.vue'
+	import {getDeliveryLog} from '@/api/delivery.js'
+	export default {
+		components: { searchModal },
+		data() {
+			return {
+				openScreen: false,
+				searchForm: {  //  查询条件
+					beginDate: '',  //  创建时间默认筛选近7天
+					endDate: '',  //  创建时间默认筛选近7天
+					customerMobile: ''  //  手机号
+				},
+				scrollTop:0,
+				pageNo: 1,  //  当前页码
+				pageSize: 10,  //  每页条数
+				total: 0,
+				listdata: [],
+				noDataText: '暂无数据',  //  列表请求状态提示语
+				status: 'loadmore',  //  加载中状态
+				rubbishType: []
+			}
+		},
+		onLoad() {
+			this.rubbishType = this.$store.state.vuex_rubbishType
+		},
+		onShow() {
+			this.openScreen = false  //  关闭筛选框
+			this.refresh({})
+		},
+		methods: {
+			// 获取查询参数 刷新列表
+			refresh(params){
+				this.searchForm = params
+				this.listdata = []
+				this.total = 0
+				this.searchHandle(1)
+			},
+			// 搜索查询
+			searchHandle (pageNo) {
+				this.status = "loading"
+				pageNo ? this.pageNo = pageNo : null
+				getDeliveryLog({
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					beginDate: this.searchForm.beginDate,
+					endDate: this.searchForm.endDate,
+					customerMobile: this.searchForm.customerMobile,
+					operatorNo : this.$store.state.vuex_userData.id
+				}).then(res => {
+					if (res.status == 200) {
+						if(this.pageNo>1){
+							this.listdata = this.listdata.concat(res.data.list || [])
+						}else{
+							this.listdata = res.data.list || []
+							this.scrollTop = 0
+						}
+						this.total = res.data.count || 0
+						this.noDataText = '暂无数据'
+					} else {
+						this.noDataText = res.message
+						this.listdata = []
+						this.total = 0
+					}
+					this.status = "loadmore"
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.listdata.length < this.total){
+					this.pageNo += 1
+					this.searchHandle()
+				}else{
+					uni.showToast({ title: '已经到底了', icon: 'none' })
+					this.status = "nomore"
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	width: 100%;
+    padding: 0 20rpx;
+	display: flex;
+	flex-direction: column;
+	height: 100vh;
+	.page-head{
+		padding: 20rpx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		.filter-icon{
+			flex-shrink: 0;
+			width: 36rpx;
+			height: 36rpx;
+			padding-left: 20rpx;
+		}
+	}
+	.list{
+		flex-grow: 1;
+		height: calc(100vh - 76rpx);
+		overflow: auto;
+	}
+	.list-box{
+		background: #FFFFFF;
+		border-radius: 10rpx;
+		padding: 20rpx;
+		box-shadow: 2rpx 2rpx 6rpx #eee;
+		margin-bottom: 20rpx;
+		.list-time{
+			font-size: 28rpx;
+			color: #666666;
+		}
+		.list-cons{
+			display: flex;
+			align-items: center;
+		}
+		.list-imgs{
+			padding:20rpx 0 0;
+			width: 180rpx;
+			display: flex;
+			align-items: center;
+			flex-direction: column;
+			justify-content: center;
+			.cls-names{
+				padding:10rpx 0;
+				font-size: 24rpx;
+			}
+		}
+		.list-md{
+			flex-grow: 1;
+			padding:0 20rpx;
+			> view{
+				padding:6rpx 0;
+				display: flex;
+				align-items: center;
+				font-size: 30rpx;
+			}
+		}
+		.list-end{
+			padding:20rpx;
+			font-size: 30rpx;
+			display: flex;
+			align-items: center;
+			.red{
+				font-size: 50rpx;
+				color: #ff5500;
+			}
+		}
+		.red{
+			font-weight: bold;
+			color: red;
+			font-size: 36rpx;
+			margin-right: 8rpx;
+		}
+	}
+}
+</style>

+ 455 - 0
pages/userAuth/userAuth.vue

@@ -0,0 +1,455 @@
+<template>
+	<view class="content">
+		<view class="steps">
+			<u-steps :list="numList" active-color="#00aaff" :current="current"></u-steps>
+		</view>
+		<view class="step1" v-if="current==0">
+			<view class="form-row form-flex">
+				<view><text class="red">*</text>网点名称</view>
+				<view>{{stationName}}</view>
+			</view>
+			<view class="form-row form-flex">
+				<view><text class="red">*</text>投递手机号</view>
+				<view>
+					<u-input v-model="formData.customerMobile" type="number" input-align="right" :custom-style="{color: '#666'}" :maxlength="11" placeholder="请输入手机号码"></u-input>
+				</view>
+			</view>
+			<view class="form-row">
+				<view><text class="red">*</text>投递类型</view>
+				<view class="form-grid">
+					<view v-for="(item,index) in rubbishtype" :key="item.id" @click="selRubbishType(item)" :class="formData.rubbishType==item.rubbishType?'active':''">
+						<view class="imgs">
+							<u-image :src="`/static/${item.rubbishType}.png`" width="70rpx" height="70rpx"></u-image>
+						</view>
+						<view class="info">
+							<view>{{item.rubbishTypeDictValue}}</view>
+							<view class="texts">{{item.rubbishWeight||0}}g/{{item.goleNum||0}}乐豆</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="step2" v-if="current==1">
+			<view class="form-row form-flex">
+				<view>投递手机号</view>
+				<view>{{formData.customerMobile}}</view>
+			</view>
+			<view class="form-row form-flex">
+				<view>用户乐豆余额</view>
+				<view class="flex-row"><text>{{currentGold}}</text><u-image width="30rpx" height="30rpx" src="/static/ledou.png"></u-image></view>
+			</view>
+			<view class="form-row form-flex">
+				<view>投递类型</view>
+				<view>
+					{{curRubbishType.rubbishTypeDictValue}}
+					<text class="des">({{curRubbishType.rubbishWeight||0}}g/{{curRubbishType.goleNum||0}}乐豆)</text>
+				</view>
+			</view>
+			<view class="form-row form-flex">
+				<view>投递重量</view>
+				<view><text class="nums">{{balanceData}}g</text></view>
+			</view>
+			<view class="form-row form-flex">
+				<view>可兑换乐豆数</view>
+				<view class="flex-row"><text class="nums">{{goldNum}}</text><u-image width="30rpx" height="30rpx" src="/static/ledou.png"></u-image></view>
+			</view>
+		</view>
+		<view class="buttons">
+			<view v-if="current==0" ><u-button shape="circle" :loading="loading" :custom-style="customStyle" @click="next()" type="primary">下一步</u-button></view>
+			<view v-if="current==1"><u-button shape="circle" @click="prev()">上一步</u-button></view>
+			<view v-if="current==1"><u-button shape="circle" @click="submit()" :custom-style="customStyle" type="primary">提交</u-button></view>
+		</view>
+		
+		<!-- 注意事项 -->
+		<view class="notes">
+			<view>注意事项:</view>
+			<view>
+				<view>1.请等待电子秤数据稳定后,再点击提交按钮</view>
+				<view>2.提交数据时,请仔细检查投递重量是否正确</view>
+				<view>3.下次称重时,记得将上次称重的物品取下,避免重复称重</view>
+			</view>
+		</view>
+		<!-- 提交确认弹框 -->
+		<u-modal v-model="showOk" :duration="50" show-cancel-button @confirm="confirm" @cancel="cancel">
+			<view class="slot-content">
+				<rich-text :nodes="modelContent"></rich-text>
+			</view>
+		</u-modal>
+	</view>
+</template>
+
+<script>
+	import {findBySrcDeviceNo, saveDelivery} from '@/api/delivery.js'
+	import {queryldByMobile} from '@/api/officialPartnerGoldLog.js'
+	export default {
+		data() {
+			return {
+				showOk: false,
+				modelContent:'',
+				customStyle: {
+					background: '#00aaff'
+				},
+				current: 0,
+				numList: [{
+					name: '用户认证'
+				}, {
+					name: '称重'
+				}],
+				stationName: '', // 网点名称
+				formData:{
+					customerMobile: '', // 客户电话
+					rubbishType: '', // 投递类型
+					rubbishWeight:0, // 投递重量
+					srcDeviceCode: '',
+					operatorNo: ''
+				},
+				currentGold: 0, // 用户乐豆余额
+				blueConnect: true,
+				deviceId: null,
+				id: null,
+				rubbishtype: [],
+				curRubbishType: null,
+				loading: false
+			}
+		},
+		computed: {
+			// 计算可兑换乐豆
+			goldNum(){
+				let ret = 0
+				if(this.curRubbishType&&this.curRubbishType.rubbishWeight){
+					if(this.balanceData >= this.curRubbishType.rubbishWeight){
+						ret = this.balanceData / this.curRubbishType.rubbishWeight * this.curRubbishType.goleNum
+					}else{
+						ret = 0
+					}
+				}
+				return Math.floor(ret)
+			},
+			// 称重结果
+			balanceData() {
+				this.cancel()
+				let _this = this
+				let data = _this.$store.state.vuex_balanceData
+				console.log(data)
+				
+				// 解析结果
+				let weight = data.split(',')[2]
+				let uit = '' // 单位
+				let fh = '' // 正负符号
+				// 去掉换行符
+				weight = weight.replace('\n','')
+				
+				// 符号位
+				if(weight.indexOf('+')>=0){
+					fh = '+'
+				}
+				if(weight.indexOf('-')>=0){
+					fh = '-'
+				}
+				
+				// 解析数字
+				if(weight.indexOf('kg')>0){
+					weight = weight.replace(/\+|-|[kg]/g,'')
+					console.log(weight,'kg-weight')
+					weight = Number(weight) * 1000
+					uit = 'kg'
+				}else if(weight.indexOf('lb')>0){
+					weight = weight.replace(/\+|-|[lb]/g,'')
+					console.log(weight,'lb-weight')
+					weight = Math.floor(Number(weight) * 453.59237)
+					uit = 'lb'
+				}else{
+					weight = weight.replace(/\+|-|g/g,'')
+					console.log(weight,'g-weight')
+					weight = Number(weight)
+					uit = 'g'
+				}
+				
+				// console.log(weight,uit,fh,'weight end')
+				_this.formData.rubbishWeight = weight
+				return fh + weight
+			}
+		},
+		onLoad(options) {
+			let _this = this
+			// 设备id,去掉冒号并转小写
+			this.deviceId = options.macAddress.toLowerCase()
+			this.deviceId = this.deviceId.replace(/:/g,'')
+			this.id = options.id
+			this.blueConnect = true
+			// 连接中断
+			uni.$on('blueConnectClose',function(){
+				_this.reConnect(1)
+			})
+			// 连接成功
+			uni.$on('blueConnectCallback',function(type){
+				if(type&&!this.blueConnect){
+					_this.blueConnect = true
+					uni.showModal({
+						title: '提示',
+						content: '重连成功,请重新称重',
+						showCancel: false,
+					})
+				}else{
+					_this.reConnect(0)
+				}
+			})
+			
+			// 通过设备id查询网点信息
+			this.findBySrcDeviceNo()
+		},
+		onUnload() {
+			uni.$off('blueConnectClose')
+			uni.$off('blueConnectCallback')
+		},
+		methods: {
+			// 获取网点信息
+			findBySrcDeviceNo(){
+				uni.showLoading({
+				    title: '加载中',
+					mask: true
+				});
+				findBySrcDeviceNo({srcDeviceCode:this.deviceId}).then(res=>{
+					console.log(res,'====')
+					if(res.status == 200){
+						this.rubbishtype = res.data.list
+						this.stationName = res.data.stationEntity.name
+						this.formData.srcDeviceCode = this.deviceId
+						this.formData.operatorNo = this.$store.state.vuex_userData.id
+					}else{
+						uni.showModal({
+							title: '提示',
+							content: res.message,
+							showCancel: false,
+							complete(e) {
+								 uni.navigateBack()
+							}
+						})
+					}
+					uni.hideLoading()
+				})
+			},
+			// 选择投递类型
+			selRubbishType(item){
+				this.formData.rubbishType = item.rubbishType
+				this.curRubbishType = item
+			},
+			// 重连蓝牙设备
+			reConnect(type){
+				console.log(type,'reConnect')
+				this.blueConnect = false
+				uni.showModal({
+					title: '提示',
+					content: type ? '蓝牙连接设备已断开,请重新绑定连接' : '请检测电子秤或手机蓝牙是否开启,确认后请重新连接',
+					showCancel: false,
+					confirmText: '重新连接',
+					complete(e){
+						if(e.confirm){
+							uni.$emit('blueReConnect')
+						}
+					}
+				})
+			},
+			next(){
+				if(this.formData.customerMobile == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入手机号码'
+					})
+					return
+				}
+				if(this.formData.customerMobile.length!=11){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入正确的手机号码'
+					})
+					return
+				}
+				if(this.formData.rubbishType == ''){
+					uni.showToast({
+						icon: 'none',
+						title: '请选择投递类型'
+					})
+					return
+				}
+				
+				this.loading = true
+				// 查询用户乐豆余额
+				queryldByMobile({mobile: this.formData.customerMobile}).then(res => {
+					if(res.status == 200){
+						this.current = this.current + 1
+						this.currentGold = res.data.currentGold
+					}
+					this.loading = false
+				})
+			},
+			// 上一步
+			prev(){
+				this.current = this.current - 1
+			},
+			// 提交保存结果
+			submit(){
+				let that = this
+				console.log(this.formData.rubbishWeight,'this.formData.rubbishWeight')
+				if(this.balanceData<=0){
+					uni.showToast({
+						icon: 'none',
+						title: '请投放物品!'
+					})
+					return
+				}
+				// 判断设备蓝牙是否仍然连接中
+				uni.getBluetoothDevices({
+				  success(res) {
+					console.log(res.devices,that.id)
+					let has = res.devices.find(item => item.deviceId == that.id)
+					console.log(has,that.blueConnect,'判断设备仍然连接中')
+					if(that.blueConnect && has){
+						that.showOk = true
+						that.modelContent = `
+						<div>
+							<div style="font-weight:bold;padding:10px 0;">投递重量:<span style="color:red">${that.balanceData}</span> g</div>
+							<div>提交后将为此用户计入本次投递数据,确认提交吗?</div>
+						</div>
+						`
+					}else{
+						that.reConnect(1)
+					}
+				  }
+				})
+			},
+			// 取消提交
+			cancel(){
+				this.showOk = false
+				this.modelContent = ''
+			},
+			// 确认提交
+			confirm(){
+				// console.log(this.formData,'formData')
+				saveDelivery(this.formData).then(res => {
+					if(res.status == 200){
+						setTimeout(()=>{
+							uni.navigateBack()
+						},500)
+					}
+					uni.showToast({
+						icon: 'none',
+						title: res.message
+					})
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	width: 100%;
+	padding: 20rpx;
+	background-color: #FFFFFF;
+	.steps{
+		padding: 40rpx 0;
+		border-bottom: 1px solid #f8f8f8;
+	}
+	.flex-row{
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+	}
+	.form-flex{
+		display: flex;
+		align-items: center;
+		> view{
+			&:first-child{
+				width: 30%;
+			}
+			&:last-child{
+				width: 70%;
+				text-align: right;
+				color: #666;
+			}
+		}
+	}
+	.form-row{
+		border-bottom: 1px solid #f8f8f8;
+		padding: 20rpx 15rpx;
+		position: relative;
+		.red{
+			color: red;
+			margin-right: 6rpx;
+		}
+		.des{
+			color: #666;
+			margin-left: 5rpx;
+			font-size: 24rpx;
+		}
+		.nums{
+			color: red;
+			margin-right: 5rpx;
+		}
+	}
+	.form-grid{
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		> view{
+			width: 46%;
+			border: 1px solid #eee;
+			margin: 10rpx;
+			padding: 10rpx 20rpx;
+			border-radius: 8rpx;
+			display: flex;
+			align-items: center;
+			background-color: #f8f8f8;
+			.texts{
+				font-size: 24rpx;
+				color: #999;
+				padding: 2rpx 0;
+			}
+			.imgs{
+				width: 90rpx;
+			}
+			.info{
+				flex-grow: 1;
+			}
+		}
+		.active{
+			border-color: #e69900;
+			background-color: #ffaa00;
+			color: #FFFFFF;
+			.texts{
+				color: #FFFFFF;
+			}
+		}
+	}
+	.buttons{
+		padding: 50rpx 5%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		>view{
+			width: 50%;
+			padding: 0 5%;
+		}
+	}
+	.notes{
+		margin-top: 50rpx;
+		border-radius: 10rpx;
+		color: #999;
+		> view{
+			&:first-child{
+				padding: 10rpx 20rpx;
+			}
+			&:last-child{
+				padding: 0 40rpx;
+				> view{
+					padding: 6rpx 20rpx;
+				}
+			}
+		}
+	}
+	.slot-content{
+		padding: 25rpx 50rpx 50rpx;
+	}
+}
+</style>

+ 7 - 4
pages/userCenter/index.vue

@@ -13,7 +13,10 @@
 		<!-- 列表 -->
 		<view class="user-list">
 			<u-cell-group>
-				<!-- <u-cell-item icon="search" icon-size="36" :icon-style="{color:'#ff0000'}" index="0" @click="toPage" title="用户乐豆查询及核销"></u-cell-item> -->
+				<u-cell-item icon="search" icon-size="36" :icon-style="{color:'#ff0000'}" index="0" @click="toPage" title="投递记录"></u-cell-item>
+			</u-cell-group>
+			<u-gap height="20" bg-color="#f8f8f8"></u-gap>
+			<u-cell-group>
 				<u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#55aa00'}" index="2" @click="toPage" title="关于我们"></u-cell-item>
 				<u-cell-item icon="file-text" icon-size="40" :icon-style="{color:'#ffaa00'}" index="1" @click="toPage" title="服务协议及隐私政策"></u-cell-item>
 				<u-cell-item icon="lock" icon-size="38" :icon-style="{color:'#00aaff'}" index="3" @click="toPage" title="修改密码"></u-cell-item>
@@ -49,7 +52,7 @@
 			// 打开对应的页面
 			toPage(index){
 				let pageUrl=[
-					'/pages/userCenter/leDouQuery',
+					'/pages/tdRecord/tdRecord',
 					'/pages/agreement/agreement?fromPage=usercenter',
 					'/pages/userCenter/aboutUs',
 					'/pages/userCenter/changePwd'
@@ -82,11 +85,11 @@
 				  content: '您确定要退出登录吗?',
 				  success(res) {
 				    if (res.confirm) {
-				      logout({}).then(res => {
+				      logout().then(res => {
+					   console.log(res,'logout')
 				       getApp().globalData.token = ''
 				       _this.$u.vuex('vuex_token','')
 					   // 关闭socket
-					   // _this.$store.commit("$closeWebsocket")
 				        uni.reLaunch({
 				        	url: '/pages/login/login'
 				        })

BIN
static/CLOTHES.png


BIN
static/GLASS.png


BIN
static/HARM.png


BIN
static/METAL.png


BIN
static/MET_PLA.png


BIN
static/PAPER.png


BIN
static/PLASTIC.png


BIN
static/RECYCLING.png


BIN
static/chengzhong.png


BIN
static/ldbg.png


BIN
static/tabbar/dzicheng-active.png


BIN
static/tabbar/dzicheng.png


BIN
static/tabbar/user-active.png


BIN
static/tabbar/user.png


+ 3 - 13
store/index.js

@@ -18,11 +18,7 @@ let saveStateKeys = [
 	'vuex_userData',
 	'vuex_payType',
 	'vuex_payStatus',
-	'vuex_storeId',
-	'vuex_bizId',
-	'vuex_orderNo',
-	'vuex_orderStatus',
-	'vuex_cartNums'
+	'vuex_balanceData'
 ];
 
 // 保存变量到本地存储中
@@ -102,18 +98,12 @@ const store = new Vuex.Store({
 		vuex_userData: lifeData.vuex_userData ? lifeData.vuex_userData : '',
 		vuex_payType: lifeData.vuex_payType ? lifeData.vuex_payType : [], // 支付方式数据字典
 		vuex_payStatus: lifeData.vuex_payStatus ? lifeData.vuex_payStatus : [], // 支付状态数据字典
-		// 订单信息
-		vuex_storeId: lifeData.vuex_storeId ? lifeData.vuex_storeId : '',// 网点id
-		vuex_bizId: lifeData.vuex_bizId ? lifeData.vuex_bizId : '',// 设备编号
-		vuex_orderNo: lifeData.vuex_orderNo ? lifeData.vuex_orderNo : '',// 订单编号
-		vuex_orderStatus: lifeData.vuex_orderStatus ? lifeData.vuex_orderStatus : '',// 订单状态
-		// 购物车及下单
-		vuex_cartList: [],
-		vuex_toOrderList: [],
+		vuex_balanceData: lifeData.vuex_balanceData ? lifeData.vuex_balanceData : '', // 称重重量
 		// 如果无需保存到本地永久存储,无需lifeData.xx方式
 		vuex_socket: null,
 		vuex_wsMessageData: '',
 		vuex_heartInterId: null,
+		vuex_rubbishType: [],
 		// 当前网络连接状态
 		vuex_netStatus: '',
 		// 客服电话