Commit c687a00f by fengzhaoyu

二维码改造

parent 889a11c2
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
"pages/billDetails/billDetails", "pages/billDetails/billDetails",
"pages/noPermission/noPermission", "pages/noPermission/noPermission",
"pages/allowanceRecordList/allowanceRecordList", "pages/allowanceRecordList/allowanceRecordList",
"pages/reTry/reTry", "pages/reTry/reTry"
"pages/example/example"
], ],
"window": { "window": {
"enableWK": "YES", "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 @@ ...@@ -24,7 +24,7 @@
<view class="time"> <view class="time">
2019-10-27 17:41 2019-10-27 17:41
</view> </view>
<view class="byVisitor">被访人:王梦琳</view> <view class="byVisitor">被访人:{{item.byVisitorName}}</view>
</view> </view>
</view> </view>
<view class="button"> <view class="button">
......
...@@ -51,8 +51,8 @@ Page({ ...@@ -51,8 +51,8 @@ Page({
let timestamp = (new Date()).getTime(); let timestamp = (new Date()).getTime();
let url = aes.getAES(JSON.stringify({ let url = aes.getAES(JSON.stringify({
"token": token, "token": token,
"timestamp": timestamp "timestamp": timestamp,
})) })) + `userType:0`
let size = 272 let size = 272
let ecc = 2 let ecc = 2
let name = 'myQrcode' let name = 'myQrcode'
...@@ -95,7 +95,7 @@ Page({ ...@@ -95,7 +95,7 @@ Page({
let url = aes.getAES(JSON.stringify({ let url = aes.getAES(JSON.stringify({
"token": res.data.access_token, "token": res.data.access_token,
"timestamp": timestamp, "timestamp": timestamp,
})) }))+ `userType:0`
let size = 272 let size = 272
let ecc = 2 let ecc = 2
let name = 'myQrcode' let name = 'myQrcode'
......
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
} */ } */
.visitorInfoTitle { .visitorInfoTitle {
padding: 0 30rpx; padding: 0 32rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #F7F7F7; background: #F7F7F7;
letter-spacing: -0.16rpx; letter-spacing: -0.16rpx;
font-size: 32rpx; font-size: 26rpx;
color: #7D8082; color: #7D8082;
} }
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
} }
.visitorNameText { .visitorNameText {
letter-spacing: -0.82rpx;
font-size: 34rpx; font-size: 34rpx;
font-weight: 400; font-weight: 400;
width: 30%; width: 30%;
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
} }
.mandatory { .mandatory {
color: #F28C85; color: #E60012;
margin-right: 6rpx; margin-right: 6rpx;
} }
...@@ -59,13 +60,14 @@ ...@@ -59,13 +60,14 @@
} }
.visitorInput input { .visitorInput input {
letter-spacing: -0.48rpx;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
outline: none; outline: none;
width: 100%; width: 100%;
font-size: 32rpx; font-size: 30rpx;
line-height: 112rpx; line-height: 112rpx;
color: #999; color: #000;
} }
.icontongxunlu { .icontongxunlu {
...@@ -76,9 +78,9 @@ ...@@ -76,9 +78,9 @@
float: right; float: right;
} }
.visitorPhoneInput { /* .visitorPhoneInput {
margin-left: 100rpx; margin-left: 100rpx;
} } */
.visitorComNameText { .visitorComNameText {
text-indent: 25rpx; text-indent: 25rpx;
...@@ -99,35 +101,50 @@ ...@@ -99,35 +101,50 @@
.startTimeTop { .startTimeTop {
height: 44rpx; height: 44rpx;
opacity: 0.8;
line-height: 44rpx; line-height: 44rpx;
color: #343434; color: #000000;
font-size: 34rpx; letter-spacing: -0.72rpx;
font-size: 30rpx;
margin-top: 36rpx; margin-top: 36rpx;
display: flex display: flex
} }
.startTimeBottop { .startTimeBottop {
margin-top: 10rpx; margin-top: 10rpx;
color: #343434; color: #000;
font-size: 34rpx; opacity: 0.8;
} }
.startTimeBottop view { .startTimeBottop view {
letter-spacing: -o.72rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
font-size: 30rpx;
} }
.minute { .minute {
color: #000; opacity: 1;
margin-top: 10rpx; margin-top: 10rpx;
} }
.fu { .fu {
width: 20%;
font-size: 60rpx; font-size: 60rpx;
height: 100%; height: 100%;
line-height: 216rpx; line-height: 216rpx;
color: #D4D4D4; 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 { .purpose {
...@@ -140,6 +157,7 @@ ...@@ -140,6 +157,7 @@
} }
.purposeTitle { .purposeTitle {
letter-spacing: -0.82rpx;
width: 30%; width: 30%;
height: 100%; height: 100%;
font-size: 34rpx; font-size: 34rpx;
...@@ -149,8 +167,10 @@ ...@@ -149,8 +167,10 @@
.purposeContent { .purposeContent {
width: 50%; width: 50%;
color: rgb(153, 153, 153); color: #191F25;
font-size: 32rpx; opacity: 0.8rpx;
letter-spacing: -0.48rpx;
font-size: 30rpx;
margin-left: 86rpx; margin-left: 86rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -179,14 +199,15 @@ ...@@ -179,14 +199,15 @@
float: right; float: right;
height: 110rpx; height: 110rpx;
line-height: 110rpx; line-height: 110rpx;
font-size: 0.32rpx; font-size: 0.30rpx;
border-bottom: 2rpx solid #EEEEEE border-bottom: 2rpx solid #EEEEEE
} }
.inputPurpose input { .inputPurpose input {
line-height: 110rpx; line-height: 110rpx;
vertical-align: middle; vertical-align: middle;
color: #808386 color: #191F25;
opacity: 0.61;
} }
.address { .address {
...@@ -204,14 +225,16 @@ ...@@ -204,14 +225,16 @@
.address .addressTitle { .address .addressTitle {
width: 30%; width: 30%;
font-size: 34rpx;
} }
.addressDetail { .addressDetail {
width: 482rpx; width: 482rpx;
height: auto; height: auto;
line-height: 40rpx; line-height: 40rpx;
font-size: 32rpx; font-size: 30rpx;
color: #717579; color: #191F25;
opacity: 0.8;
margin-left: 20rpx; margin-left: 20rpx;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
...@@ -236,7 +259,7 @@ ...@@ -236,7 +259,7 @@
padding: 0 32rpx; padding: 0 32rpx;
height: 112rpx; height: 112rpx;
color: #1C92FF; color: #1C92FF;
font-size: 34rpx; font-size: 30rpx;
line-height: 112rpx; line-height: 112rpx;
display: flex; display: flex;
} }
...@@ -257,7 +280,7 @@ ...@@ -257,7 +280,7 @@
.isHidden { .isHidden {
height: 120rpx; height: 120rpx;
font-size: 34rpx; font-size: 30rpx;
color: #3296FA; color: #3296FA;
line-height: 120rpx; line-height: 120rpx;
text-align: center; text-align: center;
...@@ -353,7 +376,7 @@ ...@@ -353,7 +376,7 @@
height: 100rpx; height: 100rpx;
width: 100rpx; width: 100rpx;
border-radius: 50%; border-radius: 50%;
background: blue; background: #3296FA;
margin-right: 10rpx; margin-right: 10rpx;
color: white; color: white;
text-align: center; text-align: center;
......
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
<view class="minute">{{startTimeHour}}</view> <view class="minute">{{startTimeHour}}</view>
</view> </view>
</view> </view>
<view class=" iconfont fu"></view> <view class=" iconfont fu">
<image src="../../assets/time_out.png"/>
</view>
<view class="startTime"> <view class="startTime">
<view class="startTimeTop"> <view class="startTimeTop">
结束 结束
......
...@@ -26,6 +26,7 @@ create.Page({ ...@@ -26,6 +26,7 @@ create.Page({
visitorNode: '',// 访客的备注 visitorNode: '',// 访客的备注
isPackUp: false, // 是否收起更多消息 isPackUp: false, // 是否收起更多消息
formValidation: false, formValidation: false,
selectVisitors:''
}, },
onLoad(query) { onLoad(query) {
console.log('onload') console.log('onload')
...@@ -63,6 +64,7 @@ create.Page({ ...@@ -63,6 +64,7 @@ create.Page({
isPackUp: false // 是否收起更多消息 isPackUp: false // 是否收起更多消息
}) })
_that.store.data.visitorName = '', _that.store.data.visitorName = '',
_that.store.data.visitorPhone = '',
_that.store.data.selectVisitors = false, _that.store.data.selectVisitors = false,
_that.store.data.visitorPeer = [], _that.store.data.visitorPeer = [],
_that.update() _that.update()
...@@ -325,7 +327,7 @@ create.Page({ ...@@ -325,7 +327,7 @@ create.Page({
if (item.name == '' || item.name.length > 10) { if (item.name == '' || item.name.length > 10) {
name = true 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 mobile = true
} }
number.push(item.phone) number.push(item.phone)
...@@ -499,9 +501,12 @@ create.Page({ ...@@ -499,9 +501,12 @@ create.Page({
onShow() { onShow() {
// 页面显示 // 页面显示
// 关闭遮照层 // 关闭遮照层
console.log('onShow') console.log(this.store.data)
this.store.data.selectVisitors = false; this.store.data.selectVisitors = false;
this.update() this.update()
this.setData({
selectVisitors: this.store.data.selectVisitors
})
}, },
onHide() { onHide() {
// 页面隐藏 // 页面隐藏
......
...@@ -11,10 +11,11 @@ Page({ ...@@ -11,10 +11,11 @@ Page({
todayVisit: 0, todayVisit: 0,
arrivedVisit: 0 arrivedVisit: 0
}, },
arriveStaus() { arriveStaus(self) {
const _that = this const _that = this
let data = { let data = {
type: 0 type: 0,
self: self,
} }
$http.$http('/admin/visitor/getCurrentCount', data, 'post').then(res => { $http.$http('/admin/visitor/getCurrentCount', data, 'post').then(res => {
_that.setData({ _that.setData({
...@@ -32,6 +33,7 @@ Page({ ...@@ -32,6 +33,7 @@ Page({
currentPage: 1 currentPage: 1
}) })
this.visitorList(this.data.type) this.visitorList(this.data.type)
this.arriveStaus(this.data.typ)
}, },
visitorList(type) { visitorList(type) {
const _that = this const _that = this
...@@ -115,7 +117,7 @@ Page({ ...@@ -115,7 +117,7 @@ Page({
this.resetData() this.resetData()
dd.setNavigationBar({ title: '智能访客' }); dd.setNavigationBar({ title: '智能访客' });
this.visitorList(1) this.visitorList(1)
this.arriveStaus() this.arriveStaus(0)
}, },
onReady() { onReady() {
......
...@@ -28,6 +28,109 @@ ...@@ -28,6 +28,109 @@
margin-right: 40rpx; 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 { image {
position: absolute; position: absolute;
right: 0; right: 0;
...@@ -68,7 +171,7 @@ image { ...@@ -68,7 +171,7 @@ image {
.visitorTimeTopTitle { .visitorTimeTopTitle {
height: 44rpx; height: 44rpx;
vertical-align: middle; vertical-align: middle;
font-size: 34rpx; font-size: 30rpx;
color: #7D8082; color: #7D8082;
line-height: 44rpx; line-height: 44rpx;
} }
...@@ -78,7 +181,7 @@ image { ...@@ -78,7 +181,7 @@ image {
margin-top: 14rpx; margin-top: 14rpx;
margin-left: 52rpx; margin-left: 52rpx;
color: #000000; color: #000000;
font-size: 34rpx; font-size: 30rpx;
justify-content: space-between; justify-content: space-between;
} }
...@@ -86,6 +189,10 @@ image { ...@@ -86,6 +189,10 @@ image {
line-height: 44rpx; line-height: 44rpx;
} }
.fu {
font-size: 34rpx;
}
.noOverdue, .overdue { .noOverdue, .overdue {
padding: 16rpx 32rpx; padding: 16rpx 32rpx;
box-shadow: inset 0 0 0 0 rgba(25, 31, 37, 0.12); box-shadow: inset 0 0 0 0 rgba(25, 31, 37, 0.12);
...@@ -127,4 +234,16 @@ image { ...@@ -127,4 +234,16 @@ image {
text-align: center; text-align: center;
line-height: 96rpx; line-height: 96rpx;
font-size: 34rpx; 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="visitorsDetail">
<view class="visitorTab"> <view class="visitorTab">
<view class='visitorTabLeft'>{{byVisitorName.substring(byVisitorName.length-2)}}</view> <view class='visitorTabLeft'>{{visitorName.substring(visitorName.length-2)}}</view>
<view class="visitorTabRight"></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')}}"/> <image mode="scaleToFill" src="{{processStatus == 'invite'? '../../assets/await.png': (processStatus == 'cancel'? '../../assets/cancel.png':'../../assets/dao.png')}}"/>
</view> </view>
<view class="otherInfo"> <view class="otherInfo">
...@@ -50,13 +71,13 @@ ...@@ -50,13 +71,13 @@
{{visitAddress}} {{visitAddress}}
</view> </view>
</view> </view>
<view class="visitorTime"> <view class="visitorTime" a:if='{{participatorUserList.length}}'>
<view class="visitorTimeTop"> <view class="visitorTimeTop">
<text class="visitorTimeTopIcon iconzhouzhiren iconfont"></text> <text class="visitorTimeTopIcon iconzhouzhiren iconfont"></text>
<text class="visitorTimeTopTitle">周知人员</text> <text class="visitorTimeTopTitle">周知人员</text>
</view> </view>
<view class="visitorTimeBottom"> <view class="participatorUserList">
<text a:for='{{participatorUserList}}' a:for-index="index" a:for-item="item">{{item.username}}</text> <view a:for='{{participatorUserList}}' a:for-index="index" a:for-item="item" class="participatorUserListname">{{item.username}}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -16,7 +16,45 @@ Page({ ...@@ -16,7 +16,45 @@ Page({
processStatus: '', // 访客的状态 processStatus: '', // 访客的状态
overdue: '', overdue: '',
visitAddress: '', //到访的地址 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) { onLoad(event) {
console.log(JSON.parse(event.item), 'query') console.log(JSON.parse(event.item), 'query')
...@@ -27,7 +65,8 @@ Page({ ...@@ -27,7 +65,8 @@ Page({
title: "访客详情", title: "访客详情",
}); });
this.setData({ this.setData({
self:query.self, visitorList1: query.visitorList1,
self: query.self,
visitorName: query.visitorName, visitorName: query.visitorName,
company: query.companyName, company: query.companyName,
startTimeYear: `${query.startTime.yearMonthDate}`, startTimeYear: `${query.startTime.yearMonthDate}`,
...@@ -42,7 +81,8 @@ Page({ ...@@ -42,7 +81,8 @@ Page({
phone: query.mobile, phone: query.mobile,
processStatus: query.processStatus, processStatus: query.processStatus,
overdue: query.overdue, overdue: query.overdue,
recordId: query.recordId recordId: query.recordId,
selectId: query.mobile
}) })
}, },
onReady() { onReady() {
...@@ -73,7 +113,7 @@ Page({ ...@@ -73,7 +113,7 @@ Page({
reception() { reception() {
dd.confirm({ dd.confirm({
title: '确认已接待', title: '确认已接待',
content:'确认已接待访客', content: '确认已接待访客',
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
success: (result) => { success: (result) => {
......
...@@ -37,7 +37,9 @@ var webSocket = { ...@@ -37,7 +37,9 @@ var webSocket = {
dd.connectSocket({ dd.connectSocket({
url: `wss://mingpay-websocket.mingwork.com/v1/mingpaywebsocket?param=${dd.corpId}_${dd.getStorageSync({ key: 'userId' }).data}`, 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}`, // url: `ws://192.168.1.102:8400/v1/mingpaywebsocket?param=${dd.corpId}_${dd.getStorageSync({ key: 'userId' }).data}`,
data: {}, data: {
userType: 0
},
header:{ header:{
'content-type': 'application/json' '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