| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <!-- 临时卡领取页面 -->
- <view class="content">
- <image :src="'data:image/jpeg;base64,' + imgUrl" mode="aspectFit" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- imgUrl: "",
- };
- },
- created() {
- this.getWeiChat();
- },
- methods: {
- getWeiChat() {
- uni.request({
- url: "https://jtishfw.ncjti.edu.cn/yinxin/ncjtSecurityManagement/getWeichat",
- data: "",
- header: {
- Accept: "text/plain",
- },
- method: "POST",
- sslVerify: true,
- success: ({ data, statusCode, header }) => {
- if (statusCode == 200) {
- // console.log(data);
- // console.log(data.replace(/[\r\n]/g, ""));
- var url = JSON.parse(data.replace(/[\r\n]/g, ""));
- // console.log(url);
- this.imgUrl = url.weichat;
- // console.log(this.imgUrl);
- }
- },
- fail: (error) => {},
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .content {
- width: 100%;
- height: 100%;
- image {
- width: 750rpx;
- height: 1207rpx;
- }
- }
- </style>
|