Browse Source

页面开发完成

wangxin 6 years atrás
parent
commit
33b141d6c1

+ 5 - 1
public/index.html

@@ -5,9 +5,13 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
     <link rel="icon" href="<%= BASE_URL %>logo.png">
+    <script src="http://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
     <title>打卡</title>
     <script>
-        window._CONFIG = {};
+      // window.wx.ready(function () {
+      //   console.log('wwwww');
+      // });
+      window._CONFIG = {};
         // 本地
         window._CONFIG['domianURL'] = 'http://127.0.0.1:8088/happyjob';
         //测试服

BIN
src/assets/address.png


BIN
src/assets/clip.png


BIN
src/assets/height_fever.png


BIN
src/assets/journey_warn.png


BIN
src/assets/low_fever.png


BIN
src/assets/normal_fever.png


BIN
src/assets/nosign.png


BIN
src/assets/temperature_randis.png


+ 73 - 22
src/router.js

@@ -1,58 +1,109 @@
 import Vue from 'vue';
 import Router from 'vue-router';
-import {getStore} from "@/utils/storage";
 
 Vue.use(Router);
 
 const routes = [
     {
         path: '*',
-        redirect: getStore('login') ? '/user' : '/login'
+        redirect: '/login'
     },
     {
-        name: 'user',
-        component: () => import('./view/user'),
+        name: 'login',
+        component: () => import('./view/login'),
         meta: {
-            title: '会员中心'
+            // title: '体温打卡,中国加油!',
+            title: '企业登录'
         }
     },
+
     {
-        name: 'cart',
-        component: () => import('./view/cart'),
+        path: '/join',
+        name: 'join',
+        component: () => import('./view/business/join'),
         meta: {
-            title: '购物车'
+            title: '企业入驻'
         }
     },
     {
-        name: 'goods',
-        component: () => import('./view/goods'),
+        name: 'stafflogin',
+        component: () => import('./view/stafflogin'),
         meta: {
-            title: '商品详情'
+            title: '员工登录'
         }
     },
     {
-        name: 'login',
-        component: () => import('./view/login'),
+        path: '/invitation',
+        name: 'invitation',
+        component: () => import('./view/invitation'),
+        meta: {
+            title: '邀请员工'
+        },
+    },
+    {
+        path: '/next',
+        name: 'next',
+        component: () => import('./view/invitation/next'),
+        meta: {
+            title: '邀请员工'
+        },
+    },
+    {
+        path: '/business',
+        name: 'business',
+        component: () => import('./view/index/index'),
         meta: {
             title: '体温打卡,中国加油!'
         }
     },
     {
-        path: 'staff',
-        name: 'staff',
-        component: () => import('./view/login/staff'),
+        path: '/business/temperature',
+        name: 'temperature',
+        component: () => import('./view/business/temperature'),
         meta: {
-            title: '体温打卡,中国加油!'
+            title: '员工体温信息'
         }
     },
     {
-        path: 'join',
-        name: 'join',
-        component: () => import('./view/business/join'),
+        path: '/business/return_journey',
+        name: 'temperature',
+        component: () => import('./view/business/return_journey'),
         meta: {
-            title: '体温打卡,中国加油!'
+            title: '员工返程信息'
         }
-    }
+    },
+    {
+        path: '/journey_detail/journey_detail',
+        name: 'journey_detail',
+        component: () => import('./view/journey_detail/journey_detail'),
+        meta: {
+            title: '返程信息详情'
+        }
+    },
+    {
+        path: '/staff_temperature',
+        name: 'staff_temperature',
+        component: () => import('./view/staff/temperature'),
+        meta: {
+            title: '每日体温打卡'
+        }
+    },
+    {
+        path: '/clock',
+        name: 'clock',
+        component: () => import('./view/staff/clock'),
+        meta: {
+            title: '体温打卡记录'
+        }
+    },
+    {
+        path: '/donations',
+        name: 'clock',
+        component: () => import('./view/donations/index'),
+        meta: {
+            title: '体温打卡记录'
+        }
+    },
 ];
 
 // add route path

File diff suppressed because it is too large
+ 4040 - 0
src/utils/area.js


+ 1 - 1
src/utils/rem.js

@@ -6,7 +6,7 @@ function setRem () {
 //得到html的Dom元素
     let htmlDom = document.getElementsByTagName('html')[0];
 //设置根元素字体大小
-    htmlDom.style.fontSize= htmlWidth/20 + 'px';
+    htmlDom.style.fontSize= htmlWidth/10 + 'px';
 }
 // 初始化
 setRem();

+ 1 - 1
src/view/business/join.vue

@@ -68,7 +68,7 @@
                             :loading="loading"
                             type="small"
                             size="large"
-                            :color="!tel||!code?'#DDDDDD':'#0177FF'"
+                            :color="!phone||!code?'#DDDDDD':'#0177FF'"
                             @cick="join"
                             text="确认入驻"
                             style="height:47px;margin-top: 65px;border-radius: 47px;font-size: 16px;border-width: 0">

+ 166 - 0
src/view/business/return_journey.vue

