小程序编译0.0.0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票详情"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{ datalsit.type }}
|
||||
@@ -18,7 +19,8 @@
|
||||
<text class="classvie_itemone">{{ datalsit.user_type == 2 ? '公司名称' : '发票抬头' }}:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.user_name }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4)">
|
||||
<view class="classvie_item flex-start"
|
||||
v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4)">
|
||||
<text class="classvie_itemone">公司税号:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.user_duty }}</text>
|
||||
</view>
|
||||
@@ -43,214 +45,218 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 240,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id;
|
||||
this.status = e.status;
|
||||
},
|
||||
onReady() {
|
||||
this.storeinvoicelist();
|
||||
},
|
||||
methods: {
|
||||
async storeinvoicelist() {
|
||||
let res = await this.api.storeinvoicedetail({
|
||||
id: this.ID
|
||||
})
|
||||
if(res){
|
||||
this.datalsit = res.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 240,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id;
|
||||
this.status = e.status;
|
||||
},
|
||||
onReady() {
|
||||
this.storeinvoicelist();
|
||||
},
|
||||
methods: {
|
||||
async storeinvoicelist() {
|
||||
let res = await this.api.storeinvoicedetail({
|
||||
id: this.ID
|
||||
})
|
||||
if (res) {
|
||||
this.datalsit = res.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
}
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #ffffff;
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ff6565;
|
||||
}
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ff6565;
|
||||
}
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288efb;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 484rpx;
|
||||
height: 484rpx;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288efb;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 484rpx;
|
||||
height: 484rpx;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user