合并冲突
commit
e4920e221a
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
@ -0,0 +1,52 @@
|
||||
import {
|
||||
service
|
||||
} from "../../utils/service";
|
||||
import {
|
||||
localPath
|
||||
} from "../api.js";
|
||||
|
||||
// 获取微信公众号access_token
|
||||
export function getAccessToken() {
|
||||
return service({
|
||||
url: "/weixinApi" + "/cgi-bin/token?grant_type=client_credential&appid=wx3c108aae98b1433c&secret=9ed5097e93b5a0e909dbe2b347d068ac",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
// 根据微信公众号access_token获取ticket
|
||||
export function getTicket(accessToken, data) {
|
||||
return service({
|
||||
url: "/weixinApi" + "/cgi-bin/qrcode/create?access_token=" + accessToken,
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 通过ticket换取二维码
|
||||
export function getQrCode(data) {
|
||||
return service({
|
||||
url: "/weixinMp" + "/cgi-bin/showqrcode?ticket=" + data,
|
||||
method: "get",
|
||||
responseType: "blob"
|
||||
});
|
||||
}
|
||||
// 通过后台过去公众号图片
|
||||
export function getJavaQrCode(data) {
|
||||
return service({
|
||||
url: "/api" + "/platformCoupon/thePublic",
|
||||
method: "post",
|
||||
responseType: "blob"
|
||||
});
|
||||
}
|
||||
// 通过后台获取用户扫描的openid
|
||||
export function getJavaOpenid(data) {
|
||||
return service({
|
||||
url: "/api" + "/platformCoupon/openid",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
// 清除后台获取的openid
|
||||
export function doDeleteJavaOpenid(data) {
|
||||
return service({
|
||||
url: "/api" + "/platformCoupon/gcopenid",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe src="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3c108aae98b1433c&redirect_uri=www.decaisoft.com&response_type=code&scope=snsapi_userinfo&connect_redirect=1#wechat_redirect" id="mobsf" scrolling="no" frameborder="0" style="border: 1px solid #ccc"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
/**
|
||||
* iframe-宽高自适应显示
|
||||
*/
|
||||
function changeMobsfIframe() {
|
||||
const mobsf = document.getElementById('mobsf');
|
||||
const deviceWidth = document.body.clientWidth;
|
||||
const deviceHeight = document.body.clientHeight;
|
||||
// mobsf.style.width = (Number(deviceWidth) - 240) + 'px'; //数字是页面布局宽度差值
|
||||
// mobsf.style.height = (Number(deviceHeight) - 64) + 'px'; //数字是页面布局高度差
|
||||
mobsf.style.width = '150px'; //数字是页面布局宽度差值
|
||||
mobsf.style.height = '150px'; //数字是页面布局高度差
|
||||
}
|
||||
|
||||
changeMobsfIframe()
|
||||
|
||||
window.onresize = function () {
|
||||
changeMobsfIframe()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
Loading…
Reference in New Issue