kongdeqiang
2023-09-12 eadd5784244d98dca21e5788440004432af8e803
修改前端页面
1个文件已修改
33 ■■■■■ 已修改文件
src/components/page/IndexTest.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/IndexTest.vue
@@ -34,7 +34,7 @@
                            <!--<el-input v-model="statisticData.code" readonly></el-input>-->
                        </el-form-item>
                        <el-form-item class="weizhang-footer-box" style="display: flex;justify-content: center;margin-top: 4.498vh" label-width="0" v-show="showFlag">
                            <el-button class="jiaofei-btn" type="primary" @click="pay()" :loading="payFlag">去缴费</el-button>
                            <el-button class="jiaofei-btn" type="primary" @click="getCode()" :loading="payFlag">去缴费</el-button>
                        </el-form-item>
                    </el-form>
<!--                    <el-form label-width="100px" label-position="left">-->
@@ -136,7 +136,36 @@
                }
            },
        }
            GetQueryString(name) {
              var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
              var r = window.location.search.substr(1).match(reg);
              if (r != null) return unescape(r[2]); return null;
            },
            getCode(){
              var code = this.GetQueryString('code');
              var code2 = this.GetQueryString('code2');
              alert(code,'code=====')
              if(code==null||code==""){
                var url = encodeURIComponent("hesuancj.cn");
                window.location.href ="https://open.weixin.qq.com/connect/oauth2/authorize?" +
                    "appid=wxcb0e4256748b327c&redirect_uri="+url+"&response_type=code" +
                   // "&scope=snsapi_userinfo&state=STATE#wechat_redirect";
                    "&scope=SCOPE&state=STATE#wechat_redirect";
              }else{
                $.ajax({
                  type : "POST", //提交方式
                  url : this.$systemconfig.basePath + '/ffzf/test/getCode',//路径
                  data : {
                    "code" : code
                  },
                  success : function(result) {//返回数据根据结果进行相应的处理
                  }
                });
             }
            }
      }
    }
</script>