@@ -0,0 +1,166 @@
+<template>
+    <div>
+        <van-row type="flex" justify="center" align="center" style=" height: 94px;">
+            <van-col span="8" class="dk-info">
+                <div style="color: #666666">320</div>
+                <div>员工人数</div>
+            </van-col>
+            <van-col span="8" class="dk-info">
+                <div style="color: #000">13</div>
+                <div>已打卡</div>
+            </van-col>
+            <van-col span="8" class="dk-info">
+                <div style="color: #000">3</div>
+                <div>体温异常</div>
+            </van-col>
+        </van-row>
+        <div>
+            <van-row class="dk-title" type="flex" align="center">
+                <img src="../../assets/temperature_randis.png" alt="">
+                <span>未登记</span>
+                <span style="color: #999">(40人)</span>
+            </van-row>
+            <van-row>
+                <van-col span="24">
+                    <van-row
+                            class='dk-cell'
+                            type="flex"
+                            align="center"
+                            justify="space-between"
+                            v-for="(item,index) in list"
+                            :key="index">
+                        <van-col span="14">
+                            <span>季明波</span>
+                            <!--                            <span style="color: #999999">(18118379209)</span>-->
+                            <span style="margin-left: 15px">预计 <span style="font-weight: bold">02月07日</span> 返程</span>
+
+                        </van-col>
+                        <van-col span="4" class="dk-warn">
+                            <img
+                                    src="../../assets/journey_warn.png"
+                                    alt=""
+                                    style="height: 12px;width: 12px;margin-right: 5px">
+                            <span>预警</span>
+                        </van-col>
+                        <van-col span="4">
+                            <van-row class="dk-fever" type="flex" align="center" justify="end">
+                                <span class="dk-fever-link">详情>></span>
+                            </van-row>
+                        </van-col>
+                    </van-row>
+                </van-col>
+            </van-row>
+        </div>
+        <div>
+            <van-row class="dk-title" type="flex" align="center">
+                <img src="../../assets/temperature_randis.png" alt="">
+                <span>北京市</span>
+                <span style="color: #999">(40人)</span>
+            </van-row>
+            <van-row>
+                <van-col span="24">
+                    <van-row
+                            class='dk-cell'
+                            type="flex"
+                            align="center"
+                            v-for="(item,index) in list"
+                            :key="index">
+                        <van-col span="12">
+                            <span>季明波</span>
+                            <span style="color: #999999">(18118379209)</span>
+                        </van-col>
+                        <van-col span="4" class="dk-warn">
+                            <img
+                                    src="../../assets/journey_warn.png"
+                                    alt=""
+                                    style="height: 12px;width: 12px;margin-right: 5px">
+                            <span>预警</span>
+                        </van-col>
+                    </van-row>
+                </van-col>
+            </van-row>
+        </div>
+    </div>
+</template>
+
+<script>
+    import {Button, Col, Row, Calendar} from 'vant';
+
+    export default {
+        name: "return_journey",
+        components: {
+            [Button.name]: Button,
+            [Col.name]: Col,
+            [Row.name]: Row,
+            [Calendar.name]: Calendar,
+        },
+        data() {
+            return {
+                list: [
+                    {
+                        temp: 1,
+                    }, {
+                        temp: 2,
+                    }, {
+                        temp: 3,
+                    },
+                ]
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .dk-info {
+        text-align: center;
+    }
+
+    .dk-info div:first-child {
+        font-size: 32px;
+    }
+
+    .dk-info div:last-child {
+        color: #999999;
+        font-size: 14px;
+    }
+
+    .dk-title {
+        height: 49px;
+        font-size: 16px;
+        color: #333;
+        background: #EEEEEE;
+        padding: 0 15px;
+    }
+
+    .dk-title img {
+        width: 4px;
+        height: 16px;
+        margin-right: 10px;
+    }
+
+    .dk-cell {
+        height: 55px;
+        color: #333;
+        font-size: 14px;
+        padding: 0 15px;
+        display: flex;
+        align-items: center;
+    }
+
+    .dk-fever-link {
+        color: #0177FF;
+        font-size: 14px;
+        font-weight: bold;
+    }
+
+    .dk-warn {
+        color: #fff;
+        font-size: 12px;
+        border-radius: 24px;
+        padding: 3px 0;
+        background: #C14810;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+    }
+</style>

+ 208 - 0
src/view/business/temperature.vue

@@ -0,0 +1,208 @@
+<template>
+    <div>
+        <van-row class="dk-header" type="flex" justify="center" align="center">
+            <van-col span="17" class="dk-date">
+                <span>2020-02-02</span> <span style="color: #999">(截至24时)</span>
+            </van-col>
+            <van-col span="7">
+                <van-button
+                        type="primary"
+                        color="#0177FF"
+                        size="small"
+                        text="更改日期"
+                        @click="show = true"
+                        style="border-radius: 38px;width: 100%;">
+                </van-button>
+            </van-col>
+        </van-row>
+        <van-row type="flex" justify="center" align="center" style=" height: 94px;">
+            <van-col span="8" class="dk-info">
+                <div>320</div>
+                <div>员工人数</div>
+            </van-col>
+            <van-col span="8" class="dk-info">
+                <div style="color: #0A6D95">13</div>
+                <div>已打卡</div>
+            </van-col>
+            <van-col span="8" class="dk-info">
+                <div style="color: #9F3112">3</div>
+                <div>体温异常</div>
+            </van-col>
+        </van-row>
+        <div>
+            <van-row class="dk-title" type="flex" align="center">
+                <img src="../../assets/address.png" alt="">
+                <span>北京市</span>
+                <span style="color: #999">(40人)</span>
+            </van-row>
+            <van-row>
+                <van-col span="24">
+                    <van-row
+                            class='dk-cell'
+                            type="flex"
+                            align="center"
+                            justify="space-between"
+                            v-for="(item,index) in list"
+                            :key="index">
+                        <van-col span="15">
+                            <span>季明波</span>
+                            <span style="color: #999999">(18118379209)</span>
+                        </van-col>
+                        <van-col span="9">
+                            <van-row class="dk-fever" type="flex" align="center" justify="end">
+                                <div v-if="item.temp === 1" class="dk-fever-info" style="background: #55B3DA;">
+                                    <img src="../../assets/normal_fever.png" alt="">
+                                    <span>正常 35.9~37.2</span>
+                                </div>
+                                <div v-if="item.temp === 2" class="dk-fever-info" style="background: #E4A835;">
+                                    <img src="../../assets/low_fever.png" alt=""/>
+                                    <span>低烧 37.3~38</span>
+                                </div>
+                                <div v-if="item.temp === 3" class="dk-fever-info" style="background: #C14810;">
+                                    <img src="../../assets/height_fever.png" alt="">
+                                    <span>高烧 38 以上</span>
+                                </div>
+                            </van-row>
+                        </van-col>
+                    </van-row>
+                </van-col>
+            </van-row>
+        </div>
+        <div>
+            <van-row class="dk-title" type="flex" align="center">
+                <img src="../../assets/address.png" alt="">
+                <span>未打卡</span>
+                <span style="color: #999">(40人)</span>
+            </van-row>
+            <van-row>
+                <van-col span="24">
+                    <van-row
+                            class='dk-cell'
+                            type="flex"
+                            align="center"
+                            justify="space-between"
+                            v-for="(item,index) in list"
+                            :key="index">
+                        <van-col span="15">
+                            <span>季明波</span>
+                            <span style="color: #999999">(18118379209)</span>
+                        </van-col>
+                    </van-row>
+                </van-col>
+            </van-row>
+        </div>
+        <van-calendar
+                v-model="show"
+                :min-date="minDate"
+                :max-date="maxDate"
+                :default-date="maxDate"
+                color="#0177FF"
+                :round="false"
+                position="right"
+                @confirm="onConfirm"/>
+    </div>
+</template>
+
+<script>
+    import {Button, Col, Row, Calendar} from 'vant';
+
+    export default {
+        name: "temperature",
+        data() {
+            return {
+                show: false,
+                minDate: new Date(2019, 11, 1),
+                maxDate: new Date(),
+                list: [
+                    {
+                        temp: 1,
+                    }, {
+                        temp: 2,
+                    }, {
+                        temp: 3,
+                    },
+                ]
+            }
+        },
+        components: {
+            [Button.name]: Button,
+            [Col.name]: Col,
+            [Row.name]: Row,
+            [Calendar.name]: Calendar,
+        },
+        methods: {
+            formatDate(date) {
+                return `${date.getMonth() + 1}/${date.getDate()}`;
+            },
+            onConfirm(e) {
+                this.show = false;
+                console.log(this.formatDate(e));
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .dk-header {
+        height: 60px;
+        padding: 0 15px;
+        border-bottom: 1PX solid #EEEEEE;
+    }
+
+    .dk-date {
+        color: #333333;
+        font-weight: bold;
+        font-size: 16px;
+    }
+
+    .dk-info {
+        text-align: center;
+    }
+
+    .dk-info div:first-child {
+        font-size: 32px;
+    }
+
+    .dk-info div:last-child {
+        color: #999999;
+        font-size: 14px;
+    }
+
+    .dk-title {
+        height: 49px;
+        font-size: 16px;
+        color: #333;
+        background: #EEEEEE;
+        padding: 0 15px;
+    }
+
+    .dk-title img {
+        width: 12px;
+        height: 16px;
+        margin-right: 10px;
+    }
+
+    .dk-cell {
+        height: 55px;
+        color: #333;
+        font-size: 14px;
+        padding: 0 15px;
+        display: flex;
+        align-items: center;
+    }
+
+    .dk-fever img {
+        height: 12px;
+        width: 12px;
+        margin-right: 5px;
+    }
+
+    .dk-fever-info {
+        font-size: 12px;
+        color: #fff;
+        -webkit-border-radius: 24px;
+        -moz-border-radius: 24px;
+        border-radius: 24px;
+        padding: 4px 8px;
+    }
+</style>

+ 0 - 119
src/view/cart/index.vue

@@ -1,119 +0,0 @@
-<template>
-  <div>
-    <van-checkbox-group class="card-goods" v-model="checkedGoods">
-      <van-checkbox
-        class="card-goods__item"
-        v-for="item in goods"
-        :key="item.id"
-        :name="item.id"
-      >
-        <van-card
-          :title="item.title"
-          :desc="item.desc"
-          :num="item.num"
-          :price="formatPrice(item.price)"
-          :thumb="item.thumb"
-        />
-      </van-checkbox>
-    </van-checkbox-group>
-    <van-submit-bar
-      :price="totalPrice"
-      :disabled="!checkedGoods.length"
-      :button-text="submitBarText"
-      @submit="onSubmit"
-    />
-  </div>
-</template>
-
-<script>
-import { Checkbox, CheckboxGroup, Card, SubmitBar, Toast } from 'vant';
-
-export default {
-  components: {
-    [Card.name]: Card,
-    [Checkbox.name]: Checkbox,
-    [SubmitBar.name]: SubmitBar,
-    [CheckboxGroup.name]: CheckboxGroup
-  },
-
-  data() {
-    return {
-      checkedGoods: ['1', '2', '3'],
-      goods: [{
-        id: '1',
-        title: '进口香蕉',
-        desc: '约250g,2根',
-        price: 200,
-        num: 1,
-        thumb: 'https://img.yzcdn.cn/public_files/2017/10/24/2f9a36046449dafb8608e99990b3c205.jpeg'
-      }, {
-        id: '2',
-        title: '陕西蜜梨',
-        desc: '约600g',
-        price: 690,
-        num: 1,
-        thumb: 'https://img.yzcdn.cn/public_files/2017/10/24/f6aabd6ac5521195e01e8e89ee9fc63f.jpeg'
-      }, {
-        id: '3',
-        title: '美国伽力果',
-        desc: '约680g/3个',
-        price: 2680,
-        num: 1,
-        thumb: 'https://img.yzcdn.cn/public_files/2017/10/24/320454216bbe9e25c7651e1fa51b31fd.jpeg'
-      }]
-    };
-  },
-
-  computed: {
-    submitBarText() {
-      const count = this.checkedGoods.length;
-      return '结算' + (count ? `(${count})` : '');
-    },
-
-    totalPrice() {
-      return this.goods.reduce((total, item) => total + (this.checkedGoods.indexOf(item.id) !== -1 ? item.price : 0), 0);
-    }
-  },
-
-  methods: {
-    formatPrice(price) {
-      return (price / 100).toFixed(2);
-    },
-
-    onSubmit() {
-      Toast('点击结算');
-    }
-  }
-};
-</script>
-
-<style lang="less">
-.card-goods {
-  padding: 10px 0;
-  background-color: #fff;
-
-  &__item {
-    position: relative;
-    background-color: #fafafa;
-
-    .van-checkbox__label {
-      width: 100%;
-      height: auto; // temp
-      padding: 0 10px 0 15px;
-      box-sizing: border-box;
-    }
-
-    .van-checkbox__icon {
-      top: 50%;
-      left: 10px;
-      z-index: 1;
-      position: absolute;
-      margin-top: -10px;
-    }
-
-    .van-card__price {
-      color: #f44;
-    }
-  }
-}
-</style>

+ 128 - 0
src/view/donations/index.vue

@@ -0,0 +1,128 @@
+<template>
+    <div class="donations">
+        <van-row type="flex" justify="center" align="center">
+            <van-col span="24">
+                <div class="dk-banner">
+                    <img src="" alt="" class="dk-banner-img">
+                    <div class="dk-banner-content">
+                        截止当前已经累计为武汉捐款
+                        <div style="font-size: 41px;margin-top: 10px">12020.32</div>
+                    </div>
+                </div>
+            </van-col>
+        </van-row>
+        <van-swipe
+                style="flex: 1;"
+                duration="1000"
+                autoplay="1000"
+                vertical
+                :loop="true"
+                height="44"
+                :show-indicators="false">
+            <van-swipe-item>
+                <van-row type="flex" justify="space-between" align="center" style="font-size: 14px;padding: 0 15px">
+                    <van-col>
+                        曹*
+                    </van-col>
+                    <van-col>
+                        成功为武汉捐赠0.01元
+                    </van-col>
+                    <van-col>
+                        2020.02.02 12:07
+                    </van-col>
+                </van-row>
+            </van-swipe-item>
+            <van-swipe-item>
+                <van-row type="flex" justify="space-between" align="center" style="font-size: 14px;padding: 0 15px">
+                    <van-col>
+                        曹*
+                    </van-col>
+                    <van-col>
+                        成功为武汉捐赠0.01元
+                    </van-col>
+                    <van-col>
+                        2020.02.02 12:07
+                    </van-col>
+                </van-row>
+            </van-swipe-item>
+            <van-swipe-item>
+                <van-row type="flex" justify="space-between" align="center" style="font-size: 14px;padding: 0 15px">
+                    <van-col>
+                        曹*
+                    </van-col>
+                    <van-col>
+                        成功为武汉捐赠0.01元
+                    </van-col>
+                    <van-col>
+                        2020.02.02 12:07
+                    </van-col>
+                </van-row>
+            </van-swipe-item>
+            <van-swipe-item>
+                <van-row type="flex" justify="space-between" align="center" style="font-size: 14px;padding: 0 15px">
+                    <van-col>
+                        曹*
+                    </van-col>
+                    <van-col>
+                        成功为武汉捐赠0.01元
+                    </van-col>
+                    <van-col>
+                        2020.02.02 12:07
+                    </van-col>
+                </van-row>
+            </van-swipe-item>
+
+        </van-swipe>
+    </div>
+</template>
+
+<script>
+    import {Button, Col, Row, Calendar, Swipe, SwipeItem} from 'vant';
+
+    export default {
+        name: "index",
+        components: {
+            [Button.name]: Button,
+            [Col.name]: Col,
+            [Row.name]: Row,
+            [Calendar.name]: Calendar,
+            [Swipe.name]: Swipe,
+            [SwipeItem.name]: SwipeItem,
+        },
+    }
+</script>
+
+<style scoped>
+    .donations {
+        height: 100vh;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        overflow: hidden;
+    }
+
+    .dk-banner {
+        height: 334px;
+        background: #4F7DA5;
+        position: relative;
+    }
+
+    .dk-banner-img {
+        position: absolute;
+        left: 0;
+        top: 0;
+        height: 100%;
+        width: 100%;
+    }
+
+    .dk-banner-content {
+        font-size: 14px;
+        text-align: center;
+        color: #fff;
+        position: absolute;
+        left: 0;
+        top: 127px;
+        width: 100%;
+    }
+
+</style>

+ 0 - 156
src/view/goods/index.vue

@@ -1,156 +0,0 @@
-<template>
-  <div class="goods">
-    <!-- NavBar导航栏 -->
-    <van-nav-bar :title="title" left-text="返回" left-arrow @click-left="onClickLeft"></van-nav-bar>
-    <van-swipe class="goods-swipe" :autoplay="3000">
-      <van-swipe-item v-for="thumb in goods.thumb" :key="thumb">
-        <img :src="thumb" >
-      </van-swipe-item>
-    </van-swipe>
-
-    <van-cell-group>
-      <van-cell>
-        <div class="goods-title">{{ goods.title }}</div>
-        <div class="goods-price">{{ formatPrice(goods.price) }}</div>
-      </van-cell>
-      <van-cell class="goods-express">
-        <van-col span="10">运费:{{ goods.express }}</van-col>
-        <van-col span="14">剩余:{{ goods.remain }}</van-col>
-      </van-cell>
-    </van-cell-group>
-
-    <van-cell-group class="goods-cell-group">
-      <van-cell value="进入店铺" icon="shop-o" is-link @click="sorry">
-        <template slot="title">
-          <span class="van-cell-text">有赞的店</span>
-          <van-tag class="goods-tag" type="danger">官方</van-tag>
-        </template>
-      </van-cell>
-      <van-cell title="线下门店" icon="location-o" is-link @click="sorry" />
-    </van-cell-group>
-
-    <van-cell-group class="goods-cell-group">
-      <van-cell title="查看商品详情" is-link @click="sorry" />
-    </van-cell-group>
-
-    <van-goods-action>
-      <van-goods-action-icon icon="chat-o" @click="sorry">
-        客服
-      </van-goods-action-icon>
-      <van-goods-action-icon icon="cart-o" @click="onClickCart">
-        购物车
-      </van-goods-action-icon>
-      <van-goods-action-button type="warning" @click="sorry">
-        加入购物车
-      </van-goods-action-button>
-      <van-goods-action-button type="danger" @click="sorry">
-        立即购买
-      </van-goods-action-button>
-    </van-goods-action>
-  </div>
-</template>
-
-<script>
-import {
-  Tag,
-  Col,
-  Icon,
-  Cell,
-  CellGroup,
-  Swipe,
-  Toast,
-  SwipeItem,
-  GoodsAction,
-  GoodsActionIcon,
-  GoodsActionButton,
-  NavBar
-} from 'vant';
-
-export default {
-  components: {
-    [Tag.name]: Tag,
-    [Col.name]: Col,
-    [Icon.name]: Icon,
-    [Cell.name]: Cell,
-    [CellGroup.name]: CellGroup,
-    [Swipe.name]: Swipe,
-    [SwipeItem.name]: SwipeItem,
-    [GoodsAction.name]: GoodsAction,
-    [GoodsActionIcon.name]: GoodsActionIcon,
-    [GoodsActionButton.name]: GoodsActionButton,
-    [NavBar.name]: NavBar
-  },
-
-  data() {
-    return {
-      title:"商品详情",
-      goods: {
-        title: '美国伽力果(约680g/3个)',
-        price: 2680,
-        express: '免运费',
-        remain: 19,
-        thumb: [
-          'https://img.yzcdn.cn/public_files/2017/10/24/e5a5a02309a41f9f5def56684808d9ae.jpeg',
-          'https://img.yzcdn.cn/public_files/2017/10/24/1791ba14088f9c2be8c610d0a6cc0f93.jpeg'
-        ]
-      }
-    };
-  },
-
-  methods: {
-    formatPrice() {
-      return '¥' + (this.goods.price / 100).toFixed(2);
-    },
-
-    onClickCart() {
-      this.$router.push('cart');
-    },
-
-    sorry() {
-      Toast('暂无后续逻辑~');
-    },
-    onClickLeft(){
-        this.$router.go(-1);
-    }
-  }
-};
-</script>
-
-<style lang="less">
-.goods {
-  padding-bottom: 50px;
-
-  &-swipe {
-    img {
-      width: 100%;
-      display: block;
-    }
-  }
-
-  &-title {
-    font-size: 16px;
-  }
-
-  &-price {
-    color: #f44;
-  }
-
-  &-express {
-    color: #999;
-    font-size: 12px;
-    padding: 5px 15px;
-  }
-
-  &-cell-group {
-    margin: 15px 0;
-
-    .van-cell__value {
-      color: #999;
-    }
-  }
-
-  &-tag {
-    margin-left: 5px;
-  }
-}
-</style>

+ 281 - 0
src/view/index/index.vue

@@ -0,0 +1,281 @@
+<template>
+    <div class="login">
+        <div v-if="role === 2">
+            <van-row>
+                <van-col span="24">
+                    <div class="dk-banner"></div>
+                </van-col>
+            </van-row>
+            <div style="margin-top: 40px;margin-bottom: 20px">
+                <van-row type="flex" justify="center">
+                    <van-col span="20">
+                        <div class="dk-info">
+
+                        </div>
+                    </van-col>
+                </van-row>
+                <van-row type="flex" justify="center">
+                    <van-col span="20">
+                        <div class="dk-info"></div>
+                    </van-col>
+                </van-row>
+            </div>
+            <van-row type="flex" justify="center">
+                <van-col span="24">
+                    <div class="dk-qrcode">
+
+                    </div>
+                </van-col>
+            </van-row>
+            <van-row>
+                <van-col span="24">
+                    <van-button color="#0177FF" text="邀请员工加入" class="dk-button"/>
+                </van-col>
+            </van-row>
+
+        </div>
+        <div v-if="role === 1">
+            <van-row>
+                <van-col span="24">
+                    <div class="dk-banner"></div>
+                </van-col>
+            </van-row>
+            <van-row type="flex" justify="center" style="margin-top: 30px;margin-bottom: 30px">
+                <van-col span="22">
+                    <van-row type="flex" justify="space-between">
+                        <van-col span="12">
+                            <div class="dengji">
+
+                            </div>
+                        </van-col>
+                        <van-col span="12">
+                            <div class="tiwen">
+
+                            </div>
+                        </van-col>
+                    </van-row>
+                </van-col>
+            </van-row>
+            <van-row type="flex" justify="center" align="center">
+                <van-col span="22">
+                    <van-row type="flex" justify="center" align="center" class="dk-content">
+                        <div class="dk" v-if="status === 1">
+                            <div style="font-size: 12px">今日还未打卡</div>
+                            <div style="font-size: 24px;margin-top: 15px;font-weight: bold">立即打卡</div>
+                        </div>
+                        <div class="dk-status" v-if="status === 2">
+                            <span class="dk-status-info">今日体温 <span
+                                    style="font-weight: bold">35.9~37.2℃</span>,体温正常</span>
+                            <div class="dk-status-message">
+                                <span style="font-weight: bold">开心打卡提醒您:</span>
+                                <p>
+                                    减少不必要的外出,不去人群聚集的地方。
+                                    外出戴口罩,勤洗手。
+                                </p>
+                            </div>
+                        </div>
+                        <div class="dk-status" v-if="status === 3">
+                            <span class="dk-status-info">今日体温 <span
+                                    style="font-weight: bold">37.3~38℃</span>,低烧</span>
+                            <div class="dk-status-message">
+                                <span style="font-weight: bold">开心打卡提醒您:</span>
+                                <p>
+                                    请多次进行体温的测量并进行监控,
+                                    并即使联系当地的发热门诊。
+                                </p>
+                            </div>
+                        </div>
+                        <div class="dk-status" v-if="status === 4">
+                            <span class="dk-status-info">今日体温 <span
+                                    style="font-weight: bold">38℃以上</span>,高烧</span>
+                            <div class="dk-status-message">
+                                <span style="font-weight: bold">开心打卡提醒您:</span>
+                                <p>
+                                    请立即前往当地的发热门诊,
+                                    出门时请做好口罩等防护措施。
+                                </p>
+                            </div>
+                        </div>
+                    </van-row>
+                </van-col>
+            </van-row>
+            <van-row type="flex" justify="center" style="margin-top: 30px">
+                <van-col span="22">
+                    <div class="dk-Donation"></div>
+                </van-col>
+            </van-row>
+            <van-row type="flex" justify="center" style="margin-top: 30px">
+                <van-col span="24">
+                    <div class="dk-qrcode">
+
+                    </div>
+                </van-col>
+            </van-row>
+            <van-row>
+                <van-col span="24">
+                    <van-button color="#0177FF" text="分享给好友" class="dk-button"/>
+                </van-col>
+            </van-row>
+        </div>
+        <div class="dk-cover" v-show="cover">
+            <img src="../../assets/clip.png" alt="">
+            <div class="dk-cover-content">点击右上角“…”
+                将连接分享给好友
+            </div>
+            <div class="dk-cover-button" @click="shareSure">确认</div>
+        </div>
+    </div>
+</template>
+
+<script>
+    // import {postAction} from '@/api/manage'
+    import {Button, Col, Row} from 'vant';
+    // import {setStore, getStore} from "@/utils/storage";
+
+    export default {
+        name: "index",
+        components: {
+            [Button.name]: Button,
+            [Col.name]: Col,
+            [Row.name]: Row,
+        },
+        data() {
+            return {
+                role: 1,
+                status: 2,
+                cover: false
+            };
+        },
+
+
+        methods: {
+            shareSure() {
+                this.cover = false
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+
+    .dk-banner {
+        height: 160px;
+        background: #ccc;
+    }
+
+    .dk-info {
+        height: 115px;
+        margin-bottom: 20px;
+        background: #cccccc;
+    }
+
+    .dk-qrcode {
+        background: #ccc;
+        height: 135px;
+        margin-bottom: 40px;
+    }
+
+    .dengji {
+        width: 95%;
+        height: 94px;
+        float: left;
+        background: #ccc;
+    }
+
+    .tiwen {
+        width: 95%;
+        height: 94px;
+        float: right;
+        background: #ccc;
+    }
+
+    .dk-content {
+        height: 197px;
+        background: #ccc;
+    }
+
+    .dk {
+        height: 132px;
+        width: 132px;
+        text-align: center;
+        color: #fff;
+        -webkit-border-radius: 100%;
+        -moz-border-radius: 100%;
+        border-radius: 100%;
+        background: linear-gradient(135deg, rgba(2, 123, 255, 1) 0%, rgba(1, 165, 255, 1) 100%);
+        box-shadow: 0px 2px 8px 0px rgba(0, 60, 130, 0.4);
+        display: flex;
+        align-items: center;
+        flex-direction: column;
+        justify-content: center;
+    }
+
+    .dk-Donation {
+        background: #ccc;
+        height: 100px;
+    }
+
+    .dk-button {
+        font-size: 17px;
+        width: 100%;
+        height: 60px;
+    }
+
+    .dk-status {
+        padding: 0 15px;
+    }
+
+    .dk-status-info {
+        font-size: 19px;
+
+    }
+
+    .dk-status-message {
+        font-size: 14px;
+        color: #333;
+        margin-top: 15px;
+    }
+
+    .dk-cover {
+        color: #fff;
+        font-size: 24px;
+        position: fixed;
+        left: 0;
+        top: 0;
+        height: 100%;
+        width: 100%;
+        background: rgba(0, 0, 0, 0.8);
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+    }
+
+    .dk-cover img {
+        height: 135px;
+        width: 119px;
+        margin-right: 68px;
+        margin-top: 15px;
+        align-self: flex-end;
+    }
+
+    .dk-cover-content {
+        height: 67px;
+        width: 192px;
+        margin-top: 56px;
+    }
+
+    .dk-cover-button {
+        width: 100px;
+        height: 44px;
+        text-align: center;
+        line-height: 39px;
+        color: #fff;
+        font-size: 16px;
+        font-weight: bold;
+        border-radius: 60px;
+        border: 3px solid rgba(255, 255, 255, 1);
+        box-sizing: border-box;
+        margin-top: 45px;
+    }
+</style>

+ 204 - 0
src/view/invitation/index.vue

@@ -0,0 +1,204 @@
+<template>
+    <div class="login">
+        <van-row>
+            <van-col span="24">
+                <div class="dk-banner"></div>
+            </van-col>
+        </van-row>
+        <div>
+            <van-row type="flex" justify="center" class="dk-invitation">
+                <span>邀请您加入 </span><span class="dk-company">江苏开心工作有限公司</span>
+            </van-row>
+            <van-cell-group :border="false">
+                <!-- 输入手机号,调起手机号键盘 -->
+                <van-row type="flex" justify="center">
+                    <van-col span="20">
+                        <van-field
+                                class="dk-border"
+                                v-model="phone"
+                                center
+                                clearable
+                                type="tel"
+                                left-icon="smile-o"
+                                placeholder="请输入手机号"
+                        ></van-field>
+                    </van-col>
+                </van-row>
+
+                <!-- 允许输入整数,调起数字键盘 -->
+                <van-row type="flex" justify="center" align="center" style="margin-top: 40px">
+                    <van-col span="20">
+                        <van-field
+                                v-model="code"
+                                maxlength="6"
+                                type="digit"
+                                left-icon="smile-o"
+                                placeholder="请输入验证码"
+                                class="dk-border">
+                            <van-button
+                                    :disabled="state.smsSendBtn"
+                                    slot="button"
+                                    size="small"
+                                    type="default"
+                                    @click="sendCode"
+                                    style="border:none"
+                                    class="dk-button "
+                                    :class="state.smsSendBtn&&'dk-color'">
+                                {{!state.smsSendBtn && '获取验证码' || ('重发 '+state.time+' s')}}
+                            </van-button>
+                        </van-field>
+                    </van-col>
+
+                </van-row>
+            </van-cell-group>
+            <van-row type="flex" justify="center">
+                <van-col span="20">
+                    <van-button
+                            :loading="loading"
+                            type="small"
+                            size="large"
+                            :color="!phone||!code?'#DDDDDD':'#0177FF'"
+                            @cick="login"
+                            text="下一步"
+                            style="height:47px;margin-top: 65px;border-radius: 47px;font-size: 16px;border-width: 0">
+
+                    </van-button>
+                </van-col>
+            </van-row>
+        </div>
+
+        <van-row>
+            <van-col span="24">
+                <div class="dk-qrcode"></div>
+            </van-col>
+        </van-row>
+    </div>
+</template>
+
+<script>
+    // import {postAction} from '@/api/manage'
+    import {Button, Cell, CellGroup, Field, Toast, Col, Row} from 'vant';
+    import {setStore, getStore} from "@/utils/storage";
+
+    export default {
+        name: "index",
+        components: {
+            [Button.name]: Button,
+            [Cell.name]: Cell,
+            [CellGroup.name]: CellGroup,
+            [Field.name]: Field,
+            [Col.name]: Col,
+            [Row.name]: Row,
+        },
+        data() {
+            return {
+                loading: false,
+                text: "登录",
+                phone: '',
+                code: '',
+                state: {
+                    time: 60,
+                    smsSendBtn: false,
+                },
+                url: {
+                    getSmsCaptcha: '/f/api/login/getAuthCode',
+                }
+            };
+        },
+
+        created() {
+            //企业已登录,跳转企业首页
+            if (getStore('login')) {
+                this.$router.replace({name: 'user', params: {enterprise_id: 123}});
+            }
+        },
+        methods: {
+            login() {
+                this.loading = true;
+                //登录成功,缓存用户信息,跳转相应页面
+                setStore('login', "123");
+                this.$router.replace('goods');
+            },
+            //获取验证码
+            sendCode() {
+                if (!this.phone) {
+                    Toast('请输入手机号~');
+                    return;
+                }
+                this.state.smsSendBtn = true;
+                let interval = window.setInterval(() => {
+                    if (this.state.time-- <= 0) {
+                        this.state.time = 60;
+                        this.state.smsSendBtn = false;
+                        window.clearInterval(interval);
+                    }
+                }, 1000);
+                let smsParams = {};
+                smsParams.phone = this.phone;
+                // postAction(this.url.getSmsCaptcha, smsParams)
+                //     .then(() => {
+                //         setTimeout(Toast('验证码发送中~'), 500);
+                //     })
+                //     .catch(() => {
+                //         setTimeout(Toast('验证码发送失败~'), 500);
+                //         clearInterval(interval);
+                //         this.state.time = 60;
+                //         this.state.smsSendBtn = false;
+                //     });
+            },
+            join() {
+                this.$router.push({name: 'join'})
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .login {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+    }
+
+    .dk-banner {
+        height: 160px;
+        background: #ccc;
+    }
+
+    .dk-border {
+        font-size: 14px;
+        border: 1px solid #0177FF;
+        border-radius: 47px;
+        box-sizing: border-box;
+    }
+
+    .dk-button {
+        height: auto;
+        width: auto;
+        font-size: 14px;
+        color: #999999;
+        opacity: 1;
+    }
+
+    .dk-color {
+        color: #0177FF;
+    }
+
+    .dk-invitation {
+        height: 60px;
+        font-size: 16px;
+        color: #333;
+        margin-top: 30px;
+        margin-bottom: 15px;
+    }
+
+    .dk-company {
+        font-weight: bold;
+    }
+
+    .dk-qrcode {
+        margin-top: 90px;
+        height: 135px;
+        background: #ccc;
+    }
+</style>

+ 141 - 0
src/view/invitation/next.vue

@@ -0,0 +1,141 @@
+<template>
+    <div class="login">
+        <van-row>
+            <van-col span="24">
+                <div class="dk-banner"></div>
+            </van-col>
+        </van-row>
+        <div>
+            <van-row type="flex" justify="center" class="dk-invitation">
+                <span>您是哪位同事? </span>
+            </van-row>
+            <van-cell-group :border="false">
+                <!-- 输入手机号,调起手机号键盘 -->
+                <van-row type="flex" justify="center">
+                    <van-col span="20">
+                        <van-field
+                                class="dk-border"
+                                v-model="name"
+                                center
+                                clearable
+                                type="text"
+                                left-icon="smile-o"
+                                placeholder="请输入手机号"
+                        ></van-field>
+                    </van-col>
+                </van-row>
+            </van-cell-group>
+            <van-row type="flex" justify="center">
+                <van-col span="20">
+                    <van-button
+                            :loading="loading"
+                            type="small"
+                            size="large"
+                            :color="!name?'#DDDDDD':'#0177FF'"
+                            @cick="join"
+                            text="立即加入"
+                            style="height:47px;margin-top: 65px;border-radius: 47px;font-size: 16px;border-width: 0">
+
+                    </van-button>
+                </van-col>
+            </van-row>
+        </div>
+
+        <van-row>
+            <van-col span="24">
+                <div class="dk-qrcode"></div>
+            </van-col>
+        </van-row>
+    </div>
+</template>
+
+<script>
+    // import {postAction} from '@/api/manage'
+    import {Button, Cell, CellGroup, Field, Col, Row} from 'vant';
+    // import {setStore, getStore} from "@/utils/storage";
+
+    export default {
+        name: "next",
+        components: {
+            [Button.name]: Button,
+            [Cell.name]: Cell,
+            [CellGroup.name]: CellGroup,
+            [Field.name]: Field,
+            [Col.name]: Col,
+            [Row.name]: Row,
+        },
+        data() {
+            return {
+                loading: false,
+                text: "登录",
+                name: '',
+                state: {
+                    time: 60,
+                    smsSendBtn: false,
+                },
+                url: {
+                    getSmsCaptcha: '/f/api/login/getAuthCode',
+                }
+            };
+        },
+
+        created() {
+
+        },
+        methods: {
+            join() {
+                this.$router.push({name: 'join'})
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .login {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+    }
+
+    .dk-banner {
+        height: 160px;
+        background: #ccc;
+    }
+
+    .dk-border {
+        font-size: 14px;
+        border: 1px solid #0177FF;
+        border-radius: 47px;
+        box-sizing: border-box;
+    }
+
+    .dk-button {
+        height: auto;
+        width: auto;
+        font-size: 14px;
+        color: #999999;
+        opacity: 1;
+    }
+
+    .dk-color {
+        color: #0177FF;
+    }
+
+    .dk-invitation {
+        height: 60px;
+        font-size: 16px;
+        color: #333;
+        margin-top: 30px;
+        margin-bottom: 15px;
+    }
+
+    .dk-company {
+        font-weight: bold;
+    }
+
+    .dk-qrcode {
+        margin-top: 90px;
+        height: 135px;
+        background: #ccc;
+    }
+</style>

+ 226 - 0
src/view/journey_detail/journey_detail.vue

@@ -0,0 +1,226 @@
+<template>
+    <div>
+        <van-row class="dk-title" type="flex" align="center">
+            <img src="../../assets/temperature_randis.png" alt="">
+            <span style="font-weight: bold">户籍地址</span>
+        </van-row>
+        <van-cell-group>
+            <van-cell
+                    class="dk-cell"
+                    title="省市:"
+                    title-style="font-weight: bold"
+                    :center="true"
+                    is-link
+                    value="请选择"
+                    @click="role===1?setData('show_address'):''"/>
+            <van-cell
+                    class="dk-cell"
+                    title="详细地址:"
+                    :center="true"
+                    title-style="font-weight: bold">
+                <van-field
+                        slot="default"
+                        v-model="value"
+                        :disabled="role !== 1"
+                        placeholder="请填写 "
+                        input-align="right"
+                        style="padding: 0;"/>
+            </van-cell>
+        </van-cell-group>
+        <van-row class="dk-title" type="flex" align="center">
+            <img src="../../assets/temperature_randis.png" alt="">
+            <span style="font-weight: bold">居住地址</span>
+        </van-row>
+        <van-cell-group>
+            <van-cell
+                    class="dk-cell"
+                    title="省市:"
+                    title-style="font-weight: bold"
+                    :center="true"
+                    is-link
+                    value="请选择"
+                    @click="role === 1?setData('show_address'):''"/>
+            <van-cell
+                    class="dk-cell"
+                    title="详细地址:"
+                    :center="true"
+                    title-style="font-weight: bold">
+                <van-field
+                        slot="default"
+                        v-model="value"
+                        placeholder="请填写 "
+                        :disabled="role !== 1"
+                        input-align="right"
+                        style="padding: 0;"/>
+            </van-cell>
+        </van-cell-group>
+        <van-row class="dk-title" type="flex" align="center">
+            <img src="../../assets/temperature_randis.png" alt="">
+            <span style="font-weight: bold">行程信息</span>
+        </van-row>
+        <van-cell
+                class="dk-cell"
+                title="是否离市:"
+                title-style="font-weight: bold"
+                :center="true"
+                is-link
+                value="请选择"
+                @click="role === 1?setData('show_choose'):''"
+        />
+
+        <van-cell
+                class="dk-cell"
+                title="离市后目的地:"
+                title-style="font-weight: bold"
+                :center="true"
+                is-link
+                value="请选择"
+                @click="role === 1?setData('show_address'):''"
+        />
+        <van-cell
+                class="dk-cell"
+                title="预计返市日期:"
+                title-style="font-weight: bold"
+                :center="true"
+                is-link
+                value="请选择"
+                @click="role === 1?setData('show_data'):''"
+        />
+        <van-row class="dk-title" type="flex" align="center">
+            <img src="../../assets/temperature_randis.png" alt="">
+            <span style="font-weight: bold">其他信息</span>
+        </van-row>
+        <van-cell
+                class="dk-cell"
+                title="两周内是否有湖北地区旅行史:"
+                title-style="font-weight: bold;color:#9F3112;flex:2;"
+                value-class="dk-right"
+                :center="true"
+                is-link
+                value="请选择"
+                @click="role === 1?setData('show_choose'):''"
+        />
+        <van-cell
+                class="dk-cell"
+                title="是否有与湖北地区人员接触史:"
+                title-style="font-weight: bold;flex:2;"
+                :center="true"
+                is-link
+                value="请选择"
+                @click="role === 1?setData('show_choose'):''"
+        />
+        <van-cell
+                class="dk-cell"
+                title="是否有与新兴冠状病毒确诊病例接触史:"
+                title-style="font-weight: bold;color:#9F3112;flex:4;"
+                :center="true"
+                is-link
+                value="请选择"
+                data-value="test"
+                @click="role === 1?setData('show_choose'):''"
+        />
+        <van-popup
+                v-model="show_address"
+                position="bottom"
+                :style="{ height: '45%' }"
+        >
+            <van-area :area-list="areaList"/>
+        </van-popup>
+        <van-popup
+                v-model="show_choose"
+                position="bottom"
+                :style="{ height: '45%' }"
+        >
+            <van-picker :columns="columns" show-toolbar @change="choose"/>
+        </van-popup>
+        <van-calendar
+                v-model="show_data"
+                :min-date="minDate"
+                color="#0177FF"
+                :default-date="minDate"
+                @confirm="chooseTime"/>
+
+    </div>
+</template>
+
+<script>
+    import {Button, Col, Row, Calendar, Cell, CellGroup, Popup, Area, Field, Picker} from 'vant';
+    import areaList from '../../utils/area'
+
+    export default {
+        name: "journey_detail",
+        components: {
+            [Button.name]: Button,
+            [Col.name]: Col,
+            [Row.name]: Row,
+            [Calendar.name]: Calendar,
+            [Cell.name]: Cell,
+            [CellGroup.name]: CellGroup,
+            [Area.name]: Area,
+            [Popup.name]: Popup,
+            [Field.name]: Field,
+            [Picker.name]: Picker,
+        },
+        data() {
+            return {
+                areaList,
+                role: 1,
+                show_address: false,
+                show_choose: false,
+                show_data: false,
+                value: '',
+                minDate: new Date(),
+                columns: ['是', '否'],
+                tmp_name: ''
+            }
+        },
+        mounted() {
+
+        },
+        methods: {
+            setData(show, data) {
+                this[show] = true;
+                if (data) {
+                    this.tmp_name = data;
+                }
+            },
+            choose() {
+                console.log(this.test);
+            },
+            chooseTime() {
+
+            }
+
+        }
+    }
+</script>
+
+<style scoped>
+    .dk-title {
+        height: 49px;
+        font-size: 16px;
+        color: #333;
+        background: #EEEEEE;
+        padding: 0 15px;
+    }
+
+    .dk-title img {
+        width: 4px;
+        height: 16px;
+        margin-right: 10px;
+    }
+
+    .dk-cell {
+        height: 55px;
+    }
+
+    .dk-fever-link {
+        color: #0177FF;
+        font-size: 14px;
+        font-weight: bold;
+    }
+
+    .van-field__control {
+        text-align: right;
+    }
+</style>

+ 7 - 4
src/view/login/index.vue

@@ -54,7 +54,7 @@
                             :loading="loading"
                             type="small"
                             size="large"
-                            :color="!tel||!code?'#DDDDDD':'#0177FF'"
+                            :color="!phone||!code?'#DDDDDD':'#0177FF'"
                             @cick="login"
                             text="登录"
                             style="height:47px;margin-top: 65px;border-radius: 47px;font-size: 16px;border-width: 0">
@@ -67,7 +67,6 @@
             </van-row>
         </div>
 
-
         <van-row>
             <van-col span="24">
                 <div class="dk-qrcode"></div>
@@ -79,7 +78,7 @@
 <script>
     // import {postAction} from '@/api/manage'
     import {Button, Cell, CellGroup, Field, Toast, Col, Row} from 'vant';
-    import {setStore} from "@/utils/storage";
+    import {setStore, getStore} from "@/utils/storage";
 
     export default {
         name: "index",
@@ -106,8 +105,12 @@
                 }
             };
         },
-        mounted() {
 
+        created() {
+            //企业已登录,跳转企业首页
+            if (getStore('login')) {
+                this.$router.replace({name: 'user', params: {enterprise_id: 123}});
+            }
         },
         methods: {
             login() {

+ 95 - 0
src/view/staff/clock.vue

@@ -0,0 +1,95 @@
+<template>
+    <div>
+        <van-row>
+            <van-col span="24">
+                <van-row
+                        class='dk-cell'
+                        type="flex"
+                        align="center"
+                        justify="space-between"
+                        v-for="(item,index) in list"
+                        :key="index">
+                    <van-col span="15">
+                        <span>2020年02月12日</span>
+                    </van-col>
+                    <van-col span="9">
+                        <van-row class="dk-fever" type="flex" align="center" justify="end">
+                            <div v-if="item.temp === 1" class="dk-fever-info" style="background: #55B3DA;">
+                                <img src="../../assets/normal_fever.png" alt="">
+                                <span>正常 35.9~37.2</span>
+                            </div>
+                            <div v-if="item.temp === 2" class="dk-fever-info" style="background: #E4A835;">
+                                <img src="../../assets/low_fever.png" alt=""/>
+                                <span>低烧 37.3~38</span>
+                            </div>
+                            <div v-if="item.temp === 3" class="dk-fever-info" style="background: #C14810;">
+                                <img src="../../assets/height_fever.png" alt="">
+                                <span>高烧 38 以上</span>
+                            </div>
+                            <div v-if="item.temp === 4" class="dk-fever-info" style="background: #CCCCCC;">
+                                <img src="../../assets/nosign.png" alt="">
+                                <span>未打卡</span>
+                            </div>
+                        </van-row>
+                    </van-col>
+                </van-row>
+            </van-col>
+        </van-row>
+    </div>
+</template>
+
+<script>
+    import {Col, Row} from 'vant';
+
+    export default {
+        name: "clock",
+        components: {
+            [Col.name]: Col,
+            [Row.name]: Row,
+        },
+        data() {
+            return {
+                list: [
+                    {
+                        temp: 1,
+                    },
+                    {
+                        temp: 2,
+                    },
+                    {
+                        temp: 3,
+                    },
+                    {
+                        temp: 4,
+                    },
+                ]
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .dk-cell {
+        height: 55px;
+        color: #333;
+        font-size: 14px;
+        padding: 0 15px;
+        display: flex;
+        align-items: center;
+    }
+
+    .dk-fever img {
+        height: 12px;
+        width: 12px;
+        margin-right: 5px;
+    }
+
+    .dk-fever-info {
+        font-size: 12px;
+        color: #fff;
+        -webkit-border-radius: 24px;
+        -moz-border-radius: 24px;
+        border-radius: 24px;
+        padding: 4px 8px;
+    }
+</style>

+ 87 - 0
src/view/staff/temperature.vue

@@ -0,0 +1,87 @@
+<template>
+    <div class="temperature">
+        <van-cell-group>
+            <van-cell
+                    class="dk-cell"
+                    title="当前位置:"
+                    title-style="font-weight: bold;"
+                    value-class="dk-address"
+                    :center="true"
+                    value="北京市"
+            />
+            <van-cell
+                    class="dk-cell"
+                    title="今日体温(腋温):"
+                    title-style="font-weight: bold;"
+                    value-class="dk-address"
+                    :center="true"
+                    is-link
+                    value="请选择"
+                    @click="show = true"
+            />
+        </van-cell-group>
+        <van-row>
+            <van-col span="24">
+                <van-button color="#0177FF" text="提交" class="dk-button"/>
+            </van-col>
+        </van-row>
+
+        <van-popup
+                v-model="show"
+                position="bottom"
+                :style="{ height: '45%' }"
+        >
+            <van-picker :columns="columns" show-toolbar @change="choose"/>
+        </van-popup>
+    </div>
+</template>
+
+<script>
+    import {Button, Cell, CellGroup, Popup, Picker} from 'vant';
+
+    export default {
+        name: "staff_temperature",
+        components: {
+            [Button.name]: Button,
+            [Popup.name]: Popup,
+            [Cell.name]: Cell,
+            [CellGroup.name]: CellGroup,
+            [Picker.name]: Picker,
+        },
+        data() {
+            return {
+                show: false,
+                columns: ['是', '否']
+            }
+        },
+        methods: {
+            choose() {
+
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .temperature {
+        height: 100vh;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+    }
+
+    .dk-cell {
+        height: 55px;
+    }
+
+    .dk-address {
+        color: #333333;
+        font-size: 14px;
+    }
+
+    .dk-button {
+        font-size: 17px;
+        width: 100%;
+        height: 60px;
+    }
+</style>

+ 9 - 8
src/view/login/staff.vue

@@ -54,7 +54,7 @@
                             :loading="loading"
                             type="small"
                             size="large"
-                            :color="!tel||!code?'#DDDDDD':'#0177FF'"
+                            :color="!phone||!code?'#DDDDDD':'#0177FF'"
                             @cick="login"
                             text="登录"
                             style="height:47px;margin-top: 65px;border-radius: 47px;font-size: 16px;border-width: 0">
@@ -79,10 +79,10 @@
 <script>
     // import {postAction} from '@/api/manage'
     import {Button, Cell, CellGroup, Field, Toast, Col, Row} from 'vant';
-    import {setStore} from "@/utils/storage";
+    import {setStore, getStore} from "@/utils/storage";
 
     export default {
-        name: "staff",
+        name: "stafflogin",
         components: {
             [Button.name]: Button,
             [Cell.name]: Cell,
@@ -106,17 +106,18 @@
                 }
             };
         },
-        created() {
-
-        },
-        mounted() {
 
+        created() {
+            //企业已登录,跳转企业首页
+            if (getStore('stafflogin')) {
+                // this.$router.replace({name: 'user', params: {enterprise_id: 123}});
+            }
         },
         methods: {
             login() {
                 this.loading = true;
                 //登录成功,缓存用户信息,跳转相应页面
-                setStore('login', "123");
+                setStore('stafflogin', "123");
                 this.$router.replace('goods');
             },
             //获取验证码

+ 0 - 73
src/view/user/index.vue

@@ -1,73 +0,0 @@
-<template>
-  <div>
-    <img class="user-poster" src="https://img.yzcdn.cn/public_files/2017/10/23/8690bb321356070e0b8c4404d087f8fd.png">
-    <van-row class="user-links">
-      <van-col span="6">
-        <van-icon name="pending-payment" />
-        待付款
-      </van-col>
-      <van-col span="6">
-        <van-icon name="records" />
-        待接单
-      </van-col>
-      <van-col span="6">
-        <van-icon name="tosend" />
-        待发货
-      </van-col>
-      <van-col span="6">
-        <van-icon name="logistics" />
-        已发货
-      </van-col>
-    </van-row>
-
-    <van-cell-group class="user-group">
-      <van-cell icon="records" title="全部订单" is-link />
-    </van-cell-group>
-
-    <van-cell-group>
-      <van-cell icon="points" title="我的积分" is-link />
-      <van-cell icon="gold-coin-o" title="我的优惠券" is-link />
-      <van-cell icon="gift-o" title="我收到的礼物" is-link />
-    </van-cell-group>
-  </div>
-</template>
-
-<script>
-import { Row, Col, Icon, Cell, CellGroup } from 'vant';
-
-export default {
-  components: {
-    [Row.name]: Row,
-    [Col.name]: Col,
-    [Icon.name]: Icon,
-    [Cell.name]: Cell,
-    [CellGroup.name]: CellGroup
-  }
-};
-</script>
-
-<style lang="less">
-.user {
-  &-poster {
-    width: 100%;
-    height: 53vw;
-    display: block;
-  }
-
-  &-group {
-    margin-bottom: 15px;
-  }
-
-  &-links {
-    padding: 15px 0;
-    font-size: 12px;
-    text-align: center;
-    background-color: #fff;
-
-    .van-icon {
-      display: block;
-      font-size: 24px;
-    }
-  }
-}
-</style>

+ 1 - 1
vue.config.js

@@ -36,7 +36,7 @@ module.exports = {
                 plugins: [
                     autoprefixer(),
                     pxtorem({
-                        rootValue: 32,
+                        rootValue: 37.5,
                         propList: ['*']
                     })
                 ]