作者 lihongjuan

1

1 { 1 {
2 "pages": [ 2 "pages": [
  3 + "pages/start/start",
  4 + "pages/enterdoor/enterdoor",
3 "pages/logining/logining", 5 "pages/logining/logining",
4 "pages/businessoffice/businessoffice", 6 "pages/businessoffice/businessoffice",
5 - "pages/start/start",  
6 "pages/service/service", 7 "pages/service/service",
7 "pages/login/login", 8 "pages/login/login",
8 "pages/fugongshenqing/fugongshenqing", 9 "pages/fugongshenqing/fugongshenqing",
@@ -23,8 +24,10 @@ @@ -23,8 +24,10 @@
23 "pages/publish/publish", 24 "pages/publish/publish",
24 "pages/interaction/interaction", 25 "pages/interaction/interaction",
25 "pages/usercenter/usercenter", 26 "pages/usercenter/usercenter",
26 - "pages/shenhez/shenhez"  
27 - 27 + "pages/shenhez/shenhez",
  28 + "pages/backenterdoor/backenterdoor",
  29 + "pages/outbackpeopledoor/outbackpeopledoor",
  30 + "pages/outbackpeopledetail/outbackpeopledetail"
28 ], 31 ],
29 "window": { 32 "window": {
30 "backgroundTextStyle": "light", 33 "backgroundTextStyle": "light",
  1 +/**app.wxss**/
  2 +
  3 +image {
  4 + width: 100%;
  5 + height: 100%;
  6 +}
  7 +
  8 +.commonpadding {
  9 + padding: 24rpx 32rpx;
  10 + box-sizing: border-box;
  11 + background: #fff;
  12 +}
  13 +
  14 +.container {
  15 + height: 100%;
  16 + display: flex;
  17 + flex-direction: column;
  18 + align-items: center;
  19 + justify-content: space-between;
  20 + padding: 200rpx 0;
  21 + box-sizing: border-box;
  22 +}
  23 +
  24 +.commontwo {
  25 + color: #232323;
  26 + font-size: 28rpx;
  27 +}
  28 +
  29 +.flex {
  30 + display: flex;
  31 +}
  32 +
  33 +.flexone {
  34 + display: flex;
  35 + align-items: center;
  36 +}
  37 +
  38 +.flextwo {
  39 + display: flex;
  40 + align-items: center;
  41 + justify-content: space-between;
  42 +}
  43 +
  44 +.flexthree {
  45 + display: flex;
  46 + align-items: center;
  47 + justify-content: center;
  48 +}
  49 +
  50 +.commonone {
  51 + color: #06121e;
  52 + font-size: 28rpx;
  53 + font-weight: bold;
  54 +}
  55 +
  56 +.commontwo {
  57 + color: #8c9198;
  58 + font-size: 28rpx;
  59 +}
  60 +
  61 +.selname {
  62 + color: #06121e;
  63 + font-size: 28rpx;
  64 +}
  65 +
  66 +.yourow {
  67 + width: 28rpx;
  68 + height: 28rpx;
  69 + font-size: 0;
  70 +}
  71 +
  72 +.nodata {
  73 + width: 300rpx;
  74 + color: #8c9198;
  75 + font-size: 32rpx;
  76 + text-align: center;
  77 + position: absolute;
  78 + top: 30%;
  79 + left: 50%;
  80 + transform: translate(-50%, -50%);
  81 +}
  82 +
  83 +.yourow {
  84 + width: 28rpx;
  85 + height: 28rpx;
  86 + font-size: 0;
  87 +}
  88 +
  89 +.bot {
  90 + width: 750rpx;
  91 + display: flex;
  92 + justify-content: center;
  93 + align-items: center;
  94 + background: #fff;
  95 + padding: 14rpx 32rpx;
  96 + box-sizing: border-box;
  97 + margin-top: 40rpx;
  98 +}
  99 +
  100 +.botk {
  101 + width: 750rpx;
  102 + display: flex;
  103 + justify-content: center;
  104 + align-items: center;
  105 + background: #fff;
  106 + position: fixed;
  107 + bottom: 0;
  108 + left: 0;
  109 + padding: 14rpx 32rpx;
  110 + box-sizing: border-box;
  111 + margin-top: 40rpx;
  112 +}
  113 +
  114 +.subtwo {
  115 + width: 686rpx;
  116 + height: 88rpx;
  117 + background: #1c8fff;
  118 + opacity: 1;
  119 + color: #fff;
  120 + font-size: 28rpx;
  121 + text-align: center;
  122 + line-height: 88rpx;
  123 +}
  124 +
  125 +/* 列表 */
  126 +
  127 +.useboxitem {
  128 + width: 100%;
  129 + padding: 30rpx 0;
  130 + box-sizing: border-box;
  131 + background: #fff;
  132 + border-bottom: 1rpx solid #f5f5f5;
  133 +}
  134 +
  135 +.leftimg {
  136 + width: 48rpx;
  137 + height: 48rpx;
  138 + font-size: 0;
  139 +}
  140 +
  141 +.itemname {
  142 + font-size: 28rpx;
  143 + font-weight: bold;
  144 +}
  145 +
  146 +.backtop {
  147 + width: 750rpx;
  148 + background: #fff;
  149 + opacity: 1;
  150 + border-radius: 8rpx;
  151 + padding: 0 32rpx;
  152 + box-sizing: border-box;
  153 +}
  154 +
  155 +.commonenter {
  156 + width: 420rpx;
  157 + margin-right: 50rpx;
  158 +}
  159 +
  160 +.commonenter input {
  161 + width: 100%;
  162 + height: 100%;
  163 + text-align: right;
  164 +}
  165 +
  166 +/* 登录遮罩层 */
  167 +
  168 +.registerk {
  169 + width: 100%;
  170 + height: 100%;
  171 + background-color: rgba(0, 0, 0, 0.5);
  172 + position: fixed;
  173 + top: 0;
  174 + left: 0;
  175 + right: 0;
  176 + z-index: 999;
  177 +}
  178 +
  179 +.userwrap {
  180 + width: 750rpx;
  181 + height: 512rpx;
  182 + background: rgba(255, 255, 255, 1);
  183 + border-radius: 24rpx 24rpx 0rpx 0rpx;
  184 + position: absolute;
  185 + bottom: 0;
  186 + left: 0;
  187 +}
  188 +
  189 +.loimg {
  190 + width: 48rpx;
  191 + height: 48rpx;
  192 + font-size: 0;
  193 +}
  194 +
  195 +.shoubtn {
  196 + width: 686rpx !important;
  197 + height: 100rpx;
  198 + background: rgba(0, 194, 95, 1);
  199 + border-radius: 50rpx;
  200 + margin: 64rpx auto 0;
  201 +}
  202 +
  203 +.word {
  204 + color: #fff;
  205 + font-size: 32rpx;
  206 + margin-left: 8rpx;
  207 +}
  208 +
  209 +.shou {
  210 + color: #06121f;
  211 + font-size: 56rpx;
  212 + font-weight: bold;
  213 + margin-top: 32rpx;
  214 +}
  215 +
  216 +.shoutext {
  217 + width: 686rpx;
  218 + color: #8c9198;
  219 + font-size: 32rpx;
  220 + margin-top: 40rpx;
  221 +}
  222 +
  223 +.lotop {
  224 + display: flex;
  225 + justify-content: flex-end;
  226 + align-items: center;
  227 +}
  228 +
  229 +.men {
  230 + width: 260rpx!important;
  231 + text-align: right;
  232 +}
  233 +
  234 +.writebtn {
  235 + width: 590rpx;
  236 + height: 88rpx;
  237 + background: rgba(28, 143, 255, 1);
  238 + opacity: 1;
  239 + border-radius: 12rpx;
  240 + color: #fff;
  241 + font-size: 28rpx;
  242 + text-align: center;
  243 + line-height: 88rpx;
  244 + margin: 64rpx auto 0;
  245 +}
  246 +
  247 +::-webkit-scrollbar {
  248 + width: 0;
  249 + height: 0;
  250 + color: transparent;
  251 +}
  1 +// pages/enterdoor/enterdoor.js
  2 +const app=getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + scene:'',
  10 + clock: ''
  11 + },
  12 +
  13 + /**
  14 + * 生命周期函数--监听页面加载
  15 + */
  16 + onLoad: function (options) {
  17 + this.setData({
  18 + scene: options.scene,
  19 + clock: options.clock
  20 + })
  21 +
  22 + },
  23 + // 返静人员管理
  24 + backlist() {
  25 + wx.navigateTo({
  26 + url: '/pages/backpeoplelist/backpeoplelist',
  27 + })
  28 + },
  29 + // 营业场所管理
  30 + ground() {
  31 + wx.navigateTo({
  32 + url: '/pages/businessoffice/businessoffice',
  33 + })
  34 + },
  35 + // 境内人员管理
  36 + incountry(){
  37 + let that = this;
  38 + var url = '/api/user/index';
  39 + var params = {
  40 +
  41 +
  42 + }
  43 + app.post(url, params).then((res) => {
  44 + console.log(res);
  45 + // if (res.qrcode == '') {
  46 + // wx.navigateTo({
  47 + // url: '/pages/backpeople/backpeople',
  48 +
  49 + // })
  50 +
  51 + // } else {
  52 + // wx.navigateTo({
  53 + // url: '/pages/backdetail/backdetail',
  54 +
  55 + // })
  56 +
  57 + // }
  58 +
  59 + if (res.back_type == 0) {
  60 + wx.navigateTo({
  61 + url: '/pages/backpeople/backpeople?clock=' + this.data.clock + '&scene=' + this.data.scene,
  62 +
  63 + })
  64 +
  65 + } else if(res.back_type == 1) {
  66 + wx.navigateTo({
  67 + url: '/pages/backdetail/backdetail',
  68 +
  69 + })
  70 +
  71 + } else if(res.back_type == 2) {
  72 + wx.navigateTo({
  73 + url: '/pages/outbackpeopledetail/outbackpeopledetail',
  74 +
  75 + })
  76 +
  77 + }
  78 +
  79 +
  80 +
  81 +
  82 + }).catch((err) => {
  83 +
  84 + })
  85 +
  86 + },
  87 +
  88 + // 境外人员管理
  89 + outcountry(){
  90 + let that = this;
  91 + var url = '/api/user/index';
  92 + var params = {
  93 +
  94 +
  95 + }
  96 + app.post(url, params).then((res) => {
  97 + console.log(res);
  98 + // wx.navigateTo({
  99 + // url: '/pages/outbackpeopledetail/outbackpeopledetail',
  100 +
  101 + // })
  102 + // if (res.qrcode == '') {
  103 + // wx.navigateTo({
  104 + // url: '/pages/outbackpeopledoor/outbackpeopledoor',
  105 +
  106 + // })
  107 +
  108 + // } else {
  109 + // wx.navigateTo({
  110 + // url: '/pages/backdetail/backdetail',
  111 +
  112 + // })
  113 +
  114 + // }
  115 +
  116 + if (res.back_type == 0) {
  117 + wx.navigateTo({
  118 + url: '/pages/outbackpeopledoor/outbackpeopledoor?clock=' + this.data.clock + '&scene=' + this.data.scene,
  119 +
  120 + })
  121 +
  122 + } else if(res.back_type == 1) {
  123 + wx.navigateTo({
  124 + url: '/pages/backdetail/backdetail',
  125 +
  126 + })
  127 +
  128 + } else if (res.back_type == 2) {
  129 + wx.navigateTo({
  130 + url: '/pages/outbackpeopledetail/outbackpeopledetail',
  131 +
  132 + })
  133 +
  134 + }
  135 +
  136 +
  137 +
  138 +
  139 +
  140 + }).catch((err) => {
  141 +
  142 + })
  143 + },
  144 +
  145 + /**
  146 + * 生命周期函数--监听页面初次渲染完成
  147 + */
  148 + onReady: function () {
  149 +
  150 + },
  151 +
  152 + /**
  153 + * 生命周期函数--监听页面显示
  154 + */
  155 + onShow: function () {
  156 +
  157 + },
  158 +
  159 + /**
  160 + * 生命周期函数--监听页面隐藏
  161 + */
  162 + onHide: function () {
  163 +
  164 + },
  165 +
  166 + /**
  167 + * 生命周期函数--监听页面卸载
  168 + */
  169 + onUnload: function () {
  170 +
  171 + },
  172 +
  173 + /**
  174 + * 页面相关事件处理函数--监听用户下拉动作
  175 + */
  176 + onPullDownRefresh: function () {
  177 +
  178 + },
  179 +
  180 + /**
  181 + * 页面上拉触底事件的处理函数
  182 + */
  183 + onReachBottom: function () {
  184 +
  185 + },
  186 +
  187 + /**
  188 + * 用户点击右上角分享
  189 + */
  190 + onShareAppMessage: function () {
  191 +
  192 + }
  193 +})
  1 +{
  2 + "navigationBarTitleText": "静海防疫服务平台"
  3 +}
  1 +<view class="topimg">
  2 + <image src="/img/bg.png"></image>
  3 + <view class="topback">
  4 + <view class="topitem flextwo">
  5 + <view class="topitemblock" bindtap="incountry">
  6 + <view class="topitemimg">
  7 + <image src="/img/icon_yingye.png"></image>
  8 + </view>
  9 + <view class="topitmname">境内人员登记</view>
  10 + </view>
  11 + <view class="topitemblock" bindtap="outcountry">
  12 + <view class="topitemimg">
  13 + <image src="/img/icon_fanjing.png"></image>
  14 + </view>
  15 + <view class="topitmname">境外人员登记</view>
  16 + </view>
  17 + </view>
  18 + </view>
  19 +</view>
  1 +.topimg {
  2 + width: 750rpx;
  3 + height: 342rpx;
  4 + font-size: 0;
  5 + position: relative;
  6 +}
  7 +
  8 +.topback {
  9 + width: 686rpx;
  10 + height: 244rpx;
  11 + background: rgba(255, 255, 255, 1);
  12 + box-shadow: 0rpx 12rpx 24rpx rgba(16, 104, 191, 0.08);
  13 + opacity: 1;
  14 + border-radius: 8rpx;
  15 + position: absolute;
  16 + top:160rpx;
  17 + left:32rpx;
  18 +}
  19 +.topitemblock{
  20 + display:flex;
  21 + flex-direction: column;
  22 + align-items: center;
  23 + justify-content: center
  24 +}
  25 +.topitemimg{
  26 + width:92rpx;
  27 + height:92rpx;
  28 + font-size: 0
  29 +}
  30 +.topitmname{
  31 + color:#06121E;
  32 + font-size: 28rpx;
  33 + margin-top:16rpx;
  34 +}
  35 +.topitem{
  36 + padding: 48rpx 90rpx;
  37 + box-sizing: border-box
  38 +}
1 <view class="backtop"> 1 <view class="backtop">
2 <view class="useboxitem backitem flextwo"> 2 <view class="useboxitem backitem flextwo">
3 - <view class="itemname commonone">出行方式</view> 3 + <view class="itemname">出行方式</view>
4 4
5 5
6 <view class="itemright flexone"> 6 <view class="itemright flexone">
@@ -258,7 +258,7 @@ Page({ @@ -258,7 +258,7 @@ Page({
258 wx.redirectTo({ 258 wx.redirectTo({
259 259
260 260
261 - url: '/pages/backpeople/backpeople?clock=' + 1 + '&scene=' + this.data.companyid, 261 + url: '/pages/backenterdoor/backenterdoor?clock=' + 1 + '&scene=' + this.data.companyid,
262 }) 262 })
263 }, 263 },
264 264
  1 +// pages/enterdoor/enterdoor.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 + // 返静人员管理
  18 + backlist(){
  19 + wx.navigateTo({
  20 + url: '/pages/backpeoplelist/backpeoplelist',
  21 + })
  22 + },
  23 + // 营业场所管理
  24 + ground(){
  25 + wx.navigateTo({
  26 + url: '/pages/businessoffice/businessoffice',
  27 + })
  28 + },
  29 +
  30 + /**
  31 + * 生命周期函数--监听页面初次渲染完成
  32 + */
  33 + onReady: function () {
  34 +
  35 + },
  36 +
  37 + /**
  38 + * 生命周期函数--监听页面显示
  39 + */
  40 + onShow: function () {
  41 +
  42 + },
  43 +
  44 + /**
  45 + * 生命周期函数--监听页面隐藏
  46 + */
  47 + onHide: function () {
  48 +
  49 + },
  50 +
  51 + /**
  52 + * 生命周期函数--监听页面卸载
  53 + */
  54 + onUnload: function () {
  55 +
  56 + },
  57 +
  58 + /**
  59 + * 页面相关事件处理函数--监听用户下拉动作
  60 + */
  61 + onPullDownRefresh: function () {
  62 +
  63 + },
  64 +
  65 + /**
  66 + * 页面上拉触底事件的处理函数
  67 + */
  68 + onReachBottom: function () {
  69 +
  70 + },
  71 +
  72 + /**
  73 + * 用户点击右上角分享
  74 + */
  75 + onShareAppMessage: function () {
  76 +
  77 + }
  78 +})
  1 +{
  2 + "navigationBarTitleText": "静海防疫服务平台"
  3 +}
  1 +<view class="topimg">
  2 + <image src="/img/bg.png"></image>
  3 + <view class="topback">
  4 + <view class="topitem flextwo">
  5 + <view class="topitemblock" bindtap="ground">
  6 + <view class="topitemimg">
  7 + <image src="/img/icon_yingye.png"></image>
  8 + </view>
  9 + <view class="topitmname">营业场所管理</view>
  10 + </view>
  11 + <view class="topitemblock" bindtap="backlist">
  12 + <view class="topitemimg">
  13 + <image src="/img/icon_fanjing.png"></image>
  14 + </view>
  15 + <view class="topitmname">返静人员管理</view>
  16 + </view>
  17 + </view>
  18 + </view>
  19 +</view>
  1 +.topimg {
  2 + width: 750rpx;
  3 + height: 342rpx;
  4 + font-size: 0;
  5 + position: relative;
  6 +}
  7 +
  8 +.topback {
  9 + width: 686rpx;
  10 + height: 244rpx;
  11 + background: rgba(255, 255, 255, 1);
  12 + box-shadow: 0rpx 12rpx 24rpx rgba(16, 104, 191, 0.08);
  13 + opacity: 1;
  14 + border-radius: 8rpx;
  15 + position: absolute;
  16 + top:160rpx;
  17 + left:32rpx;
  18 +}
  19 +.topitemblock{
  20 + display:flex;
  21 + flex-direction: column;
  22 + align-items: center;
  23 + justify-content: center
  24 +}
  25 +.topitemimg{
  26 + width:92rpx;
  27 + height:92rpx;
  28 + font-size: 0
  29 +}
  30 +.topitmname{
  31 + color:#06121E;
  32 + font-size: 28rpx;
  33 + margin-top:16rpx;
  34 +}
  35 +.topitem{
  36 + padding: 48rpx 90rpx;
  37 + box-sizing: border-box
  38 +}
@@ -7,14 +7,18 @@ Page({ @@ -7,14 +7,18 @@ Page({
7 */ 7 */
8 data: { 8 data: {
9 account:'', 9 account:'',
10 - password:'' 10 + password:'',
  11 + type:""
11 }, 12 },
12 13
13 /** 14 /**
14 * 生命周期函数--监听页面加载 15 * 生命周期函数--监听页面加载
15 */ 16 */
16 onLoad: function (options) { 17 onLoad: function (options) {
17 - 18 + console.log(options)
  19 + this.setData({
  20 + type:options.type
  21 + })
18 }, 22 },
19 entercount(e){ 23 entercount(e){
20 this.setData({ 24 this.setData({
@@ -27,32 +31,75 @@ Page({ @@ -27,32 +31,75 @@ Page({
27 }) 31 })
28 }, 32 },
29 login(){ 33 login(){
  34 + if(this.data.type==1){
  35 + this.businesslogin()
  36 + }else{
  37 + this.countrylogin()
  38 + }
  39 + },
  40 + // 营业场所登记
  41 + businesslogin(){
  42 + let that = this;
  43 + var url = '/api/office/office_login';
  44 + var params = {
  45 + username: this.data.account,
  46 + password: this.data.password
  47 +
  48 + }
  49 + app.post(url, params, "post").then((res) => {
  50 + console.log(res);
  51 + wx.showToast({
  52 + title: '登录成功',
  53 + icon: "none"
  54 + })
  55 + wx.setStorageSync("office_token", res.office_token.token)
  56 +
  57 + setTimeout(function () {
  58 + wx.navigateTo({
  59 + url: '/pages/logining/logining',
  60 + })
  61 + }, 1500)
  62 +
  63 +
  64 + }).catch((err) => {
  65 + wx.showToast({
  66 + title: err.data.msg,
  67 + icon: 'none'
  68 + })
  69 +
  70 +
  71 + })
  72 +
  73 + },
  74 +
  75 + // 乡镇登录
  76 + countrylogin(){
30 let that = this; 77 let that = this;
31 var url = '/api/user/admin_login'; 78 var url = '/api/user/admin_login';
32 var params = { 79 var params = {
33 username: this.data.account, 80 username: this.data.account,
34 - password:this.data.password 81 + password: this.data.password
35 82
36 } 83 }
37 - app.post(url, params,"post").then((res) => { 84 + app.post(url, params, "post").then((res) => {
38 console.log(res); 85 console.log(res);
39 wx.showToast({ 86 wx.showToast({
40 title: '登录成功', 87 title: '登录成功',
41 - icon:"none" 88 + icon: "none"
42 }) 89 })
43 wx.setStorageSync("usertoken", res.admin_token.token) 90 wx.setStorageSync("usertoken", res.admin_token.token)
44 91
45 - setTimeout(function(){ 92 + setTimeout(function () {
46 wx.navigateTo({ 93 wx.navigateTo({
47 url: '/pages/backpeoplelist/backpeoplelist', 94 url: '/pages/backpeoplelist/backpeoplelist',
48 }) 95 })
49 - },1500) 96 + }, 1500)
50 97
51 98
52 }).catch((err) => { 99 }).catch((err) => {
53 wx.showToast({ 100 wx.showToast({
54 title: err.data.msg, 101 title: err.data.msg,
55 - icon:'none' 102 + icon: 'none'
56 }) 103 })
57 104
58 105
@@ -83,7 +130,8 @@ Page({ @@ -83,7 +130,8 @@ Page({
83 }) 130 })
84 }, 1500) 131 }, 1500)
85 132
86 - let url = '/pages/login/login'; 133 +
  134 + let url = '/pages/login/login?type='+this.data.type;
87 wx.setStorageSync("url", url) 135 wx.setStorageSync("url", url)
88 wx.setStorageSync("nologin", true) 136 wx.setStorageSync("nologin", true)
89 } 137 }
1 // pages/logining/logining.js 1 // pages/logining/logining.js
  2 +const app=getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
  9 + protectarr:[],
  10 + office:'',
  11 + address:'',
  12 + is_business:0,
  13 + ishandbook:0,
  14 + materials:[],
  15 + time: '请选择营业时间',
8 16
9 }, 17 },
10 18
@@ -12,7 +20,110 @@ Page({ @@ -12,7 +20,110 @@ Page({
12 * 生命周期函数--监听页面加载 20 * 生命周期函数--监听页面加载
13 */ 21 */
14 onLoad: function (options) { 22 onLoad: function (options) {
  23 + this.gettail()
  24 + },
  25 +
  26 + bindTimeChange: function (e) {
  27 + console.log('picker发送选择改变,携带值为', e.detail.value)
  28 + this.setData({
  29 + time: e.detail.value
  30 + })
  31 + },
  32 +
  33 + // 是否营业中
  34 + selsy(){
  35 + this.setData({
  36 + is_business:1
  37 + })
  38 + },
  39 + selsn(){
  40 + this.setData({
  41 + is_business: 2
  42 + })
  43 + },
  44 +
  45 + // 是否收到疫情防控指南
  46 + selsy(){
  47 + this.setData({
  48 + ishandbook:1
  49 + })
  50 + },
  51 + selsn() {
  52 + this.setData({
  53 + ishandbook: 2
  54 + })
  55 + },
  56 +
  57 + //获取登记详情
  58 + gettail(){
  59 + let that = this;
  60 + var url = '/api/office/office_detail';
  61 + var params = {
  62 + office_token: wx.getStorageSync('office_token'),
  63 +
  64 + }
  65 + app.post(url, params,"post").then((res) => {
  66 + console.log(res);
  67 + that.setData({
  68 + protectarr: res.materials
  69 + })
  70 + that.data.protectarr.forEach(function(value,index,array){
  71 + value.sel=false
  72 + })
  73 +
  74 + that.setData({
  75 + office:res.office,
  76 + protectarr:that.data.protectarr,
  77 + address:res.office.address
  78 + })
  79 +
  80 + console.log(that.data.protectarr)
15 81
  82 +
  83 +
  84 + }).catch((err) => {
  85 +
  86 + })
  87 + },
  88 +
  89 + // 选择防疫物资
  90 + selprotect(e){
  91 + let that=this;
  92 + let index=e.currentTarget.dataset.index;
  93 + let id=e.currentTarget.dataset.id
  94 + this.data.protectarr.forEach(function(value,indexk,array){
  95 + if(index==indexk){
  96 + value.sel = !value.sel;
  97 + if(value.sel==true){
  98 + that.data.materials.push(value.id)
  99 + }else{
  100 + that.data.materials.forEach(function(value,indexk,array){
  101 + if(id==value){
  102 + that.data.materials.splice(indexk, 1)
  103 + }
  104 +
  105 + })
  106 + }
  107 + }
  108 +
  109 + })
  110 + this.setData({
  111 + protectarr:this.data.protectarr,
  112 + materials: this.data.materials
  113 + })
  114 + console.log(that.data.materials)
  115 + },
  116 +
  117 + // 输入地址
  118 + enteraddress(){
  119 + this.setData({
  120 + address:''
  121 + })
  122 + },
  123 + enterplace(e){
  124 + this.setData({
  125 + address:e.detail.value
  126 + })
16 }, 127 },
17 128
18 /** 129 /**
1 { 1 {
2 - "usingComponents": {} 2 + "navigationBarTitleText": "营业登记场所"
3 } 3 }
@@ -5,19 +5,22 @@ @@ -5,19 +5,22 @@
5 <view class="topbox"> 5 <view class="topbox">
6 <view class="topboxitem flextwo"> 6 <view class="topboxitem flextwo">
7 <view class="boxitemleft">名称</view> 7 <view class="boxitemleft">名称</view>
8 - <view class="boxitemleft itemright">王某某</view> 8 + <view class="boxitemleft itemright">{{office.name}}</view>
9 </view> 9 </view>
10 <view class="topboxitem flextwo"> 10 <view class="topboxitem flextwo">
11 <view class="boxitemleft">地址</view> 11 <view class="boxitemleft">地址</view>
12 - <view class="boxitemleft itemright">21321132199719301201</view> 12 + <view class="boxitemleft itemright" bindtap="enteraddress">
  13 + <input placeholder='请输入地址' value="{{address}}" bindinput="enterplace" />
  14 +
  15 + </view>
13 </view> 16 </view>
14 <view class="topboxitem flextwo"> 17 <view class="topboxitem flextwo">
15 <view class="boxitemleft">所属行业</view> 18 <view class="boxitemleft">所属行业</view>
16 - <view class="boxitemleft itemright">静海网信办</view> 19 + <view class="boxitemleft itemright">{{office.industry}}</view>
17 </view> 20 </view>
18 <view class="topboxitem flextwo"> 21 <view class="topboxitem flextwo">
19 <view class="boxitemleft">所属乡镇</view> 22 <view class="boxitemleft">所属乡镇</view>
20 - <view class="boxitemleft itemright">15822187890</view> 23 + <view class="boxitemleft itemright">{{office.town_pname}}</view>
21 </view> 24 </view>
22 25
23 26
@@ -30,7 +33,7 @@ @@ -30,7 +33,7 @@
30 <view class="flexone"> 33 <view class="flexone">
31 <view class="commontwo seltype"> 34 <view class="commontwo seltype">
32 35
33 - <input placeholder="请填写负责人姓名" placeholder-class="commontwo" bindinput="entercompany" /> 36 + <input placeholder="请填写负责人姓名" placeholder-class="commontwo" bindinput="entername" />
34 </view> 37 </view>
35 38
36 </view> 39 </view>
@@ -40,7 +43,7 @@ @@ -40,7 +43,7 @@
40 <view class="flexone"> 43 <view class="flexone">
41 <view class="commontwo seltype"> 44 <view class="commontwo seltype">
42 45
43 - <input placeholder="请填写联系电话" placeholder-class="commontwo" bindinput="entercompany" /> 46 + <input placeholder="请填写联系电话" placeholder-class="commontwo" bindinput="enterphone" />
44 </view> 47 </view>
45 48
46 49
@@ -66,14 +69,14 @@ @@ -66,14 +69,14 @@
66 <view class="selleft flexone"> 69 <view class="selleft flexone">
67 <view class="selleftitem selzuo flexone" bindtap="selsy"> 70 <view class="selleftitem selzuo flexone" bindtap="selsy">
68 <view class="sellefitemimg"> 71 <view class="sellefitemimg">
69 - <image src="/img/sel.png" wx:if="{{is_symptom==1}}"></image> 72 + <image src="/img/sel.png" wx:if="{{is_business==1}}"></image>
70 <image src="/img/nosel.png" wx:else></image> 73 <image src="/img/nosel.png" wx:else></image>
71 </view> 74 </view>
72 <view class="selname">是</view> 75 <view class="selname">是</view>
73 </view> 76 </view>
74 <view class="selleftitem flexone " bindtap="selsn"> 77 <view class="selleftitem flexone " bindtap="selsn">
75 <view class="sellefitemimg"> 78 <view class="sellefitemimg">
76 - <image src="/img/sel.png" wx:if="{{is_symptom==2}}"></image> 79 + <image src="/img/sel.png" wx:if="{{is_business==2}}"></image>
77 <image src="/img/nosel.png" wx:else></image> 80 <image src="/img/nosel.png" wx:else></image>
78 </view> 81 </view>
79 <view class="selname">否</view> 82 <view class="selname">否</view>
@@ -83,10 +86,15 @@ @@ -83,10 +86,15 @@
83 </view> 86 </view>
84 87
85 <view class="useboxitem flextwo" bindtap="selectcompany"> 88 <view class="useboxitem flextwo" bindtap="selectcompany">
86 - <view class="itemname commonone">营业时间(预计)</view> 89 + <view class="itemname commonone yingye">营业时间(预计)</view>
87 <view class="flexone"> 90 <view class="flexone">
88 - <view class="commontwo seltype">  
89 - 请选择营业时间 91 + <view class="commontwo">
  92 +
  93 + <picker mode="time" value="{{time}}" start="00:00" end="24:59" bindchange="bindTimeChange">
  94 + <view class="picker">
  95 + {{time}}
  96 + </view>
  97 + </picker>
90 <!-- <input placeholder="请填写工作单位" placeholder-class="commontwo" bindinput="entercompany" value="{{companyname}}" /> --> 98 <!-- <input placeholder="请填写工作单位" placeholder-class="commontwo" bindinput="entercompany" value="{{companyname}}" /> -->
91 </view> 99 </view>
92 100
@@ -96,20 +104,27 @@ @@ -96,20 +104,27 @@
96 </view> 104 </view>
97 </view> 105 </view>
98 106
99 - <view class="useboxitem flextwo">·  
100 - <view class="itemname commonone">是否收到疫情防控指南</view> 107 + <view class="useboxitem ">
  108 + <view class="itemname commonone have">是否有以下防疫物资?(多选)</view>
  109 + <view class=" flexone protect">
  110 + <view class="protectitem {{item.sel==true?'protectactive':''}}" wx:for="{{protectarr}}" wx:key="" bindtap="selprotect" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
  111 +
  112 + </view>
  113 + </view>
  114 + <view class="useboxitem flextwo">
  115 + <view class="itemname commonone yiiqng">是否收到疫情防控指南</view>
101 <view class=" flexone"> 116 <view class=" flexone">
102 <view class="selleft flexone"> 117 <view class="selleft flexone">
103 <view class="selleftitem selzuo flexone" bindtap="selsy"> 118 <view class="selleftitem selzuo flexone" bindtap="selsy">
104 <view class="sellefitemimg"> 119 <view class="sellefitemimg">
105 - <image src="/img/sel.png" wx:if="{{is_symptom==1}}"></image> 120 + <image src="/img/sel.png" wx:if="{{ishandbook==1}}"></image>
106 <image src="/img/nosel.png" wx:else></image> 121 <image src="/img/nosel.png" wx:else></image>
107 </view> 122 </view>
108 <view class="selname">是</view> 123 <view class="selname">是</view>
109 </view> 124 </view>
110 <view class="selleftitem flexone " bindtap="selsn"> 125 <view class="selleftitem flexone " bindtap="selsn">
111 <view class="sellefitemimg"> 126 <view class="sellefitemimg">
112 - <image src="/img/sel.png" wx:if="{{is_symptom==2}}"></image> 127 + <image src="/img/sel.png" wx:if="{{ishandbook==2}}"></image>
113 <image src="/img/nosel.png" wx:else></image> 128 <image src="/img/nosel.png" wx:else></image>
114 </view> 129 </view>
115 <view class="selname">否</view> 130 <view class="selname">否</view>
@@ -121,5 +136,7 @@ @@ -121,5 +136,7 @@
121 136
122 </view> 137 </view>
123 138
124 - 139 + <view class="finish flexthree">
  140 + <view class="finishbtn">完成</view>
  141 + </view>
125 </view> 142 </view>
1 @import "../backpeople/backpeople.wxss"; 1 @import "../backpeople/backpeople.wxss";
  2 +
2 image { 3 image {
3 width: 100%; 4 width: 100%;
4 height: 100%; 5 height: 100%;
@@ -18,7 +19,6 @@ page { @@ -18,7 +19,6 @@ page {
18 19
19 .topbox { 20 .topbox {
20 width: 690rpx; 21 width: 690rpx;
21 -  
22 margin: 48rpx auto 0; 22 margin: 48rpx auto 0;
23 padding: 0 24rpx; 23 padding: 0 24rpx;
24 box-sizing: border-box; 24 box-sizing: border-box;
@@ -39,15 +39,19 @@ page { @@ -39,15 +39,19 @@ page {
39 white-space: nowrap; 39 white-space: nowrap;
40 text-align: right; 40 text-align: right;
41 } 41 }
42 - 42 +.itemright input{
  43 + width: 510rpx;
  44 + overflow: hidden;
  45 + text-overflow: ellipsis;
  46 + white-space: nowrap;
  47 + text-align: right;
  48 +}
43 .topboxitem { 49 .topboxitem {
44 padding: 34rpx 0; 50 padding: 34rpx 0;
45 box-sizing: border-box; 51 box-sizing: border-box;
46 border-bottom: 1rpx solid #f5f5f5; 52 border-bottom: 1rpx solid #f5f5f5;
47 } 53 }
48 54
49 -  
50 -  
51 .title { 55 .title {
52 position: relative; 56 position: relative;
53 text-align: center; 57 text-align: center;
@@ -63,7 +67,8 @@ page { @@ -63,7 +67,8 @@ page {
63 width: 144rpx; 67 width: 144rpx;
64 height: 1px; 68 height: 1px;
65 position: absolute; 69 position: absolute;
66 - background: #ccc; 70 + background: rgba(128, 192, 255, 1);
  71 + opacity: 0.4;
67 top: 50%; 72 top: 50%;
68 } 73 }
69 74
@@ -75,21 +80,96 @@ page { @@ -75,21 +80,96 @@ page {
75 .title::after { 80 .title::after {
76 margin-left: 64rpx; 81 margin-left: 64rpx;
77 } 82 }
78 -.formbox{  
79 - margin-top:20rpx;  
80 83
  84 +.formbox {
  85 + margin-top: 20rpx;
  86 + margin-bottom: 150rpx;
81 } 87 }
82 -.seltype input{ 88 +
  89 +.seltype input {
83 font-size: 24rpx; 90 font-size: 24rpx;
84 } 91 }
85 -.commontwo{ 92 +
  93 +.commontwo {
86 font-size: 24rpx; 94 font-size: 24rpx;
87 } 95 }
88 -.itemname{  
89 - width:200rpx; 96 +
  97 +.itemname {
  98 + width: 200rpx;
90 } 99 }
91 -.selname{  
92 - color:#06121E; 100 +
  101 +.selname {
  102 + color: #06121e;
93 font-size: 28rpx; 103 font-size: 28rpx;
94 font-weight: bold; 104 font-weight: bold;
95 } 105 }
  106 +
  107 +.yiiqng {
  108 + width: 300rpx;
  109 +}
  110 +
  111 +.yingye {
  112 + width: 260rpx !important;
  113 +}
  114 +
  115 +.protect {
  116 + flex-wrap: wrap;
  117 +}
  118 +
  119 +.protect {
  120 + margin-top: 6rpx;
  121 +}
  122 +
  123 +.protectitem {
  124 + width: 302rpx;
  125 + height: 64rpx;
  126 + background: rgba(255, 255, 255, 1);
  127 + border: 1rpx solid rgba(219, 219, 219, 1);
  128 + opacity: 1;
  129 + border-radius: 48rpx;
  130 + color: #3d444d;
  131 + font-size: 24rpx;
  132 + text-align: center;
  133 + line-height: 64rpx;
  134 + margin-top: 20rpx;
  135 +}
  136 +
  137 +.protectitem:nth-child(2n) {
  138 + margin-left: 28rpx;
  139 +}
  140 +
  141 +.itemone {
  142 + margin-right: 28rpx;
  143 +}
  144 +
  145 +.have {
  146 + width: 400rpx;
  147 +}
  148 +
  149 +.protectactive {
  150 + background: rgba(232, 244, 255, 1);
  151 + color: #1b8ffd;
  152 + border: 1rpx solid rgba(27, 143, 253, 1);
  153 +}
  154 +
  155 +.finish {
  156 + width: 750rpx;
  157 + padding: 14rpx 0;
  158 + box-sizing: border-box;
  159 + position: fixed;
  160 + left: 0;
  161 + bottom: 0;
  162 + background: #e7f0f9;
  163 +}
  164 +
  165 +.finishbtn {
  166 + width: 686rpx;
  167 + height: 88rpx;
  168 + background: rgba(28, 143, 255, 1);
  169 + opacity: 1;
  170 + color: #fefefe;
  171 + font-size: 32rpx;
  172 + text-align: center;
  173 + line-height: 88rpx;
  174 + border-radius: 10rpx;
  175 +}
  1 +// pages/backdetail/backdetail.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + showcode: false,
  10 + back_list: '',
  11 + basic: '',
  12 + first: '',
  13 + codeurl: ''
  14 + },
  15 + closecode() {
  16 + this.setData({
  17 + showcode: false
  18 + })
  19 + },
  20 +
  21 +
  22 + /**
  23 + * 生命周期函数--监听页面加载
  24 + */
  25 + onLoad: function (options) {
  26 + this.getdetail()
  27 + this.getuser()
  28 + },
  29 + dian() {
  30 + this.setData({
  31 + showcode: true
  32 + })
  33 + },
  34 +
  35 + getdetail() {
  36 + let that = this;
  37 + var url = '/api/user/back_nation_detail';
  38 + var params = {
  39 +
  40 +
  41 + }
  42 + app.post(url, params, "post").then((res) => {
  43 + console.log(res);
  44 + that.setData({
  45 + back_list: res.back_list,
  46 + basic: res.basic,
  47 + first: res.back
  48 + })
  49 + app.globalData.workname = res.first.company_name;
  50 + app.globalData.workid = res.first.company_id;
  51 + app.globalData.shortworkname = res.first.unit_id
  52 +
  53 +
  54 +
  55 + }).catch((err) => {
  56 +
  57 + })
  58 +
  59 + },
  60 + edit() {
  61 + wx.navigateTo({
  62 + url: '/pages/outbackpeopledoor/outbackpeopledoor?type=' + 1,
  63 + })
  64 + },
  65 +
  66 + getuser() {
  67 + let that = this;
  68 + var url = '/api/user/index';
  69 + var params = {
  70 +
  71 +
  72 + }
  73 + app.post(url, params).then((res) => {
  74 + console.log(res);
  75 + that.setData({
  76 + codeurl: res.qrcode,
  77 +
  78 + })
  79 + that.savefilecode()
  80 +
  81 +
  82 +
  83 +
  84 + }).catch((err) => {
  85 +
  86 + })
  87 +
  88 + },
  89 +
  90 + // 保存图片
  91 + //点击保存到相册
  92 + baocun: function () {
  93 + console.log(999)
  94 + var that = this
  95 + wx.getSetting({
  96 + success(res) {
  97 + if (!res.authSetting['scope.writePhotosAlbum']) {
  98 + wx.authorize({
  99 + scope: 'scope.writePhotosAlbum',
  100 + success() { //这里是用户同意授权后的回调
  101 +
  102 +
  103 + wx.saveImageToPhotosAlbum({
  104 + filePath: that.data.codeurl,
  105 + success(res) {
  106 + wx.showModal({
  107 + content: '图片已保存到相册',
  108 + showCancel: false,
  109 + confirmText: '好的',
  110 + confirmColor: '#333',
  111 + success: function (res) {
  112 + if (res.confirm) {
  113 + console.log('用户点击确定');
  114 + /* 该隐藏的隐藏 */
  115 + that.setData({
  116 + maskHidden: false
  117 + })
  118 + }
  119 + },
  120 + fail: function (res) {
  121 +
  122 + }
  123 + })
  124 + }
  125 + })
  126 +
  127 +
  128 +
  129 + },
  130 + fail() { //这里是用户拒绝授权后的回调
  131 +
  132 +
  133 + // wx.openSetting({
  134 + // success: function (data) {
  135 + // console.log(data)
  136 + // if (data.authSetting["scope.writePhotosAlbum"] === true) {
  137 + // console.log("是否授权成功")
  138 + // } else {
  139 + // applyApi.toast("授权失败");
  140 + // }
  141 + // }
  142 + // })
  143 + wx.showModal({
  144 + title: '提示',
  145 + content: '您取消授权,无法保存图片,点击确定打开权限',
  146 + success(res) {
  147 + if (res.confirm) {
  148 + console.log('用户点击确定')
  149 + wx.openSetting({
  150 + success(res) {
  151 + console.log(res.authSetting)
  152 + // res.authSetting = {
  153 + // "scope.userInfo": true,
  154 + // "scope.userLocation": true
  155 + // }
  156 + }
  157 + })
  158 + } else if (res.cancel) {
  159 + console.log('用户点击取消')
  160 + }
  161 + }
  162 + })
  163 +
  164 + }
  165 + })
  166 + } else { //用户已经授权过了
  167 +
  168 + console.log(that.data.codeurl)
  169 + wx.saveImageToPhotosAlbum({
  170 + filePath: that.data.codeurl,
  171 + success(res) {
  172 + wx.showModal({
  173 + content: '图片已保存到相册',
  174 + showCancel: false,
  175 + confirmText: '好的',
  176 + confirmColor: '#333',
  177 + success: function (res) {
  178 + if (res.confirm) {
  179 + console.log('用户点击确定');
  180 + /* 该隐藏的隐藏 */
  181 + that.setData({
  182 + maskHidden: false
  183 + })
  184 + }
  185 + },
  186 + fail: function (res) {
  187 +
  188 + }
  189 + })
  190 + }
  191 + })
  192 + }
  193 + }
  194 + })
  195 +
  196 + },
  197 +
  198 + savefilecode() {
  199 + let that = this;
  200 + console.log(that.data.codeurl)
  201 + wx.downloadFile({
  202 + url: that.data.codeurl,
  203 + header: {},
  204 + success: function (res) {
  205 + console.log('下载图片下载图片下载图片', res)
  206 + var tempFilePath = res.tempFilePath
  207 + //console.log('临时文件地址是:' + tempFilePath)
  208 + wx.saveFile({
  209 + tempFilePath: tempFilePath,
  210 + success: function (res) {
  211 + console.log(res)
  212 + var saveFilePath = res.savedFilePath;
  213 + that.setData({
  214 + codeurl: res.savedFilePath
  215 + })
  216 +
  217 + console.log('123456855555555', that.data.qrcode)
  218 +
  219 + }, //可以将saveFilePath写入到页面数据中
  220 + fail: function (res) { },
  221 + complete: function (res) {
  222 + console.log('complete后的res数据:')
  223 + },
  224 + }) //,
  225 + },
  226 + // fail: function (res) {
  227 + // wx.showModal({
  228 + // title: '下载失败',
  229 + // content: '请联系管理员',
  230 + // })
  231 + // },
  232 + complete: function (res) { },
  233 + })
  234 + },
  235 +
  236 + /**
  237 + * 生命周期函数--监听页面初次渲染完成
  238 + */
  239 + onReady: function () {
  240 +
  241 + },
  242 +
  243 + /**
  244 + * 生命周期函数--监听页面显示
  245 + */
  246 + onShow: function () {
  247 +
  248 + },
  249 +
  250 + /**
  251 + * 生命周期函数--监听页面隐藏
  252 + */
  253 + onHide: function () {
  254 +
  255 + },
  256 +
  257 + /**
  258 + * 生命周期函数--监听页面卸载
  259 + */
  260 + onUnload: function () {
  261 +
  262 + },
  263 +
  264 + /**
  265 + * 页面相关事件处理函数--监听用户下拉动作
  266 + */
  267 + onPullDownRefresh: function () {
  268 +
  269 + },
  270 +
  271 + /**
  272 + * 页面上拉触底事件的处理函数
  273 + */
  274 + onReachBottom: function () {
  275 +
  276 + },
  277 +
  278 + /**
  279 + * 用户点击右上角分享
  280 + */
  281 + onShareAppMessage: function () {
  282 +
  283 + }
  284 +})
  1 +{
  2 + "navigationBarTitleText": "返静人员详情"
  3 +}
  1 +<view class="backtop">
  2 +
  3 + <view class="useboxitem flextwo">
  4 + <view class="itemname commonone topname">出行信息</view>
  5 + </view>
  6 + <view class="useboxitem backitem flextwo">
  7 + <view class="itemname commonone">出行方式</view>
  8 +
  9 +
  10 + <view class="itemright flexone">
  11 + <view class="commontwo commonenter">
  12 + {{basic.travel}}
  13 + </view>
  14 +
  15 + </view>
  16 +
  17 +
  18 +
  19 + </view>
  20 +
  21 + <view class="useboxitem backitem flextwo">
  22 + <view class="itemname commonone" wx:if="{{basic.travel == '飞机'}}">航班号</view>
  23 + <view class="itemname commonone" wx:elif="{{basic.travel == '自驾' || basic.travel == '大巴'}}">车牌号</view>
  24 + <view class="itemname commonone" wx:elif="{{basic.travel == '火车'}}">车次</view>
  25 + <view class="itemname commonone" wx:else>有效证件号</view>
  26 +
  27 +
  28 + <view class="itemright flexone time">
  29 + <view class="commontwo commonenter">
  30 + {{basic.number}}
  31 + </view>
  32 +
  33 + </view>
  34 +
  35 +
  36 +
  37 + </view>
  38 +
  39 +
  40 +</view>
  41 +
  42 +
  43 +<view class="backtop peopleitem">
  44 +
  45 + <view class="useboxitem flextwo">
  46 + <view class="itemname commonone topname">人员信息</view>
  47 +
  48 + </view>
  49 +
  50 + <view class="useboxitem backitem flextwo">
  51 + <view class="itemname commonone">姓名</view>
  52 +
  53 +
  54 + <view class="itemright flexone">
  55 + <view class="commontwo commonenter">
  56 + {{first.name}}
  57 + </view>
  58 +
  59 + </view>
  60 +
  61 +
  62 +
  63 + </view>
  64 +
  65 +
  66 + <view class="useboxitem backitem flextwo">
  67 + <view class="itemname commonone">国籍</view>
  68 +
  69 +
  70 + <view class="itemright flexone">
  71 + <view class="commontwo commonenter">
  72 + <text wx:if="{{first.nation==1}}">中国</text>
  73 + <text wx:if="{{first.nation==2}}">港澳台</text>
  74 + <text wx:if="{{first.nation==3}}">外籍</text>
  75 +
  76 + </view>
  77 +
  78 + </view>
  79 +
  80 +
  81 +
  82 + </view>
  83 + <!-- wx:if="{{first.credentials_type==1}}" -->
  84 + <view class="useboxitem backitem flextwo">
  85 + <view class="itemname commonone">证件类型</view>
  86 +
  87 +
  88 + <view class="itemright flexone">
  89 + <view class="commontwo commonenter" wx:if="{{first.credentials_type==1}}">
  90 + 身份证
  91 + </view>
  92 + <view class="commontwo commonenter" wx:if="{{first.credentials_type==2}}">
  93 + 港澳台通行证
  94 + </view>
  95 + <view class="commontwo commonenter" wx:if="{{first.credentials_type==3}}">
  96 + 护照
  97 + </view>
  98 +
  99 + </view>
  100 +
  101 +
  102 +
  103 + </view>
  104 + <view class="useboxitem backitem flextwo">
  105 + <view class="itemname commonone">证件号码</view>
  106 +
  107 +
  108 + <view class="itemright flexone">
  109 + <view class="commontwo commonenter">
  110 + {{first.identity}}
  111 + </view>
  112 +
  113 +
  114 + </view>
  115 +
  116 +
  117 +
  118 + </view>
  119 +
  120 +
  121 + <view class="useboxitem backitem flextwo">
  122 + <view class="itemname commonone">联系电话</view>
  123 +
  124 +
  125 + <view class="itemright flexone">
  126 + <view class="commontwo commonenter">
  127 + {{first.mobile}}
  128 + </view>
  129 +
  130 + </view>
  131 +
  132 +
  133 +
  134 + </view>
  135 + <view class="useboxitem backitem flextwo">
  136 + <view class="itemname commonone">从何国返静</view>
  137 +
  138 +
  139 + <view class="itemright flexone">
  140 + <view class="commontwo commonenter">
  141 + {{first.from_province}}
  142 + </view>
  143 +
  144 + </view>
  145 +
  146 +
  147 +
  148 + </view>
  149 +
  150 + <view class="useboxitem backitem flextwo">
  151 + <view class="itemname commonone">途经国家或城市</view>
  152 +
  153 +
  154 + <view class="itemright flexone">
  155 + <view class="commontwo commonenter">
  156 + {{first.arrivecity}}
  157 + </view>
  158 +
  159 + </view>
  160 +
  161 +
  162 +
  163 + </view>
  164 +
  165 + <view class="useboxitem backitem flextwo">
  166 + <view class="itemname commonone">到静海时间(计划)</view>
  167 +
  168 +
  169 + <view class="itemright flexone time">
  170 + <view class="commontwo commonenter">
  171 + {{first.arrivetime}}
  172 + </view>
  173 +
  174 + </view>
  175 +
  176 +
  177 +
  178 + </view>
  179 +
  180 +
  181 + <view class="useboxitem backitem flextwo">
  182 + <view class="itemname commonone">目的地</view>
  183 +
  184 +
  185 + <view class="itemright flexone">
  186 + <view class="commontwo commonenter">
  187 + {{first.town_p_name}}{{first.town_name}}
  188 + </view>
  189 +
  190 + </view>
  191 +
  192 +
  193 +
  194 + </view>
  195 +
  196 + <view class="useboxitem backitem flextwo">
  197 + <view class="itemname commonone">详细地址(具体到门牌号)</view>
  198 +
  199 +
  200 + <view class="itemright flexone">
  201 + <view class="commontwo men">
  202 + {{first.add}}
  203 + </view>
  204 +
  205 + </view>
  206 +
  207 +
  208 +
  209 + </view>
  210 +
  211 + <view class="useboxitem backitem flextwo">
  212 + <view class="itemname commonone">是否有相应症状(发热、呕吐)</view>
  213 +
  214 +
  215 + <view class="itemright flexone istouch">
  216 + <view class="commontwo commonenter" wx:if="{{first.is_symptom==1}}">
  217 +
  218 + </view>
  219 + <view class="commontwo commonenter" wx:else>
  220 +
  221 + </view>
  222 +
  223 + </view>
  224 +
  225 +
  226 +
  227 + </view>
  228 +
  229 +
  230 +
  231 + <view class="useboxitem backitem flextwo">
  232 + <view class="itemname commonone">两周内有无重度疫情区来往接触史</view>
  233 +
  234 +
  235 + <view class="itemright flexone istouch">
  236 + <view class="commontwo commonenter" wx:if="{{first.is_epidemic==1}}">
  237 +
  238 + </view>
  239 + <view class="commontwo commonenter" wx:else>
  240 +
  241 + </view>
  242 +
  243 + </view>
  244 +
  245 +
  246 +
  247 + </view>
  248 +
  249 +
  250 +
  251 +</view>
  252 +
  253 +
  254 +<view class="code flextwo">
  255 + <view class="codeleft">
  256 + 二维码
  257 + </view>
  258 + <view class="coderight flexone" bindtap="dian">
  259 + <view class="commontwo">点击查看/保存</view>
  260 + <view class="codeimg">
  261 + <image src="{{codeurl}}"></image>
  262 + </view>
  263 + </view>
  264 +</view>
  265 +
  266 +<view class="bot" bindtap="edit">
  267 +
  268 + <view class="subtwo">编辑</view>
  269 +</view>
  270 +
  271 +
  272 +<view class="registerk" wx:if="{{showcode}}">
  273 + <view class="codewrap">
  274 + <view class="codetop">
  275 + <image src="/img/codetopimg.png"></image>
  276 + <view class="codename">我的二维码</view>
  277 + </view>
  278 + <view class="codekimg" bindlongpress="baocun">
  279 + <image src="{{codeurl}}"></image>
  280 + </view>
  281 + <view class="ansave">长按保存二维码</view>
  282 +
  283 + </view>
  284 + <view class="closeimg" bindtap="closecode">
  285 + <image src="/img/closecode.png"></image>
  286 + </view>
  287 +</view>
  1 +page{
  2 + background: #F9F9FB
  3 +}
  4 +
  5 +.commonenter{
  6 + margin-right:0;
  7 + text-align: right
  8 +}
  9 +.topname{
  10 + font-size: 36rpx;
  11 +}
  12 +.istouch{
  13 + width:150rpx;
  14 +}
  15 +.peopleitem{
  16 + margin-top:22rpx;
  17 +}
  18 +.codeleft{
  19 + color:#06121E;
  20 + font-size: 36rpx;
  21 + font-weight:bold;
  22 +
  23 +}
  24 +.codename{
  25 + margin-right:24rpx;
  26 +}
  27 +.codeimg{
  28 + width:54rpx;
  29 + height:54rpx;
  30 + font-size:0;
  31 +}
  32 +.code{
  33 + padding: 36rpx 32rpx;
  34 + box-sizing: border-box;
  35 + background: #fff;
  36 + margin-top:20rpx;
  37 +}
  38 +
  39 +.codewrap {
  40 + width: 606rpx;
  41 + height: 696rpx;
  42 + background: rgba(255, 255, 255, 1);
  43 + box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
  44 + opacity: 1;
  45 + border-radius: 24rpx;
  46 + position: absolute;
  47 + top:50%;
  48 + left:50%;
  49 + transform: translate(-50%,-50%)
  50 +}
  51 +.codetop{
  52 + width:606rpx;
  53 + height:186rpx;
  54 + font-size: 0;
  55 + position: relative;
  56 + top:0;
  57 + left:0
  58 +}
  59 +.codename{
  60 + color:#fff;
  61 + font-size: 40rpx;
  62 + position: absolute;
  63 + top:50%;
  64 + left:50%;
  65 + transform: translate(-50%,-50%)
  66 +}
  67 +.closeimg{
  68 + width:72rpx;
  69 + height:72rpx;
  70 + font-size: 0;
  71 + position: absolute;
  72 + bottom:10%;
  73 + left:50%;
  74 + transform: translateX(-50%)
  75 +}
  76 +.ansave{
  77 + color:#06121E;
  78 + font-size: 36rpx;
  79 + font-weight: bold;
  80 + margin-top:40rpx;
  81 + text-align: center
  82 +}
  83 +.codekimg{
  84 + width:260rpx;
  85 + height:260rpx;
  86 + font-size: 0;
  87 + margin:80rpx auto 0;
  88 +}
  89 +.commontwo{
  90 + margin-right:10rpx;
  91 +}
  1 +// pages/backpeople/backpeople.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + chuxing: '请选择出行方式',
  10 + chuixngarray: ['飞机', '自驾', '火车', '大巴', '其他'],
  11 + chuxingindex: 0,
  12 + chuxingid: '',
  13 + danweiarray: [],
  14 + danweiindex: 0,
  15 + danweiname: '请选择工作单位',
  16 + danweiid: "",
  17 + danweiindexk: 0,
  18 + danweinamek: '请选择工作单位',
  19 + danweiidk: "",
  20 + phone: "",
  21 + date: '请选择时间',
  22 + datek: '请选择时间',
  23 + time: '请选择时间',
  24 + timek: '请选择时间',
  25 + fromname: '请选择来源地',
  26 + fromnamek: '请选择来源地',
  27 + toname: "请选择目的地",
  28 + region: ['天津市', '天津市', '静海区'],
  29 + xiangarray: [],
  30 + xiangindex: 0,
  31 + xiangname: '请选择乡镇',
  32 + xiangid: '',
  33 + xiangindexk: 0,
  34 + xiangnamek: '请选择乡镇',
  35 + xiangidk: '',
  36 + quarray: [],
  37 + quname: '请选择社区',
  38 + quid: '',
  39 + quindex: 0,
  40 + qunamek: '请选择社区',
  41 + quidk: '',
  42 + quindexk: 0,
  43 + is_symptom: 2,
  44 + is_symptomk: 2,
  45 + gocity: '',
  46 + is_epidemic: 2,
  47 + is_epidemick: 2,
  48 + from_province_id: '',
  49 + from_city_id: '',
  50 + from_region_id: '',
  51 + from_province: '',
  52 + from_city: '',
  53 + from_region: '',
  54 + from_province_idk: '',
  55 + from_city_idk: '',
  56 + from_region_idk: '',
  57 + from_provincek: '',
  58 + from_cityk: '',
  59 + from_regionk: '',
  60 + xingname: '',
  61 +
  62 + card: '',
  63 + people: [],
  64 + suichebox: [1],
  65 + detailadd: '',
  66 + back_list: '',
  67 + basic: '',
  68 + first: '',
  69 + companyname: '',
  70 + shortworkname: '',
  71 + type: "",
  72 + basicinfo: '',
  73 + clock: '',
  74 + scene: '',
  75 + falsebtn: false,
  76 + workid: '',
  77 +
  78 + nationarray: [{
  79 + id: 1,
  80 + name: '中国'
  81 + },
  82 + {
  83 + id: 2,
  84 + name: '港澳台'
  85 + },
  86 + {
  87 + id: 3,
  88 + name: '外籍'
  89 + },
  90 +
  91 +
  92 + ],
  93 + nationindex: 0,
  94 + nation: '中国',
  95 + nationid: 1,
  96 + certificate: '身份证',
  97 + certificateid: 1,
  98 + certificatearray: [{
  99 + id: 1,
  100 + name: '身份证'
  101 + },
  102 + {
  103 + id: 2,
  104 + name: '港澳台通行证'
  105 + },
  106 + {
  107 + id: 3,
  108 + name: '护照'
  109 + },
  110 + ],
  111 + certificateindex:0,
  112 + // 从何国返静
  113 + from_province:"",
  114 + arrivecity:''
  115 + },
  116 +
  117 + /**
  118 + * 生命周期函数--监听页面加载
  119 + */
  120 + onLoad: function(options) {
  121 + console.log(options)
  122 + this.setData({
  123 + falsebtn: false
  124 + })
  125 + this.getdanweilist();
  126 + // 获取乡
  127 + this.getxiang();
  128 + if (options.type != undefined) {
  129 + this.setData({
  130 + type: options.type
  131 + })
  132 + this.getbackinfo()
  133 + }
  134 +
  135 + if (options.clock != undefined) {
  136 + this.setData({
  137 + clock: options.clock,
  138 + scene: options.scene
  139 + })
  140 + }
  141 +
  142 +
  143 + },
  144 +
  145 + // 选择国籍
  146 + bindnationChange(e) {
  147 + this.setData({
  148 + nationindex: e.detail.value,
  149 + nation: this.data.nationarray[e.detail.value].name,
  150 + nationid: this.data.nationarray[e.detail.value].id
  151 + })
  152 + },
  153 +
  154 + // 从何国返静
  155 + fromprovince(e){
  156 + this.setData({
  157 + from_province:e.detail.value
  158 + })
  159 + },
  160 +
  161 +//途径国家城市
  162 + enterbyway(e){
  163 + this.setData({
  164 + arrivecity:e.detail.value
  165 + })
  166 + },
  167 +// 选择证件类型
  168 + bindcertificateChange(e){
  169 + this.setData({
  170 + certificateindex:e.detail.value,
  171 + certificate: this.data.certificatearray[e.detail.value].name,
  172 + certificateid: this.data.certificatearray[e.detail.value].id
  173 + })
  174 + },// 选择工作单位
  175 + selectcompany() {
  176 + console.log(8888)
  177 + wx.navigateTo({
  178 + url: '/pages/selectdanwei/selectdanwei',
  179 + })
  180 + },
  181 +
  182 + // 获取详细信息
  183 + getbackinfo() {
  184 + let that = this;
  185 + var url = '/api/user/back_detail';
  186 + var params = {};
  187 + app.post(url, params, "post").then((res) => {
  188 + console.log(res);
  189 + let tempPeople = res.back_list;
  190 +
  191 + that.setData({
  192 + people: res.back_list,
  193 + basic: res.basic,
  194 + chuxing: res.basic.travel,
  195 + typename: res.basic.number,
  196 + xingname: res.first.name,
  197 + card: res.first.identity,
  198 + companyname: res.first.company_name,
  199 + workid: res.first.company_id,
  200 + danweiname: res.first.unit,
  201 + phone: res.first.mobile,
  202 + date: res.first.arrivetime,
  203 + fromname: res.first.from_province + res.first.from_city + res.first.from_region,
  204 + from_province_id: res.first.from_province_id,
  205 + from_region_id: res.first.from_region_id,
  206 + from_city_id: res.first.from_city_id,
  207 + from_province: res.first.from_province,
  208 + from_city: res.first.from_city,
  209 + from_region: res.first.from_region,
  210 + xiangname: res.first.town_p_name,
  211 + xiangid: res.first.town_pid,
  212 + quname: res.first.town_name,
  213 + quid: res.first.town_id,
  214 + detailadd: res.first.add,
  215 + is_epidemic: res.first.is_epidemic,
  216 + is_symptom: res.first.is_symptom,
  217 + gocity: res.first.arrivecity,
  218 + xiangindex: res.first.town_pid - 1,
  219 + quindex: res.first.town_id - 41,
  220 + arrivecity: res.first.arrivecity,
  221 + nation: res.first.nation == 1 ? '中国' : res.first.nation == 2 ? '港澳台通行证' :'护照',
  222 + nationid: res.first.nation,
  223 + certificate: res.first.credentials_type == 1 ? '身份证号' : res.first.credentials_type == 2 ? '港澳台通行证' :'护照',
  224 + certificateid: res.first.credentials_type,
  225 +
  226 +
  227 + })
  228 + let chuixngarray = that.data.chuixngarray;
  229 + for (var i = 0; i < chuixngarray.length; i++) {
  230 + if (chuixngarray[i] == res.basic.travel) {
  231 +
  232 + that.setData(({
  233 + chuxingindex: i
  234 + }))
  235 + }
  236 +
  237 + }
  238 +
  239 + that.getqu();
  240 + // 获取司机目标社区
  241 + var first = res.first;
  242 + if (first.length == 0) {
  243 + that.setData({
  244 + xiangname: that.data.xiangarray[0].name,
  245 + xiangid: that.data.xiangarray[0].id,
  246 + xiangindex: 0
  247 + })
  248 + } else {
  249 + app.post('/api/index/town', {
  250 + type: 2,
  251 + pid: first.town_pid || 1
  252 + }).then((res) => {
  253 + let town = res.town;
  254 + first.quarray = town;
  255 + for (let i in town) {
  256 + if (town[i].id == first.town_id) {
  257 + first.quindex = i;
  258 + break;
  259 + }
  260 + }
  261 + that.setData({
  262 + first: first,
  263 + })
  264 +
  265 + }).catch((err) => {
  266 +
  267 + })
  268 + }
  269 +
  270 + // 初始化随车人员乡镇所在地
  271 +
  272 + for (let obj of tempPeople) {
  273 + for (let i in that.data.xiangarray) {
  274 + if (obj.town_pid == that.data.xiangarray[i].id) {
  275 + obj.xiangindex = i
  276 + }
  277 + }
  278 + }
  279 +
  280 + this.setData({
  281 + people: tempPeople
  282 + })
  283 +
  284 + for (let i in tempPeople) {
  285 + that.getTown(tempPeople[i].town_pid, i, tempPeople[i].town_id)
  286 + }
  287 + }).catch((err) => {
  288 +
  289 + })
  290 +
  291 + },
  292 +
  293 + // 添加随车人员
  294 + addsuiche() {
  295 + let newsuichebox = this.data.suichebox;
  296 + var newpeople = this.data.people;
  297 + let obj = {
  298 + is_symptom: 2,
  299 + is_epidemic: 2,
  300 + unit_id: '',
  301 + town_p_name: '请选择乡镇',
  302 + town_name: '请选择社区',
  303 + arrivetime: '请选择时间',
  304 + from_province: '请选择来源地',
  305 +
  306 + }
  307 + newsuichebox.push(1);
  308 + newpeople.push(obj)
  309 + this.setData({
  310 + suichebox: newsuichebox,
  311 + people: newpeople
  312 + })
  313 + console.log(this.data.people)
  314 + this.getxiang();
  315 +
  316 + },
  317 + selsy() {
  318 + this.setData({
  319 + is_symptom: 1
  320 + })
  321 +
  322 +
  323 + },
  324 + selsyk(e) {
  325 +
  326 + let index = e.currentTarget.dataset.index;
  327 + let newpeople = this.data.people;
  328 + newpeople[index].is_symptom = 1;
  329 + this.setData({
  330 + people: newpeople
  331 + })
  332 +
  333 + console.log(this.data.people)
  334 + },
  335 + selsn(e) {
  336 + this.setData({
  337 + is_symptom: 2
  338 + })
  339 + },
  340 + selsnk(e) {
  341 + this.setData({
  342 + is_symptomk: 2
  343 + })
  344 +
  345 + let index = e.currentTarget.dataset.index;
  346 + let newpeople = this.data.people;
  347 + newpeople[index].is_symptom = 2;
  348 + this.setData({
  349 + people: newpeople
  350 + })
  351 +
  352 + console.log(this.data.people)
  353 + },
  354 + selzy(e) {
  355 + this.setData({
  356 + is_epidemic: 1
  357 + })
  358 +
  359 + },
  360 + selzyk(e) {
  361 + this.setData({
  362 + is_epidemick: 1
  363 + })
  364 + let index = e.currentTarget.dataset.index;
  365 + let newpeople = this.data.people;
  366 + newpeople[index].is_epidemic = 1;
  367 + this.setData({
  368 + people: newpeople
  369 + })
  370 + },
  371 + selzn(e) {
  372 + this.setData({
  373 + is_epidemic: 2
  374 + })
  375 + },
  376 + selznk(e) {
  377 + this.setData({
  378 + is_epidemick: 2
  379 + })
  380 + let index = e.currentTarget.dataset.index;
  381 + let newpeople = this.data.people;
  382 + newpeople[index].is_epidemic = 2;
  383 + this.setData({
  384 + people: newpeople
  385 + })
  386 + },
  387 + gocity(e) {
  388 + this.setData({
  389 + gocity: e.detail.value
  390 + })
  391 +
  392 + console.log(this.data.gocity)
  393 + },
  394 + gocityk(e) {
  395 +
  396 + let index = e.currentTarget.dataset.index;
  397 + let newpeople = this.data.people;
  398 + newpeople[index].arrivecity = e.detail.value;
  399 + this.setData({
  400 + people: newpeople
  401 + })
  402 + console.log(this.data.people)
  403 + },
  404 + // 获取乡镇
  405 + getxiang() {
  406 + let that = this;
  407 + var url = '/api/index/town';
  408 + var params = {
  409 + type: 1,
  410 + pid: ''
  411 + }
  412 + app.post(url, params).then((res) => {
  413 + console.log(res);
  414 + that.setData({
  415 + xiangarray: res.town
  416 + })
  417 + console.log(this.data.xiangarray)
  418 +
  419 +
  420 + }).catch((err) => {
  421 +
  422 + })
  423 + },
  424 + bindxiangChange: function(e) {
  425 +
  426 + this.setData({
  427 + xiangname: this.data.xiangarray[e.detail.value].name,
  428 + xiangid: this.data.xiangarray[e.detail.value].id,
  429 + xiangindex: e.detail.value,
  430 + quname: '',
  431 + quid: ''
  432 + })
  433 + this.getqu()
  434 + },
  435 + bindxiangChangek: function(e) {
  436 + console.log(e)
  437 + let that = this,
  438 + index = e.currentTarget.dataset.index,
  439 + t_index = e.detail.value,
  440 + xiangArry = this.data.xiangarray;
  441 + let pid = xiangArry[t_index].id;
  442 +
  443 + if (that.data.people[index].town_pid != pid) {
  444 + that.data.people[index].xiangindex = index;
  445 + that.data.people[index].town_p_name = xiangArry[t_index].name;
  446 + that.data.people[index].town_pid = pid;
  447 + that.data.people[index].town_name = ""
  448 + that.data.people[index].town_id = ""
  449 + this.setData({
  450 + people: that.data.people
  451 + })
  452 + this.getTown(pid, index, '')
  453 + }
  454 +
  455 + },
  456 +
  457 + getqu() {
  458 + let that = this;
  459 + var url = '/api/index/town';
  460 + var params = {
  461 + type: 2,
  462 + pid: that.data.xiangid || 1
  463 + }
  464 + app.post(url, params).then((res) => {
  465 + console.log(res);
  466 + this.setData({
  467 + 'first.quarray': res.town,
  468 + 'first.quindex': 0,
  469 + quname: this.data.quname || res.town[0].name,
  470 + quid: this.data.quid || res.town[0].id
  471 + })
  472 + }).catch((err) => {
  473 +
  474 + })
  475 + },
  476 +
  477 + getTown(id, index, townId) {
  478 + let that = this;
  479 + var url = '/api/index/town';
  480 + var params = {
  481 + type: 2,
  482 + pid: id
  483 + }
  484 + app.post(url, params).then((res) => {
  485 + let town = res.town;
  486 + that.data.people[index].quarrayk = town;
  487 + for (let i in town) {
  488 + if (town[i].id == townId) {
  489 + that.data.people[index].quindex = i;
  490 + that.data.people[index].town_name = town[i].name;
  491 + that.data.people[index].town_id = town[i].id;
  492 + break;
  493 + } else {
  494 + that.data.people[index].quindex = 0;
  495 + that.data.people[index].town_id = town[0].id;
  496 + that.data.people[index].town_name = town[0].name;
  497 + }
  498 + }
  499 + that.setData({
  500 + people: that.data.people,
  501 + })
  502 +
  503 + }).catch((err) => {
  504 +
  505 + })
  506 + },
  507 +
  508 + bindquChange: function(e) {
  509 +
  510 + this.setData({
  511 + quname: this.data.first.quarray[e.detail.value].name,
  512 + quid: this.data.first.quarray[e.detail.value].id,
  513 + quindex: e.detail.value,
  514 + 'first.quindex': e.detail.value,
  515 + })
  516 +
  517 +
  518 +
  519 +
  520 + },
  521 + bindquChangek: function(e) {
  522 + console.log(e)
  523 + let index = e.currentTarget.dataset.index,
  524 + chooseIndex = e.detail.value;
  525 + this.data.people[index].quindex = chooseIndex;
  526 + this.data.people[index].town_name = this.data.people[index].quarrayk[chooseIndex].name;
  527 + this.data.people[index].town_id = this.data.people[index].quarrayk[chooseIndex].id;
  528 + this.setData({
  529 + people: this.data.people
  530 + })
  531 + },
  532 +
  533 + // 判断乡镇
  534 + panduan(e) {
  535 + console.log(343)
  536 + let index = e.currentTarget.dataset.index;
  537 + let newpeople = this.data.people
  538 + for (var i = 0; i < newpeople.length; i++) {
  539 + if (newpeople[i].town_p_name == '请选择乡镇') {
  540 +
  541 + wx.showToast({
  542 + title: '请先选择乡镇',
  543 + icon: "none"
  544 + })
  545 + }
  546 + }
  547 +
  548 + },
  549 +
  550 + bindtypeChange: function(e) {
  551 + console.log('picker发送选择改变,携带值为', e.detail.value)
  552 + this.setData({
  553 + chuxingindex: e.detail.value,
  554 +
  555 + chuxing: this.data.chuixngarray[e.detail.value]
  556 +
  557 + })
  558 +
  559 +
  560 + },
  561 +
  562 + // 获取工作单位
  563 + getdanweilist() {
  564 + let that = this;
  565 + var url = '/api/index/unit';
  566 + var params = {
  567 +
  568 +
  569 + }
  570 + app.post(url, params).then((res) => {
  571 + console.log(res);
  572 +
  573 + that.setData({
  574 + danweiarray: res.unit
  575 + })
  576 +
  577 + }).catch((err) => {
  578 +
  579 + })
  580 + },
  581 + binddanChange: function(e) {
  582 + console.log('picker发送选择改变,携带值为', e.detail.value)
  583 + this.setData({
  584 + danweiindex: e.detail.value,
  585 +
  586 + danweiname: this.data.danweiarray[e.detail.value].name,
  587 + danweiid: this.data.danweiarray[e.detail.value].id
  588 +
  589 + })
  590 +
  591 +
  592 + },
  593 +
  594 + binddanChangek: function(e) {
  595 + console.log(e)
  596 + console.log('picker发送选择改变,携带值为', e.detail.value)
  597 + // this.setData({
  598 + // danweiindexk: e.detail.value,
  599 +
  600 + // danweinamek: this.data.danweiarray[e.detail.value].name,
  601 + // danweiidk: this.data.danweiarray[e.detail.value].id
  602 +
  603 + // })
  604 +
  605 +
  606 + let index = e.currentTarget.dataset.index;
  607 + let newpeople = this.data.people;
  608 + newpeople[index].unit_id = this.data.danweiarray[e.detail.value].id;
  609 + newpeople[index].unit = this.data.danweiarray[e.detail.value].name;
  610 + this.setData({
  611 + people: newpeople
  612 + })
  613 +
  614 + },
  615 +
  616 +
  617 +
  618 + // 到达静海时间
  619 + bindDateChange: function(e) {
  620 + console.log('picker发送选择改变,携带值为', e.detail.value)
  621 + this.setData({
  622 + date: e.detail.value
  623 + })
  624 + },
  625 + bindDateChangek: function(e) {
  626 + console.log('picker发送选择改变,携带值为', e.detail.value)
  627 + this.setData({
  628 + datek: e.detail.value
  629 + })
  630 +
  631 + let index = e.currentTarget.dataset.index;
  632 + let newpeople = this.data.people;
  633 + newpeople[index].arrivetime = e.detail.value
  634 + this.setData({
  635 + people: newpeople
  636 + })
  637 +
  638 + },
  639 + bindTimeChange: function(e) {
  640 + console.log('picker发送选择改变,携带值为', e.detail.value)
  641 + this.setData({
  642 + time: e.detail.value
  643 + })
  644 + },
  645 + bindTimeChangek: function(e) {
  646 + console.log('picker发送选择改变,携带值为', e.detail.value)
  647 + this.setData({
  648 + timek: e.detail.value
  649 + })
  650 +
  651 + let index = e.currentTarget.dataset.index;
  652 + let newpeople = this.data.people;
  653 + newpeople[index].arrivetime = this.data.dateK = this.data.timeK
  654 + },
  655 +
  656 + bindRegionChange: function(e) {
  657 + console.log(e)
  658 + console.log('picker发送选择改变,携带值为', e.detail.value)
  659 + this.setData({
  660 + fromname: e.detail.value[0] + e.detail.value[1] + e.detail.value[2],
  661 + from_province_id: e.detail.code[0],
  662 + from_city_id: e.detail.code[1],
  663 + from_region_id: e.detail.code[2],
  664 + from_province: e.detail.value[0],
  665 + from_city: e.detail.value[1],
  666 + from_region: e.detail.value[2]
  667 +
  668 + })
  669 + },
  670 + bindRegionChangek: function(e) {
  671 + console.log(e)
  672 + console.log('picker发送选择改变,携带值为', e.detail.value)
  673 + this.setData({
  674 + fromnamek: e.detail.value[0] + e.detail.value[1] + e.detail.value[2],
  675 + from_province_idk: e.detail.code[0],
  676 + from_city_idk: e.detail.code[1],
  677 + from_region_idk: e.detail.code[2],
  678 + from_provincek: e.detail.value[0],
  679 + from_cityk: e.detail.value[1],
  680 + from_regionk: e.detail.value[2]
  681 +
  682 + })
  683 +
  684 + let index = e.currentTarget.dataset.index;
  685 + let newpeople = this.data.people;
  686 + newpeople[index].from_province_id = e.detail.code[0],
  687 + newpeople[index].from_city_id = e.detail.code[1],
  688 + newpeople[index].from_region_id = e.detail.code[2],
  689 + newpeople[index].from_province = e.detail.value[0],
  690 + newpeople[index].from_city = e.detail.value[1],
  691 + newpeople[index].from_region = e.detail.value[2]
  692 +
  693 + this.setData({
  694 + people: newpeople
  695 + })
  696 + },
  697 + entertype(e) {
  698 + this.setData({
  699 + typename: e.detail.value
  700 + })
  701 + },
  702 + // 手机号
  703 + enterphone(e) {
  704 + this.setData({
  705 + phone: e.detail.value
  706 + })
  707 + },
  708 + enterphonek(e) {
  709 + let index = e.currentTarget.dataset.index;
  710 + let newpeople = this.data.people;
  711 + newpeople[index].mobile = e.detail.value;
  712 + this.setData({
  713 + people: newpeople
  714 + })
  715 + },
  716 + // 姓名
  717 + entername(e) {
  718 + this.setData({
  719 + xingname: e.detail.value
  720 + })
  721 + },
  722 + enternamek(e) {
  723 + let index = e.currentTarget.dataset.index;
  724 + let newpeople = this.data.people;
  725 + newpeople[index].name = e.detail.value;
  726 + this.setData({
  727 + people: newpeople
  728 + })
  729 + console.log(this.data.people)
  730 +
  731 +
  732 + },
  733 +
  734 + // 输入公司
  735 + entercompany(e) {
  736 + this.setData({
  737 + companyname: e.detail.value
  738 + })
  739 + },
  740 + entercompanyk(e) {
  741 + let index = e.currentTarget.dataset.index;
  742 + let newpeople = this.data.people;
  743 + newpeople[index].unit_id = e.detail.value;
  744 + this.setData({
  745 + people: newpeople
  746 + })
  747 + },
  748 +
  749 + // 身份证号
  750 + entercard(e) {
  751 + let that = this
  752 + that.setData({
  753 + card: e.detail.value
  754 + })
  755 + if (that.data.type == '') {
  756 +
  757 + }
  758 +
  759 + console.log(this.data.card)
  760 + },
  761 + entercardk(e) {
  762 + let index = e.currentTarget.dataset.index;
  763 + console.log(index)
  764 + let newpeople = this.data.people;
  765 + newpeople[index].identity = e.detail.value;
  766 + this.setData({
  767 + people: newpeople
  768 + })
  769 +
  770 + console.log(this.data.people)
  771 + },
  772 +
  773 + // 详细地址
  774 + enterdetailadd(e) {
  775 + this.setData({
  776 + detailadd: e.detail.value
  777 + })
  778 + },
  779 + enterdetailaddk(e) {
  780 + let index = e.currentTarget.dataset.index;
  781 + let newpeople = this.data.people;
  782 + newpeople[index].add = e.detail.value;
  783 + this.setData({
  784 + people: newpeople
  785 + })
  786 + },
  787 +
  788 + del(e) {
  789 + let index = e.currentTarget.dataset.index;
  790 + console.log(index)
  791 + let newpeople = this.data.people;
  792 + for (var i = 0; i < newpeople.length; i++) {
  793 + newpeople.splice(index, 1)
  794 + }
  795 + this.setData({
  796 + people: newpeople
  797 + })
  798 +
  799 +
  800 + },
  801 + finish() {
  802 + let that = this;
  803 +
  804 + console.log(that.data.falsebtn)
  805 + var url = '/api/user/back_nation';
  806 + console.log(this.data.people)
  807 + if (that.data.chuxing == '请选择出行方式') {
  808 + wx.showToast({
  809 + title: '请选择出行方式',
  810 + icon: "none"
  811 + })
  812 + return false
  813 + }
  814 +
  815 +
  816 + let newpeople = that.data.people;
  817 +
  818 + newpeople.forEach(item => delete item.quarray)
  819 + console.log(newpeople)
  820 + for (let obj of newpeople) {
  821 + delete obj['quarrayk'];
  822 + delete obj['quindex'];
  823 + delete obj['xiangindex'];
  824 + }
  825 + var params = {
  826 + travel: that.data.chuxing,
  827 + number: that.data.typename,
  828 + name: this.data.xingname,
  829 + mobile: this.data.phone,
  830 + nation: that.data.nationid,
  831 + credentials_type: that.data.certificateid,
  832 + identity: this.data.card,
  833 + from_province: this.data.from_province,
  834 + arrivecity: this.data.arrivecity,
  835 + arrivetime: this.data.date,
  836 +
  837 + town_pid: this.data.xiangid,
  838 + town_id: this.data.quid,
  839 + add: this.data.detailadd,
  840 + is_symptom: this.data.is_symptom,
  841 + is_epidemic: this.data.is_epidemic,
  842 + people: JSON.stringify(newpeople),
  843 + }
  844 + app.post(url, params, "post").then((res) => {
  845 + console.log(res);
  846 + wx.showToast({
  847 + title: '提交成功',
  848 + icon: 'none'
  849 + })
  850 + that.setData({
  851 + falsebtn: true
  852 + })
  853 + if (that.data.clock == 1) {
  854 + setTimeout(function() {
  855 + wx.redirectTo({
  856 + url: '/pages/clock/clock?scene=' + that.data.scene,
  857 + })
  858 + }, 1500)
  859 + } else {
  860 + setTimeout(function() {
  861 + wx.redirectTo({
  862 + url: '/pages/outbackpeopledetail/outbackpeopledetail',
  863 + })
  864 + }, 1500)
  865 + }
  866 + }).catch((err) => {
  867 +
  868 + wx.showToast({
  869 + title: err.data.msg,
  870 + icon: 'none'
  871 + })
  872 +
  873 + })
  874 +
  875 + },
  876 + /**
  877 + * 生命周期函数--监听页面初次渲染完成
  878 + */
  879 + onReady: function() {
  880 +
  881 + },
  882 +
  883 + /**
  884 + * 生命周期函数--监听页面显示
  885 + */
  886 + onShow: function() {
  887 +
  888 +
  889 +
  890 + this.setData({
  891 + companyname: app.globalData.workname != undefined ? app.globalData.workname : '请选择工作单位',
  892 + shortworkname: app.globalData.shortworkname != undefined ? app.globalData.shortworkname : '',
  893 + workid: app.globalData.workid != undefined ? app.globalData.workid : ''
  894 +
  895 + })
  896 +
  897 + console.log(app.globalData.workname);
  898 + console.log(app.globalData.workid)
  899 + console.log(app.globalData.shortworkname)
  900 +
  901 + let token = wx.getStorageSync("token");
  902 + if (token == '') {
  903 + wx.showToast({
  904 + title: '请先授权登录',
  905 + icon: "none"
  906 + })
  907 +
  908 + setTimeout(function() {
  909 + wx.navigateTo({
  910 + url: '/pages/start/start',
  911 + })
  912 + }, 1500)
  913 +
  914 +
  915 +
  916 + let url = '/pages/outbackpeopledoor/outbackpeopledoor';
  917 + wx.setStorageSync("url", url)
  918 + wx.setStorageSync("nologin", true)
  919 + }
  920 +
  921 + },
  922 +
  923 + /**
  924 + * 生命周期函数--监听页面隐藏
  925 + */
  926 + onHide: function() {
  927 +
  928 + },
  929 +
  930 + /**
  931 + * 生命周期函数--监听页面卸载
  932 + */
  933 + onUnload: function() {
  934 +
  935 + },
  936 +
  937 + /**
  938 + * 页面相关事件处理函数--监听用户下拉动作
  939 + */
  940 + onPullDownRefresh: function() {
  941 +
  942 + },
  943 +
  944 + /**
  945 + * 页面上拉触底事件的处理函数
  946 + */
  947 + onReachBottom: function() {
  948 +
  949 + },
  950 +
  951 + /**
  952 + * 用户点击右上角分享
  953 + */
  954 + onShareAppMessage: function() {
  955 +
  956 + }
  957 +})
  1 +{
  2 + "navigationBarTitleText": "返静人员注册"
  3 +}
  1 +<view class="backhead">
  2 + <image src="/img/outdoor.png"></image>
  3 +</view>
  4 +
  5 +<view class="backbox">
  6 + <view class="backboxitem">
  7 + <!-- 出行方式--车牌号码 -->
  8 + <view class="backtop">
  9 + <picker bindchange="bindtypeChange" value="{{chuxingindex}}" range="{{chuixngarray}}">
  10 + <view class="picker">
  11 + <!-- 当前选择:{{array[index]}} -->
  12 + <view class="useboxitem flextwo">
  13 + <view class="itemname commonone">返静方式</view>
  14 + <view class="itemright flexone">
  15 + <view class="commontwo seltype">
  16 + {{chuxing}}
  17 + </view>
  18 + <view class="yourow you">
  19 + <image src="/img/yourow.png"></image>
  20 + </view>
  21 + </view>
  22 + </view>
  23 + </view>
  24 + </picker>
  25 + <view class="useboxitem flextwo" wx:if="{{chuxingindex==1||chuxingindex==3}}">
  26 + <view class="itemname commonone">车牌号码</view>
  27 + <view class="itemright flexone">
  28 + <view class="commontwo commonenter">
  29 + <input placeholder="请填写车牌号码" placeholder-class="commontwo" bindinput="entertype" value="{{typename}}" />
  30 + </view>
  31 +
  32 + </view>
  33 +
  34 +
  35 +
  36 + </view>
  37 + <view class="useboxitem flextwo" wx:if="{{chuxingindex==2}}">
  38 + <view class="itemname commonone">车次</view>
  39 +
  40 +
  41 + <view class="itemright flexone">
  42 + <view class="commontwo commonenter">
  43 + <input placeholder="请填写车次" placeholder-class="commontwo" bindinput="entertype" value="{{typename}}" />
  44 + </view>
  45 +
  46 + </view>
  47 +
  48 +
  49 +
  50 + </view>
  51 +
  52 + <view class="useboxitem flextwo" wx:if="{{chuxingindex==0}}">
  53 + <view class="itemname commonone">航班号</view>
  54 +
  55 +
  56 + <view class="itemright flexone">
  57 + <view class="commontwo commonenter">
  58 + <input placeholder="请填写航班号" placeholder-class="commontwo" bindinput="entertype" value="{{typename}}" />
  59 + </view>
  60 +
  61 + </view>
  62 +
  63 +
  64 +
  65 + </view>
  66 + <view class="useboxitem flextwo" wx:if="{{chuxingindex==4}}">
  67 + <view class="itemname commonone">其他</view>
  68 +
  69 +
  70 + <view class="itemright flexone">
  71 + <view class="commontwo commonenter">
  72 + <input placeholder="请填写交通方式" placeholder-class="commontwo" bindinput="entertype" value="{{typename}}" />
  73 + </view>
  74 +
  75 + </view>
  76 +
  77 +
  78 +
  79 + </view>
  80 +
  81 + </view>
  82 + <!-- 司机及随车人员信息 -->
  83 + <!-- <text class="enterzhong">*填写身份证号,自动匹配已录入信息。</text> -->
  84 +
  85 + <view class="backtop userbox">
  86 + <view class="useboxitem flextwo">
  87 + <view class="itemname commonone">姓名</view>
  88 + <view class="itemright flexone">
  89 + <view class="commontwo commonenter">
  90 + <input placeholder="请填写姓名" placeholder-class="commontwo" bindinput="entername" value="{{xingname}}" />
  91 + </view>
  92 + </view>
  93 + </view>
  94 +
  95 + <picker bindchange="bindnationChange" value="{{nationindex}}" range="{{nationarray}}" range-key='name'>
  96 + <view class="picker">
  97 + <!-- 当前选择:{{array[index]}} -->
  98 + <view class="useboxitem flextwo">
  99 + <view class="itemname commonone">国籍/地区</view>
  100 + <view class="itemright flexone">
  101 + <view class="commontwo seltype">
  102 + {{nation}}
  103 + </view>
  104 + <view class="yourow you">
  105 + <image src="/img/yourow.png"></image>
  106 + </view>
  107 + </view>
  108 + </view>
  109 + </view>
  110 + </picker>
  111 +
  112 + <picker bindchange="bindcertificateChange" value="{{certificateindex}}" range="{{ certificatearray}}" range-key='name'>
  113 + <view class="picker">
  114 + <!-- 当前选择:{{array[index]}} -->
  115 + <view class="useboxitem flextwo">
  116 + <view class="itemname commonone">证件类型</view>
  117 + <view class="itemright flexone">
  118 + <view class="commontwo seltype">
  119 + {{certificate}}
  120 + </view>
  121 + <view class="yourow you">
  122 + <image src="/img/yourow.png"></image>
  123 + </view>
  124 + </view>
  125 + </view>
  126 + </view>
  127 + </picker>
  128 + <view class="useboxitem flextwo" wx:if="{{certificateid==1}}">
  129 + <view class="itemname commonone">身份证号</view>
  130 + <view class="itemright flexone">
  131 + <view class="commontwo commonenter">
  132 + <input placeholder="请填写身份证号" placeholder-class="commontwo" bindinput="entercard" value="{{card}}" />
  133 + </view>
  134 + </view>
  135 + </view>
  136 + <view class="useboxitem flextwo" wx:if="{{certificateid==2}}">
  137 + <view class="itemname commonone">港澳台通行证号</view>
  138 + <view class="itemright flexone">
  139 + <view class="commontwo tu">
  140 + <input placeholder="港澳台通行证号" placeholder-class="commontwo" bindinput="entercard" value="{{card}}" />
  141 + </view>
  142 + </view>
  143 + </view>
  144 + <view class="useboxitem flextwo" wx:if="{{certificateid==3}}">
  145 + <view class="itemname commonone">护照号</view>
  146 + <view class="itemright flexone">
  147 + <view class="commontwo commonenter">
  148 + <input placeholder="请填写护照号" placeholder-class="commontwo" bindinput="entercard" value="{{card}}"/>
  149 + </view>
  150 + </view>
  151 + </view>
  152 +
  153 + <view class="useboxitem flextwo">
  154 + <view class="itemname commonone">联系电话</view>
  155 + <view class="itemright flexone">
  156 + <view class="commontwo commonenter">
  157 + <input placeholder="请填联系电话" placeholder-class="commontwo" bindinput="enterphone" value="{{phone}}" />
  158 + </view>
  159 + </view>
  160 + </view>
  161 +
  162 + <view class="useboxitem flextwo">
  163 + <view class="itemname commonone">从何国返静</view>
  164 + <view class="itemright flexone">
  165 + <view class="commontwo commonenter">
  166 + <input placeholder="请填写从何国返静" placeholder-class="commontwo" bindinput="fromprovince" value="{{from_province}}" />
  167 + </view>
  168 + </view>
  169 + </view>
  170 +
  171 + <view class="useboxitem flextwo">
  172 + <view class="itemname commonone">途经国家或城市</view>
  173 + <view class="itemright flexone">
  174 + <view class="commontwo tu">
  175 + <input placeholder="请填写途经国家或城市" placeholder-class="commontwo" bindinput="enterbyway" value="{{arrivecity}}" />
  176 + </view>
  177 + </view>
  178 + </view>
  179 +
  180 + <picker mode="date" value="{{date}}" start="2020-01-01" bindchange="bindDateChange">
  181 + <view class="picker">
  182 + <view class="useboxitem flextwo">
  183 + <view class="itemname commonone">到静海时间(计划)</view>
  184 + <view class="itemright flexone ">
  185 + <view class="commontwo seltype plan">
  186 + {{date}}
  187 + </view>
  188 + <view class="yourow you">
  189 + <image src="/img/yourow.png"></image>
  190 + </view>
  191 + </view>
  192 + </view>
  193 + </view>
  194 + </picker>
  195 +
  196 + <picker value="{{xiangindex||0}}" range="{{xiangarray}}" range-key="name" bindchange="bindxiangChange">
  197 + <view class="picker">
  198 + <view class="useboxitem flextwo">
  199 + <view class="itemname commonone">目的地乡镇</view>
  200 + <view class="itemright flexone">
  201 + <view class="commontwo seltype">
  202 + {{xiangname}}
  203 + </view>
  204 + <view class="yourow you">
  205 + <image src="/img/yourow.png"></image>
  206 + </view>
  207 + </view>
  208 + </view>
  209 + </view>
  210 + </picker>
  211 + <picker value="{{first.quindex}}" range="{{first.quarray}}" range-key="name" bindchange="bindquChange">
  212 + <view class="picker">
  213 + <view class="useboxitem flextwo">
  214 + <view class="itemname commonone">目的地社区</view>
  215 + <view class="itemright flexone">
  216 + <view class="commontwo seltype">
  217 + {{quname}}
  218 + </view>
  219 + <view class="yourow you">
  220 + <image src="/img/yourow.png"></image>
  221 + </view>
  222 + </view>
  223 + </view>
  224 + </view>
  225 + </picker>
  226 + <view class="useboxitem flextwo">
  227 + <view class="itemname commonone">详细地址(具体到门牌号)</view>
  228 + <view class="itemright flexone tu">
  229 + <view class="commontwo men">
  230 + <input placeholder="请填详细地址" placeholder-class="commontwo" bindinput="enterdetailadd" value="{{detailadd}}" />
  231 + </view>
  232 + </view>
  233 + </view>
  234 + <view class="useboxitem flextwo">
  235 + <view class="itemname commonone">是否有相应症状(发热、呕吐)</view>
  236 + <view class="itemright flexone">
  237 + <view class="selleft flexone">
  238 + <view class="selleftitem selzuo flexone" bindtap="selsy">
  239 + <view class="sellefitemimg">
  240 + <image src="/img/sel.png" wx:if="{{is_symptom==1}}"></image>
  241 + <image src="/img/nosel.png" wx:else></image>
  242 + </view>
  243 + <view class="selname">是</view>
  244 + </view>
  245 + <view class="selleftitem flexone " bindtap="selsn">
  246 + <view class="sellefitemimg">
  247 + <image src="/img/sel.png" wx:if="{{is_symptom==2}}"></image>
  248 + <image src="/img/nosel.png" wx:else></image>
  249 + </view>
  250 + <view class="selname">否</view>
  251 + </view>
  252 + </view>
  253 + </view>
  254 + </view>
  255 + <!-- <view class="useboxitem flextwo">
  256 + <view class="itemname commonone">1月1日以来到过的城市</view>
  257 + <view class="itemright flexone gicity">
  258 + <view class="commontwo men">
  259 + <input placeholder="请填写去过的城市" placeholder-class="commontwo" bindinput="gocity" value="{{gocity}}" />
  260 + </view>
  261 + </view>
  262 + </view> -->
  263 + <view class="useboxitem flextwo">
  264 + <view class="itemname commonone">两周内有无重度疫情区来往接触史</view>
  265 + <view class="itemright flexone">
  266 + <view class="selleft flexone">
  267 + <view class="selleftitem selzuo flexone" bindtap="selzy">
  268 + <view class="sellefitemimg">
  269 + <image src="/img/sel.png" wx:if="{{is_epidemic==1}}"></image>
  270 + <image src="/img/nosel.png" wx:else></image>
  271 + </view>
  272 + <view class="selname">是</view>
  273 + </view>
  274 + <view class="selleftitem flexone " bindtap="selzn">
  275 + <view class="sellefitemimg">
  276 + <image src="/img/sel.png" wx:if="{{is_epidemic==2}}"></image>
  277 + <image src="/img/nosel.png" wx:else></image>
  278 + </view>
  279 + <view class="selname">否</view>
  280 + </view>
  281 + </view>
  282 + </view>
  283 + </view>
  284 + </view>
  285 +
  286 + <view class="bot">
  287 + <view class="subtwo" bindtap="{{falsebtn==false?'finish':''}}">完成</view>
  288 + </view>
  289 + </view>
  290 +</view>
  1 +page {
  2 + background: #f9f9fb;
  3 +}
  4 +
  5 +.backhead {
  6 + width: 750rpx;
  7 + height: 320rpx;
  8 + font-size: 0;
  9 +}
  10 +
  11 +.backbox {
  12 + width: 750rpx;
  13 + height: 860rpx;
  14 + background: linear-gradient(180deg, rgba(28, 143, 255, 1) 0%, rgba(249, 249, 249, 1) 100%);
  15 + opacity: 1;
  16 + position: relative;
  17 +}
  18 +
  19 +.backboxitem {
  20 + width: 100%;
  21 + position: absolute;
  22 + top: 0;
  23 + left: 0;
  24 + display: flex;
  25 + justify-content: center;
  26 + flex-direction: column;
  27 +}
  28 +
  29 +.backtop {
  30 + width: 690rpx;
  31 + background: rgba(255, 255, 255, 1);
  32 + opacity: 1;
  33 + border-radius: 8rpx;
  34 + padding: 0 26rpx;
  35 + box-sizing: border-box;
  36 + margin: 0 auto;
  37 +}
  38 +
  39 +.useboxitem {
  40 + width: 100%;
  41 + padding: 30rpx 0;
  42 + box-sizing: border-box;
  43 + background: #fff;
  44 + border-bottom: 1rpx solid #f5f5f5;
  45 +}
  46 +
  47 +.leftimg {
  48 + width: 48rpx;
  49 + height: 48rpx;
  50 + font-size: 0;
  51 +}
  52 +
  53 +.itemname {
  54 + font-size: 28rpx;
  55 + font-weight: bold;
  56 +}
  57 +
  58 +.ren {
  59 + color: #ef7847;
  60 + font-size: 28rpx;
  61 + margin-right: 26rpx;
  62 +}
  63 +
  64 +.loimg {
  65 + width: 48rpx;
  66 + height: 48rpx;
  67 + font-size: 0;
  68 +}
  69 +
  70 +.lotop {
  71 + display: flex;
  72 + justify-content: flex-end;
  73 + align-items: center;
  74 +}
  75 +
  76 +.seltype {
  77 + width: 400rpx;
  78 + overflow: hidden;
  79 + text-overflow: ellipsis;
  80 + white-space: nowrap;
  81 + text-align: right;
  82 + margin-right: 24rpx;
  83 +}
  84 +
  85 +.plan {
  86 + width: 300rpx;
  87 +}
  88 +
  89 +.commonenter {
  90 + width: 420rpx;
  91 + margin-right: 50rpx;
  92 + text-align: right;
  93 + overflow: hidden;
  94 + text-overflow: ellipsis;
  95 + white-space: nowrap
  96 +}
  97 +
  98 +.commonenter input {
  99 + width: 100%;
  100 + height: 100%;
  101 + text-align: right;
  102 +}
  103 +
  104 +.userbox {
  105 + margin-top: 30rpx;
  106 +}
  107 +
  108 +.selzuo {
  109 + margin-right: 56rpx;
  110 +}
  111 +
  112 +.sellefitemimg {
  113 + width: 24rpx;
  114 + height: 24rpx;
  115 + font-size: 0;
  116 + margin-right: 18rpx;
  117 +}
  118 +
  119 +.gicity {
  120 + width: 300rpx;
  121 +}
  122 +
  123 +.addbtn {
  124 + width: 364rpx;
  125 + height: 88rpx;
  126 + background: #1c8fff;
  127 + border-radius: 44rpx;
  128 + margin: 56rpx auto 0;
  129 + color: #fff;
  130 + font-size: 32rpx;
  131 + text-align: center;
  132 + line-height: 88rpx;
  133 +}
  134 +
  135 +.rangeimg {
  136 + width: 32rpx;
  137 + height: 32rpx;
  138 + font-size: 0;
  139 + margin-right: 8rpx;
  140 +}
  141 +
  142 +.rangename {
  143 + color: #fa3030;
  144 + font-size: 28rpx;
  145 +}
  146 +
  147 +.range {
  148 + padding: 30rpx;
  149 + justify-content: flex-end;
  150 +}
  151 +
  152 +.enterzhong {
  153 + color: #fa3030;
  154 + font-size: 32rpx;
  155 + width: 690rpx;
  156 + margin:0 auto;
  157 + padding: 26rpx 0 0;
  158 + box-sizing: border-box;
  159 +}
  160 +.tu{
  161 + text-align: right;
  162 + margin-right:50rpx;
  163 +}
@@ -349,6 +349,8 @@ Page({ @@ -349,6 +349,8 @@ Page({
349 349
350 }, 350 },
351 back(){ 351 back(){
  352 +
  353 +
352 let that = this; 354 let that = this;
353 var url = '/api/user/index'; 355 var url = '/api/user/index';
354 var params = { 356 var params = {
@@ -357,18 +359,24 @@ Page({ @@ -357,18 +359,24 @@ Page({
357 } 359 }
358 app.post(url, params).then((res) => { 360 app.post(url, params).then((res) => {
359 console.log(res); 361 console.log(res);
360 - if (res.qrcode == '') { 362 + if (res.back_type == 0) {
361 wx.navigateTo({ 363 wx.navigateTo({
362 - url: '/pages/backpeople/backpeople',  
363 - 364 + url: '/pages/backenterdoor/backenterdoor',
364 }) 365 })
365 366
366 - } else { 367 +
  368 + } else if (res.back_type == 1) {
367 wx.navigateTo({ 369 wx.navigateTo({
368 url: '/pages/backdetail/backdetail', 370 url: '/pages/backdetail/backdetail',
369 371
370 }) 372 })
371 373
  374 + }else{
  375 + wx.navigateTo({
  376 + url: '/pages/outbackpeopledetail/outbackpeopledetail',
  377 +
  378 + })
  379 +
372 } 380 }
373 381
374 382
@@ -383,42 +391,16 @@ Page({ @@ -383,42 +391,16 @@ Page({
383 391
384 }, 392 },
385 resup(){ 393 resup(){
386 -  
387 - let that = this;  
388 - var url = '/api/user/index';  
389 - var params = {  
390 -  
391 -  
392 - }  
393 - app.post(url, params).then((res) => {  
394 - console.log(res);  
395 - that.setData({  
396 - company_status: res.company_status  
397 - })  
398 -  
399 - console.log(this.data.company_status)  
400 - if (that.data.company_status == 0) {  
401 - console.log(43894) 394 + let office_token = wx.getStorageSync("office_token");
  395 + if (office_token == '') {
402 wx.navigateTo({ 396 wx.navigateTo({
403 - url: '/pages/companyidentity/companyidentity', 397 + url: '/pages/login/login?type=' + 1,
404 }) 398 })
405 - } else if (that.data.company_status == 1){  
406 - wx.navigateTo({  
407 - url: '/pages/shenhez/shenhez',  
408 - })  
409 - } else if (that.data.company_status == 2){  
410 - console.log(6666) 399 + } else {
411 wx.navigateTo({ 400 wx.navigateTo({
412 - url: '/pages/fugongshenqing/fugongshenqing', 401 + url: '/pages/logining/logining',
413 }) 402 })
414 } 403 }
415 -  
416 -  
417 -  
418 - }).catch((err) => {  
419 -  
420 - })  
421 -  
422 }, 404 },
423 manager(){ 405 manager(){
424 wx.navigateTo({ 406 wx.navigateTo({
@@ -429,11 +411,14 @@ Page({ @@ -429,11 +411,14 @@ Page({
429 let usertoken=wx.getStorageSync("usertoken"); 411 let usertoken=wx.getStorageSync("usertoken");
430 if (usertoken==''){ 412 if (usertoken==''){
431 wx.navigateTo({ 413 wx.navigateTo({
432 - url: '/pages/login/login', 414 + url: '/pages/login/login?type='+2,
433 }) 415 })
434 }else{ 416 }else{
  417 + // wx.navigateTo({
  418 + // url: '/pages/backpeoplelist/backpeoplelist',
  419 + // })
435 wx.navigateTo({ 420 wx.navigateTo({
436 - url: '/pages/backpeoplelist/backpeoplelist', 421 + url: '/pages/enterdoor/enterdoor',
437 }) 422 })
438 } 423 }
439 424
@@ -17,12 +17,19 @@ @@ -17,12 +17,19 @@
17 <image src="/img/img_fanjing.png"></image> 17 <image src="/img/img_fanjing.png"></image>
18 </view> 18 </view>
19 </view> 19 </view>
20 - <view class="startitem" bindtap="resup"> 20 + <!-- <view class="startitem" bindtap="resup">
21 <view class="startitemtop">营业场所</view> 21 <view class="startitemtop">营业场所</view>
22 <view class="register">登记</view> 22 <view class="register">登记</view>
23 <view class="startimg"> 23 <view class="startimg">
24 <image src="/img/img_fugong.png"></image> 24 <image src="/img/img_fugong.png"></image>
25 </view> 25 </view>
  26 + </view> -->
  27 + <view class="startitem" bindtap="backlist">
  28 + <view class="startitemtop">乡镇管理员</view>
  29 + <view class="register">入口</view>
  30 + <view class="startimg">
  31 + <image src="/img/guanli.png"></image>
  32 + </view>
26 </view> 33 </view>
27 <view class="startitem" bindtap="manager"> 34 <view class="startitem" bindtap="manager">
28 <view class="startitemtop">企业</view> 35 <view class="startitemtop">企业</view>
@@ -31,13 +38,7 @@ @@ -31,13 +38,7 @@
31 <image src="/img/img_qiye.png"></image> 38 <image src="/img/img_qiye.png"></image>
32 </view> 39 </view>
33 </view> 40 </view>
34 - <view class="startitem" bindtap="backlist">  
35 - <view class="startitemtop">乡镇管理员</view>  
36 - <view class="register">入口</view>  
37 - <view class="startimg">  
38 - <image src="/img/guanli.png"></image>  
39 - </view>  
40 - </view> 41 +
41 42
42 43
43 </view> 44 </view>
  1 +<view class="topimg">
  2 + <image src="/img/bg.png"></image>
  3 + <view class="logoimg">
  4 + <image src="/img/logo.png"></image>
  5 + </view>
  6 +
  7 + <view class="startbanner">
  8 + <image src="/img/startbanner.png"></image>
  9 + </view>
  10 +</view>
  11 +
  12 +<view class="startbox">
  13 + <view class="startitem" bindtap="back">
  14 + <view class="startitemtop">返静人员</view>
  15 + <view class="register">注册</view>
  16 + <view class="startimg">
  17 + <image src="/img/img_fanjing.png"></image>
  18 + </view>
  19 + </view>
  20 + <!-- <view class="startitem" bindtap="resup">
  21 + <view class="startitemtop">企业复工</view>
  22 + <view class="register">申请</view>
  23 + <view class="startimg">
  24 + <image src="/img/img_fugong.png"></image>
  25 + </view>
  26 + </view> -->
  27 + <view class="startitem" bindtap="backlist">
  28 + <view class="startitemtop">返静人员</view>
  29 + <view class="register">管理</view>
  30 + <view class="startimg">
  31 + <image src="/img/guanli.png"></image>
  32 + </view>
  33 + </view>
  34 + <view class="startitem" bindtap="manager">
  35 + <view class="startitemtop">企业</view>
  36 + <view class="register">管理及服务</view>
  37 + <view class="startimg">
  38 + <image src="/img/img_qiye.png"></image>
  39 + </view>
  40 + </view>
  41 +
  42 +</view>
  43 +
  44 +<view class="jiaotop">
  45 + <view class="botjiao" bindtap="sub">
  46 + <view class="codeimg">
  47 + <image src="/img/erweima.png"></image>
  48 + </view>
  49 + </view>
  50 +</view>
  51 +
  52 +
  53 +
  54 +<view class="registerk" wx:if="{{nologin}}">
  55 + <view class="userwrap commonpadding">
  56 + <view class="lotop" bindtap="hidelogin">
  57 + <view class="loimg">
  58 + <image src="/img/chahao.png"></image>
  59 + </view>
  60 + </view>
  61 + <view class="shou">请先授权登录</view>
  62 + <view class="shoutext">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
  63 + <button open-type="getUserInfo" bindgetuserinfo='start' class="shoubtn flexthree">
  64 + <view class="shoubtnleft loimg">
  65 + <image src="/img/wechat.png"></image>
  66 + </view>
  67 + <view class="word">微信授权登录</view>
  68 + </button>
  69 +
  70 + </view>
  71 +</view>
  72 +
  73 +<view class="registerk" wx:if="{{showcode}}">
  74 + <view class="codewrap">
  75 + <view class="codetop">
  76 + <image src="/img/codetopimg.png"></image>
  77 + <view class="codename">我的二维码</view>
  78 + </view>
  79 + <view class="codekimg" bindlongpress="baocun">
  80 + <image src="{{codeurl}}"></image>
  81 + </view>
  82 + <view class="ansave">长按保存二维码</view>
  83 +
  84 + </view>
  85 + <view class="closeimg" bindtap="closecode">
  86 + <image src="/img/closecode.png"></image>
  87 + </view>
  88 +</view>