123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8" />
- <meta http-equv="X-UA-Compatible" content="IE=edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="format-detection" content="telephone=no" />
- <title>潜山市党建引领信用村(社区)建设</title>
- <meta name="keywords" content="潜山市党建引领信用村(社区)建设">
- <meta name="description" content="潜山市党建引领信用村(社区)建设">
- <script src="static/js/vue.js"></script>
- <script type="text/javascript" src="static/js/vue-router.js"></script>
- <script src="static/js/index.js" type="text/javascript"></script>
- <script type="text/javascript" src="./static/js/jquery.min.js"></script>
- <script src="static/js/common.js"></script>
- <link href="static/css/common.css" rel="stylesheet" />
- <link href="static/css/style.css" rel="stylesheet" />
- <link rel="stylesheet" href="static/css/theme-chalk/index.css">
- <style></style>
- </head>
- <body class="qbox">
- <div class="qsback">
- <img src="static/images/back_white.png" class="backimg" />
- </div>
- <div id="appse">
- <header>
- <div>
- <img src="static/images/pic_up.png" class="qup" />
- </div>
- </header>
- </div>
- <div id="app">
- <main>
- <img src="static/images/pic_tit.png" class="qtitimg" />
- <div class="qd_txtbox">
- <div class="qd_txtt">基本信息</div>
- <div class="qd_txtb">
- <div class="qd_txtbt">尊敬的用户您好!</div>
- <div class="flex" >
- <div class="qd_txtbxa">
- <div class="flexcj qd_txtbxal">
- <img src="static/images/texa.png" />
- </div>
- <div class="ovh">
- <div class="f26 c34 fw mb1 ovone">{{userName||'暂无信息'}}</div>
- <div class="f16 c6 ovone">姓名</div>
- </div>
- </div>
- <div class="qd_txtbxa">
- <div class="flexcj qd_txtbxal">
- <img src="static/images/texc.png" />
- </div>
- <div class="ovh">
- <div class="f26 c34 fw mb1 ovone" v-if="creditLevel"><span
- class="cd3 fsi">{{creditLevel}}</span>级</div>
- <div class="f26 c34 fw mb1 ovone" v-else>暂无评级</div>
- <div class="f16 c6 ovone">信用等级</div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- <div class="flex qd_fun">
- <a href="javascript:void(0);" @click="getCode">
- <img src="static/images/icon_hpa.png" class="qd_funimg" />
- <div class="ovone tc c0 f24">扫码出示</div>
- </a>
- <a href="javascript:void(0);" @click="getTip">
- <img src="static/images/icon_hpb.png" class="qd_funimg" />
- <div class="ovone tc c0 f24">水费申报</div>
- </a>
- <a href="policy.html">
- <img src="static/images/icon_hpc.png" class="qd_funimg" />
- <div class="ovone tc c0 f24">政策指南</div>
- </a>
- <a :href="'use.html?creditId='+creditId">
- <img src="static/images/icon_hpd.png" class="qd_funimg" />
- <div class="ovone tc c0 f24">使用记录</div>
- </a>
- </div>
- <a href="" class="mb66">
- <img src="static/images/hp_banner.png" class="qd_funa" />
- </a>
- <div class="qd_wel">
- <div class="qd_weltit ">
- <img src="static/images/tet_flbg.png" />
- <div class="qd_weltita">福利清单</div>
- </div>
- <div class="qd_weltxt flexcj mb3" v-if="stalist.length"><span></span>{{numterm}}<span></span></div>
- <div class="qd_welb">
- <a v-for="(item,idx) in stalist"
- :href="'tktbdetail.html?id=' + item.menuId+ '&tit=' + (item.menuName||'')">
- <div class="flexend">
- <div class="qd_welbox">
- <div class="qd_welbt ovone">{{item.menuName}}</div>
- <div class="qd_welbtx overtwo">{{item.menuIntroduce}} </div>
- </div>
- <img :src="'http://118.31.23.65:5007/prod-api'+item.photo" class="qd_welimg" />
- </div>
- <div class="qd_welbm">查看详情<img src="static/images/welr.png" /></div>
- </a>
- </div>
- </div>
- </main>
- </div>
- </div>
- <script type="text/javascript">
- var app = new Vue({
- el: '#app',
- data: {
- // base_url: 'https://qsdj.qs163.cn/prod-api',
- base_url: 'http://118.31.23.65:5007/prod-api',
- // base_url: 'http://192.168.101.168:9000',
- // base_url: 'http://192.168.101.11:9000/dev-api',
- stalist: [],
- useinfo: '',
- numterm: '0大项福利',
- creditId:'',
-
- phone:'',
- userName:'',
- creditScore:'',
- creditLevel:'',
- idCard:'',
- scoreflag:false
- },
- created() {
- this.userName = decodeURI(this.getQueryString("userName"))||''
- this.phone = decodeURI(this.getQueryString("phone"))||'';
-
- this.creditLevel = decodeURI(this.getQueryString("pjjg"))||''
- this.idCard = decodeURI(this.getQueryString("cardNumber"))||''
- this.getDataFn()
-
- // 获取信息
- if(window.localStorage.getItem('userinfo')){
- var newobj=JSON.parse(window.localStorage.getItem('userinfo'))
- if(newobj.phone==this.phone&&newobj.userName==this.userName&&newobj.creditLevel==this.creditLevel&&newobj.idCard==this.idCard){
- this.getUseFn()
- }else{
- var obj={
- phone:this.phone,
- userName:this.userName,
- creditLevel:this.creditLevel,
- idCard:this.idCard,
- }
- window.localStorage.setItem('userinfo',JSON.stringify(obj))
- this.getsetUseFn()
- }
- }else{
- var obj={
- phone:this.phone,
- userName:this.userName,
- creditLevel:this.creditLevel,
- idCard:this.idCard,
- }
- window.localStorage.setItem('userinfo',JSON.stringify(obj))
- this.getsetUseFn()
- }
- },
- mounted() {
- },
- methods: {
- getQueryString(name) {
- try {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
- var r = window.location.href.split('?')[1].match(reg);
- // console.log(reg,r)
- if(r != null) {
- return r[2];
- }
- return "";//如果此处只写return;则返回的是undefined
- } catch(e) {
- return "";//如果此处只写return;则返回的是undefined
- }
- },
- getTip(){
- this.$message({
- message: "功能暂未开放",
- center: true,
- showClose:true
- });
- },
- getCode(){
- // 扫码出示
- if(!this.creditLevel){
- this.$message({
- message: "暂无信用评级",
- center: true,
- showClose:true
- });
- }else{
- window.location.href="category.html"
- }
- },
- // 数字格式转换
- numberfilter(num) {
- const changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'] // changeNum[0] = "零"
- const unit = ['', '十', '百']
- num = parseInt(num)
- const getWan = (temp) => {
- const strArr = temp.toString().split('').reverse()
- let newNum = ''
- for (var i = 0; i < strArr.length; i++) {
- newNum = (i == 0 && strArr[i] == 0 ? '' : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? '' : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum
- }
- return newNum
- }
- const overWan = Math.floor(num / 100)
- let noWan = num % 100
- if (noWan.toString().length < 2) noWan = '0' + noWan
- let strr = (overWan ? getWan(overWan) + '百' + getWan(noWan) : getWan(num))
- if(strr.split('')[0] == '一'){
- let showNum = "";
- if(strr == '一'){
- showNum = strr.substring(0);
- }else{
- showNum = strr.substring(1);
- }
- return showNum+"大项福利"
- }else{
- let showNum = overWan ? getWan(overWan) + '百' + getWan(noWan) : getWan(num);
- return showNum+"大项福利"
- }
- },
- getDataFn() {
- var that = this;
- $.ajax({
- url: this.base_url + '/system/h5/policy/list',
- type: 'GET',
- data: '',
- dataType: 'json',
- success: function(res) {
- if (res.code == 200) {
- that.stalist = res.data;
- var len = res.data.length;
- that.numterm = that.numberfilter(len);
-
- } else {
- that.$message({
- message: res.msg,
- type: 'error',
- center: true,
- });
- }
- }
- })
- },
- getUseFn() {
- var that = this;
- let params = {
- "idCard": that.idCard
- }
- $.ajax({
- url: this.base_url + '/system/h5/user/info',
- type: 'POST',
- data: JSON.stringify(params),
- dataType: 'json',
- success: function(res) {
- if (res.code == 200) {
- if(res.data){
- that.creditId=res.data.id;
- }else{
-
- }
- } else {
- that.$message({
- message: res.msg,
- type: 'error',
- center: true,
- });
- }
- }
- })
- },
- getsetUseFn() {
- var that = this;
- let params = {
- "idCard":that.idCard,
- "phoneNum":that.phone,
- "userName":that.userName,
- "creditLevel":that.creditLevel,
- }
- $.ajax({
- url: this.base_url + '/system/h5/insert/creditUser',
- type: 'POST',
- data: JSON.stringify(params),
- dataType: 'json',
- success: function(res) {
- that.getUseFn()
- }
- })
- },
- getDetail(e) {
- var id = e.menuId;
- var tit = e.menuName || ''
- window.location.href = "tktbdetail.html?id=" + id + '&tit=' + tit
- }
- }
- })
- </script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('.backimg').click(function() {
- window.history.go(-1)
- })
- })
- </script>
- <script src="static/js/footer.js" type="text/javascript" charset="utf-8"></script>
- </body>
- </html>
|