提交 c5ecec5a 作者: wk

首页 我的模块页面

父级 3da6e402
......@@ -17,4 +17,48 @@
page {
background-color: #F5F5F5;
}
.uni-blue-button {
height: 100rpx;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
background-color: #3B73FE;
border-radius: 4rpx;
font-size: 32rpx;
color: #FFFFFF;
margin-left: 32rpx;
}
/* 适用重置 */
.uni-grey-button {
height: 100rpx;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
background-color: #FFFFFF;
border-radius: 4rpx;
border: 2rpx solid #BFBFBF;
font-size: 32rpx;
color: #666666;
margin-left: 32rpx;
}
.uni-group-button {
display: flex;
flex-direction: row;
border-top: 2rpx solid rgba(0, 0, 0, 0.1);
padding: 0px 32rpx;
margin-top: 10rpx;
height: 144rpx;
background-color: #FFFFFF;
align-items: center;
position: fixed;
z-index: 998;
right: 0;
left: 0;
bottom: 0;
}
</style>
......@@ -3,7 +3,16 @@ import {
} from "./param.js"
const params = {
/* 防疫模块*/
// 获取上一次填报记录
getBeforeRecord: {
url: "/api/v1/common_check/pass_code_record/detail",
method: "get"
},
saveRecord: {
url: "/api/v1/common_check/pass_code_record/save",
method: "post"
}
}
export default buildParam(params)
let base = "https://console-api.waspring.com/"
// let base = "https://console-api.wringcloud.com/"
let base = "https://test-console-api.hzdingmao.com"
// let base = "https://dev-console-api.hzdingmao.com"
// let base="https://console-api.hibuilding.cn"
const http = (params) => {
return new Promise((resolve, reject) => {
uni.request({
......
<template>
<view class="holdon">
<image class="ball" :style="'left:'+(moveX == 0 & x>0? x:moveX)+'px;top:'+(moveY == 0 & y>0? y:moveY)+'px'"
@touchstart="drag_start" @touchmove.prevent="drag_hmove" :src="image" mode="aspectFit" @tap="drag_click">
</image>
</view>
</template>
<script>
export default {
props: {
x: {
type: Number,
default: 0
},
y: {
type: Number,
default: 0
},
image: {
type: String,
default: '../../static/float-fy.png'
}
},
data() {
return {
start: [0, 0],
moveY: 0,
moveX: 0
}
},
methods: {
drag_start(event) {
this.start[0] = event.touches[0].clientX - event.target.offsetLeft;
this.start[1] = event.touches[0].clientY - event.target.offsetTop;
},
drag_hmove(event) {
let tag = event.touches;
this.moveX = tag[0].clientX - this.start[0];
this.moveY = tag[0].clientY - this.start[1];
},
drag_click() {
uni.navigateTo({
url: "/pages/epidemic/epidemic"
})
}
}
}
</script>
<style lang="less">
.holdon {
width: 100%;
height: 100%;
}
.ball {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
color: #fff;
font-size: 30upx;
display: flex;
justify-content: center;
align-items: center;
position: fixed !important;
z-index: 1000000;
}
</style>
......@@ -21,10 +21,14 @@
props: {
title: {
type: String,
default: '首页'
default: ''
},
showBack: {
type: Boolean,
default: true
},
isImage: {
type: Boolean,
default: false
}
},
......@@ -49,17 +53,17 @@
console.log(this.titlebarHeight);
},
methods: {
// // 返回app列表页
// back(){
// uni.redirectTo({
// url:'../app-list/app-list'
// })
// },
// finish() {
// uni.navigateBack({
// delta: 1
// })
// }
// 返回app列表页
back() {
uni.redirectTo({
url: '../app-list/app-list'
})
},
finish() {
uni.navigateBack({
delta: 1
})
}
},
}
</script>
......@@ -85,7 +89,7 @@
display: flex;
align-items: center;
width: 100%;
padding: 10px;
padding: 10px 30rpx;
box-sizing: border-box;
.navbar-v-back {
......
<template xlang="wxml" minapp="mpvue">
<view class="tki-qrcode">
<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
</view>
</template>
<script>
import QRCode from "./qrcode.js"
let qrcode
export default {
name: "tki-qrcode",
props: {
cid: {
type: String,
default: 'tki-qrcode-canvas'
},
size: {
type: Number,
default: 200
},
unit: {
type: String,
default: 'upx'
},
show: {
type: Boolean,
default: true
},
val: {
type: String,
default: ''
},
background: {
type: String,
default: '#ffffff'
},
foreground: {
type: String,
default: '#000000'
},
pdground: {
type: String,
default: '#000000'
},
icon: {
type: String,
default: ''
},
iconSize: {
type: Number,
default: 40
},
lv: {
type: Number,
default: 3
},
onval: {
type: Boolean,
default: false
},
loadMake: {
type: Boolean,
default: false
},
usingComponents: {
type: Boolean,
default: true
},
showLoading: {
type: Boolean,
default: true
},
loadingText: {
type: String,
default: '二维码生成中'
},
},
data() {
return {
result: '',
}
},
methods: {
_makeCode() {
let that = this
if (!this._empty(this.val)) {
qrcode = new QRCode({
context: that, // 上下文环境
canvasId:that.cid, // canvas-id
usingComponents: that.usingComponents, // 是否是自定义组件
showLoading: that.showLoading, // 是否显示loading
loadingText: that.loadingText, // loading文字
text: that.val, // 生成内容
size: that.cpSize, // 二维码大小
background: that.background, // 背景色
foreground: that.foreground, // 前景色
pdground: that.pdground, // 定位角点颜色
correctLevel: that.lv, // 容错级别
image: that.icon, // 二维码图标
imageSize: that.iconSize,// 二维码图标大小
cbResult: function (res) { // 生成二维码的回调
that._result(res)
},
});
} else {
uni.showToast({
title: '二维码内容不能为空',
icon: 'none',
duration: 2000
});
}
},
_clearCode() {
this._result('')
qrcode.clear()
},
_saveCode() {
let that = this;
if (this.result != "") {
uni.saveImageToPhotosAlbum({
filePath: that.result,
success: function () {
uni.showToast({
title: '二维码保存成功',
icon: 'success',
duration: 2000
});
}
});
}
},
_result(res) {
this.result = res;
this.$emit('result', res)
},
_empty(v) {
let tp = typeof v,
rt = false;
if (tp == "number" && String(v) == "") {
rt = true
} else if (tp == "undefined") {
rt = true
} else if (tp == "object") {
if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
} else if (tp == "string") {
if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
} else if (tp == "function") {
rt = false
}
return rt
}
},
watch: {
size: function (n, o) {
if (n != o && !this._empty(n)) {
this.cSize = n
if (!this._empty(this.val)) {
setTimeout(() => {
this._makeCode()
}, 100);
}
}
},
val: function (n, o) {
if (this.onval) {
if (n != o && !this._empty(n)) {
setTimeout(() => {
this._makeCode()
}, 0);
}
}
}
},
computed: {
cpSize() {
if(this.unit == "upx"){
return uni.upx2px(this.size)
}else{
return this.size
}
}
},
mounted: function () {
if (this.loadMake) {
if (!this._empty(this.val)) {
setTimeout(() => {
this._makeCode()
}, 0);
}
}
},
}
</script>
<style>
.tki-qrcode {
position: relative;
}
.tki-qrcode-canvas {
position: fixed;
top: -99999upx;
left: -99999upx;
z-index: -99999;
}
</style>
<template>
<view v-if="width" :style="'width:'+width+';'+(square?'height:'+width:'')" class="uni-grid-item">
<view :class="{ 'uni-grid-item--border': showBorder, 'uni-grid-item--border-top': showBorder && index < column, 'uni-highlight': highlight }" :style="{ 'border-right-color': borderColor ,'border-bottom-color': borderColor ,'border-top-color': borderColor }" class="uni-grid-item__box" @click="_onClick">
<slot />
</view>
</view>
</template>
<script>
/**
* GridItem 宫格
* @description 宫格组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=27
* @property {Number} index 子组件的唯一标识 ,点击gird会返回当前的标识
*/
export default {
name: 'UniGridItem',
inject: ['grid'],
props: {
index: {
type: Number,
default: 0
}
},
data() {
return {
column: 0,
showBorder: false,
square: false,
highlight: true,
left: 0,
top: 0,
openNum: 2,
width: 0,
borderColor: '#e5e5e5'
}
},
created() {
this.column = this.grid.column
this.showBorder = this.grid.showBorder
// this.square = this.grid.square
this.highlight = this.grid.highlight
this.top = this.hor === 0 ? this.grid.hor : this.hor
this.left = this.ver === 0 ? this.grid.ver : this.ver
this.borderColor = this.grid.borderColor
this.grid.children.push(this)
// this.grid.init()
this.width = this.grid.width
},
beforeDestroy() {
this.grid.children.forEach((item, index) => {
if (item === this) {
this.grid.children.splice(index, 1)
}
})
},
methods: {
_onClick() {
this.grid.change({
detail: {
index: this.index
}
})
}
}
}
</script>
<style scoped>
.uni-grid-item {
/* #ifndef APP-NVUE */
height: 100%;
display: flex;
/* #endif */
}
.uni-grid-item__box {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
/* #endif */
position: relative;
flex: 1;
flex-direction: column;
/* justify-content: center;
*/
/* align-items: center;
*/
}
.uni-grid-item--border {
position: relative;
border-bottom-color: #e5e5e5;
border-bottom-style: solid;
border-bottom-width: 1px;
border-right-color: #e5e5e5;
border-right-style: solid;
border-right-width: 1px;
}
.uni-grid-item--border-top {
border-top-color: #e5e5e5;
border-top-style: solid;
border-top-width: 1px;
/* #ifndef APP-NVUE */
height: 100%;
box-sizing: border-box;
/* #endif */
}
.uni-highlight:active {
background-color: #f1f1f1;
}
</style>
\ No newline at end of file
<template>
<view class="uni-grid-wrap">
<view :id="elId" ref="uni-grid" class="uni-grid" :class="{ 'uni-grid--border': showBorder }" :style="{ 'border-left-style':'solid','border-left-color':borderColor, 'border-left-width':showBorder?'1px':0 }">
<slot />
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom');
// #endif
/**
* Grid 宫格
* @description 宫格组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=27
* @property {Number} column 每列显示个数
* @property {String} borderColor 边框颜色
* @property {Boolean} showBorder 是否显示边框
* @property {Boolean} square 是否方形显示
* @property {Boolean} Boolean 点击背景是否高亮
* @event {Function} change 点击 grid 触发,e={detail:{index:0}},index 为当前点击 gird 下标
*/
export default {
name: 'UniGrid',
props: {
// 每列显示个数
column: {
type: Number,
default: 3
},
// 是否显示边框
showBorder: {
type: Boolean,
default: false
},
// 边框颜色
borderColor: {
type: String,
default: '#e5e5e5'
},
// 是否正方形显示,默认为 true
square: {
type: Boolean,
default: true
},
highlight: {
type: Boolean,
default: true
}
},
provide() {
return {
grid: this
}
},
data() {
const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
return {
elId,
width: 0
}
},
created() {
this.children = []
},
mounted() {
this.init()
},
methods: {
init() {
setTimeout(() => {
this._getSize((width) => {
this.children.forEach((item, index) => {
item.width = width
})
})
}, 50)
},
change(e) {
this.$emit('change', e)
},
_getSize(fn) {
// #ifndef APP-NVUE
uni.createSelectorQuery()
.in(this)
.select(`#${this.elId}`)
.boundingClientRect()
.exec(ret => {
this.width = parseInt((ret[0].width - 1) / this.column) + 'px'
fn(this.width)
})
// #endif
// #ifdef APP-NVUE
dom.getComponentRect(this.$refs['uni-grid'], (ret) => {
this.width = parseInt((ret.size.width - 1) / this.column) + 'px'
fn(this.width)
})
// #endif
}
}
}
</script>
<style scoped>
.uni-grid-wrap {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: column;
/* #ifdef H5 */
width: 100%;
/* #endif */
}
.uni-grid {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
/* flex: 1;
*/
flex-direction: row;
flex-wrap: wrap;
}
.uni-grid--border {
border-left-color: #e5e5e5;
border-left-style: solid;
border-left-width: 1px;
}
</style>
\ No newline at end of file
export default {
"pulldown": "\ue588",
"refreshempty": "\ue461",
"back": "\ue471",
"forward": "\ue470",
"more": "\ue507",
"more-filled": "\ue537",
"scan": "\ue612",
"qq": "\ue264",
"weibo": "\ue260",
"weixin": "\ue261",
"pengyouquan": "\ue262",
"loop": "\ue565",
"refresh": "\ue407",
"refresh-filled": "\ue437",
"arrowthindown": "\ue585",
"arrowthinleft": "\ue586",
"arrowthinright": "\ue587",
"arrowthinup": "\ue584",
"undo-filled": "\ue7d6",
"undo": "\ue406",
"redo": "\ue405",
"redo-filled": "\ue7d9",
"bars": "\ue563",
"chatboxes": "\ue203",
"camera": "\ue301",
"chatboxes-filled": "\ue233",
"camera-filled": "\ue7ef",
"cart-filled": "\ue7f4",
"cart": "\ue7f5",
"checkbox-filled": "\ue442",
"checkbox": "\ue7fa",
"arrowleft": "\ue582",
"arrowdown": "\ue581",
"arrowright": "\ue583",
"smallcircle-filled": "\ue801",
"arrowup": "\ue580",
"circle": "\ue411",
"eye-filled": "\ue568",
"eye-slash-filled": "\ue822",
"eye-slash": "\ue823",
"eye": "\ue824",
"flag-filled": "\ue825",
"flag": "\ue508",
"gear-filled": "\ue532",
"reload": "\ue462",
"gear": "\ue502",
"hand-thumbsdown-filled": "\ue83b",
"hand-thumbsdown": "\ue83c",
"hand-thumbsup-filled": "\ue83d",
"heart-filled": "\ue83e",
"hand-thumbsup": "\ue83f",
"heart": "\ue840",
"home": "\ue500",
"info": "\ue504",
"home-filled": "\ue530",
"info-filled": "\ue534",
"circle-filled": "\ue441",
"chat-filled": "\ue847",
"chat": "\ue263",
"mail-open-filled": "\ue84d",
"email-filled": "\ue231",
"mail-open": "\ue84e",
"email": "\ue201",
"checkmarkempty": "\ue472",
"list": "\ue562",
"locked-filled": "\ue856",
"locked": "\ue506",
"map-filled": "\ue85c",
"map-pin": "\ue85e",
"map-pin-ellipse": "\ue864",
"map": "\ue364",
"minus-filled": "\ue440",
"mic-filled": "\ue332",
"minus": "\ue410",
"micoff": "\ue360",
"mic": "\ue302",
"clear": "\ue434",
"smallcircle": "\ue868",
"close": "\ue404",
"closeempty": "\ue460",
"paperclip": "\ue567",
"paperplane": "\ue503",
"paperplane-filled": "\ue86e",
"person-filled": "\ue131",
"contact-filled": "\ue130",
"person": "\ue101",
"contact": "\ue100",
"images-filled": "\ue87a",
"phone": "\ue200",
"images": "\ue87b",
"image": "\ue363",
"image-filled": "\ue877",
"location-filled": "\ue333",
"location": "\ue303",
"plus-filled": "\ue439",
"plus": "\ue409",
"plusempty": "\ue468",
"help-filled": "\ue535",
"help": "\ue505",
"navigate-filled": "\ue884",
"navigate": "\ue501",
"mic-slash-filled": "\ue892",
"search": "\ue466",
"settings": "\ue560",
"sound": "\ue590",
"sound-filled": "\ue8a1",
"spinner-cycle": "\ue465",
"download-filled": "\ue8a4",
"personadd-filled": "\ue132",
"videocam-filled": "\ue8af",
"personadd": "\ue102",
"upload": "\ue402",
"upload-filled": "\ue8b1",
"starhalf": "\ue463",
"star-filled": "\ue438",
"star": "\ue408",
"trash": "\ue401",
"phone-filled": "\ue230",
"compose": "\ue400",
"videocam": "\ue300",
"trash-filled": "\ue8dc",
"download": "\ue403",
"chatbubble-filled": "\ue232",
"chatbubble": "\ue202",
"cloud-download": "\ue8e4",
"cloud-upload-filled": "\ue8e5",
"cloud-upload": "\ue8e6",
"cloud-download-filled": "\ue8e9",
"headphones":"\ue8bf",
"shop":"\ue609"
}
......@@ -4,6 +4,8 @@ import App from './App'
import Vue from 'vue'
import tabBar from 'components/uni-tabbar/uni-tabbar.vue'
import api from 'api/api.js'
Vue.prototype.$api = api;
Vue.component('tabBar', tabBar)
Vue.config.productionTip = false
App.mpType = 'app'
......
......@@ -24,7 +24,8 @@
"path": "pages/gallery/gallery",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
......@@ -38,16 +39,64 @@
"path": "pages/mine/mine",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/epidemic",
"style": {
"navigationBarTitleText": "工地通行码",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/serviceAgree/serviceAgree",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/recordInput/recordInput",
"style": {
"navigationBarTitleText": "填写",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/recordDetail/recordDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/recordList/recordList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/score/score",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
"navigationBarBackgroundColor": "#F5F5F5",
"backgroundColor": "#F5F5F5"
},
"uniIdRouter": {},
"tabBar": {
......
<template>
<view class="content">
<navbar title="工地通行码"></navbar>
<view class="qrcode-content" v-if="isCodeShow">
<view class="title">{{inOut==''?'':'已提交'}}</view>
<tki-qrcode ref="qrcode" cid="code" :val="text" size="300" background="#FFFFFF" foreground="#000000"
:icon="inOut=='in'?'/static/ic-in.png':'/static/ic-out.png'" iconSize="40" :onval="true"
:showLoading="false" loadMake="true" />
<view class="time-content">
<view class="time">{{remainTime}}</view>
<view class="desc">{{remainDesc}}</view>
</view>
<view style="font-size: 32rpx;color: #333333;margin-top: 32rpx;">{{nowTime}}</view>
<view style="font-size: 32rpx;color: #3B73FE;margin-top: 32rpx;" @click="linkTo('record-page')">查看历史记录
</view>
</view>
<view class="uni-group-button">
<view class="uni-blue-button" @click="toEnter">填报</view>
</view>
</view>
</template>
<script>
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue'
export default {
components: {
tkiQrcode
},
data() {
return {
created: "",
remainTime: "",
remainDesc: "后失效",
curTitle: "",
countDown: 0,
inOut: "",
text: "",
isCodeShow: false,
nowTime: "",
timer: {},
timer2: {}
}
},
onLoad() {
},
onShow() {
this.getBeforeRecord()
let that = this
this.timer = setInterval(function() {
let nowDate = new Date()
that.nowTime =
`${nowDate.getFullYear()}-${that.add0(nowDate.getMonth()+1)}-${that.add0(nowDate.getDate())} ${that.add0(nowDate.getHours())}:${that.add0(nowDate.getMinutes())}:${that.add0(nowDate.getSeconds())}`
}, 1000)
},
onReady() {
console.log("onReady");
},
onHide() {
console.log("onHide");
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
if (this.timer2) {
clearInterval(this.timer2);
this.timer2 = null
}
},
methods: {
add0(text) {
if (text < 10) {
return "0" + text
}
return text
},
toEnter() {
let isAuth = uni.getStorageSync("isAuth")
if (isAuth == 1) {
uni.navigateTo({
url: "/pages/epidemic/recordInput/recordInput"
})
} else {
uni.showModal({
cancelText: "取消",
confirmText: "去阅读",
confirmColor: "#1757FF",
content: "小程序涉及收集、使用和存储用户个人信息,需要您认真阅读用户服务协议和隐私政策",
success(res) {
if (res.confirm) {
uni.setStorageSync("isAuth", 1)
uni.navigateTo({
url: "../epidemic/serviceAgree/serviceAgree?isBtn=1"
})
}
}
})
}
},
linkTo(router) {
uni.navigateTo({
url: `/pages/enter-exit-page/${router}`
})
},
getBeforeRecord() {
this.$api.getBeforeRecord().then((res) => {
let result = res.data
console.log("记录详情", result);
if (result.code == 0) {
if (result.data._id) { //有记录
this.isCodeShow = true
let detail = result.data
this.pass_code_record_id = detail._id
this.created = detail.created_at
this.inOut = detail.site_type
this.text = JSON.stringify({
type: "inOut",
text: result.data._id,
ext: detail.created_at
})
this.startDownTime()
} else { //没有记录
this.isCodeShow = false
this.showAddTip()
}
} else {
this.$toast.showToast(result.msg)
}
})
},
showAddTip() {
let that = this
uni.showModal({
cancelText: "取消",
confirmText: "去填报",
confirmColor: "#1890FF",
content: "您还未填报信息,是否去填报?",
success(res) {
if (res.confirm) {
that.toEnter()
}
}
})
},
startDownTime() {
//当前时间
let nowDate = new Date().getTime()
console.log("当前时间", nowDate);
//开始时间
let startDate = new Date(this.created.replace(/-/g, "/")).getTime()
console.log("开始时间", this.created)
//时间差
let space = nowDate - startDate
if (space >= 30 * 60 * 1000) {
this.curTitle = "二维码已失效"
this.remainTime = "00:00"
this.remainDesc = "已失效"
} else {
this.remainDesc = "后失效"
this.countDown = parseInt((30 * 60 * 1000 - space) / 1000)
console.log("余下时间", this.countDown);
this.timer2 = setInterval(() => {
this.downTime()
}, 1000)
}
//是否大于30分钟
},
downTime() {
if (this.countDown > 0) {
this.countDown = this.countDown - 1
let min = parseInt(this.countDown / 60)
let sec = parseInt(this.countDown % 60)
if (min < 10) {
if (sec < 10) {
this.remainTime = `0${min}:0${sec}`
} else {
this.remainTime = `0${min}:${sec}`
}
} else {
if (sec < 10) {
this.remainTime = `${min}:0${sec}`
} else {
this.remainTime = `${min}:${sec}`
}
}
} else {
this.remainTime = "00:00"
this.remainDesc = "已失效"
}
},
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
align-items: center;
.qrcode-content {
display: flex;
width: 690rpx;
padding: 30rpx 0;
margin-top: 30rpx;
background-color: #fff;
border-radius: 30rpx;
flex-direction: column;
align-items: center;
.model-content {
width: 200px;
height: 200px;
margin-top: 32rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.title {
font-size: 48rpx;
margin-top: 200rpx;
margin-bottom: 32rpx;
color: #1890ff;
font-weight: bold;
}
.time-content {
display: flex;
margin-top: 64rpx;
justify-content: center;
flex-direction: row;
align-items: center;
.time {
font-size: 64rpx;
color: #1890ff;
margin-right: 32rpx;
font-weight: bold;
}
.desc {
font-size: 32rpx;
color: #333333;
font-weight: bold;
}
}
}
}
</style>
<template>
<view class="content">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="item">
<view class="item-content">
<view class="value">{{item.created_at}}</view>
</view>
<view class="item-content">
<view class="desc">姓名:</view>
<view class="value">{{item.user_name}}</view>
</view>
<view class="item-content">
<view class="desc">所在单位名称:</view>
<view class="value">{{item.company_name}}</view>
</view>
<view class="item-content">
<view class="desc">班组名称:</view>
<view class="value">{{item.group_name}}</view>
</view>
<view class="item-content">
<view class="desc">进/出场:</view>
<view class="value">{{item.site_type=='in'?'进场':'出场'}}</view>
</view>
<view class="item-content">
<view class="desc">体温:</view>
<view class="value">{{item.cur_temp}}</view>
</view>
<view class="btn-content">
<view style="font-size: 32rpx;color: #1890ff;" @click="toDetail(item._id)">查看</view>
<button class="share-button" open-type="share" :id="item._id" hover-class='none'>分享</button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
page: 1,
page_total: 1
}
},
onLoad() {
this.getRecordList()
},
onPullDownRefresh() {
this.page = 1
this.getRecordList()
},
onReachBottom() {
if (this.page < this.page_total) {
this.page++
this.getRecordList()
}
},
onShareAppMessage(res) {
console.log(res);
let id = res.target.id
return {
title: '',
path: `pages/index/index?page=inOut&id=${id}`
}
},
methods: {
toDetail(id) {
uni.navigateTo({
url: `/pages/enter-exit-page/record-detail-page?id=${id}`
})
},
getRecordList() {
this.$http.get({
url: "/api/v1/common_check/pass_code_record/list",
data: {
is_page: 1,
page: this.page,
page_size: 20
},
header: {
access_token: this.getToken()
}
}).then((res) => {
let result = res.data
console.log("提交记录", result);
uni.stopPullDownRefresh()
if (result.code == 0) {
this.page_total = result.data.total_page
if (this.page == 1) {
this.list = []
}
this.list = this.list.concat(result.data.list)
} else {
this.$toast.showToast(result.msg)
}
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.content {
display: flex;
flex-direction: column;
.list-content {
margin-top: 32rpx;
display: flex;
flex-direction: column;
.item {
margin-top: 4rpx;
background-color: #FFFFFF;
display: flex;
flex-direction: column;
padding: 32rpx;
.item-content {
display: flex;
flex-direction: row;
margin-top: 20rpx;
align-items: center;
.desc {
font-size: 32rpx;
color: #666666;
}
.value {
font-size: 32rpx;
color: #333333;
}
}
.btn-content {
display: flex;
width: 40%;
margin-top: 32rpx;
flex-direction: row-reverse;
align-items: center;
.share-button {
font-size: 16px;
width: 25%;
color: #1890FF;
background-color: #fff;
border-radius: 0;
padding: 0;
}
.share-button::after {
border: none;
}
}
}
}
}
</style>
<template>
<view style="display: flex;flex-direction: column;">
<navbar title="用户服务协议和隐私政策"></navbar>
<view style="padding: 32rpx;display: flex;flex-direction: column;">
<text style="font-size: 32rpx;color: #333333;">
本协议是由您(以下简称“用户”)与本小程序系统(以下简称为“本小程序”)就本小程序提供的产品和服务内容,所订立的契约,具有合同的法律效力,请您仔细阅读。\n
一、本协议内容、生效、变更。本协议内容包括协议正文及所有本小程序已经发布的或将来可能发布的各类规则。所有规则为本协议不可分割的组成部分,
与协议正文具有同等法律效力。如您对协议有任何疑问,应向本小程序咨询。您在同意所有协议条款并完成注册程序,才能成为本站的正式用户,
您勾选“我以阅读并同意本小程序用户协议和法律协议”按钮后,本协议即生效,对双方产生约束力。只要您使用本小程序平台服务,则本协议即对您产生约束,
届时您不应以未阅读本协议的内容或者未获得本小程序对您问询的解答等理由,主张本协议无效,或要求撤销本协议。
您确认:本协议条款是处理双方权利义务的契约,始终有效,法律另有强制性规定或双方另有特别约定的,依其规定。您承诺接受并遵守本协议的约定。
如果您不同意本协议的约定,您应立即停止注册程序或停止使用本小程序平台服务。基于对小程序本身、用户及市场状况不断变化的考虑,
本小程序有权根据需要不定期地制订、修改本协议及/或各类规则,并在本小程序平台公示,不再另行单独通知用户。变更后的协议和规则一经在网站公布,
立即生效。如您不同意相关变更,应当立即停止使用本小程序平台服务。您继续使用本小程序平台服务的,即表明您接受修订后的协议和规则。\n
二、注册资格用户须具有法定的相应权利能力和行为能力的自然人、法人或其他组织,能够独立承担法律责任。
您完成注册程序或其他本小程序平台同意的方式实际使用本平台服务时,即视为您确认自己具备主体资格,能够独立承担法律责任。若因您不具备主体资格,
而导致的一切后果,由您及您的监护人自行承担。\n
2.1用户应自行诚信向本站提供注册资料,用户同意其提供的注册资料真实、准确、完整、合法有效,用户注册资料如有变动的,
应及时更新其注册资料。如果用户提供的注册资料不合法、不真实、不准确、不详尽的,用户需承担因此引起的相应责任及后果,
并且本小程序保留终止用户使用本平台各项服务的权利。\n
2.2用户在本站进行浏览等活动时,涉及用户真实姓名/名称、通信地址、联系电话、电子邮箱等隐私信息的,本站将予以严格保密,
除非得到用户的授权或法律另有规定,本站不会向外界披露用户隐私信息。为完成创建账号,用户需提供以下信息:用户的姓名、身份证号、
密码、户籍地址、家庭住址、手机号等信息。用户提供的上述信息,将在用户使用本服务期间持续授权我们使用。
在用户注销账号时,我们将停止使用并删除上述信息。上述信息将存储于中华人民共和国境内。如需跨境传输,我们将会单独征得用户的授权同意。\n
三、账户\n
3.1您注册成功后,即成为本小程序平台的用户,将持有本小程序平台唯一编号的账户信息,您可以根据本站规定改变您的密码。\n
3.2您设置的姓名为真实姓名,不得侵犯或涉嫌侵犯他人合法权益。否则,本小程序有权终止向您提供服务,注销您的账户。账户注销后,相应的用户名将开放给任意用户注册登记使用。\n
3.3您应谨慎合理的保存、使用您的用户名和密码,应对通过您的用户名和密码实施的行为负责。除非有法律规定或司法裁定,
且征得本小程序的同意,否则,用户名和密码不得以任何方式转让、赠与或继承(与账户相关的财产权益除外)。\n
3.4用户不得将在本站注册获得的账户借给他人使用,否则用户应承担由此产生的全部责任,并与实际使用人承担连带责任。\n
3.5如果发现任何非法使用等可能危及您的账户安全的情形时,您应当立即以有效方式通知本小程序要求暂停相关服务,并向公安机关报案。
您理解本小程序对您的请求采取行动需要合理时间,本小程序对在采取行动前已经产生的后果(包括但不限于您的任何损失)不承担任何责任。\n
四、用户信息的合理使用\n
4.1您同意本小程序平台拥有通过邮件、短信电话等形式,向在本站注册用户发送信息等告知信息的权利。\n
4.2您了解并同意,本小程序有权应国家司法、行政等主管部门的要求,向其提供您在本小程序平台填写的注册信息和交易记录等必要信息。如您涉嫌侵犯他人知识产权,
则本小程序亦有权在初步判断涉嫌侵权行为存在的情况下,向权利人提供您必要的身份信息。\n
4.3用户同意本小程序有权使用用户的注册信息、用户名、密码等信息,登录进入用户的注册账户,进行证据保全,包括但不限于公证、见证等。\n
五、免责条款\n
5.1 本平台仅提供信息对接,发生一切纠纷问题皆与本平台无关,请通过仲裁部门维护各自权益。\n
(完)\n
浙江省建工集团有限责任公司
</text>
<view style="height: 160rpx;"></view>
<view class="uni-group-button" v-if="isBtn==1">
<view class="uni-blue-button" @click="toEnter">同意</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isBtn: 0
}
},
onLoad(options) {
this.isBtn = options.isBtn
},
methods: {
toEnter() {
uni.redirectTo({
url: "/pages/enter-exit-page/enter-info-page"
})
}
}
}
</script>
<style>
</style>
<template>
<view>
<view class="content">
<view class="header-content">
<image src="../../static/home-head.png" class="header-image"></image>
<navbar :title="title" :showBack="false"></navbar>
<view class="project-content" :style="{top:statusBarHeight+45+'px'}">
<view class="name">XXX市高薪区府城写字楼二期改造项目</view>
<image class="image" src="../../static/down-arrow.png"></image>
</view>
<view class="message-content" :style="{top:statusBarHeight+78+'px'}">
<view class="item">
<view class="title-content">
<view class="title">消息中心</view>
<image src="../../static/message.png" class="image"></image>
</view>
<view class="count">2</view>
</view>
<view class="line"></view>
<view class="item">
<view class="title-content">
<view class="title">我的待办</view>
<image src="../../static/willdo.png" class="image"></image>
</view>
<view class="count">15</view>
</view>
</view>
</view>
<uni-tabbar currentPage="1"></uni-tabbar>
</view>
</template>
......@@ -8,15 +33,118 @@
export default {
data() {
return {
title: '欢迎XXX访问一点通',
statusBarHeight: 20
}
},
onLoad() {
const info = uni.getSystemInfoSync()
this.statusBarHeight = info.statusBarHeight
},
methods: {
}
}
</script>
<style>
<style lang="scss">
.content {
display: flex;
padding-bottom: 130rpx;
flex-direction: column;
.header-content {
position: relative;
top: 0;
left: 0;
.header-image {
width: 750rpx;
height: 206px;
position: absolute;
top: 0;
left: 0;
}
.project-content {
position: absolute;
left: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
.name {
font-weight: 500;
width: 408rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 24rpx;
text-align: left;
color: #fff;
}
image {
width: 26rpx;
margin-left: 30rpx;
height: 16rpx;
}
}
.message-content {
position: absolute;
left: 30rpx;
background-color: #FFFFFF;
border-radius: 30rpx;
width: 690rpx;
display: flex;
flex-direction: row;
align-items: center;
height: 108px;
.item {
display: flex;
flex: 1;
flex-direction: column;
.title-content {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.title {
font-weight: 400;
font-size: 28rpx;
margin-left: 50rpx;
text-align: center;
color: #656565;
}
image {
width: 50rpx;
margin-right: 50rpx;
height: 44rpx;
}
}
.count {
font-weight: 600;
font-size: 40rpx;
margin-top: 30rpx;
margin-left: 50rpx;
text-align: left;
color: #333;
}
}
.line {
width: 2rpx;
height: 55px;
background-color: #e0e0e0;
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
<view class="content">
<view class="header-content">
<image src="../../static/home-head.png" class="header-image"></image>
<navbar :title="title"></navbar>
<navbar :title="title" :showBack="false"></navbar>
<!-- 天气 -->
<view class="weather-content" :style="{top:statusBarHeight+36+'px'}">
<view class="temp-content">
......@@ -42,7 +42,59 @@
<view class="tab-line" v-if="isRecentlySel"></view>
</view>
</view>
<uni-grid column="2">
<uni-grid-item v-for="(app,index) in appList" :key="index">
<view class="app-item">
<view :class="isLineVisil(index)?'app-name-left':'app-name-right'">积分商城</view>
<image class="app-logo" src="../../static/logo.png"></image>
<view class="line" v-if="isLineVisil(index)"></view>
</view>
</uni-grid-item>
</uni-grid>
<!-- 无组织默认 -->
<view class="def-content">
<image src="../../static/def-avatar.png" class="image"></image>
<view class="text-content">
<text class="text">当前身份为访客,可点击</text>
<text class="text-blue">【我的】</text>
<text class="text-blue">【加入组织】</text>
<text class="text"> 等待审批通过后进入组织</text>
</view>
</view>
</view>
<!-- 积分兑换 -->
<view class="score-content">
<view class="title-content">
<view class="title">积分兑换</view>
<view class="more">更多</view>
<image src="../../static/right-arrow.png"></image>
</view>
<view class="score-count">剩余:1000豆丁</view>
<view class="list-content">
<view class="left-content">
<view class="item-content" v-for="(item,index) in leftList()" :key="index">
<image class="image"></image>
<view class="count">500豆丁可兑换</view>
<view class="name-content">
<view class="name">XXX牌雨伞XXX牌雨伞XXX牌雨伞XXX牌雨伞</view>
<image src="../../static/exchange.png" class="image"></image>
</view>
</view>
</view>
<view class="right-content">
<view class="item-content" v-for="(item,index) in rightList()" :key="index">
<image class="image"></image>
<view class="count">500豆丁可兑换</view>
<view class="name-content">
<view class="name">XXX牌雨伞XXX牌雨伞XXX牌雨伞XXX牌雨伞</view>
<image src="../../static/exchange.png" class="image"></image>
</view>
</view>
</view>
</view>
</view>
<drag-ball x="300" y="350"></drag-ball>
<uni-tabbar currentPage="0"></uni-tabbar>
</view>
</template>
......@@ -55,7 +107,9 @@
banners: [],
statusBarHeight: 20,
isCommonSel: true,
isRecentlySel: false
isRecentlySel: false,
appList: [{}, {}],
shopList: [{}, {}, {}]
}
},
onLoad() {
......@@ -63,7 +117,27 @@
this.statusBarHeight = info.statusBarHeight
},
methods: {
isLineVisil(index) {
return index % 2 == 0
},
leftList() {
var list = []
for (var i = 0; i < this.shopList.length; i++) {
if (i % 3 == 0) {
list.push(this.shopList[i])
}
}
return list
},
rightList() {
var list = []
for (var i = 0; i < this.shopList.length; i++) {
if (i % 3 != 0) {
list.push(this.shopList[i])
}
}
return list
},
}
}
</script>
......@@ -71,6 +145,7 @@
<style lang="scss">
.content {
display: flex;
padding-bottom: 130rpx;
flex-direction: column;
.scan-image {
......@@ -228,6 +303,7 @@
display: flex;
flex-direction: column;
padding: 30rpx;
background-color: #FFFFFF;
border-radius: 30rpx;
margin: 0 30rpx;
......@@ -266,6 +342,230 @@
}
}
}
.app-item {
display: flex;
flex-direction: row;
justify-content: space-between;
height: 150rpx;
align-items: center;
.app-name-left {
font-family: "PingFang SC Medium";
font-weight: 700;
margin-left: 30rpx;
font-size: 28rpx;
text-align: center;
color: #333;
}
.app-name-right {
font-family: "PingFang SC Medium";
font-weight: 700;
margin-left: 60rpx;
font-size: 28rpx;
text-align: center;
color: #333;
}
.app-logo {
width: 50rpx;
margin-right: 30rpx;
height: 45rpx;
}
.line {
width: 2rpx;
height: 70rpx;
background-color: #e0e0e0;
}
}
.def-content {
display: flex;
flex-direction: row;
padding: 30rpx;
align-items: center;
image {
height: 38rpx;
width: 50rpx;
}
.text-content {
display: flex;
flex-direction: row;
flex: 1;
margin-left: 30rpx;
flex-wrap: wrap;
align-items: center;
text {
font-size: 28rpx;
font-face: MicrosoftYaHeiUI;
flex-wrap: wrap;
color: #666666;
}
.text-blue {
font-size: 28rpx;
flex-wrap: wrap;
font-face: MicrosoftYaHeiUI-Bold;
color: #3B73FE;
font-weight: bold;
}
}
}
}
.score-content {
display: flex;
flex-direction: column;
margin: 30rpx;
background-color: #FFFFFF;
padding: 30rpx;
border-radius: 30rpx;
.title-content {
display: flex;
flex-direction: row;
align-items: center;
.title {
font-family: "PingFang SC Medium";
font-weight: 700;
font-size: 28rpx;
flex: 1;
text-align: left;
color: #333;
}
.more {
font-family: "MicrosoftYaHei ";
font-weight: 400;
font-size: 28rpx;
text-align: left;
color: #333;
}
image {
margin-left: 10rpx;
width: 13rpx;
height: 24rpx;
}
}
.score-count {
font-weight: 400;
font-size: 24rpx;
margin-top: 10rpx;
text-align: left;
color: #666;
}
.list-content {
display: flex;
flex: 1;
flex-direction: row;
margin-top: 30rpx;
.left-content {
display: flex;
flex-direction: column;
.item-content {
display: flex;
flex-direction: column;
image {
width: 300rpx;
height: 400rpx;
border-radius: 16rpx;
}
.count {
font-weight: 400;
font-size: 20rpx;
margin-top: 20rpx;
text-align: left;
color: #f60;
}
.name-content {
display: flex;
flex-direction: row;
align-items: center;
.name {
font-weight: 400;
font-size: 24rpx;
text-align: left;
width: 180rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #000;
}
image {
width: 120rpx;
height: 40rpx;
}
}
}
}
.right-content {
display: flex;
margin-left: 30rpx;
flex: 1;
flex-direction: column;
.item-content {
display: flex;
flex-direction: column;
image {
width: 300rpx;
height: 220rpx;
border-radius: 16rpx;
}
.count {
font-weight: 400;
font-size: 20rpx;
margin-top: 20rpx;
text-align: left;
color: #f60;
}
.name-content {
display: flex;
flex-direction: row;
align-items: center;
.name {
font-weight: 400;
font-size: 24rpx;
width: 180rpx;
text-align: left;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #000;
}
image {
width: 120rpx;
height: 40rpx;
}
}
}
}
}
}
}
</style>
<template>
<view>
<view class="content">
<view class="header-content">
<image src="../../static/home-head.png" class="header-image"></image>
<navbar :title="title" :showBack="false"></navbar>
<view class="info-content" :style="{top:statusBarHeight+45+'px'}">
<image src="../../static/mine-bg.png" class="image"></image>
<view class="company">浙江建工XXXXX公司</view>
<view class="name">张三 项目经理</view>
<view class="project">XXXXXXXXXXX项目</view>
<image src="../../static/mine-def-avatar.png" class="avatar"></image>
</view>
</view>
<view class="func-content">
<view class="item">
<view class="name">项目信息</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item">
<view class="name">项目过往</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item">
<view class="name">我的审批</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item">
<view class="name">我的积分</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item">
<view class="name">加入组织</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
</view>
<view class="version-content">
<text class="text">当前版本:v1.0.0</text>
</view>
<view class="btn-org">
<text class="text">切换组织</text>
</view>
<view class="btn-logout">
<text class="text">退出登录</text>
</view>
<uni-tabbar currentPage="3"></uni-tabbar>
</view>
</template>
......@@ -8,15 +54,178 @@
export default {
data() {
return {
title: '欢迎XXX访问一点通',
statusBarHeight: 20
}
},
onLoad() {
const info = uni.getSystemInfoSync()
this.statusBarHeight = info.statusBarHeight
},
methods: {
}
}
</script>
<style>
<style lang="scss">
.content {
display: flex;
padding-bottom: 130rpx;
flex-direction: column;
.header-content {
position: relative;
top: 0;
left: 0;
.header-image {
width: 750rpx;
height: 206px;
position: absolute;
top: 0;
left: 0;
}
.info-content {
position: absolute;
top: 0;
left: 0;
image {
margin-left: 20rpx;
width: 710rpx;
height: 360rpx;
}
.company {
position: absolute;
font-weight: 500;
font-size: 28rpx;
left: 72rpx;
top: 100rpx;
text-align: center;
color: #333;
}
.name {
position: absolute;
font-weight: 400;
font-size: 28rpx;
left: 72rpx;
top: 200rpx;
text-align: center;
color: #333;
}
.project {
position: absolute;
font-weight: 400;
font-size: 28rpx;
left: 72rpx;
top: 245rpx;
text-align: center;
color: #333;
}
.avatar {
position: absolute;
top: 90rpx;
right: 90rpx;
width: 120rpx;
height: 120rpx;
}
}
}
.func-content {
display: flex;
flex-direction: column;
margin: 190px 30rpx 0 30rpx;
background-color: #fff;
border-radius: 30rpx;
.item {
display: flex;
flex-direction: row;
align-items: center;
padding: 30rpx 50rpx;
.name {
font-weight: 400;
font-size: 28rpx;
flex: 1;
color: #333;
}
image {
width: 15rpx;
height: 28rpx;
}
}
.line {
width: 600rpx;
height: 2rpx;
margin: 0 50rpx;
background: rgba(0, 0, 0, 0.1);
}
}
.version-content {
display: flex;
margin-top: 30rpx;
flex-direction: column;
align-items: center;
text {
font-weight: 400;
font-size: 28rpx;
text-align: center;
color: #999;
}
}
.btn-logout {
position: absolute;
bottom: 84px;
height: 40px;
width: 690rpx;
margin: 30rpx;
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
background-color: #3B73FE;
text {
font-weight: 400;
font-size: 28rpx;
text-align: center;
color: #fff;
}
}
.btn-org {
position: absolute;
bottom: 134px;
height: 40px;
width: 690rpx;
margin: 30rpx;
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid #3b73fe;
background-color: #FFFFFF;
text {
font-weight: 400;
font-size: 28rpx;
text-align: center;
color: #3b73fe;
}
}
}
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment