其他分享
首页 > 其他分享> > 生成二维码下载二维码

生成二维码下载二维码

作者:互联网

//获取二维码
    @RequestMapping(value = "/getQrcode")
    @ResponseBody
    public AjaxResult getQrcode(){
        AjaxResult ajaxResult = null;
        //返回用来生成二维码的data
        String str = "abcdefg";
        ajaxResult = AjaxResult.success();
        ajaxResult.put("data",str);
        return ajaxResult;
    }
<!-- 展示二维码弹窗 -->
    <el-dialog :visible.sync="open2" :title="title">
      <el-button type="success"
        @click="dowloanQrCode('Qrcode', '二维码')"
        >下载二维码
      </el-button>
      <el-table v-loading="dialogLoading" v-show="dialogLoading" ></el-table>
      <div>
        <vue-qr :logo-src="logoSrc"
        ref="Qrcode"
        :size="191"
        :margin="0"
        :auto-color="true"
        :dot-scale="1"
        :text="str" />
      </div>
    </el-dialog>

 

标签:getQrcode,生成,二维码,ajaxResult,下载,str,data,AjaxResult
来源: https://www.cnblogs.com/tszr/p/16198448.html