修改小程序目录,删除示例小程序
							
								
								
									
										12
									
								
								miniprogram/.editorconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,12 @@
 | 
			
		||||
# http://editorconfig.org
 | 
			
		||||
root = true
 | 
			
		||||
 | 
			
		||||
[*]
 | 
			
		||||
indent_style = space
 | 
			
		||||
indent_size = 2
 | 
			
		||||
charset = utf-8
 | 
			
		||||
trim_trailing_whitespace = true
 | 
			
		||||
insert_final_newline = true
 | 
			
		||||
 | 
			
		||||
[*.md]
 | 
			
		||||
trim_trailing_whitespace = false
 | 
			
		||||
							
								
								
									
										5
									
								
								miniprogram/.eslintrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,5 @@
 | 
			
		||||
// ESLint 检查 .vue 文件需要单独配置编辑器:
 | 
			
		||||
// https://eslint.vuejs.org/user-guide/#editor-integrations
 | 
			
		||||
{
 | 
			
		||||
  "extends": ["taro/vue3"]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										20
									
								
								miniprogram/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -1,16 +1,6 @@
 | 
			
		||||
# Windows
 | 
			
		||||
[Dd]esktop.ini
 | 
			
		||||
Thumbs.db
 | 
			
		||||
$RECYCLE.BIN/
 | 
			
		||||
 | 
			
		||||
# macOS
 | 
			
		||||
.DS_Store
 | 
			
		||||
.fseventsd
 | 
			
		||||
.Spotlight-V100
 | 
			
		||||
.TemporaryItems
 | 
			
		||||
.Trashes
 | 
			
		||||
 | 
			
		||||
# Node.js
 | 
			
		||||
dist/
 | 
			
		||||
deploy_versions/
 | 
			
		||||
.temp/
 | 
			
		||||
.rn_temp/
 | 
			
		||||
node_modules/
 | 
			
		||||
 | 
			
		||||
example
 | 
			
		||||
.DS_Store
 | 
			
		||||
 
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
// app.js
 | 
			
		||||
App({
 | 
			
		||||
  onLaunch() {
 | 
			
		||||
    // 展示本地存储能力
 | 
			
		||||
    const logs = wx.getStorageSync('logs') || []
 | 
			
		||||
    logs.unshift(Date.now())
 | 
			
		||||
    wx.setStorageSync('logs', logs)
 | 
			
		||||
 | 
			
		||||
    // 登录
 | 
			
		||||
    wx.login({
 | 
			
		||||
      success: res => {
 | 
			
		||||
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    wx.authorize({
 | 
			
		||||
      scope: 'scope',
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  // 全局变量
 | 
			
		||||
  globalData: {
 | 
			
		||||
    baseUrl: "http://localhost:8080", // 不带最后的 /
 | 
			
		||||
    userInfo: null
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,81 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "pages": [
 | 
			
		||||
    "pages/home/home",
 | 
			
		||||
    "pages/report/report",
 | 
			
		||||
    "pages/apply/apply",
 | 
			
		||||
    "pages/person/person",
 | 
			
		||||
    "pages/index/index",
 | 
			
		||||
    "pages/logs/logs",
 | 
			
		||||
    "pages/webPage/schoolWeb",
 | 
			
		||||
    "pages/login/login",
 | 
			
		||||
    "pages/person/issues",
 | 
			
		||||
    "pages/code/code",
 | 
			
		||||
    "pages/other/feedback",
 | 
			
		||||
    "pages/other/about",
 | 
			
		||||
    "pages/person/info",
 | 
			
		||||
    "pages/other/password",
 | 
			
		||||
    "pages/report/myreport",
 | 
			
		||||
    "pages/apply/myapply",
 | 
			
		||||
    "pages/visitor/visitor",
 | 
			
		||||
    "pages/webPage/xgPage",
 | 
			
		||||
    "pages/visitor/showMyVisitor",
 | 
			
		||||
    "pages/other/redList",
 | 
			
		||||
    "pages/other/redList2",
 | 
			
		||||
    "pages/other/feedbackReplay",
 | 
			
		||||
    "pages/person/count",
 | 
			
		||||
    "pages/apply/applyReplay",
 | 
			
		||||
    "pages/visitor/visitorReplay",
 | 
			
		||||
    "pages/notice/notice"
 | 
			
		||||
  ],
 | 
			
		||||
  "window": {
 | 
			
		||||
    "backgroundTextStyle": "dark",
 | 
			
		||||
    "navigationBarBackgroundColor": "#FF8966",
 | 
			
		||||
    "navigationBarTitleText": "校园疫情防控系统",
 | 
			
		||||
    "navigationBarTextStyle": "black",
 | 
			
		||||
    "enablePullDownRefresh": true
 | 
			
		||||
  },
 | 
			
		||||
  "tabBar": {
 | 
			
		||||
    "selectedColor": "#FF8966",
 | 
			
		||||
    "list": [
 | 
			
		||||
      {
 | 
			
		||||
        "pagePath": "pages/home/home",
 | 
			
		||||
        "text": "首页",
 | 
			
		||||
        "iconPath": "/icon/_home.png",
 | 
			
		||||
        "selectedIconPath": "/icon/home.png"
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "pagePath": "pages/code/code",
 | 
			
		||||
        "text": "二维码",
 | 
			
		||||
        "iconPath": "/icon/_code.png",
 | 
			
		||||
        "selectedIconPath": "/icon/code.png"
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "pagePath": "pages/report/report",
 | 
			
		||||
        "text": "日报",
 | 
			
		||||
        "iconPath": "/icon/_report.png",
 | 
			
		||||
        "selectedIconPath": "/icon/report.png"
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "pagePath": "pages/apply/apply",
 | 
			
		||||
        "text": "申请",
 | 
			
		||||
        "iconPath": "/icon/_apply.png",
 | 
			
		||||
        "selectedIconPath": "/icon/apply.png"
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "pagePath": "pages/person/person",
 | 
			
		||||
        "text": "我的",
 | 
			
		||||
        "selectedColor": "#FF8966",
 | 
			
		||||
        "iconPath": "/icon/_person.png",
 | 
			
		||||
        "selectedIconPath": "/icon/person.png"
 | 
			
		||||
      }
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  "permission": {
 | 
			
		||||
    "scope.userLocation": {
 | 
			
		||||
      "desc": "申请访问您的地址"
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "style": "v2",
 | 
			
		||||
  "sitemapLocation": "sitemap.json",
 | 
			
		||||
  "lazyCodeLoading": "requiredComponents"
 | 
			
		||||
}
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
/**app.wxss**/
 | 
			
		||||
@import "weui.wxss";
 | 
			
		||||
page{
 | 
			
		||||
  line-height: 150%;
 | 
			
		||||
  color: #666;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.container {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: space-between;
 | 
			
		||||
  padding: 200rpx 0;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
} 
 | 
			
		||||
							
								
								
									
										10
									
								
								miniprogram/babel.config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
// babel-preset-taro 更多选项和默认值:
 | 
			
		||||
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
 | 
			
		||||
module.exports = {
 | 
			
		||||
  presets: [
 | 
			
		||||
    ['taro', {
 | 
			
		||||
      framework: 'vue3',
 | 
			
		||||
      ts: false
 | 
			
		||||
    }]
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								miniprogram/config/dev.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
module.exports = {
 | 
			
		||||
  env: {
 | 
			
		||||
    NODE_ENV: '"development"'
 | 
			
		||||
  },
 | 
			
		||||
  defineConstants: {
 | 
			
		||||
  },
 | 
			
		||||
  mini: {},
 | 
			
		||||
  h5: {}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										82
									
								
								miniprogram/config/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,82 @@
 | 
			
		||||
const config = {
 | 
			
		||||
  projectName: '社区疫情防控系统',
 | 
			
		||||
  date: '2022-11-21',
 | 
			
		||||
  designWidth: 750,
 | 
			
		||||
  deviceRatio: {
 | 
			
		||||
    640: 2.34 / 2,
 | 
			
		||||
    750: 1,
 | 
			
		||||
    828: 1.81 / 2
 | 
			
		||||
  },
 | 
			
		||||
  sourceRoot: 'src',
 | 
			
		||||
  outputRoot: 'dist',
 | 
			
		||||
  plugins: [],
 | 
			
		||||
  defineConstants: {
 | 
			
		||||
  },
 | 
			
		||||
  copy: {
 | 
			
		||||
    patterns: [
 | 
			
		||||
    ],
 | 
			
		||||
    options: {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  framework: 'vue3',
 | 
			
		||||
  compiler: 'webpack5',
 | 
			
		||||
  cache: {
 | 
			
		||||
    enable: true // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
 | 
			
		||||
  },
 | 
			
		||||
  mini: {
 | 
			
		||||
    postcss: {
 | 
			
		||||
      pxtransform: {
 | 
			
		||||
        enable: true,
 | 
			
		||||
        config: {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      url: {
 | 
			
		||||
        enable: true,
 | 
			
		||||
        config: {
 | 
			
		||||
          limit: 1024 // 设定转换尺寸上限
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      cssModules: {
 | 
			
		||||
        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
 | 
			
		||||
        config: {
 | 
			
		||||
          namingPattern: 'module', // 转换模式,取值为 global/module
 | 
			
		||||
          generateScopedName: '[name]__[local]___[hash:base64:5]'
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  h5: {
 | 
			
		||||
    publicPath: '/',
 | 
			
		||||
    staticDirectory: 'static',
 | 
			
		||||
    postcss: {
 | 
			
		||||
      autoprefixer: {
 | 
			
		||||
        enable: true,
 | 
			
		||||
        config: {
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      cssModules: {
 | 
			
		||||
        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
 | 
			
		||||
        config: {
 | 
			
		||||
          namingPattern: 'module', // 转换模式,取值为 global/module
 | 
			
		||||
          generateScopedName: '[name]__[local]___[hash:base64:5]'
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  rn: {
 | 
			
		||||
    appName: 'taroDemo',
 | 
			
		||||
    postcss: {
 | 
			
		||||
      cssModules: {
 | 
			
		||||
        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = function (merge) {
 | 
			
		||||
  if (process.env.NODE_ENV === 'development') {
 | 
			
		||||
    return merge({}, config, require('./dev'))
 | 
			
		||||
  }
 | 
			
		||||
  return merge({}, config, require('./prod'))
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										37
									
								
								miniprogram/config/prod.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,37 @@
 | 
			
		||||
module.exports = {
 | 
			
		||||
  env: {
 | 
			
		||||
    NODE_ENV: '"production"'
 | 
			
		||||
  },
 | 
			
		||||
  defineConstants: {
 | 
			
		||||
  },
 | 
			
		||||
  mini: {},
 | 
			
		||||
  h5: {
 | 
			
		||||
    /**
 | 
			
		||||
     * WebpackChain 插件配置
 | 
			
		||||
     * @docs https://github.com/neutrinojs/webpack-chain
 | 
			
		||||
     */
 | 
			
		||||
    // webpackChain (chain) {
 | 
			
		||||
    //   /**
 | 
			
		||||
    //    * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
 | 
			
		||||
    //    * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
 | 
			
		||||
    //    */
 | 
			
		||||
    //   chain.plugin('analyzer')
 | 
			
		||||
    //     .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
 | 
			
		||||
 | 
			
		||||
    //   /**
 | 
			
		||||
    //    * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
 | 
			
		||||
    //    * @docs https://github.com/chrisvfritz/prerender-spa-plugin
 | 
			
		||||
    //    */
 | 
			
		||||
    //   const path = require('path')
 | 
			
		||||
    //   const Prerender = require('prerender-spa-plugin')
 | 
			
		||||
    //   const staticDir = path.join(__dirname, '..', 'dist')
 | 
			
		||||
    //   chain
 | 
			
		||||
    //     .plugin('prerender')
 | 
			
		||||
    //     .use(new Prerender({
 | 
			
		||||
    //       staticDir,
 | 
			
		||||
    //       routes: [ '/pages/index/index' ],
 | 
			
		||||
    //       postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
 | 
			
		||||
    //     }))
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 5.8 KiB  | 
| 
		 Before Width: | Height: | Size: 5.4 KiB  | 
| 
		 Before Width: | Height: | Size: 7.2 KiB  | 
| 
		 Before Width: | Height: | Size: 8.4 KiB  | 
| 
		 Before Width: | Height: | Size: 11 KiB  | 
| 
		 Before Width: | Height: | Size: 7.2 KiB  | 
| 
		 Before Width: | Height: | Size: 1.8 KiB  | 
| 
		 Before Width: | Height: | Size: 1.3 KiB  | 
| 
		 Before Width: | Height: | Size: 2.3 KiB  | 
| 
		 Before Width: | Height: | Size: 1.7 KiB  | 
| 
		 Before Width: | Height: | Size: 5.9 KiB  | 
| 
		 Before Width: | Height: | Size: 8.4 KiB  | 
| 
		 Before Width: | Height: | Size: 22 KiB  | 
| 
		 Before Width: | Height: | Size: 65 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 7.5 KiB  | 
							
								
								
									
										39406
									
								
								miniprogram/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										72
									
								
								miniprogram/package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,72 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "epp",
 | 
			
		||||
  "version": "1.0.0",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "description": "基于微服务的社区疫情防控系统",
 | 
			
		||||
  "templateInfo": {
 | 
			
		||||
    "name": "default",
 | 
			
		||||
    "typescript": false,
 | 
			
		||||
    "css": "none"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "build:weapp": "taro build --type weapp",
 | 
			
		||||
    "build:swan": "taro build --type swan",
 | 
			
		||||
    "build:alipay": "taro build --type alipay",
 | 
			
		||||
    "build:tt": "taro build --type tt",
 | 
			
		||||
    "build:h5": "taro build --type h5",
 | 
			
		||||
    "build:rn": "taro build --type rn",
 | 
			
		||||
    "build:qq": "taro build --type qq",
 | 
			
		||||
    "build:jd": "taro build --type jd",
 | 
			
		||||
    "build:quickapp": "taro build --type quickapp",
 | 
			
		||||
    "dev:weapp": "npm run build:weapp -- --watch",
 | 
			
		||||
    "dev:swan": "npm run build:swan -- --watch",
 | 
			
		||||
    "dev:alipay": "npm run build:alipay -- --watch",
 | 
			
		||||
    "dev:tt": "npm run build:tt -- --watch",
 | 
			
		||||
    "dev:h5": "npm run build:h5 -- --watch",
 | 
			
		||||
    "dev:rn": "npm run build:rn -- --watch",
 | 
			
		||||
    "dev:qq": "npm run build:qq -- --watch",
 | 
			
		||||
    "dev:jd": "npm run build:jd -- --watch",
 | 
			
		||||
    "dev:quickapp": "npm run build:quickapp -- --watch"
 | 
			
		||||
  },
 | 
			
		||||
  "browserslist": [
 | 
			
		||||
    "last 3 versions",
 | 
			
		||||
    "Android >= 4.1",
 | 
			
		||||
    "ios >= 8"
 | 
			
		||||
  ],
 | 
			
		||||
  "author": "",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@babel/runtime": "^7.7.7",
 | 
			
		||||
    "@tarojs/components": "3.5.7",
 | 
			
		||||
    "@tarojs/helper": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-framework-vue3": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-platform-alipay": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-platform-jd": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-platform-qq": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-platform-swan": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-platform-tt": "3.5.7",
 | 
			
		||||
    "@tarojs/plugin-platform-weapp": "3.5.7",
 | 
			
		||||
    "@tarojs/router": "3.5.7",
 | 
			
		||||
    "@tarojs/runtime": "3.5.7",
 | 
			
		||||
    "@tarojs/shared": "3.5.7",
 | 
			
		||||
    "@tarojs/taro": "3.5.7",
 | 
			
		||||
    "@tarojs/taro-h5": "3.5.7",
 | 
			
		||||
    "vue": "^3.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@babel/core": "^7.8.0",
 | 
			
		||||
    "@tarojs/cli": "3.5.7",
 | 
			
		||||
    "@tarojs/webpack5-runner": "3.5.7",
 | 
			
		||||
    "@types/webpack-env": "^1.13.6",
 | 
			
		||||
    "@vue/babel-plugin-jsx": "^1.0.6",
 | 
			
		||||
    "@vue/compiler-sfc": "^3.0.0",
 | 
			
		||||
    "babel-preset-taro": "3.5.7",
 | 
			
		||||
    "css-loader": "3.4.2",
 | 
			
		||||
    "eslint": "^8.12.0",
 | 
			
		||||
    "eslint-config-taro": "3.5.7",
 | 
			
		||||
    "eslint-plugin-vue": "^8.0.0",
 | 
			
		||||
    "style-loader": "1.3.0",
 | 
			
		||||
    "stylelint": "^14.4.0",
 | 
			
		||||
    "vue-loader": "^17.0.0",
 | 
			
		||||
    "webpack": "5.69.0"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,280 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
var dateTimePicker = require('./dateTimePicker.js');
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    isMaskWindowShow: false,
 | 
			
		||||
    maskWindowList: ['时间太早', '时间太晚', '距离太远', '交通不方便', '其他(输入)', '没有原因'],
 | 
			
		||||
    selectIndex: -1,
 | 
			
		||||
    isMaskWindowInputShow: false,
 | 
			
		||||
    maskWindowInputValue: "",
 | 
			
		||||
    type: '',
 | 
			
		||||
    typeTitle: '',
 | 
			
		||||
    transport: '',
 | 
			
		||||
 | 
			
		||||
    date: '2018-10-01',
 | 
			
		||||
    time: '12:00',
 | 
			
		||||
    dateTimeArray: null,
 | 
			
		||||
    dateTime: null,
 | 
			
		||||
    dateTimeArray1: null,
 | 
			
		||||
    dateTime1: null,
 | 
			
		||||
    dateTimeArray2: null,
 | 
			
		||||
    dateTime2: null,
 | 
			
		||||
    startYear: 2000,
 | 
			
		||||
    endYear: 2050,
 | 
			
		||||
    date1: '',
 | 
			
		||||
    date2: '',
 | 
			
		||||
 | 
			
		||||
    issue: '',
 | 
			
		||||
    place: '',
 | 
			
		||||
    id: wx.getStorageSync('id')
 | 
			
		||||
  },
 | 
			
		||||
  issue: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      issue: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  place: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      place: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  report: function () {
 | 
			
		||||
    var data = this.data;
 | 
			
		||||
    this.setData({
 | 
			
		||||
      date1: data.dateTimeArray1[0][data.dateTime1[0]] + "-" + data.dateTimeArray1[1][data.dateTime1[1]] + "-" +
 | 
			
		||||
        data.dateTimeArray1[2][data.dateTime1[2]] + " " + data.dateTimeArray1[3][data.dateTime1[3]] + ":" + data.dateTimeArray1[4][data.dateTime1[4]],
 | 
			
		||||
      date2: data.dateTimeArray2[0][data.dateTime2[0]] + "-" + data.dateTimeArray2[1][data.dateTime2[1]] + "-" +
 | 
			
		||||
        data.dateTimeArray2[2][data.dateTime2[2]] + " " + data.dateTimeArray2[3][data.dateTime2[3]] + ":" + data.dateTimeArray2[4][data.dateTime2[4]]
 | 
			
		||||
    })
 | 
			
		||||
    if(data.issue==''){
 | 
			
		||||
      wx.showToast({
 | 
			
		||||
        title: '请填写请假事由',
 | 
			
		||||
        icon: 'none',
 | 
			
		||||
        duration: 2000
 | 
			
		||||
      })
 | 
			
		||||
    }else if(data.transport==''){
 | 
			
		||||
      wx.showToast({
 | 
			
		||||
        title: '请填写交通方式',
 | 
			
		||||
        icon: 'none',
 | 
			
		||||
        duration: 2000
 | 
			
		||||
      })
 | 
			
		||||
    }else if(data.place==''){
 | 
			
		||||
      wx.showToast({
 | 
			
		||||
        title: '请填写目的地',
 | 
			
		||||
        icon: 'none',
 | 
			
		||||
        duration: 2000
 | 
			
		||||
      })
 | 
			
		||||
    }else if (data.dateTime1[0] <= data.dateTime2[0]) {
 | 
			
		||||
      if (data.dateTime1[1] > data.dateTime2[1] || (data.dateTime1[1] <= data.dateTime2[1] && data.dateTime1[2] > data.dateTime2[2])) {
 | 
			
		||||
        wx.showToast({
 | 
			
		||||
          title: '结束日期不能早于开始日期',
 | 
			
		||||
          icon: 'none',
 | 
			
		||||
          duration: 2000
 | 
			
		||||
        })
 | 
			
		||||
      } else if (data.dateTime1[1] == data.dateTime2[1] && data.dateTime1[2] == data.dateTime2[2]) {
 | 
			
		||||
        if (data.dateTime1[3] > data.dateTime2[3] || (data.dateTime1[3] <= data.dateTime2[3] && data.dateTime1[4] > data.dateTime2[4])) {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: '结束时间不能早于开始时间',
 | 
			
		||||
            icon: 'none',
 | 
			
		||||
            duration: 2000
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
          this.apply();
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        this.apply();
 | 
			
		||||
      }
 | 
			
		||||
    } else {
 | 
			
		||||
      wx.showToast({
 | 
			
		||||
        title: '结束日期不能早于开始日期',
 | 
			
		||||
        icon: 'none',
 | 
			
		||||
        duration: 2000
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  apply: function () {
 | 
			
		||||
    var data = this.data;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/apply/applySub`,
 | 
			
		||||
      data: {
 | 
			
		||||
        stu_id: data.id,
 | 
			
		||||
        issue: data.issue,
 | 
			
		||||
        transport: data.transport,
 | 
			
		||||
        place: data.place,
 | 
			
		||||
        start_time: data.date1,
 | 
			
		||||
        end_time: data.date2
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        if (d.data == "申请成功") {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data,
 | 
			
		||||
            icon: 'success',
 | 
			
		||||
            duration: 2000,
 | 
			
		||||
            success: function () {
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data,
 | 
			
		||||
            icon: 'none',
 | 
			
		||||
            duration: 2000
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
  chooseTransport: function () {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      type: 'transport',
 | 
			
		||||
      typeTitle: '交通方式',
 | 
			
		||||
      maskWindowList: ['飞机', '动车', '火车', '大巴', '私家车', '自行车', '步行', '其他(输入)']
 | 
			
		||||
    })
 | 
			
		||||
    this.showMaskWindow()
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  //弹框以外区域点击
 | 
			
		||||
  maskWindowBgClick: function (e) {
 | 
			
		||||
    this.dismissMaskWindow();
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  //弹窗区域点击事件
 | 
			
		||||
  clickTap: function (e) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  //切换选择项事件
 | 
			
		||||
  maskWindowTableSelect: function (e) {
 | 
			
		||||
    var index = e.currentTarget.dataset.windowIndex;
 | 
			
		||||
    this.setData({
 | 
			
		||||
      selectIndex: e.currentTarget.dataset.windowIndex,
 | 
			
		||||
      isMaskWindowInputShow: index == 7
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  //输入框输入绑定事件
 | 
			
		||||
  maskWindowInput: function (e) {
 | 
			
		||||
    var value = e.detail.value;
 | 
			
		||||
    this.setData({
 | 
			
		||||
      maskWindowInputValue: value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  maskWindowOk: function (e) {
 | 
			
		||||
    var index = this.data.selectIndex;
 | 
			
		||||
    var text;
 | 
			
		||||
    if (this.data.type == 'transport') {
 | 
			
		||||
      if (index == 7) {
 | 
			
		||||
        text = this.data.maskWindowInputValue;
 | 
			
		||||
      } else {
 | 
			
		||||
        text = this.data.maskWindowList[index];
 | 
			
		||||
      }
 | 
			
		||||
      this.setData({
 | 
			
		||||
        transport: text
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
    this.dismissMaskWindow();
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  maskWindowCancel: function (e) {
 | 
			
		||||
    this.dismissMaskWindow();
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // 显示蒙版弹窗
 | 
			
		||||
  showMaskWindow: function () {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      isMaskWindowShow: true,
 | 
			
		||||
      selectIndex: -1,
 | 
			
		||||
      isMaskWindowInputShow: false,
 | 
			
		||||
      maskWindowInputValue: ""
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // 隐藏蒙版窗体
 | 
			
		||||
  dismissMaskWindow: function () {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      isMaskWindowShow: false,
 | 
			
		||||
      selectIndex: -1,
 | 
			
		||||
      isMaskWindowInputShow: false,
 | 
			
		||||
      maskWindowInputValue: ""
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    // 获取完整的年月日 时分秒,以及默认显示的数组
 | 
			
		||||
    var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
 | 
			
		||||
    var obj1 = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
 | 
			
		||||
    var obj2 = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
 | 
			
		||||
    // 精确到分的处理,将数组的秒去掉
 | 
			
		||||
    var lastArray1 = obj1.dateTimeArray.pop();
 | 
			
		||||
    var lastTime1 = obj1.dateTime.pop();
 | 
			
		||||
    var lastArray2 = obj2.dateTimeArray.pop();
 | 
			
		||||
    var lastTime2 = obj2.dateTime.pop();
 | 
			
		||||
    obj2.dateTime[3] += 2
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTime: obj.dateTime,
 | 
			
		||||
      dateTimeArray: obj.dateTimeArray,
 | 
			
		||||
      dateTimeArray1: obj1.dateTimeArray,
 | 
			
		||||
      dateTime1: obj1.dateTime,
 | 
			
		||||
      dateTimeArray2: obj2.dateTimeArray,
 | 
			
		||||
      dateTime2: obj2.dateTime,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDate(e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      date: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeTime(e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      time: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDateTime(e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTime: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDateTime1(e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTime1: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDateTime2(e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTime2: e.detail.value
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDateTimeColumn(e) {
 | 
			
		||||
    var arr = this.data.dateTime,
 | 
			
		||||
      dateArr = this.data.dateTimeArray;
 | 
			
		||||
    arr[e.detail.column] = e.detail.value;
 | 
			
		||||
    dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTimeArray: dateArr,
 | 
			
		||||
      dateTime: arr
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDateTimeColumn1(e) {
 | 
			
		||||
    var arr = this.data.dateTime1,
 | 
			
		||||
      dateArr = this.data.dateTimeArray1;
 | 
			
		||||
    arr[e.detail.column] = e.detail.value;
 | 
			
		||||
    dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTimeArray1: dateArr,
 | 
			
		||||
      dateTime1: arr
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  changeDateTimeColumn2(e) {
 | 
			
		||||
    var arr = this.data.dateTime2,
 | 
			
		||||
      dateArr = this.data.dateTimeArray2;
 | 
			
		||||
    arr[e.detail.column] = e.detail.value;
 | 
			
		||||
    dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
 | 
			
		||||
    this.setData({
 | 
			
		||||
      dateTimeArray2: dateArr,
 | 
			
		||||
      dateTime2: arr
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,73 +0,0 @@
 | 
			
		||||
<page-meta root-font-size="system" />
 | 
			
		||||
<view>
 | 
			
		||||
  <view class="weui-form" style="padding:20px 0">
 | 
			
		||||
    <view class="weui-form__text-area">
 | 
			
		||||
      <h2 class="weui-form__title">出校申请</h2>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class="weui-form__control-area" style="margin-top: 20px;margin-bottom: 0;">
 | 
			
		||||
      <view class="weui-cells__group weui-cells__group_form">
 | 
			
		||||
        <view class="weui-cells__title">1.请假事由</view>
 | 
			
		||||
        <view class="weui-cell weui-cell_active">
 | 
			
		||||
          <view class="weui-cell__bd">
 | 
			
		||||
            <input class="weui-input" placeholder-class="weui-input__placeholder" bindinput='issue' />
 | 
			
		||||
          </view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="weui-cells__title">2.交通方式</view>
 | 
			
		||||
        <view class="weui-cell weui-cell_active">
 | 
			
		||||
          <view class="weui-cell__bd" bindtap="chooseTransport">
 | 
			
		||||
            <view class="weui-input" placeholder-class="weui-input__placeholder">{{transport}}</view>
 | 
			
		||||
          </view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="weui-cells__title">3.目的地</view>
 | 
			
		||||
        <view class="weui-cell weui-cell_active">
 | 
			
		||||
          <view class="weui-cell__bd">
 | 
			
		||||
            <input class="weui-input" placeholder-class="weui-input__placeholder" bindinput='place' />
 | 
			
		||||
          </view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="weui-cells__title">4.开始时间</view>
 | 
			
		||||
        <view class="weui-cell weui-cell_active">
 | 
			
		||||
          <view class="weui-cell__bd">
 | 
			
		||||
            <view class="weui-input" placeholder-class="weui-input__placeholder">
 | 
			
		||||
              <picker mode="multiSelector" value="{{dateTime1}}" bindchange="changeDateTime1" bindcolumnchange="changeDateTimeColumn1" range="{{dateTimeArray1}}">
 | 
			
		||||
                <view class="tui-picker-detail">
 | 
			
		||||
                  {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
 | 
			
		||||
                </view>
 | 
			
		||||
              </picker>
 | 
			
		||||
            </view>
 | 
			
		||||
          </view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="weui-cells__title">5.结束时间</view>
 | 
			
		||||
        <view class="weui-cell weui-cell_active">
 | 
			
		||||
          <view class="weui-cell__bd">
 | 
			
		||||
            <view class="weui-input" placeholder-class="weui-input__placeholder">
 | 
			
		||||
              <picker mode="multiSelector" value="{{dateTime2}}" bindchange="changeDateTime2" bindcolumnchange="changeDateTimeColumn2" range="{{dateTimeArray2}}">
 | 
			
		||||
                <view class="tui-picker-detail" bindtap='date2'>
 | 
			
		||||
                  {{dateTimeArray2[0][dateTime2[0]]}}-{{dateTimeArray2[1][dateTime2[1]]}}-{{dateTimeArray2[2][dateTime2[2]]}} {{dateTimeArray2[3][dateTime2[3]]}}:{{dateTimeArray2[4][dateTime2[4]]}}
 | 
			
		||||
                </view>
 | 
			
		||||
              </picker>
 | 
			
		||||
            </view>
 | 
			
		||||
          </view>
 | 
			
		||||
        </view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class="weui-form__opr-area" style="margin-bottom: 0;">
 | 
			
		||||
      <a aria-role="button" class="weui-btn weui-btn_primary" catchtap="report" style="margin-top: 50px;">提交申请</a>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
<view class='maskWindow' wx:if="{{isMaskWindowShow}}" catchtap='maskWindowBgClick' catchtouchmove='move'>
 | 
			
		||||
  <view class='maskWindowContent' catchtap='clickTap'>
 | 
			
		||||
    <text class="maskWindowTitleText">{{typeTitle}}</text>
 | 
			
		||||
    <view class='maskWindowList' wx:for='{{maskWindowList}}' wx:for-index='index' wx:if='{{index%2===0}}'>
 | 
			
		||||
      <view class="maskWindowText {{index == selectIndex? 'maskWindowText_selected' : 'maskWindowText_unselected'}}" catchtap='maskWindowTableSelect' data-window-Index='{{index}}'>{{maskWindowList[index]}}</view>
 | 
			
		||||
      <view class="maskWindowText {{index + 1 == selectIndex? 'maskWindowText_selected' : 'maskWindowText_unselected'}}" catchtap='maskWindowTableSelect' data-window-Index='{{index+1}}'>{{maskWindowList[index+1]}}</view>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class='maskWindowInputView'>
 | 
			
		||||
      <input class='maskWindowInput' maxlength='100' placeholder='请输入其他原因' hidden='{{!isMaskWindowInputShow}}' bindinput='maskWindowInput'></input>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class='maskWindowBtnView'>
 | 
			
		||||
      <view class='maskWindowBtn' catchtap='maskWindowOk'>确定</view>
 | 
			
		||||
      <view class='maskWindowBtn' catchtap='maskWindowCancel'>取消</view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,72 +0,0 @@
 | 
			
		||||
/* pages/apply/apply.wxss */
 | 
			
		||||
.weui-cells__title{
 | 
			
		||||
  font-size: 17px;
 | 
			
		||||
}
 | 
			
		||||
.maskWindow{
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  position: fixed;
 | 
			
		||||
  background-color: rgba(0, 0, 0, .2);
 | 
			
		||||
  z-index:2;
 | 
			
		||||
  top: 0;
 | 
			
		||||
  left: 0;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowContent {
 | 
			
		||||
  padding: 20rpx 0;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  background: #ffffff;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  justify-content: space - around;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  position: fixed;
 | 
			
		||||
  bottom: 0;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowTitleText {
 | 
			
		||||
  padding: 10rpx 20rpx;
 | 
			
		||||
  margin: 10rpx;
 | 
			
		||||
  font-size: 16px;
 | 
			
		||||
  width: 80%;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowList {
 | 
			
		||||
  width: 80%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: row;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowText {
 | 
			
		||||
  padding: 10rpx 20rpx;
 | 
			
		||||
  margin: 8rpx;
 | 
			
		||||
  width: 50%;
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
  border-radius: 10rpx;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowText_selected {
 | 
			
		||||
  border: 1px solid #15c261;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowText_unselected {
 | 
			
		||||
  border: 1px solid lightgray;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowInputView {
 | 
			
		||||
  width: 80%;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowInput {
 | 
			
		||||
  margin: 15rpx 0;
 | 
			
		||||
  padding: 10rpx 20rpx;
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
  border: 1px solid lightgray;
 | 
			
		||||
  border-radius: 10rpx;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowBtnView {
 | 
			
		||||
  width: 80%;
 | 
			
		||||
  margin-top: 20rpx;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: row;
 | 
			
		||||
  justify-content: flex - end;
 | 
			
		||||
}
 | 
			
		||||
.maskWindowBtn {
 | 
			
		||||
  padding: 10rpx 50rpx;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
  border-radius: 10rpx;
 | 
			
		||||
  border: 1px solid #15c261;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,136 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    List: '',
 | 
			
		||||
    replay: [],
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
  doReplay: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      replay: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  agree: function (event) {
 | 
			
		||||
    var that = this
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/apply/applyReplay`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: event.target.dataset.id,
 | 
			
		||||
        replay: event.target.dataset.replay,
 | 
			
		||||
        reasonId: 99
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        wx.showToast({
 | 
			
		||||
          title: d.data.msg,
 | 
			
		||||
          icon: 'success',
 | 
			
		||||
          duration: 2000,
 | 
			
		||||
          success: function () {}
 | 
			
		||||
        })
 | 
			
		||||
        that.onShow();
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  disagree: function (event) {
 | 
			
		||||
    var that = this
 | 
			
		||||
    wx.showActionSheet({
 | 
			
		||||
      itemList: ['格式错误', '出行地点不允许', '时间填写错误'],
 | 
			
		||||
      success: function (res) {
 | 
			
		||||
        if (!res.cancel) {
 | 
			
		||||
          wx.request({
 | 
			
		||||
            url: `${baseUrl}/apply/applyReplay`,
 | 
			
		||||
            data: {
 | 
			
		||||
              id: event.target.dataset.id,
 | 
			
		||||
              replay: event.target.dataset.replay,
 | 
			
		||||
              reasonId: res.tapIndex,
 | 
			
		||||
            },
 | 
			
		||||
            success: function (d) {
 | 
			
		||||
              wx.showToast({
 | 
			
		||||
                title: d.data.msg,
 | 
			
		||||
                icon: 'success',
 | 
			
		||||
                duration: 2000,
 | 
			
		||||
                success: function () {
 | 
			
		||||
                  that.onShow();
 | 
			
		||||
                }
 | 
			
		||||
              })
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/apply/applyListNoReplay`,
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        that.setData({
 | 
			
		||||
          List: d.data.data
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // replay: function (event) {
 | 
			
		||||
  //   var that = this
 | 
			
		||||
  //   console.log(event.target.dataset)
 | 
			
		||||
  //   wx.request({
 | 
			
		||||
  //     url: `${baseUrl}/apply/applyListNoReplay`,
 | 
			
		||||
  //   })
 | 
			
		||||
  // },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  <h2 class="weui-form__title" style="text-align: center;padding-top: 20px;">申请审批</h2>
 | 
			
		||||
  <view class="issues-panel" wx:for="{{List}}">
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">姓名:{{item.name}}</view>
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">学号:{{item.stuId}}</view>
 | 
			
		||||
    <view class="issues-input" bindinput="contentInput" auto-height disabled="true" style="border-bottom: none;">出行方式: {{item.transport}}</view>
 | 
			
		||||
    <view class="issues-input" bindinput="contentInput" auto-height disabled="true" style="border-bottom: none;">地点:{{item.place}}</view>
 | 
			
		||||
    <view class="issues-input" bindinput="contentInput" auto-height disabled="true" style="border-bottom: none;">开始时间: {{item.start_time}}</view>
 | 
			
		||||
    <view class="issues-input" bindinput="contentInput" auto-height disabled="true" style="border-bottom: none;">结束时间: {{item.end_time}}</view>
 | 
			
		||||
    <view class="weui-cells weui-cells_after-title">
 | 
			
		||||
      <view class="weui-cell weui-cell_input">
 | 
			
		||||
        <button class="mini-btn" type="primary" size="mini" data-id="{{item.id}}" data-replay="1" bindtap="agree">通过</button>
 | 
			
		||||
        <button class="mini-btn" type="warn" size="mini" data-id="{{item.id}}" data-replay="2" bindtap="disagree">驳回</button>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,115 +0,0 @@
 | 
			
		||||
/**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 30rpx;
 | 
			
		||||
  padding-top: 0;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  margin-top: 30px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,80 +0,0 @@
 | 
			
		||||
function withData(param){
 | 
			
		||||
  return param < 10 ? '0' + param : '' + param;
 | 
			
		||||
}
 | 
			
		||||
function getLoopArray(start,end){
 | 
			
		||||
  var start = start || 0;
 | 
			
		||||
  var end = end || 1;
 | 
			
		||||
  var array = [];
 | 
			
		||||
  for (var i = start; i <= end; i++) {
 | 
			
		||||
    array.push(withData(i));
 | 
			
		||||
  }
 | 
			
		||||
  return array;
 | 
			
		||||
}
 | 
			
		||||
function getMonthDay(year,month){
 | 
			
		||||
  var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0), array = null;
 | 
			
		||||
 | 
			
		||||
  switch (month) {
 | 
			
		||||
    case '01':
 | 
			
		||||
    case '03':
 | 
			
		||||
    case '05':
 | 
			
		||||
    case '07':
 | 
			
		||||
    case '08':
 | 
			
		||||
    case '10':
 | 
			
		||||
    case '12':
 | 
			
		||||
      array = getLoopArray(1, 31)
 | 
			
		||||
      break;
 | 
			
		||||
    case '04':
 | 
			
		||||
    case '06':
 | 
			
		||||
    case '09':
 | 
			
		||||
    case '11':
 | 
			
		||||
      array = getLoopArray(1, 30)
 | 
			
		||||
      break;
 | 
			
		||||
    case '02':
 | 
			
		||||
      array = flag ? getLoopArray(1, 29) : getLoopArray(1, 28)
 | 
			
		||||
      break;
 | 
			
		||||
    default:
 | 
			
		||||
      array = '月份格式不正确,请重新输入!'
 | 
			
		||||
  }
 | 
			
		||||
  return array;
 | 
			
		||||
}
 | 
			
		||||
function getNewDateArry(){
 | 
			
		||||
  // 当前时间的处理
 | 
			
		||||
  var newDate = new Date();
 | 
			
		||||
  var year = withData(newDate.getFullYear()),
 | 
			
		||||
      mont = withData(newDate.getMonth() + 1),
 | 
			
		||||
      date = withData(newDate.getDate()),
 | 
			
		||||
      hour = withData(newDate.getHours()),
 | 
			
		||||
      minu = withData(newDate.getMinutes()),
 | 
			
		||||
      seco = withData(newDate.getSeconds());
 | 
			
		||||
 | 
			
		||||
  return [year, mont, date, hour, minu, seco];
 | 
			
		||||
}
 | 
			
		||||
function dateTimePicker(startYear,endYear,date) {
 | 
			
		||||
  // 返回默认显示的数组和联动数组的声明
 | 
			
		||||
  var dateTime = [], dateTimeArray = [[],[],[],[],[],[]];
 | 
			
		||||
  var start = startYear || 1978;
 | 
			
		||||
  var end = endYear || 2100;
 | 
			
		||||
  // 默认开始显示数据
 | 
			
		||||
  var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
 | 
			
		||||
  // 处理联动列表数据
 | 
			
		||||
  /*年月日 时分秒*/ 
 | 
			
		||||
  dateTimeArray[0] = getLoopArray(start,end);
 | 
			
		||||
  dateTimeArray[1] = getLoopArray(1, 12);
 | 
			
		||||
  dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
 | 
			
		||||
  dateTimeArray[3] = getLoopArray(0, 23);
 | 
			
		||||
  dateTimeArray[4] = getLoopArray(0, 59);
 | 
			
		||||
  dateTimeArray[5] = getLoopArray(0, 59);
 | 
			
		||||
 | 
			
		||||
  dateTimeArray.forEach((current,index) => {
 | 
			
		||||
    dateTime.push(current.indexOf(defaultDate[index]));
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  return {
 | 
			
		||||
    dateTimeArray: dateTimeArray,
 | 
			
		||||
    dateTime: dateTime
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
module.exports = {
 | 
			
		||||
  dateTimePicker: dateTimePicker,
 | 
			
		||||
  getMonthDay: getMonthDay
 | 
			
		||||
}
 | 
			
		||||
@@ -1,124 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    List: '',
 | 
			
		||||
    replay: [],
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
  doReplay: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      replay: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  agree: function (event) {
 | 
			
		||||
    var that = this
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/apply/applyReplay`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: event.target.dataset.id,
 | 
			
		||||
        replay: event.target.dataset.replay,
 | 
			
		||||
        reasonId: 99
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        if (d.data.msg == "成功") {
 | 
			
		||||
          that.onshow();
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  disagree: function (event) {
 | 
			
		||||
    var that = this
 | 
			
		||||
    wx.showActionSheet({
 | 
			
		||||
      itemList: ['格式错误', '出行地点不允许', '时间填写错误'],
 | 
			
		||||
      success: function (res) {
 | 
			
		||||
        if (!res.cancel) {
 | 
			
		||||
          wx.request({
 | 
			
		||||
            url: `${baseUrl}/apply/applyReplay`,
 | 
			
		||||
            data: {
 | 
			
		||||
              id: event.target.dataset.id,
 | 
			
		||||
              replay: event.target.dataset.replay,
 | 
			
		||||
              reasonId: res.tapIndex,
 | 
			
		||||
            },
 | 
			
		||||
            success: function (d) {
 | 
			
		||||
              if (d.data.msg == "成功") {
 | 
			
		||||
                that.onShow();
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/apply/myApply`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: wx.getStorageSync('id')
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        that.setData({
 | 
			
		||||
          List: d.data.data
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,13 +0,0 @@
 | 
			
		||||
<!--pages/apply/myapply.wxml-->
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  <h2 class="weui-form__title" style="text-align: center;padding-top: 20px;">我的申请</h2>
 | 
			
		||||
  <view class="issues-panel" wx:for="{{List}}">
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">请假事由:{{item.issue}}</view>
 | 
			
		||||
    <textarea class="issues-textarea" bindinput="contentInput" auto-height disabled="true">
 | 
			
		||||
      <text>目的地:{{item.place}}\n</text> 
 | 
			
		||||
      <text>开始时间:{{item.start_time}}\n</text>
 | 
			
		||||
      <text>结束时间:{{item.end_time}}\n</text>
 | 
			
		||||
    </textarea>
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">管理员意见:{{item.state==1?"同意":item.state==2?"驳回":"审批中"}}</view>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,115 +0,0 @@
 | 
			
		||||
/**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 30rpx;
 | 
			
		||||
  padding-top: 0;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  margin-top: 30px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,107 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
var util = require('../../utils/util.js');
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    imgUrl: '',
 | 
			
		||||
    stuId: wx.getStorageSync('stuId'),
 | 
			
		||||
    name: wx.getStorageSync('name'),
 | 
			
		||||
    isHealth: 0,
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
    console.log("onLoad")
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
    console.log("onReady")
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
    console.log("onPullDownRefresh");
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onRefresh: function () {
 | 
			
		||||
    console.log("onRefresh");
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
    console.log("onShow");
 | 
			
		||||
    this.updateQrCode();
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  updateQrCode: function () {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      stuId: wx.getStorageSync('stuId'),
 | 
			
		||||
      name: wx.getStorageSync('name')
 | 
			
		||||
    })
 | 
			
		||||
    if (wx.getStorageSync("state") == this.formatDate(new Date())) {
 | 
			
		||||
      this.setData({
 | 
			
		||||
        isHealth: 1
 | 
			
		||||
      })
 | 
			
		||||
    } else {
 | 
			
		||||
      this.setData({
 | 
			
		||||
        isHealth: 0
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
    wx.showLoading({
 | 
			
		||||
      title: '请稍候'
 | 
			
		||||
    })
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/code/showCode`,
 | 
			
		||||
      data: {
 | 
			
		||||
        stuId: this.data.stuId,
 | 
			
		||||
        name: this.data.name,
 | 
			
		||||
        isHealth: this.data.isHealth
 | 
			
		||||
      },
 | 
			
		||||
      success: (data) => {
 | 
			
		||||
        console.log(data)
 | 
			
		||||
        this.setData({
 | 
			
		||||
          imgUrl: '../../img/greenCode.png'
 | 
			
		||||
        })
 | 
			
		||||
        wx.hideLoading()
 | 
			
		||||
        wx.showToast({
 | 
			
		||||
          title: '加载成功',
 | 
			
		||||
          icon: 'none',
 | 
			
		||||
          duration: 800
 | 
			
		||||
        })
 | 
			
		||||
        setInterval(() => {
 | 
			
		||||
          var time = util.formatTime(new Date())
 | 
			
		||||
          //为页面中time赋值
 | 
			
		||||
          this.setData({
 | 
			
		||||
            time: time
 | 
			
		||||
          })
 | 
			
		||||
        }, 1000);
 | 
			
		||||
      },
 | 
			
		||||
      fail: (error) => {
 | 
			
		||||
        console.log(error)
 | 
			
		||||
        wx.hideLoading()
 | 
			
		||||
        wx.showModal({
 | 
			
		||||
          title: '加载失败',
 | 
			
		||||
          showCancel: false
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  formatDate: function (date) {
 | 
			
		||||
    let year = date.getFullYear()
 | 
			
		||||
    let month = date.getMonth() + 1
 | 
			
		||||
    month = month.toString()
 | 
			
		||||
    month[1] ? month = month : month = '0' + month
 | 
			
		||||
    let day = date.getDate()
 | 
			
		||||
    day = day.toString()
 | 
			
		||||
    day[1] ? day = day : day = '0' + day
 | 
			
		||||
    return year + "-" + month + "-" + day
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +0,0 @@
 | 
			
		||||
<view style="text-align: center;margin-top: 100px;">
 | 
			
		||||
  <view><text>{{stuId}} {{name}}</text></view>
 | 
			
		||||
  <image id="qrcode" src="{{imgUrl}}"></image>
 | 
			
		||||
  <view><text class="time-text">{{time}}</text></view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
/* pages/home/code.wxss */
 | 
			
		||||
.time-text {
 | 
			
		||||
    font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#qrcode {
 | 
			
		||||
    width: 70vw;
 | 
			
		||||
    height: 70vw;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,90 +0,0 @@
 | 
			
		||||
var QR = require("../../../lib/qrcode.js");
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
Page({
 | 
			
		||||
 
 | 
			
		||||
    /**
 | 
			
		||||
     * 页面的初始数据
 | 
			
		||||
     */
 | 
			
		||||
    data: {
 | 
			
		||||
		canvasHidden: false,
 | 
			
		||||
		imagePath: '',
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
    /**
 | 
			
		||||
     * 生命周期函数--监听页面加载
 | 
			
		||||
     */
 | 
			
		||||
    onLoad: function(options) {
 | 
			
		||||
	    //option为上个页面传递过来的参数
 | 
			
		||||
		var jiaoyanCode = 'sorry,jiaoyanCode is loss';
 | 
			
		||||
	//	if (options) {
 | 
			
		||||
	//		jiaoyanCode = options.jiaoyanCode;
 | 
			
		||||
	//	}
 | 
			
		||||
		console.log(jiaoyanCode);
 | 
			
		||||
		
 | 
			
		||||
		var size = this.setCanvasSize(); //动态设置画布大小	
 | 
			
		||||
		this.createQrCode(jiaoyanCode, "mycanvas", size.w, size.h);		
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
    //适配不同屏幕大小的canvas
 | 
			
		||||
    setCanvasSize: function() {
 | 
			
		||||
        var size = {};
 | 
			
		||||
        try {
 | 
			
		||||
            var res = wx.getSystemInfoSync();
 | 
			
		||||
            var scale = 750 / 686; //不同屏幕下canvas的适配比例;设计稿是750宽  686是因为样式wxss文件中设置的大小
 | 
			
		||||
            var width = res.windowWidth / scale;
 | 
			
		||||
            var height = width; //canvas画布为正方形
 | 
			
		||||
            size.w = width;
 | 
			
		||||
            size.h = height;
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
            // Do something when catch error
 | 
			
		||||
            console.log("获取设备信息失败" + e);
 | 
			
		||||
        }
 | 
			
		||||
        return size;
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
    /**
 | 
			
		||||
     * 绘制二维码图片
 | 
			
		||||
     */
 | 
			
		||||
    createQrCode: function(url, canvasId, cavW, cavH) {
 | 
			
		||||
        //调用插件中的draw方法,绘制二维码图片
 | 
			
		||||
        QR.api.draw(url, canvasId, cavW, cavH);
 | 
			
		||||
        setTimeout(() => {
 | 
			
		||||
            this.canvasToTempImage(canvasId);
 | 
			
		||||
        }, 1000);
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
    /**
 | 
			
		||||
	 * 获取临时缓存照片路径,存入data中
 | 
			
		||||
	 */
 | 
			
		||||
    canvasToTempImage: function() {
 | 
			
		||||
        var that = this;
 | 
			
		||||
		//把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径。
 | 
			
		||||
        wx.canvasToTempFilePath({
 | 
			
		||||
            canvasId: 'mycanvas',
 | 
			
		||||
            success: function(res) {
 | 
			
		||||
                var tempFilePath = res.tempFilePath;
 | 
			
		||||
                console.log(tempFilePath);
 | 
			
		||||
                that.setData({
 | 
			
		||||
                    imagePath: tempFilePath,
 | 
			
		||||
                    // canvasHidden:true
 | 
			
		||||
                });
 | 
			
		||||
            },
 | 
			
		||||
            fail: function(res) {
 | 
			
		||||
                console.log(res);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
	/**
 | 
			
		||||
	 * 点击图片进行预览
 | 
			
		||||
	 */
 | 
			
		||||
	previewImg: function (e) {
 | 
			
		||||
		var img = this.data.imagePath;
 | 
			
		||||
		console.log(img);
 | 
			
		||||
		wx.previewImage({
 | 
			
		||||
			current: img, // 当前显示图片的http链接
 | 
			
		||||
			urls: [img] // 需要预览的图片http链接列表
 | 
			
		||||
		});
 | 
			
		||||
	},
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
 | 
			
		||||
<view class='container'>
 | 
			
		||||
    <image bindtap="previewImg" mode="scaleToFill" src="{{imagePath}}"></image>
 | 
			
		||||
</view>
 | 
			
		||||
 
 | 
			
		||||
<!-- 画布,用来画二维码,只用来站位,不用来显示-->
 | 
			
		||||
<view class="canvas-box">
 | 
			
		||||
    <canvas hidden="{{canvasHidden}}" style="width: 686rpx;height: 686rpx;background:#f1f1f1;" canvas-id="mycanvas" />
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
 | 
			
		||||
.container {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
width: 100%;
 | 
			
		||||
height: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.container image {
 | 
			
		||||
  width: 686rpx;
 | 
			
		||||
  height: 686rpx;
 | 
			
		||||
  background-color: #f9f9f9;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.canvas-box {
 | 
			
		||||
  position: fixed;
 | 
			
		||||
  top: 999999rpx;
 | 
			
		||||
  left: 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,164 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    isManager: false,
 | 
			
		||||
    isStudent: false,
 | 
			
		||||
    notice: ''
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  goWebPage: function (event) {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../webPage/' + event.target.dataset.web,
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  toRedList: function (event) {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../other/redList'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goCode: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../other/redList2'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goCount: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../person/count'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goNotice: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../notice/notice'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goVisitor: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../visitor/visitorReplay'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goFeedback: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../other/feedback'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goFeedbackReplay: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../other/feedbackReplay'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  goApply: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../apply/myapply'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goApplyReplay: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../apply/applyReplay'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goUpdPwd: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../other/password'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goKf: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../person/issues'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  goReport: function () {
 | 
			
		||||
    wx.switchTab({
 | 
			
		||||
      url: '../report/report'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
    if (!wx.getStorageSync("username")) {
 | 
			
		||||
      wx.navigateTo({
 | 
			
		||||
        url: '../login/login'
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
    if (wx.getStorageSync("role") == 2) {
 | 
			
		||||
      this.setData({
 | 
			
		||||
        isManager: false,
 | 
			
		||||
        isStudent: true,
 | 
			
		||||
      })
 | 
			
		||||
    } else if (wx.getStorageSync("role") == 1) {
 | 
			
		||||
      this.setData({
 | 
			
		||||
        isManager: true,
 | 
			
		||||
        isStudent: false,
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/notice/noticeList`,
 | 
			
		||||
      data: {
 | 
			
		||||
        limit: 3
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        that.setData({
 | 
			
		||||
          notice: d.data.data
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,97 +0,0 @@
 | 
			
		||||
<!--pages/home/home.wxml-->
 | 
			
		||||
<view style="background-color: #F6F6F6;height: 100%;">
 | 
			
		||||
  <image src="../../img/home.jpg" style="width: 100%;height: 130px;"></image>
 | 
			
		||||
  <view style="display: block;" wx:if="{{isManager}}">
 | 
			
		||||
    <view style="display: flex;text-align: center;margin-top: 20px;">
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/logo.png" style="width: 40px;height: 40px;" data-web="schoolWeb" bindtap='goWebPage'></image>
 | 
			
		||||
        <view>学校官网</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/danger.png" style="width: 40px;height: 40px;" bindtap='goCode'></image>
 | 
			
		||||
        <view>不健康人员</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/feedback.png" style="width: 40px;height: 40px;" bindtap='goFeedbackReplay'></image>
 | 
			
		||||
        <view>反馈回复</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/apply.png" style="width: 40px;height: 40px;" bindtap='goApplyReplay'></image>
 | 
			
		||||
        <view>申请审批</view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view style="display: flex;text-align: center;margin-top: 20px;">
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/gg.png" style="width: 40px;height: 40px;" data-web="xgPage" bindtap='goNotice'></image>
 | 
			
		||||
        <view>公告发布</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/visitor.png" style="width: 40px;height: 40px;" bindtap="goVisitor"></image>
 | 
			
		||||
        <view>访客审批</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/count.png" style="width: 40px;height: 40px;" bindtap='goCount'></image>
 | 
			
		||||
        <view>分配账号</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/_report.png" style="width: 40px;height: 40px;" bindtap='toRedList'></image>
 | 
			
		||||
        <view>今日未填</view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
  <view style="display: block;" wx:if="{{isStudent}}">
 | 
			
		||||
    <view style="display: flex;text-align: center;margin-top: 20px;">
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/logo.png" style="width: 40px;height: 40px;" data-web="schoolWeb" bindtap='goWebPage'></image>
 | 
			
		||||
        <view>学校官网</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/code.png" style="width: 40px;height: 40px;" bindtap='goCode'></image>
 | 
			
		||||
        <view>进校码</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/feedback.png" style="width: 40px;height: 40px;" bindtap='goFeedback'></image>
 | 
			
		||||
        <view>反馈查看</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/apply.png" style="width: 40px;height: 40px;" bindtap='goApply'></image>
 | 
			
		||||
        <view>申请记录</view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view style="display: flex;text-align: center;margin-top: 20px;">
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/yq.png" style="width: 40px;height: 40px;" data-web="xgPage" bindtap='goWebPage'></image>
 | 
			
		||||
        <view>疫情追踪</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/report.png" style="width: 40px;height: 40px;" bindtap='goReport'></image>
 | 
			
		||||
        <view>今日日报</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/UpdPwd.png" style="width: 40px;height: 40px;" bindtap='goUpdPwd'></image>
 | 
			
		||||
        <view>密码修改</view>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view style="width: 25%;">
 | 
			
		||||
        <image src="../../icon/fk.png" style="width: 40px;height: 40px;" bindtap='goKf'></image>
 | 
			
		||||
        <view>提交反馈</view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
  <view style="background-color:white; border-radius: 50px;width: 30%;margin:10px;margin-top: 20px;">
 | 
			
		||||
    <view style="display: flex;">
 | 
			
		||||
      <image src="../../icon/notice.png" style="height: 30px;width: 30px;margin:5px"></image>
 | 
			
		||||
      <text style="margin-top: 7px;">系统公告</text>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
    <view style="height: 200px;width: 350px;border: black solid 1px;margin-left: 12px;border-radius: 5%;">
 | 
			
		||||
    <view wx:for="{{notice}}">
 | 
			
		||||
      <view style="margin: 20px;">  {{item.title}} 
 | 
			
		||||
        <text class="noticeTime">{{item.time}}</text>
 | 
			
		||||
        <view class="line"></view> 
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
    </view>
 | 
			
		||||
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
/* pages/home/home.wxss */
 | 
			
		||||
page{
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.line{
 | 
			
		||||
  width: 100%; 
 | 
			
		||||
  height: 1px; 
 | 
			
		||||
  background-color: #cccccc;
 | 
			
		||||
  margin-top: 10px;
 | 
			
		||||
}
 | 
			
		||||
.noticeTime{
 | 
			
		||||
  float: right;
 | 
			
		||||
  font-size: small;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,48 +0,0 @@
 | 
			
		||||
// index.js
 | 
			
		||||
// 获取应用实例
 | 
			
		||||
const app = getApp()
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    motto: 'Hello World',
 | 
			
		||||
    userInfo: {},
 | 
			
		||||
    hasUserInfo: false,
 | 
			
		||||
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
 | 
			
		||||
    canIUseGetUserProfile: false,
 | 
			
		||||
    canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
 | 
			
		||||
  },
 | 
			
		||||
  // 事件处理函数
 | 
			
		||||
  bindViewTap() {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../logs/logs'
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    if (wx.getUserProfile) {
 | 
			
		||||
      this.setData({
 | 
			
		||||
        canIUseGetUserProfile: true
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  getUserProfile(e) {
 | 
			
		||||
    // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
 | 
			
		||||
    wx.getUserProfile({
 | 
			
		||||
      desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
 | 
			
		||||
      success: (res) => {
 | 
			
		||||
        console.log(res)
 | 
			
		||||
        this.setData({
 | 
			
		||||
          userInfo: res.userInfo,
 | 
			
		||||
          hasUserInfo: true
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  getUserInfo(e) {
 | 
			
		||||
    // 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息
 | 
			
		||||
    console.log(e)
 | 
			
		||||
    this.setData({
 | 
			
		||||
      userInfo: e.detail.userInfo,
 | 
			
		||||
      hasUserInfo: true
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,23 +0,0 @@
 | 
			
		||||
<!--index.wxml-->
 | 
			
		||||
<view class="container">
 | 
			
		||||
  <view class="userinfo">
 | 
			
		||||
    <block wx:if="{{canIUseOpenData}}">
 | 
			
		||||
      <view class="userinfo-avatar" bindtap="bindViewTap">
 | 
			
		||||
        <open-data type="userAvatarUrl"></open-data>
 | 
			
		||||
      </view>
 | 
			
		||||
      <open-data type="userNickName"></open-data>
 | 
			
		||||
    </block>
 | 
			
		||||
    <block wx:elif="{{!hasUserInfo}}">
 | 
			
		||||
      <button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
 | 
			
		||||
      <button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
 | 
			
		||||
      <view wx:else> 请使用1.4.4及以上版本基础库 </view>
 | 
			
		||||
    </block>
 | 
			
		||||
    <block wx:else>
 | 
			
		||||
      <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
 | 
			
		||||
      <text class="userinfo-nickname">{{userInfo.nickName}}</text>
 | 
			
		||||
    </block>
 | 
			
		||||
  </view>
 | 
			
		||||
  <view class="usermotto">
 | 
			
		||||
    <text class="user-motto">{{motto}}</text>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
/**index.wxss**/
 | 
			
		||||
.userinfo {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  color: #aaa;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.userinfo-avatar {
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
  width: 128rpx;
 | 
			
		||||
  height: 128rpx;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  border-radius: 50%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.usermotto {
 | 
			
		||||
  margin-top: 200px;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,79 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    username: '',
 | 
			
		||||
    password: ''
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // 获取输入账号
 | 
			
		||||
  usernameInput: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      username: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // 获取输入密码
 | 
			
		||||
  passwordInput: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      password: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // 登录
 | 
			
		||||
  login: function () {
 | 
			
		||||
    var username = this.data.username
 | 
			
		||||
    var password = this.data.password
 | 
			
		||||
    if (username == '' || password == '') {
 | 
			
		||||
      wx.showToast({
 | 
			
		||||
        title: "请完善登录信息",
 | 
			
		||||
        icon: 'error',
 | 
			
		||||
        duration: 2000
 | 
			
		||||
      })
 | 
			
		||||
    } else {
 | 
			
		||||
      wx.request({
 | 
			
		||||
        url: `${baseUrl}/user/login`,
 | 
			
		||||
        data: {
 | 
			
		||||
          username: this.data.username,
 | 
			
		||||
          password: this.data.password,
 | 
			
		||||
        },
 | 
			
		||||
        success: function (d) {
 | 
			
		||||
          if (d.data.msg == "成功") {
 | 
			
		||||
            wx.setStorageSync("username", username);
 | 
			
		||||
            if (d.data.data.stu_id) {
 | 
			
		||||
              wx.setStorageSync("stuId", d.data.data.stu_id);
 | 
			
		||||
            }
 | 
			
		||||
            wx.setStorageSync("id", d.data.data.id);
 | 
			
		||||
            wx.setStorageSync("name", d.data.data.name);
 | 
			
		||||
            wx.setStorageSync("role", d.data.data.role);
 | 
			
		||||
            wx.setStorageSync("state", d.data.data.state)
 | 
			
		||||
            wx.showToast({
 | 
			
		||||
              title: "登录成功",
 | 
			
		||||
              icon: 'success',
 | 
			
		||||
              success: function () {
 | 
			
		||||
                wx.switchTab({
 | 
			
		||||
                  url: '../home/home'
 | 
			
		||||
                })
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          } else {
 | 
			
		||||
            wx.showToast({
 | 
			
		||||
              title: d.data.msg,
 | 
			
		||||
              icon: 'error',
 | 
			
		||||
              duration: 2000
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  visitor: function () {
 | 
			
		||||
    wx.navigateTo({
 | 
			
		||||
      url: '../visitor/visitor',
 | 
			
		||||
      success: function () { }, //成功后的回调;
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,27 +0,0 @@
 | 
			
		||||
<!--pages/login/login.wxml-->
 | 
			
		||||
<view class="container">
 | 
			
		||||
	<view class="login-icon">
 | 
			
		||||
		<image class="login-img" src="../../icon/login-background.svg"></image>
 | 
			
		||||
	</view>
 | 
			
		||||
	<view class="login-from">
 | 
			
		||||
		<!--账号-->
 | 
			
		||||
		<view class="inputView">
 | 
			
		||||
			<image class="nameImage" src="../../icon/username.png"></image>
 | 
			
		||||
			<input class="inputText" placeholder="账号" bindinput="usernameInput" />
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="line"></view>
 | 
			
		||||
		<!--密码-->
 | 
			
		||||
		<view class="inputView" style="margin-top:30px;">
 | 
			
		||||
			<image class="keyImage" src="../../icon/password.png"></image>
 | 
			
		||||
			<input class="inputText" password="true" placeholder="密码" bindinput="passwordInput" />
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="line"></view>
 | 
			
		||||
		<!--按钮-->
 | 
			
		||||
		<view class="loginBtnView" style="margin-top: 30px;">
 | 
			
		||||
			<button class="loginBtn" type="primary" bindtap="login">登录</button>
 | 
			
		||||
		</view>
 | 
			
		||||
		<view class="loginBtnView">
 | 
			
		||||
			<button class="loginBtn" type="primary" bindtap="visitor">访客申请</button>
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,79 +0,0 @@
 | 
			
		||||
page {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.container {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*登录图片*/
 | 
			
		||||
.login-icon {
 | 
			
		||||
  flex: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.login-img {
 | 
			
		||||
  margin-top: 50px;
 | 
			
		||||
  width: 450rpx;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*表单内容*/
 | 
			
		||||
.login-from {
 | 
			
		||||
  margin-top: 20px;
 | 
			
		||||
  flex: auto;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.inputView {
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  line-height: 44px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*输入框*/
 | 
			
		||||
.nameImage,
 | 
			
		||||
.keyImage {
 | 
			
		||||
  margin-left: 22px;
 | 
			
		||||
  margin-right: 8px;
 | 
			
		||||
  width: 14px;
 | 
			
		||||
  height: 14px;
 | 
			
		||||
  vertical-align: middle;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.loginLab {
 | 
			
		||||
  margin: 15px 15px 15px 10px;
 | 
			
		||||
  color: #545454;
 | 
			
		||||
  font-size: 14px
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.inputText {
 | 
			
		||||
  flex: block;
 | 
			
		||||
  float: right;
 | 
			
		||||
  margin-right: 22px;
 | 
			
		||||
  margin-top: 11px;
 | 
			
		||||
  color: #cccccc;
 | 
			
		||||
  font-size: 14px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.line {
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 1px;
 | 
			
		||||
  background-color: #cccccc;
 | 
			
		||||
  margin-top: 1px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*按钮*/
 | 
			
		||||
.loginBtnView {
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: auto;
 | 
			
		||||
  margin-top: 0px;
 | 
			
		||||
  margin-bottom: 0px;
 | 
			
		||||
  padding-bottom: 0px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.loginBtn {
 | 
			
		||||
  width: 80%;
 | 
			
		||||
  margin-top: 10px;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
// logs.js
 | 
			
		||||
const util = require('../../utils/util.js')
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    logs: []
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      logs: (wx.getStorageSync('logs') || []).map(log => {
 | 
			
		||||
        return {
 | 
			
		||||
          date: util.formatTime(new Date(log)),
 | 
			
		||||
          timeStamp: log
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "navigationBarTitleText": "查看启动日志",
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
<!--logs.wxml-->
 | 
			
		||||
<view class="container log-list">
 | 
			
		||||
  <block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
 | 
			
		||||
    <text class="log-item">{{index + 1}}. {{log.date}}</text>
 | 
			
		||||
  </block>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
.log-list {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding: 40rpx;
 | 
			
		||||
}
 | 
			
		||||
.log-item {
 | 
			
		||||
  margin: 10rpx;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,65 +0,0 @@
 | 
			
		||||
//issues.js
 | 
			
		||||
//获取应用实例
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
var util = require('../../utils/util')
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    title: '',
 | 
			
		||||
    content: '',
 | 
			
		||||
    time: ''
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  titleInput: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      title: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  contentInput: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      content: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  submit: function () {
 | 
			
		||||
    var TIME = util.formatTime(new Date());
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/notice/addNotice`,
 | 
			
		||||
      data: {
 | 
			
		||||
        title: this.data.title,
 | 
			
		||||
        content: this.data.content,
 | 
			
		||||
        time: TIME,
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        if (d.data != "提交失败") {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data,
 | 
			
		||||
            icon: 'success',
 | 
			
		||||
            duration: 2000,
 | 
			
		||||
            success: function () {
 | 
			
		||||
              setTimeout(function () {
 | 
			
		||||
                wx.switchTab({
 | 
			
		||||
                  url: '../home/home'
 | 
			
		||||
                })
 | 
			
		||||
              }, 2000);
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data,
 | 
			
		||||
            icon: 'error',
 | 
			
		||||
            duration: 2000
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onLoad: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,10 +0,0 @@
 | 
			
		||||
<!--issues.wxml-->
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  <view class="issues-panel">
 | 
			
		||||
    <input class="issues-input" placeholder="请输入标题" bindinput="titleInput" />
 | 
			
		||||
    <textarea class="issues-textarea" placeholder="请输入内容" bindinput="contentInput" auto-height></textarea>
 | 
			
		||||
  </view>
 | 
			
		||||
  <view class="submit-btn" bindtap="submit">
 | 
			
		||||
    <text>发布公告</text>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,113 +0,0 @@
 | 
			
		||||
/**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,66 +0,0 @@
 | 
			
		||||
// pages/other/about.js
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
<!--pages/other/about.wxml-->
 | 
			
		||||
<image src="../../img/about.png" class='imagesize'> </image>
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
/* pages/other/about.wxss */
 | 
			
		||||
page{
 | 
			
		||||
  height:100%
 | 
			
		||||
}
 | 
			
		||||
.imagesize{
 | 
			
		||||
display:flex;
 | 
			
		||||
height: 100%;
 | 
			
		||||
width: 100%;
 | 
			
		||||
justify-content: center;
 | 
			
		||||
align-items:center;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,85 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    feedbackList: '',
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/other/feedbackList`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: wx.getStorageSync('id')
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        for (const iterator of d.data.data) {
 | 
			
		||||
          if (!iterator.reply) {
 | 
			
		||||
            iterator.reply = "暂无"
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        that.setData({
 | 
			
		||||
          feedbackList: d.data.data
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
<!--pages/other/feedback.wxml-->
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  <h2 class="weui-form__title" style="text-align: center;padding-top: 20px;">我的反馈</h2>
 | 
			
		||||
  <view class="issues-panel" wx:for="{{feedbackList}}">
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">标题:{{item.title}}</view>
 | 
			
		||||
    <textarea class="issues-textarea" bindinput="contentInput" auto-height disabled="true">内容:{{item.content}}</textarea>
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">管理员回复:{{item.reply}}</view>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,115 +0,0 @@
 | 
			
		||||
/**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 30rpx;
 | 
			
		||||
  padding-top: 0;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  margin-top: 30px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,112 +0,0 @@
 | 
			
		||||
// pages/other/feedback.js
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    feedbackList: '',
 | 
			
		||||
    replay: [],
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
  doReplay: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      replay: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/other/feedbackListNoReplay`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: wx.getStorageSync('id')
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        for (const iterator of d.data.data) {
 | 
			
		||||
          if (!iterator.reply) {
 | 
			
		||||
            iterator.reply = ""
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        that.setData({
 | 
			
		||||
          feedbackList: d.data.data
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  replay: function (event) {
 | 
			
		||||
    var that = this
 | 
			
		||||
    console.log(event.target.dataset)
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/other/feedbackReplay`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: event.target.dataset.id,
 | 
			
		||||
        replay: event.target.dataset.replay
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        wx.showToast({
 | 
			
		||||
          title: d.data.msg,
 | 
			
		||||
          icon: 'success',
 | 
			
		||||
          duration: 2000,
 | 
			
		||||
          success: function () {
 | 
			
		||||
            that.setData({
 | 
			
		||||
              replay: ""
 | 
			
		||||
            })
 | 
			
		||||
            that.onShow()
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
<!--pages/other/feedback.wxml-->
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  <h2 class="weui-form__title" style="text-align: center;padding-top: 20px;">反馈回复</h2>
 | 
			
		||||
  <view class="issues-panel" wx:for="{{feedbackList}}">
 | 
			
		||||
    <view class="issues-input" bindinput="titleInput" disabled="true">标题:{{item.title}}</view>
 | 
			
		||||
    <textarea class="issues-textarea" bindinput="contentInput" auto-height disabled="true" style="border-bottom: none;">内容:{{item.content}}</textarea>
 | 
			
		||||
    <view class="weui-cells weui-cells_after-title">
 | 
			
		||||
      <view class="weui-cell weui-cell_input">
 | 
			
		||||
        <input class="weui-input" auto-focus placeholder="请输入回复的内容" style="width: 80%;" bindinput="doReplay" data-id="{{item.id}}" />
 | 
			
		||||
        <button class="mini-btn" type="primary" size="mini" data-id="{{item.id}}" data-replay="{{replay}}" bindtap="replay">回复</button>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,115 +0,0 @@
 | 
			
		||||
/**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 30rpx;
 | 
			
		||||
  padding-top: 0;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  margin-top: 30px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,129 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    username: wx.getStorageSync('username'),
 | 
			
		||||
    pwd1: '',
 | 
			
		||||
    pwd2: '',
 | 
			
		||||
    pwd3: ''
 | 
			
		||||
  },
 | 
			
		||||
  pwd1: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      pwd1: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  pwd2: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      pwd2: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  pwd3: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      pwd3: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  submit: function () {
 | 
			
		||||
    if (this.data.pwd2 != this.data.pwd3) {
 | 
			
		||||
      wx.showToast({
 | 
			
		||||
        title: '新密码不一致',
 | 
			
		||||
        icon: 'error',
 | 
			
		||||
        duration: 2000
 | 
			
		||||
      })
 | 
			
		||||
    } else {
 | 
			
		||||
      wx.request({
 | 
			
		||||
        url: `${baseUrl}/user/updPwd`,
 | 
			
		||||
        data: {
 | 
			
		||||
          username: this.data.username,
 | 
			
		||||
          pwd1: this.data.pwd1,
 | 
			
		||||
          pwd2: this.data.pwd2
 | 
			
		||||
        },
 | 
			
		||||
        success: function (d) {
 | 
			
		||||
          if (d.data == "请重新登录") {
 | 
			
		||||
            wx.showToast({
 | 
			
		||||
              title: d.data,
 | 
			
		||||
              icon: 'success',
 | 
			
		||||
              duration: 2000,
 | 
			
		||||
              success: function () {
 | 
			
		||||
                setTimeout(function () {
 | 
			
		||||
                  wx.clearStorageSync()
 | 
			
		||||
                  wx.navigateTo({
 | 
			
		||||
                    url: '../login/login'
 | 
			
		||||
                  })
 | 
			
		||||
                }, 2000);
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          } else {
 | 
			
		||||
            wx.showToast({
 | 
			
		||||
              title: d.data,
 | 
			
		||||
              icon: 'error',
 | 
			
		||||
              duration: 2000
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
<!--pages/other/password.wxml-->
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  原密码:
 | 
			
		||||
  <view class="issues-panel">
 | 
			
		||||
    <input class="issues-input" bindinput="pwd1" />
 | 
			
		||||
  </view>
 | 
			
		||||
  新密码:
 | 
			
		||||
  <view class="issues-panel">
 | 
			
		||||
    <input class="issues-input" bindinput="pwd2" />
 | 
			
		||||
  </view>
 | 
			
		||||
  再次输入新密码:
 | 
			
		||||
  <view class="issues-panel">
 | 
			
		||||
    <input class="issues-input" bindinput="pwd3" />
 | 
			
		||||
  </view>
 | 
			
		||||
  <view class="submit-btn" bindtap="submit">
 | 
			
		||||
    <text>提交修改</text>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,114 +0,0 @@
 | 
			
		||||
/* pages/other/password.wxss *//**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 0 15px;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  margin-bottom: 10px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  data: {
 | 
			
		||||
    tableInfo: {},
 | 
			
		||||
    count: ''
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
    // 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/user/redCodeList`,
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        let item = [];
 | 
			
		||||
        for (const iterator of d.data.data) {
 | 
			
		||||
          let item1 = [iterator.stu_id, iterator.name];
 | 
			
		||||
          item.push(item1)
 | 
			
		||||
        }
 | 
			
		||||
        that.setData({
 | 
			
		||||
          tableInfo: {
 | 
			
		||||
            title: ["学号", "姓名"],
 | 
			
		||||
            contentItem: item,
 | 
			
		||||
          },
 | 
			
		||||
          count: d.data.data.length
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
<template name="tableTemp">
 | 
			
		||||
  <view>
 | 
			
		||||
    <view class="table">
 | 
			
		||||
      <view class="tr">
 | 
			
		||||
        <block wx:for="{{title}}" wx:key="{{index}}">
 | 
			
		||||
          <view class="th left">{{item}}</view>
 | 
			
		||||
        </block>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view class="tr" wx:for="{{contentItem}}" wx:key="index">
 | 
			
		||||
        <block wx:for="{{item}}" wx:key="index">
 | 
			
		||||
          <view class="td left">{{item}}</view>
 | 
			
		||||
        </block>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
</template>
 | 
			
		||||
<view style="margin-left: 220px;margin-top: 10px;">
 | 
			
		||||
  <h2>未填人数: {{count}}</h2>
 | 
			
		||||
</view>
 | 
			
		||||
<view class="tb1">
 | 
			
		||||
  <template is="tableTemp" data="{{...tableInfo}}" />
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
 | 
			
		||||
.table-wrap{
 | 
			
		||||
  top: 20rpx;
 | 
			
		||||
}
 | 
			
		||||
/* 表格代码   */
 | 
			
		||||
.table{
 | 
			
		||||
  background-color: white;
 | 
			
		||||
  border:1px solid #dadada;
 | 
			
		||||
  border-right:0;
 | 
			
		||||
  border-bottom: 0;
 | 
			
		||||
  width: 96%;
 | 
			
		||||
  margin: auto;
 | 
			
		||||
  margin-top: 10px;
 | 
			
		||||
}
 | 
			
		||||
.tr{
 | 
			
		||||
  width:100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  justify-content: space-between;
 | 
			
		||||
}
 | 
			
		||||
.th{
 | 
			
		||||
  padding: 3px;
 | 
			
		||||
  border-bottom: 1px solid #dadada;
 | 
			
		||||
  border-right: 1px solid #dadada;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  background-color: rgba(139, 182, 155, 0.12);
 | 
			
		||||
  font-size: 28rpx;
 | 
			
		||||
  color: rgba(23, 21, 23, 0.73);
 | 
			
		||||
}
 | 
			
		||||
.td{
 | 
			
		||||
  padding: 3px;
 | 
			
		||||
  border-bottom: 1px solid #dadada;
 | 
			
		||||
  border-right: 1px solid #dadada;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  font-size: 28rpx;
 | 
			
		||||
  color: #666666;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.left{
 | 
			
		||||
  text-align: left;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
  data: {
 | 
			
		||||
    tableInfo: {},
 | 
			
		||||
    count: ''
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
    // 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/user/redCodeList2`,
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        let item = [];
 | 
			
		||||
        for (const iterator of d.data.data) {
 | 
			
		||||
          let item1 = [iterator.stu_id, iterator.name];
 | 
			
		||||
          item.push(item1)
 | 
			
		||||
        }
 | 
			
		||||
        that.setData({
 | 
			
		||||
          tableInfo: {
 | 
			
		||||
            title: ["学号", "姓名"],
 | 
			
		||||
            contentItem: item,
 | 
			
		||||
          },
 | 
			
		||||
          count: d.data.data.length
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
<template name="tableTemp">
 | 
			
		||||
  <view>
 | 
			
		||||
    <view class="table">
 | 
			
		||||
      <view class="tr">
 | 
			
		||||
        <block wx:for="{{title}}" wx:key="{{index}}">
 | 
			
		||||
          <view class="th left">{{item}}</view>
 | 
			
		||||
        </block>
 | 
			
		||||
      </view>
 | 
			
		||||
      <view class="tr" wx:for="{{contentItem}}" wx:key="index">
 | 
			
		||||
        <block wx:for="{{item}}" wx:key="index">
 | 
			
		||||
          <view class="td left">{{item}}</view>
 | 
			
		||||
        </block>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </view>
 | 
			
		||||
</template>
 | 
			
		||||
<view style="margin-left: 220px;margin-top: 10px;">
 | 
			
		||||
  <h2>不健康人数: {{count}}</h2>
 | 
			
		||||
</view>
 | 
			
		||||
<view class="tb1">
 | 
			
		||||
  <template is="tableTemp" data="{{...tableInfo}}" />
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
 | 
			
		||||
.table-wrap{
 | 
			
		||||
  top: 20rpx;
 | 
			
		||||
}
 | 
			
		||||
/* 表格代码   */
 | 
			
		||||
.table{
 | 
			
		||||
  background-color: white;
 | 
			
		||||
  border:1px solid #dadada;
 | 
			
		||||
  border-right:0;
 | 
			
		||||
  border-bottom: 0;
 | 
			
		||||
  width: 96%;
 | 
			
		||||
  margin: auto;
 | 
			
		||||
  margin-top: 10px;
 | 
			
		||||
}
 | 
			
		||||
.tr{
 | 
			
		||||
  width:100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  justify-content: space-between;
 | 
			
		||||
}
 | 
			
		||||
.th{
 | 
			
		||||
  padding: 3px;
 | 
			
		||||
  border-bottom: 1px solid #dadada;
 | 
			
		||||
  border-right: 1px solid #dadada;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  background-color: rgba(139, 182, 155, 0.12);
 | 
			
		||||
  font-size: 28rpx;
 | 
			
		||||
  color: rgba(23, 21, 23, 0.73);
 | 
			
		||||
}
 | 
			
		||||
.td{
 | 
			
		||||
  padding: 3px;
 | 
			
		||||
  border-bottom: 1px solid #dadada;
 | 
			
		||||
  border-right: 1px solid #dadada;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  font-size: 28rpx;
 | 
			
		||||
  color: #666666;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.left{
 | 
			
		||||
  text-align: left;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,120 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    useranme: '',
 | 
			
		||||
    name: '',
 | 
			
		||||
    radio1: [{
 | 
			
		||||
      name: '管理员',
 | 
			
		||||
      value: '1'
 | 
			
		||||
    }, {
 | 
			
		||||
      name: '学生',
 | 
			
		||||
      value: '2',
 | 
			
		||||
      checked: 'true'
 | 
			
		||||
    }],
 | 
			
		||||
    role: '2'
 | 
			
		||||
  },
 | 
			
		||||
  radioChange: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      role: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  username: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      username: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  name: function (e) {
 | 
			
		||||
    this.setData({
 | 
			
		||||
      name: e.detail.value
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  submit: function () {
 | 
			
		||||
    var that = this
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url:  `${baseUrl}/user/addUser`,
 | 
			
		||||
      data: {
 | 
			
		||||
        username: this.data.username,
 | 
			
		||||
        name: this.data.name,
 | 
			
		||||
        role: this.data.role
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        if (d.data.data == "添加成功") {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data.data,
 | 
			
		||||
            icon: 'success',
 | 
			
		||||
            duration: 2000,
 | 
			
		||||
          })
 | 
			
		||||
          that.onLoad();
 | 
			
		||||
        } else {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data.data,
 | 
			
		||||
            icon: 'error',
 | 
			
		||||
            duration: 2000,
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,21 +0,0 @@
 | 
			
		||||
<view class="perason">
 | 
			
		||||
  账号/学号(密码默认与账号相同):
 | 
			
		||||
  <view class="issues-panel">
 | 
			
		||||
    <input class="issues-input" bindinput="username" />
 | 
			
		||||
  </view>
 | 
			
		||||
  姓名:
 | 
			
		||||
  <view class="issues-panel">
 | 
			
		||||
    <input class="issues-input" bindinput="name" />
 | 
			
		||||
  </view>
 | 
			
		||||
  角色:
 | 
			
		||||
  <view>
 | 
			
		||||
    <radio-group class="weui-cell weui-cell_active" style="display: flex;text-align: center;" bindchange="radioChange">
 | 
			
		||||
          <label class="radio" wx:for="{{radio1}}" style="margin-right: 60px;">
 | 
			
		||||
            <radio value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 | 
			
		||||
          </label>
 | 
			
		||||
        </radio-group>
 | 
			
		||||
  </view>
 | 
			
		||||
  <view class="submit-btn" bindtap="submit">
 | 
			
		||||
    <text>提交</text>
 | 
			
		||||
  </view>
 | 
			
		||||
</view>
 | 
			
		||||
@@ -1,114 +0,0 @@
 | 
			
		||||
/* pages/other/password.wxss *//**issuse.wxss**/
 | 
			
		||||
.perason{
 | 
			
		||||
  background-color: #f6f6f6;
 | 
			
		||||
  padding: 0 15px;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
  font-size: 11pt;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  padding-bottom: 100rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-label{
 | 
			
		||||
  font-size: 10pt;
 | 
			
		||||
  line-height: 100%;
 | 
			
		||||
  color: #999;
 | 
			
		||||
  margin: 25rpx 20rpx 15rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-panel{
 | 
			
		||||
  margin-bottom: 10px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: stretch;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.issues-img-panel{
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  background-color: #fff;
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-input{
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
  padding: 15rpx 25rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-textarea{
 | 
			
		||||
  padding: 25rpx;
 | 
			
		||||
  min-height: 225rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  color: #888;
 | 
			
		||||
  margin: 20rpx;
 | 
			
		||||
  margin-right: 0;
 | 
			
		||||
  width: 135rpx;
 | 
			
		||||
  height: 135rpx;
 | 
			
		||||
  border: 1rpx solid #e5e5e5;
 | 
			
		||||
  border-radius: 5rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item:active{
 | 
			
		||||
  opacity: .8;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item .remind-img{
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.issues-photo-item image{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active {
 | 
			
		||||
  background: #f0f0f0;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before, .add-photo::after{
 | 
			
		||||
  content: '';
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 50%;
 | 
			
		||||
  left: 50%;
 | 
			
		||||
  background: #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.add-photo:active::before, .add-photo:active::after{
 | 
			
		||||
  background: #ddd;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::before {
 | 
			
		||||
  width: 10rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  margin-top: -40rpx;
 | 
			
		||||
  margin-left: -5rpx;
 | 
			
		||||
}
 | 
			
		||||
.add-photo::after {
 | 
			
		||||
  width: 80rpx;
 | 
			
		||||
  height: 10rpx;
 | 
			
		||||
  margin-top: -5rpx;
 | 
			
		||||
  margin-left: -40rpx;
 | 
			
		||||
}
 | 
			
		||||
.issues-remind {
 | 
			
		||||
  flex: 1;
 | 
			
		||||
  font-size: 9pt;
 | 
			
		||||
  line-height: 135%;
 | 
			
		||||
  color: #ccc;
 | 
			
		||||
  padding: 0 30rpx;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
  text-indent: 1em;
 | 
			
		||||
  padding-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit-btn {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  margin: 40rpx 3%;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  border-radius: 3px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  background-color: #FF8966;
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  font-size: 12pt;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,134 +0,0 @@
 | 
			
		||||
const app = getApp()
 | 
			
		||||
const baseUrl = app.globalData.baseUrl
 | 
			
		||||
// console.log("baseUrl", baseUrl)
 | 
			
		||||
 | 
			
		||||
Page({
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    id: wx.getStorageSync('id'),
 | 
			
		||||
    name: wx.getStorageSync('name'),
 | 
			
		||||
    stuId: wx.getStorageSync('stuId'),
 | 
			
		||||
    img: ''
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  personInfo() {
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/user/person`,
 | 
			
		||||
      data: {
 | 
			
		||||
        username: wx.getStorageSync('username'),
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        that.setData({
 | 
			
		||||
          img: d.data.img,
 | 
			
		||||
          name: wx.getStorageSync('name'),
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  uploadImg: function () {
 | 
			
		||||
    var that = this;
 | 
			
		||||
    wx.chooseImage({
 | 
			
		||||
      count: 1,
 | 
			
		||||
      sizeType: 'compressed',
 | 
			
		||||
      sourceType: ['album', 'camera'],
 | 
			
		||||
      success(res) {
 | 
			
		||||
        let imgbase64 = 'data:image/png;base64,' + wx.getFileSystemManager().readFileSync(res.tempFilePaths[0], "base64")
 | 
			
		||||
        that.setData({
 | 
			
		||||
          img: imgbase64,
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  update: function () {
 | 
			
		||||
    wx.request({
 | 
			
		||||
      url: `${baseUrl}/user/updateImg`,
 | 
			
		||||
      data: {
 | 
			
		||||
        id: this.data.id,
 | 
			
		||||
        img: this.data.img
 | 
			
		||||
      },
 | 
			
		||||
      success: function (d) {
 | 
			
		||||
        if (d.data != "修改失败") {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data,
 | 
			
		||||
            icon: 'success',
 | 
			
		||||
            duration: 2000,
 | 
			
		||||
            success: function () {
 | 
			
		||||
              setTimeout(function () {
 | 
			
		||||
                wx.switchTab({
 | 
			
		||||
                  url: '../person/person'
 | 
			
		||||
                })
 | 
			
		||||
              }, 2000);
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        } else {
 | 
			
		||||
          wx.showToast({
 | 
			
		||||
            title: d.data,
 | 
			
		||||
            icon: 'error',
 | 
			
		||||
            duration: 2000
 | 
			
		||||
          })
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面加载
 | 
			
		||||
   */
 | 
			
		||||
  onLoad: function (options) {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面初次渲染完成
 | 
			
		||||
   */
 | 
			
		||||
  onReady: function () {
 | 
			
		||||
    this.personInfo()
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面显示
 | 
			
		||||
   */
 | 
			
		||||
  onShow: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面隐藏
 | 
			
		||||
   */
 | 
			
		||||
  onHide: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 生命周期函数--监听页面卸载
 | 
			
		||||
   */
 | 
			
		||||
  onUnload: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面相关事件处理函数--监听用户下拉动作
 | 
			
		||||
   */
 | 
			
		||||
  onPullDownRefresh: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 页面上拉触底事件的处理函数
 | 
			
		||||
   */
 | 
			
		||||
  onReachBottom: function () {
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 用户点击右上角分享
 | 
			
		||||
   */
 | 
			
		||||
  onShareAppMessage: function () {
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "usingComponents": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
<!--pages/person/info.wxml-->
 | 
			
		||||
<view class="person">
 | 
			
		||||
 | 
			
		||||
<view class="more-list">
 | 
			
		||||
  <view class="more-btn" style="margin-top: 20px;" bindtap="uploadImg">
 | 
			
		||||
      <text class="btn-text">头像</text>
 | 
			
		||||
      <view class="btn-open">
 | 
			
		||||
        <image class="user-avatar" src="{{img}}" style="margin-right: 10px;"></image>
 | 
			
		||||
        <image class="btn-enter" src="/icon/person/enter.png"></image>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class="more-btn">
 | 
			
		||||
      <text class="btn-text">姓名</text>
 | 
			
		||||
      <view class="btn-open">{{name}}</view>
 | 
			
		||||
    </view>
 | 
			
		||||
    <view class="more-btn">
 | 
			
		||||
      <text class="btn-text">学号</text>
 | 
			
		||||
      <view class="btn-open">{{stuId}}</view>
 | 
			
		||||
    </view>
 | 
			
		||||
</view>
 | 
			
		||||
<navigator bindtap='update' class="login-btn" url="none">
 | 
			
		||||
  <text >提交修改</text>
 | 
			
		||||
</navigator>
 | 
			
		||||
</view>
 | 
			
		||||