123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>水猫工匠</title>
- <link rel="icon" href="__TMPL__/public/assets/images/favicon.png" type="image/png">
- <link href="__TMPL__/public/assets/simpleboot3/themes/simpleboot3/bootstrap.min.css" rel="stylesheet">
- <link href="__TMPL__/public/assets/simpleboot3/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
- <script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
- <style>
- .main_div{
- border:1px solid #fffccc;
- }
- #app{
- margin-top: 1em;
- }
- </style>
- </head>
- <body>
- <div class="container-fluid" id="app">
- <div class="row">
- <div class="col-xs-12 col-md-4 col-md-offset-4 main_div">
- <div v-if="!error&&info" class="col-xs-12">
- <div class="col-xs-12" v-if="type=='invent'">
- <div class="row">
- <div class="col-xs-12">
- <p class="lead"> <strong>招工|</strong>{{info.info}}</p>
- </div>
- <div class="col-xs-6">
- <p> {{ getusername }}<span v-if="info.coninfo.is_realauth" class="label label-danger">已实名</span></p>
- </div>
- <div class="col-xs-3">
- <p>{{ info.coninfo.gender }}</p>
- </div>
- <div class="col-xs-3">
- <p>{{ info.coninfo.wage }}</p>
- </div>
- <div class="col-xs-12">
- <p>
- <strong>地址:</strong>
- <div>{{info.city}}{{info.disc}}</div>
- <div>{{info.address}}</div>
- </p>
- </div>
- <div class="col-xs-12">
- <p> <strong>工种:</strong>{{info.worktype}}</p>
- </div>
- <div class="col-xs-12">
- <p><strong>日工资:</strong>{{getdaysalary}}</p>
- </div>
- </div>
- </div>
- <div class="col-xs-12" v-if="type=='jobhunting'">
-
- </div>
- </div>
- <div v-else class="col-xs-12">
- <p>{{ error }}</p>
- </div>
- <div class="col-xs-12">
- </div>
- </div>
- </div>
- </div>
- <script>
- var app = new Vue({
- el:'#app',
- data:{
- error:false,
- type:false,
- infoid:false,
- url:'https://app.tjzhxx.cn:10443/index.php',
- inventapi:'/index/invent/queryinfobyidforapp',
- jobhuntingapi:'/index/invent/queryinfobyidforapp',
- info:false
- },
- computed: {
- getusername: function () {
- if(this.info){
- const wname = this.info.coninfo.wname;
- var firststr = wname.substr(0,1);
- switch(this.type){
- case 'invent':
- firststr+="老板";
- break;
- case 'jobhunting':
- firststr+="XX";
- break;
- }
- return firststr;
- }else{
- return "";
- }
- },
- getdaysalary:function(){
- if(this.info){
- if(this.info.daysalary>0){
- return this.info.daysalary;
- }else{
- return "面议";
- }
- }else{
- return "";
- }
- }
- },
- methods:{
- getQueryVariable(variable)
- {
- var query = window.location.search.substring(1);
- var vars = query.split("&");
- for (var i=0;i<vars.length;i++) {
- var pair = vars[i].split("=");
- if(pair[0] == variable){return pair[1];}
- }
- return(false);
- },
- getinfo(){
- var url_use = false;
- switch(this.type){
- case 'invent':
- url_use = this.url+this.inventapi;
- break;
- case 'jobhunting':
- url_use = this.url+this.jobhuntingapi;
- break;
- }
- if(url_use){
- var data = {
- 'id':this.infoid
- }
- $.post(url_use,data,function(res){
- console.log(res);
- if(200===res.code){
- app.info = res.data
- }else{
- app.error = res.msg;
- }
- });
- }else{
- }
- }
- },
- mounted(){
- this.type= this.getQueryVariable('type');
- this.infoid= this.getQueryVariable('infoid');
- console.log(this.type,this.infoid);
- this.getinfo();
- }
- })
- </script>
- </body>
- </html>
|