|
@@ -0,0 +1,319 @@
|
|
|
+<!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="/static/wechat/jweixin-1.0.0.js"></script>-->
|
|
|
+ <script src="/static/js/jquery.js"></script>
|
|
|
+ <!--<script src="/static/jssha/sha.js"></script>-->
|
|
|
+ <!--<script src="/static/wechat/wx_share_config.js"></script>-->
|
|
|
+ <!--<script>
|
|
|
+ var share_info = {
|
|
|
+ title:"水猫工匠app",
|
|
|
+ desc:"水猫工匠app",
|
|
|
+ link:window.location.href,
|
|
|
+ imgUrl:'https://'+window.location.host+'__TMPL__/public/assets/images/favicon.png'
|
|
|
+ };
|
|
|
+ </script>-->
|
|
|
+ <!--<script src="/static/wechat/wx_share.js"></script>-->
|
|
|
+ <script src="/static/js/vue@2.js"></script>
|
|
|
+ <script src="/static/js/jquery.qrcode.min.js"></script>
|
|
|
+ <style>
|
|
|
+ #app{
|
|
|
+ margin-top: 0em;
|
|
|
+ }
|
|
|
+ .isrealauth{
|
|
|
+ font-size: 8px;
|
|
|
+ }
|
|
|
+ .error-height{
|
|
|
+ height: 200px;
|
|
|
+ line-height: 200px;
|
|
|
+ }
|
|
|
+ .p-username{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ #baiduqrcode canvas{
|
|
|
+ margin:0 auto;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .qrcodelist .item{
|
|
|
+ padding: 1em;
|
|
|
+ }
|
|
|
+ #wechat_open_div canvas{
|
|
|
+ margin:0 auto;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .more{
|
|
|
+ margin-top: 1em;
|
|
|
+ }
|
|
|
+ [v-cloak]{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="container-fluid" id="app" v-cloak>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12 col-md-4 col-md-offset-4 main_div">
|
|
|
+ <div v-if="!error&&info&&isshow" class="col-xs-12">
|
|
|
+ <div class="col-xs-12" v-if="type=='invent'">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <div class="page-header lead">
|
|
|
+ <strong>招工|</strong>{{info.disstr}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-me-6 col-xs-12" v-if="info.coninfo">
|
|
|
+ <p class="text-left p-username">
|
|
|
+ {{ getusername }}
|
|
|
+ <span v-if="info.coninfo.is_realauth" class="label label-danger isrealauth">已实名</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="col-me-6 col-xs-12" v-if="info.coninfo">
|
|
|
+ <p class="">{{ info.coninfo.gender }}|{{ info.coninfo.wage }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p class="lead">{{info.info}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p>
|
|
|
+ <strong>地址:</strong>
|
|
|
+ <div>{{info.city}}{{info.disc}}{{info.town}}</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 class="col-xs-12">
|
|
|
+ <p class="text-right">{{info.createdate}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12" v-if="type=='jobhunting'">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <div class="page-header lead">
|
|
|
+ <strong>找活|</strong>{{info.disstr}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-6" v-if="info.coninfo">
|
|
|
+ <p class="text-left p-username">
|
|
|
+ {{ getusername }}
|
|
|
+ <span v-if="info.coninfo.is_realauth" class="label label-danger isrealauth">已实名</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-6" v-if="info.coninfo">
|
|
|
+ <p class="text-right">{{ info.coninfo.gender }}|{{ info.coninfo.wage }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p class="lead">{{info.info}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p class="text-left"> <strong>工种:</strong>{{info.worktype}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p class="text-left"><strong>日工资:</strong>{{getdaysalary}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p class="text-right"><small>{{info.createdate}}</small></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="!iswechat">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <button @click="downloadapp" class="btn btn-primary btn-lg btn-block" role="button">
|
|
|
+ 下载
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12 qrcodelist">
|
|
|
+ <div class="col-md-offset-3 col-md-6 col-xs-12 item">
|
|
|
+ <div id="baiduqrcode"></div>
|
|
|
+ <p class="text-center">应用宝下载地址</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else class="col-xs-12 more">
|
|
|
+ <h1 class="text-center"><a href="https://wxaurl.cn/eZOxVkewett">查看电话</a></h1>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="!info" class="col-xs-12">
|
|
|
+ <p class="lead text-center error-height">页面加载中</p>
|
|
|
+ </div>
|
|
|
+ <div v-if="error" class="col-xs-12">
|
|
|
+ <p class="lead text-center error-height">{{ errormsg }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+ var app = new Vue({
|
|
|
+ el:'#app',
|
|
|
+ data:{
|
|
|
+ iswechat:false,
|
|
|
+ isshow:false,
|
|
|
+ error:false,
|
|
|
+ errormsg:"加载中",
|
|
|
+ type:false,
|
|
|
+ infoid:false,
|
|
|
+ url:'https://app.tjzhxx.cn:10443/index.php',
|
|
|
+ inventapi:'/index/invent/queryinfobyidforapp',
|
|
|
+ jobhuntingapi:'/index/jobhunting/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+="XX";
|
|
|
+ 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(){
|
|
|
+ this.type= this.getQueryVariable('type');
|
|
|
+ this.infoid= this.getQueryVariable('infoid');
|
|
|
+ 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){
|
|
|
+ res =JSON.parse(res);
|
|
|
+ if(200===res.code){
|
|
|
+ app.info = res.data
|
|
|
+ }else{
|
|
|
+ app.info=false
|
|
|
+ app.error=true
|
|
|
+ app.errormsg = res.msg;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getqrcode(){
|
|
|
+ if(this.isshow){
|
|
|
+ var baiduUrl='https://a.app.qq.com/o/simple.jsp?pkgname=com.tjzhxx.craftsmen';
|
|
|
+ $('#baiduqrcode').qrcode(baiduUrl);
|
|
|
+ }else if(this.iswechat){
|
|
|
+ /*var url = 'https://wxaurl.cn/eZOxVkewett';
|
|
|
+ $('#wechat_open_div').qrcode(url);*/
|
|
|
+ }
|
|
|
+ },
|
|
|
+ downloadapp(){
|
|
|
+ let downurl="http://www.tjzhonghui.cn:20443/file/apk/app-watercat.apk";
|
|
|
+ if(!this.error){
|
|
|
+ var ua = navigator.userAgent.toLowerCase();
|
|
|
+ var isAndroid = ua.indexOf('android') > -1 || ua.indexOf('linux') > -1;
|
|
|
+ //仅处理android
|
|
|
+ if(isAndroid){
|
|
|
+ window.location="launchapp://com.tjzhxx.craftsmen";//打开某手机上的某个app应用
|
|
|
+ setTimeout(function(){
|
|
|
+ window.location=downurl;
|
|
|
+ return
|
|
|
+ },500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ var browser = {
|
|
|
+ versions: function () {
|
|
|
+ var u = navigator.userAgent, app = navigator.appVersion;
|
|
|
+ return { //移动终端浏览器版本信息
|
|
|
+ trident: u.indexOf('Trident') > -1, //IE内核
|
|
|
+ presto: u.indexOf('Presto') > -1, //opera内核
|
|
|
+ webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
|
|
|
+ gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
|
|
|
+ mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
|
|
|
+ ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
|
|
|
+ android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
|
|
|
+ iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
|
|
|
+ iPad: u.indexOf('iPad') > -1, //是否iPad
|
|
|
+ webApp: u.indexOf('Safari') == -1, //是否ios web应该程序,没有头部与底部
|
|
|
+ androidbrowser:u.indexOf('Browser') > -1, //android移动端浏览器
|
|
|
+ iosbrowser:u.indexOf("Safari") > -1 && u.indexOf("Chrome") == -1
|
|
|
+ };
|
|
|
+ }(),
|
|
|
+ language: (navigator.browserLanguage || navigator.language).toLowerCase()
|
|
|
+ }
|
|
|
+ if(!this.isshow){
|
|
|
+ if (browser.versions.mobile) {
|
|
|
+ var ua = navigator.userAgent.toLowerCase();
|
|
|
+ if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
|
+ this.error=false
|
|
|
+ this.iswechat =true
|
|
|
+ this.isshow=true
|
|
|
+ }else if (ua.match(/WeiBo/i) == "weibo") {
|
|
|
+ this.error=true
|
|
|
+ this.errormsg="请使用浏览器打开"
|
|
|
+ }else if (ua.match(/QQ/i) == "qq") {
|
|
|
+ this.error=true
|
|
|
+ this.errormsg="请使用浏览器打开"
|
|
|
+ }else{
|
|
|
+ this.isshow=true
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.isshow=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.getinfo();
|
|
|
+ },
|
|
|
+ updated: function () {
|
|
|
+ this.$nextTick(function () {
|
|
|
+ this.getqrcode()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+</html>
|