Commit c687a00f by fengzhaoyu

二维码改造

parent 889a11c2
......@@ -16,8 +16,7 @@
"pages/billDetails/billDetails",
"pages/noPermission/noPermission",
"pages/allowanceRecordList/allowanceRecordList",
"pages/reTry/reTry",
"pages/example/example"
"pages/reTry/reTry"
],
"window": {
"enableWK": "YES",
......
<view onTap="handleChangeTitle">更改</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
// 是否自动注入所有store.data状态和全局状态globalData
// useAll: true,
// 注入页面store
store: exampleStore,
data: {
// 声明使用全局共享状态,如果设置useAll为true,则不声明就可以使用
// 为了避免与页面store.data内属性命名冲突,globalStore.data整个赋给globalData,即globalData = globalStore.data
globalData: null,
// 按需声明状态属性,如果设置useAll为true,则自动注入store.data全部属性,无需一个个添加
// 设置的默认值无效,如需设置请在store.data内设置
title: null,
a: null,
// 定义store.data没有的属性,则默认为页面私有状态,只能使用默认的this.setData(obj)方式更新
privateData: '私有状态'
},
handleChangeTitle() {
this.store.data.title = '首页' + Math.floor(Math.random() * 1000)
this.update()
},
// goPage() {
// dd.navigateTo({ url: '/pages/hello/hello' })
// }
});
\ No newline at end of file
{}
\ No newline at end of file
......@@ -24,7 +24,7 @@
<view class="time">
2019-10-27 17:41
</view>
<view class="byVisitor">被访人:王梦琳</view>
<view class="byVisitor">被访人:{{item.byVisitorName}}</view>
</view>
</view>
<view class="button">
......
......@@ -51,8 +51,8 @@ Page({
let timestamp = (new Date()).getTime();
let url = aes.getAES(JSON.stringify({
"token": token,
"timestamp": timestamp
}))
"timestamp": timestamp,
})) + `userType:0`
let size = 272
let ecc = 2
let name = 'myQrcode'
......@@ -95,7 +95,7 @@ Page({
let url = aes.getAES(JSON.stringify({
"token": res.data.access_token,
"timestamp": timestamp,
}))
}))+ `userType:0`
let size = 272
let ecc = 2
let name = 'myQrcode'
......
......@@ -18,12 +18,12 @@
} */
.visitorInfoTitle {
padding: 0 30rpx;
padding: 0 32rpx;
height: 76rpx;
line-height: 76rpx;
background: #F7F7F7;
letter-spacing: -0.16rpx;
font-size: 32rpx;
font-size: 26rpx;
color: #7D8082;
}
......@@ -40,6 +40,7 @@
}
.visitorNameText {
letter-spacing: -0.82rpx;
font-size: 34rpx;
font-weight: 400;
width: 30%;
......@@ -48,7 +49,7 @@
}
.mandatory {
color: #F28C85;
color: #E60012;
margin-right: 6rpx;
}
......@@ -59,13 +60,14 @@
}
.visitorInput input {
letter-spacing: -0.48rpx;
display: inline-block;
vertical-align: middle;
outline: none;
width: 100%;
font-size: 32rpx;
font-size: 30rpx;
line-height: 112rpx;
color: #999;
color: #000;
}
.icontongxunlu {
......@@ -76,9 +78,9 @@
float: right;
}
.visitorPhoneInput {
/* .visitorPhoneInput {
margin-left: 100rpx;
}
} */
.visitorComNameText {
text-indent: 25rpx;
......@@ -99,35 +101,50 @@
.startTimeTop {
height: 44rpx;
opacity: 0.8;
line-height: 44rpx;
color: #343434;
font-size: 34rpx;
color: #000000;
letter-spacing: -0.72rpx;
font-size: 30rpx;
margin-top: 36rpx;
display: flex
}
.startTimeBottop {
margin-top: 10rpx;
color: #343434;
font-size: 34rpx;
color: #000;
opacity: 0.8;
}
.startTimeBottop view {
letter-spacing: -o.72rpx;
height: 44rpx;
line-height: 44rpx;
font-size: 30rpx;
}
.minute {
color: #000;
opacity: 1;
margin-top: 10rpx;
}
.fu {
width: 20%;
font-size: 60rpx;
height: 100%;
line-height: 216rpx;
color: #D4D4D4;
margin: 0 32rpx 0 144rpx;
margin: 0 30rpx 0 10rpx;
position: relative
}
.fu image {
width: 28rpx;
height: 96rpx;
position: absolute;
top: 50%;
left: 50%;
margin-top: -48rpx;
margin-left: -14rpx;
}
.purpose {
......@@ -140,6 +157,7 @@
}
.purposeTitle {
letter-spacing: -0.82rpx;
width: 30%;
height: 100%;
font-size: 34rpx;
......@@ -149,8 +167,10 @@
.purposeContent {
width: 50%;
color: rgb(153, 153, 153);
font-size: 32rpx;
color: #191F25;
opacity: 0.8rpx;
letter-spacing: -0.48rpx;
font-size: 30rpx;
margin-left: 86rpx;
overflow: hidden;
text-overflow: ellipsis;
......@@ -179,14 +199,15 @@
float: right;
height: 110rpx;
line-height: 110rpx;
font-size: 0.32rpx;
font-size: 0.30rpx;
border-bottom: 2rpx solid #EEEEEE
}
.inputPurpose input {
line-height: 110rpx;
vertical-align: middle;
color: #808386
color: #191F25;
opacity: 0.61;
}
.address {
......@@ -204,14 +225,16 @@
.address .addressTitle {
width: 30%;
font-size: 34rpx;
}
.addressDetail {
width: 482rpx;
height: auto;
line-height: 40rpx;
font-size: 32rpx;
color: #717579;
font-size: 30rpx;
color: #191F25;
opacity: 0.8;
margin-left: 20rpx;
display: -webkit-box;
overflow: hidden;
......@@ -236,7 +259,7 @@
padding: 0 32rpx;
height: 112rpx;
color: #1C92FF;
font-size: 34rpx;
font-size: 30rpx;
line-height: 112rpx;
display: flex;
}
......@@ -257,7 +280,7 @@
.isHidden {
height: 120rpx;
font-size: 34rpx;
font-size: 30rpx;
color: #3296FA;
line-height: 120rpx;
text-align: center;
......@@ -353,7 +376,7 @@
height: 100rpx;
width: 100rpx;
border-radius: 50%;
background: blue;
background: #3296FA;
margin-right: 10rpx;
color: white;
text-align: center;
......
......@@ -41,7 +41,9 @@
<view class="minute">{{startTimeHour}}</view>
</view>
</view>
<view class=" iconfont fu"></view>
<view class=" iconfont fu">
<image src="../../assets/time_out.png"/>
</view>
<view class="startTime">
<view class="startTimeTop">
结束
......
......@@ -26,6 +26,7 @@ create.Page({
visitorNode: '',// 访客的备注
isPackUp: false, // 是否收起更多消息
formValidation: false,
selectVisitors:''
},
onLoad(query) {
console.log('onload')
......@@ -63,6 +64,7 @@ create.Page({
isPackUp: false // 是否收起更多消息
})
_that.store.data.visitorName = '',
_that.store.data.visitorPhone = '',
_that.store.data.selectVisitors = false,
_that.store.data.visitorPeer = [],
_that.update()
......@@ -325,7 +327,7 @@ create.Page({
if (item.name == '' || item.name.length > 10) {
name = true
}
else if (item.phone == '' || !(/^[1][3,4,5,7,8][0-9]{9}$/).test(this.store.data.visitorPhone)) {
else if (item.phone == '' || !(/^[1][3,4,5,7,8][0-9]{9}$/).test(item.phone)) {
mobile = true
}
number.push(item.phone)
......@@ -499,9 +501,12 @@ create.Page({
onShow() {
// 页面显示
// 关闭遮照层
console.log('onShow')
console.log(this.store.data)
this.store.data.selectVisitors = false;
this.update()
this.setData({
selectVisitors: this.store.data.selectVisitors
})
},
onHide() {
// 页面隐藏
......
......@@ -11,10 +11,11 @@ Page({
todayVisit: 0,
arrivedVisit: 0
},
arriveStaus() {
arriveStaus(self) {
const _that = this
let data = {
type: 0
type: 0,
self: self,
}
$http.$http('/admin/visitor/getCurrentCount', data, 'post').then(res => {
_that.setData({
......@@ -32,6 +33,7 @@ Page({
currentPage: 1
})
this.visitorList(this.data.type)
this.arriveStaus(this.data.typ)
},
visitorList(type) {
const _that = this
......@@ -115,7 +117,7 @@ Page({
this.resetData()
dd.setNavigationBar({ title: '智能访客' });
this.visitorList(1)
this.arriveStaus()
this.arriveStaus(0)
},
onReady() {
......
......@@ -28,6 +28,109 @@
margin-right: 40rpx;
}
.name {
font-size: 38rpx;
color: #000000;
height: 56rpx;
display: flex;
line-height: 56rpx;
position: relative;
}
.iconzhankai {
height: 100%;
line-height: 56rpx;
font-size: 40rpx;
vertical-align: middle;
margin-left: 26rpx;
}
.hidden {
box-shadow: 0 0 6rpx 2rpx rgba(0, 0, 0, 0.1);
border-radius: 8rpx;
background: white;
width: 426rpx;
padding: 0rpx 32rpx 32rpx 32rpx;
position: absolute;
top:60rpx;
z-index: 9999;
}
.hidden>view {
display: flex;
margin-top: 40rpx;
height: 48rpx;
line-height: 48rpx;
font-size: 30rpx;
}
.visitorList1Name {
width: 120rpx;
margin-right: 10rpx;
overflow: hidden;
}
.visitorList1Phone {
width: 184rpx;
margin-right: 30rpx;
}
.hidden .iconxuanze {
font-size: 40rpx;
vertical-align: middle;
color: white;
}
.hidden .iconxuanze1 {
font-size: 40rpx;
vertical-align: middle;
color: #3296FA;
}
.phone {
margin-top: 20rpx;
height: 44rpx;
line-height: 44rpx;
display: flex;
}
.icondianhua, .iconqiye {
font-size: 40rpx;
margin-right: 20rpx;
color: #BFC1C2;
height: 44rpx;
line-height: 44rpx;
vertical-align: middle;
}
.hidden .select {
color: #3296FA;
}
.call {
width: 68rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
background: #E7F3FF;
border-radius: 15rpx;
margin-top: 8rpx;
font-size: 20rpx;
color: #2C99FF;
margin-left: 22rpx;
}
.company {
display: flex;
overflow: hidden;
line-height: 44rpx;
margin-top: 20rpx;
}
.companyDeatil {
width: 340rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
image {
position: absolute;
right: 0;
......@@ -68,7 +171,7 @@ image {
.visitorTimeTopTitle {
height: 44rpx;
vertical-align: middle;
font-size: 34rpx;
font-size: 30rpx;
color: #7D8082;
line-height: 44rpx;
}
......@@ -78,7 +181,7 @@ image {
margin-top: 14rpx;
margin-left: 52rpx;
color: #000000;
font-size: 34rpx;
font-size: 30rpx;
justify-content: space-between;
}
......@@ -86,6 +189,10 @@ image {
line-height: 44rpx;
}
.fu {
font-size: 34rpx;
}
.noOverdue, .overdue {
padding: 16rpx 32rpx;
box-shadow: inset 0 0 0 0 rgba(25, 31, 37, 0.12);
......@@ -128,3 +235,15 @@ image {
line-height: 96rpx;
font-size: 34rpx;
}
.participatorUserList {
display: flex;
margin-top: 14rpx;
margin-left: 52rpx;
color: #000000;
font-size: 30rpx;
}
.participatorUserListname {
margin-right: 20rpx;
}
\ No newline at end of file
<view class="visitorsDetail">
<view class="visitorTab">
<view class='visitorTabLeft'>{{byVisitorName.substring(byVisitorName.length-2)}}</view>
<view class="visitorTabRight"></view>
<view class='visitorTabLeft'>{{visitorName.substring(visitorName.length-2)}}</view>
<view class="visitorTabRight">
<view class="name">
<view>{{visitorName}}</view>
<text class="iconzhankai iconfont" onTap="isHidden" ></text>
<view class="hidden " a:if={{isHidden}} >
<view class="{{item.mobile == selectId?'select':''}}" a:for="{{visitorList1}}" a:for-index="index" a:for-item="item" onTap="selectVisitor" data-item='{{item}}'>
<view class="visitorList1Name">{{item.name}}</view>
<view class="visitorList1Phone">{{item.mobile}}</view>
<view class="iconxuanze iconfont {{item.mobile == selectId?'iconxuanze1':''}}"></view>
</view>
</view>
</view>
<view class="phone">
<view class="icondianhua iconfont "></view>
<view>{{phone}}</view>
<view class="call" onTap="call">拨打</view>
</view>
<view class="company" a:if='{{company}}'>
<view class="iconqiye iconfont"></view>
<view class="companyDeatil">{{company}}</view>
</view>
</view>
<image mode="scaleToFill" src="{{processStatus == 'invite'? '../../assets/await.png': (processStatus == 'cancel'? '../../assets/cancel.png':'../../assets/dao.png')}}"/>
</view>
<view class="otherInfo">
......@@ -50,13 +71,13 @@
{{visitAddress}}
</view>
</view>
<view class="visitorTime">
<view class="visitorTime" a:if='{{participatorUserList.length}}'>
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon iconzhouzhiren iconfont"></text>
<text class="visitorTimeTopTitle">周知人员</text>
</view>
<view class="visitorTimeBottom">
<text a:for='{{participatorUserList}}' a:for-index="index" a:for-item="item">{{item.username}}</text>
<view class="participatorUserList">
<view a:for='{{participatorUserList}}' a:for-index="index" a:for-item="item" class="participatorUserListname">{{item.username}}</view>
</view>
</view>
</view>
......
......@@ -16,7 +16,45 @@ Page({
processStatus: '', // 访客的状态
overdue: '',
visitAddress: '', //到访的地址
self:true
self: true,
visitorList1: '', // 同行人
selectId: '',
isHidden: false
},
isHidden() {
if (this.data.isHidden) {
this.setData({
isHidden: false
})
}
else {
this.setData({
isHidden: true
})
}
},
selectVisitor(event) {
console.log(event.target.dataset.item.mobile, 11111111)
if (this.data.isHidden) {
this.setData({
isHidden: false
})
}
else {
this.setData({
isHidden: true
})
}
this.setData({
visitorName: event.target.dataset.item.name,
phone: event.target.dataset.item.mobile,
selectId: event.target.dataset.item.mobile,
})
},
onLoad(event) {
console.log(JSON.parse(event.item), 'query')
......@@ -27,7 +65,8 @@ Page({
title: "访客详情",
});
this.setData({
self:query.self,
visitorList1: query.visitorList1,
self: query.self,
visitorName: query.visitorName,
company: query.companyName,
startTimeYear: `${query.startTime.yearMonthDate}`,
......@@ -42,7 +81,8 @@ Page({
phone: query.mobile,
processStatus: query.processStatus,
overdue: query.overdue,
recordId: query.recordId
recordId: query.recordId,
selectId: query.mobile
})
},
onReady() {
......@@ -73,7 +113,7 @@ Page({
reception() {
dd.confirm({
title: '确认已接待',
content:'确认已接待访客',
content: '确认已接待访客',
confirmButtonText: '确认',
cancelButtonText: '取消',
success: (result) => {
......
......@@ -37,7 +37,9 @@ var webSocket = {
dd.connectSocket({
url: `wss://mingpay-websocket.mingwork.com/v1/mingpaywebsocket?param=${dd.corpId}_${dd.getStorageSync({ key: 'userId' }).data}`,
// url: `ws://192.168.1.102:8400/v1/mingpaywebsocket?param=${dd.corpId}_${dd.getStorageSync({ key: 'userId' }).data}`,
data: {},
data: {
userType: 0
},
header:{
'content-type': 'application/json'
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment