优化
This commit is contained in:
85
index.html
85
index.html
@@ -1,20 +1,69 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="zh-CN">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="utf-8">
|
||||||
<script>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
<title>
|
||||||
CSS.supports('top: constant(a)'))
|
<%= htmlWebpackPlugin.options.title %>
|
||||||
document.write(
|
</title>
|
||||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
<!-- Open Graph data -->
|
||||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
<!-- <meta property="og:title" content="Title Here" /> -->
|
||||||
</script>
|
<!-- <meta property="og:url" content="http://www.example.com/" /> -->
|
||||||
<title></title>
|
<!-- <meta property="og:image" content="http://example.com/image.jpg" /> -->
|
||||||
<!--preload-links-->
|
<!-- <meta property="og:description" content="Description Here" /> -->
|
||||||
<!--app-context-->
|
<script>
|
||||||
</head>
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
|
||||||
<body>
|
.supports('top: constant(a)'))
|
||||||
<div id="app"><!--app-html--></div>
|
document.write(
|
||||||
<script type="module" src="/main.js"></script>
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
</body>
|
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||||
|
'" />')
|
||||||
|
</script>
|
||||||
|
<!-- <script src="https://qzs.gdtimg.com/union/res/union_sdk/page/h5_sdk/i.js"></script> -->
|
||||||
|
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>Please enable JavaScript to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- <script type="text/javascript">
|
||||||
|
// H5 SDK 在线文档地址:http://developers.adnet.qq.com/doc/web/js_develop
|
||||||
|
// 全局命名空间申明TencentGDT对象
|
||||||
|
window.TencentGDT = window.TencentGDT || [];
|
||||||
|
|
||||||
|
// 广告初始化
|
||||||
|
window.TencentGDT.push({
|
||||||
|
app_id: '1206941502', // {String} - appid - 必填
|
||||||
|
placement_id: '9019288881405424', // {String} - 广告位id - 必填
|
||||||
|
type: 'interstitial', // {String} - 原生广告类型 - 必填
|
||||||
|
muid_type: '1', // {String} - 移动终端标识类型,1:imei,2:idfa,3:mac号 - 选填
|
||||||
|
muid: '******', // {String} - 加密终端标识,详细加密算法见API说明 - 选填
|
||||||
|
count: 1, // {Number} - 拉取广告的数量,默认是3,最高支持10 - 选填
|
||||||
|
onComplete: function(res) {
|
||||||
|
if (res && res.ret === 0) {
|
||||||
|
// 原生模板广告位调用 window.TencentGDT.NATIVE.renderAd(res[0], 'containerId') 进行模板广告的渲染
|
||||||
|
// res[0] 代表取广告数组第一个数据
|
||||||
|
TencentGDT.NATIVE.renderAd(res.data[0]);
|
||||||
|
} else {
|
||||||
|
// 加载广告API,如广告回调无广告,可使用loadAd再次拉取广告
|
||||||
|
// 注意:拉取广告频率每分钟不要超过20次,否则会被广告接口过滤,影响广告位填充率
|
||||||
|
setTimeout(function() {
|
||||||
|
window.TencentGDT.NATIVE.loadAd(placement_id)
|
||||||
|
}, 3000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// H5 SDK接入全局只需运行一次
|
||||||
|
(function() {
|
||||||
|
var doc = document,
|
||||||
|
h = doc.getElementsByTagName('head')[0],
|
||||||
|
s = doc.createElement('script');
|
||||||
|
s.async = true;
|
||||||
|
s.src = '//qzs.qq.com/qzone/biz/res/i.js';
|
||||||
|
h && h.insertBefore(s, h.firstChild);
|
||||||
|
})();
|
||||||
|
</script> -->
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -84,7 +84,8 @@
|
|||||||
"title" : "发票",
|
"title" : "发票",
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"maps" : {}
|
"maps" : {}
|
||||||
}
|
},
|
||||||
|
"template" : "index.html"
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"uview-ui": "^2.0.36"
|
"uview-ui": "^2.0.36",
|
||||||
|
"weixin-js-sdk": "^1.6.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="content_top">
|
<view class="content_top">
|
||||||
<view :class="form.user_type == 1 ? 'content_topview':''" @click="clickakex(1)">
|
<view :class="form.user_type == 1 ? 'content_topview' : ''" @click="clickakex(1)">个人</view>
|
||||||
个人
|
<view :class="form.user_type == 2 ? 'content_topview' : ''" @click="clickakex(2)">企业</view>
|
||||||
</view>
|
|
||||||
<view :class="form.user_type == 2 ? 'content_topview':''" @click="clickakex(2)">
|
|
||||||
企业
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content_item">
|
<view class="content_item">
|
||||||
<view class="Box_box flex-between" v-if="form.user_type == 1">
|
<view class="Box_box flex-between" v-if="form.user_type == 1">
|
||||||
@@ -15,13 +11,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="Box_box flex-between" v-if="form.user_type == 2">
|
<view class="Box_box flex-between" v-if="form.user_type == 2">
|
||||||
<view>*单位名称</view>
|
<view>*单位名称</view>
|
||||||
<view style="position: relative; width:70%;">
|
<view style="position: relative; width: 70%">
|
||||||
<input type="text" v-if="subCategoryList.length == 0" v-model="form.user_name" placeholder="请填写公司名称"
|
<input type="text" v-if="subCategoryList.length == 0" v-model="form.user_name" placeholder="请填写公司名称" @input="onInput" />
|
||||||
@input="onInput" />
|
|
||||||
<view class="position" v-else>
|
<view class="position" v-else>
|
||||||
<view class="positionitem" v-for="(item,index) in subCategoryList" :key="index"
|
<view class="positionitem" v-for="(item, index) in subCategoryList" :key="index" @click="categorySubClick(item)">
|
||||||
@click="categorySubClick(item)">
|
{{ item.companyName }}
|
||||||
{{item.companyName}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -38,6 +32,33 @@
|
|||||||
<view>*手机号</view>
|
<view>*手机号</view>
|
||||||
<view><input type="text" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
<view><input type="text" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||||
</view>
|
</view>
|
||||||
|
<template v-if="form.user_type == 2">
|
||||||
|
<view class="Box_box flex-between" @click="showElse = !showElse">
|
||||||
|
<view>其他信息</view>
|
||||||
|
<view class="arrow">
|
||||||
|
<text class="t">地址、开户行</text>
|
||||||
|
<u-icon name="arrow-down" class="arrow-icon" :class="{ active: showElse }"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<template v-if="showElse">
|
||||||
|
<view class="Box_box flex-between">
|
||||||
|
<view>公司地址</view>
|
||||||
|
<view><input type="text" v-model="form.c_address" placeholder="请填写公司地址" /></view>
|
||||||
|
</view>
|
||||||
|
<view class="Box_box flex-between">
|
||||||
|
<view>联系电话</view>
|
||||||
|
<view><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" /></view>
|
||||||
|
</view>
|
||||||
|
<view class="Box_box flex-between">
|
||||||
|
<view>开户行名称</view>
|
||||||
|
<view><input type="text" v-model="form.c_bank_name" placeholder="请填写公司开户行名称" /></view>
|
||||||
|
</view>
|
||||||
|
<view class="Box_box flex-between">
|
||||||
|
<view>开户行账号</view>
|
||||||
|
<view><input type="text" v-model="form.c_bank_account" placeholder="请填写公司开户行账号" /></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
<!-- <view class="Box_box flex-between">
|
<!-- <view class="Box_box flex-between">
|
||||||
<view>备注:</view>
|
<view>备注:</view>
|
||||||
<view><input type="text" v-model="form.notes" placeholder="请输入内容" /></view>
|
<view><input type="text" v-model="form.notes" placeholder="请输入内容" /></view>
|
||||||
@@ -56,379 +77,431 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="preservation flex-colum">
|
<view class="preservation flex-colum">
|
||||||
<view v-if="form.status_note"
|
<view v-if="form.status_note" style="width: 100%; color: #ff2b2b; padding: 28rpx 0; word-wrap: break-word">({{ form.status_note || '无' }})</view>
|
||||||
style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
|
|
||||||
({{form.status_note|| '无'}})</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_bottom" @click="saveMerchantBaseInfo">
|
<view class="content_bottom" @click="saveMerchantBaseInfo">确定</view>
|
||||||
确定
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import jWeixin from 'jweixin-module's
|
// import jWeixin from 'jweixin-module's
|
||||||
import _ from 'lodash'
|
import wx from 'weixin-js-sdk';
|
||||||
export default {
|
import _ from 'lodash';
|
||||||
data() {
|
export default {
|
||||||
return {
|
data() {
|
||||||
showtext: 0,
|
return {
|
||||||
subCategoryList: [],
|
showtext: 0,
|
||||||
form: {
|
subCategoryList: [],
|
||||||
user_type: 2,
|
form: {
|
||||||
img: '',
|
user_type: 2,
|
||||||
user_name: "",
|
img: '',
|
||||||
user_duty: "",
|
user_name: '',
|
||||||
email: "",
|
user_duty: '',
|
||||||
mobile: '',
|
email: '',
|
||||||
status_note: ''
|
mobile: '',
|
||||||
|
status_note: '',
|
||||||
}
|
c_address: '',
|
||||||
}
|
c_phone: '',
|
||||||
},
|
c_bank_name: '',
|
||||||
async onLoad(e) {
|
c_bank_account: ''
|
||||||
this.form.id = e.id
|
|
||||||
this.form.open_id = e.open_id
|
|
||||||
if (e.view_type == 'fail') {
|
|
||||||
this.form.view_type = e.view_type
|
|
||||||
let res = await this.api.szzpyfailccho({
|
|
||||||
id: this.form.id,
|
|
||||||
view_type: this.form.view_type
|
|
||||||
})
|
|
||||||
try {
|
|
||||||
if (res.code == 1) {
|
|
||||||
this.form = res.data.data
|
|
||||||
this.form.status_note = res.data.status_note
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onInput(e) {
|
|
||||||
if (this.form.user_type == 2) {
|
|
||||||
if ([...e.detail.value].length >= 6) {
|
|
||||||
console.log(100000)
|
|
||||||
this.handleClick()
|
|
||||||
} else {
|
|
||||||
this.subCategoryList = []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
handleClick: _.debounce(function() {
|
showElse: false
|
||||||
console.log(100000)
|
};
|
||||||
this.getOrder()
|
},
|
||||||
// 函数执行内容
|
async onLoad(e) {
|
||||||
|
this.form.id = e.id;
|
||||||
}, 500),
|
this.form.open_id = e.open_id;
|
||||||
categorySubClick(category) {
|
if (e.view_type == 'fail') {
|
||||||
console.log(category, 86)
|
this.form.view_type = e.view_type;
|
||||||
this.form.user_name = category.companyName
|
let res = await this.api.szzpyfailccho({
|
||||||
this.form.user_duty = category.creditCode
|
id: this.form.id,
|
||||||
this.subCategoryList = []
|
view_type: this.form.view_type
|
||||||
},
|
});
|
||||||
upload() {
|
try {
|
||||||
uni.chooseImage({
|
|
||||||
success: (chooseImageRes) => {
|
|
||||||
uni.pro.showLoading({
|
|
||||||
title: '上传中',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
||||||
uni.uploadFile({
|
|
||||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
|
||||||
filePath: tempFilePaths[0],
|
|
||||||
name: 'file',
|
|
||||||
formData: {
|
|
||||||
open_id: this.form.open_id,
|
|
||||||
},
|
|
||||||
success: (uploadFileRes) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '上传成功',
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
let data = JSON.parse(uploadFileRes.data)
|
|
||||||
this.form.img = data.data[0]
|
|
||||||
console.log(this.form)
|
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
console.log(111)
|
|
||||||
uni.pro.hideLoading();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async saveMerchantBaseInfo() {
|
|
||||||
if (this.form.user_name == null || this.form.user_name == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入名称',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.user_type == 2) {
|
|
||||||
if (this.form.user_duty == null || this.form.user_duty == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入税号',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (this.form.email == null || this.form.email == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入邮箱',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.mobile == null || this.form.mobile == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入手机号',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let res = await this.api.usersubopeninvoice({
|
|
||||||
id: this.form.id,
|
|
||||||
open_id: this.form.open_id,
|
|
||||||
user_name: this.form.user_name,
|
|
||||||
user_type: this.form.user_type,
|
|
||||||
user_duty: this.form.user_duty,
|
|
||||||
email: this.form.email,
|
|
||||||
img: this.form.img,
|
|
||||||
mobile: this.form.mobile,
|
|
||||||
notes: this.form.notes
|
|
||||||
})
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
uni.showToast({
|
this.form = res.data.data;
|
||||||
title: res.msg,
|
this.form.status_note = res.data.status_note;
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
if (res.data.url) {
|
|
||||||
window.location.href = res.data.url
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
|
||||||
}
|
}
|
||||||
// uni.request({
|
} catch (e) {
|
||||||
// url: 'https://invoice.sxczgkj.cn/api/' + 'user/subopeninvoice',
|
//TODO handle the exception
|
||||||
// data: {
|
|
||||||
// //参数
|
|
||||||
// id: this.form.id,
|
|
||||||
// open_id: this.form.open_id,
|
|
||||||
// user_name: this.form.user_name,
|
|
||||||
// user_type: this.form.user_type,
|
|
||||||
// user_duty: this.form.user_duty,
|
|
||||||
// email: this.form.email,
|
|
||||||
// img: this.form.img,
|
|
||||||
// mobile: this.form.mobile,
|
|
||||||
// notes: this.form.notes
|
|
||||||
// },
|
|
||||||
// method: 'POST', //请求方式,必须为大写
|
|
||||||
// success: res => {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: res.data.message || res.data.msg,
|
|
||||||
// icon: "none",
|
|
||||||
// })
|
|
||||||
// if (res.data.code == 1) {
|
|
||||||
// setTimeout(() => {
|
|
||||||
// if (res.data.data.url) {
|
|
||||||
// window.location.href = res.data.data.url
|
|
||||||
// }
|
|
||||||
// // let data = encodeURIComponent(res.data.data.url);
|
|
||||||
// // uni.navigateTo({
|
|
||||||
// // url: '/pages/index/web?src=' + data
|
|
||||||
// // })
|
|
||||||
// }, 1000);
|
|
||||||
// // window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
clickakex(e) {
|
|
||||||
this.form.user_type = e
|
|
||||||
this.form.user_name = ''
|
|
||||||
this.form.img = ''
|
|
||||||
this.form.user_duty = ''
|
|
||||||
this.form.email = ''
|
|
||||||
this.form.mobile = ''
|
|
||||||
},
|
|
||||||
async getOrder() { //搜索值
|
|
||||||
uni.request({
|
|
||||||
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
|
|
||||||
data: {
|
|
||||||
//参数
|
|
||||||
like: this.form.user_name,
|
|
||||||
open_id: this.form.open_id
|
|
||||||
},
|
|
||||||
method: 'POST', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
console.log('接口返回------', res);
|
|
||||||
setTimeout(() => {
|
|
||||||
if (this.page == 1) {
|
|
||||||
this.subCategoryList = res.data.data;
|
|
||||||
} else {
|
|
||||||
this.subCategoryList.push(...res.data.data);
|
|
||||||
}
|
|
||||||
}, 500)
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
wxInit() {
|
||||||
|
wx.config({
|
||||||
|
debug: false, // true:调试时候弹窗
|
||||||
|
appId: res.appId, // 微信appid
|
||||||
|
timestamp: res.timestamp, // 时间戳
|
||||||
|
nonceStr: res.nonceStr, // 随机字符串
|
||||||
|
signature: res.signature, // 签名
|
||||||
|
jsApiList: [
|
||||||
|
// 所有要调用的 API 都要加到这个列表中
|
||||||
|
'onMenuShareTimeline', // 分享到朋友圈接口
|
||||||
|
'onMenuShareAppMessage', // 分享到朋友接口
|
||||||
|
'onMenuShareQQ', // 分享到QQ接口
|
||||||
|
'onMenuShareWeibo' // 分享到微博接口
|
||||||
|
]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onInput(e) {
|
||||||
|
if (this.form.user_type == 2) {
|
||||||
|
if ([...e.detail.value].length >= 6) {
|
||||||
|
console.log(100000);
|
||||||
|
this.handleClick();
|
||||||
|
} else {
|
||||||
|
this.subCategoryList = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClick: _.debounce(function () {
|
||||||
|
console.log(100000);
|
||||||
|
this.getOrder();
|
||||||
|
// 函数执行内容
|
||||||
|
}, 500),
|
||||||
|
categorySubClick(category) {
|
||||||
|
console.log(category, 86);
|
||||||
|
this.form.user_name = category.companyName;
|
||||||
|
this.form.user_duty = category.creditCode;
|
||||||
|
this.subCategoryList = [];
|
||||||
|
},
|
||||||
|
upload() {
|
||||||
|
uni.chooseImage({
|
||||||
|
success: (chooseImageRes) => {
|
||||||
|
uni.pro.showLoading({
|
||||||
|
title: '上传中',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||||
|
uni.uploadFile({
|
||||||
|
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||||
|
filePath: tempFilePaths[0],
|
||||||
|
name: 'file',
|
||||||
|
formData: {
|
||||||
|
open_id: this.form.open_id
|
||||||
|
},
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
uni.pro.hideLoading();
|
||||||
|
let data = JSON.parse(uploadFileRes.data);
|
||||||
|
this.form.img = data.data[0];
|
||||||
|
console.log(this.form);
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.pro.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
console.log(111);
|
||||||
|
uni.pro.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async saveMerchantBaseInfo() {
|
||||||
|
if (this.form.user_name == null || this.form.user_name == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入名称',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.user_type == 2) {
|
||||||
|
if (this.form.user_duty == null || this.form.user_duty == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入税号',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.form.email == null || this.form.email == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入邮箱',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.mobile == null || this.form.mobile == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入手机号',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let res = await this.api.usersubopeninvoice({
|
||||||
|
id: this.form.id,
|
||||||
|
open_id: this.form.open_id,
|
||||||
|
...this.form
|
||||||
|
});
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
console.log('t_type===', res.data.t_type);
|
||||||
|
switch (res.data.t_type) {
|
||||||
|
case '1':
|
||||||
|
console.log(1);
|
||||||
|
// 内链
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = res.data.n_url;
|
||||||
|
}, 1000);
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
console.log(2);
|
||||||
|
// 外链
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = res.data.url;
|
||||||
|
}, 1000);
|
||||||
|
break;
|
||||||
|
// case '3':
|
||||||
|
// console.log(3);
|
||||||
|
// // 小程序
|
||||||
|
// setTimeout(() => {
|
||||||
|
// plus.share.getServices(function (plusRes) {
|
||||||
|
// var sweixin = null;
|
||||||
|
// for (var i = 0; i < plusRes.length; i++) {
|
||||||
|
// var t = plusRes[i];
|
||||||
|
// if (t.id == 'weixin') {
|
||||||
|
// sweixin = t;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (sweixin) {
|
||||||
|
// sweixin.launchMiniProgram({ ...res.data.mini });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }, 1000);
|
||||||
|
// break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
||||||
|
}
|
||||||
|
// uni.request({
|
||||||
|
// url: 'https://invoice.sxczgkj.cn/api/' + 'user/subopeninvoice',
|
||||||
|
// data: {
|
||||||
|
// //参数
|
||||||
|
// id: this.form.id,
|
||||||
|
// open_id: this.form.open_id,
|
||||||
|
// user_name: this.form.user_name,
|
||||||
|
// user_type: this.form.user_type,
|
||||||
|
// user_duty: this.form.user_duty,
|
||||||
|
// email: this.form.email,
|
||||||
|
// img: this.form.img,
|
||||||
|
// mobile: this.form.mobile,
|
||||||
|
// notes: this.form.notes
|
||||||
|
// },
|
||||||
|
// method: 'POST', //请求方式,必须为大写
|
||||||
|
// success: res => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: res.data.message || res.data.msg,
|
||||||
|
// icon: "none",
|
||||||
|
// })
|
||||||
|
// if (res.data.code == 1) {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// if (res.data.data.url) {
|
||||||
|
// window.location.href = res.data.data.url
|
||||||
|
// }
|
||||||
|
// // let data = encodeURIComponent(res.data.data.url);
|
||||||
|
// // uni.navigateTo({
|
||||||
|
// // url: '/pages/index/web?src=' + data
|
||||||
|
// // })
|
||||||
|
// }, 1000);
|
||||||
|
// // window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
clickakex(e) {
|
||||||
|
this.form.user_type = e;
|
||||||
|
this.form.user_name = '';
|
||||||
|
this.form.img = '';
|
||||||
|
this.form.user_duty = '';
|
||||||
|
this.form.email = '';
|
||||||
|
this.form.mobile = '';
|
||||||
|
},
|
||||||
|
async getOrder() {
|
||||||
|
//搜索值
|
||||||
|
uni.request({
|
||||||
|
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
|
||||||
|
data: {
|
||||||
|
//参数
|
||||||
|
like: this.form.user_name,
|
||||||
|
open_id: this.form.open_id
|
||||||
|
},
|
||||||
|
method: 'POST', //请求方式,必须为大写
|
||||||
|
success: (res) => {
|
||||||
|
console.log('接口返回------', res);
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.page == 1) {
|
||||||
|
this.subCategoryList = res.data.data;
|
||||||
|
} else {
|
||||||
|
this.subCategoryList.push(...res.data.data);
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
page {
|
page {
|
||||||
background: #F9F9F9;
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
.arrow {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.t {
|
||||||
|
margin-right: 8upx;
|
||||||
|
color: #808080;
|
||||||
|
font-size: 32upx;
|
||||||
|
}
|
||||||
|
.arrow-icon {
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
&.active {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
padding: 0 28rpx 28upx;
|
||||||
|
|
||||||
|
.content_top {
|
||||||
|
padding: 32rpx 110rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.content_topview {
|
||||||
|
background: #288efb;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 142rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
background: #fff;
|
||||||
|
color: #288efb;
|
||||||
|
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content_item {
|
||||||
padding: 0 28rpx;
|
width: 100%;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
|
||||||
.content_top {
|
.Box_box {
|
||||||
padding: 32rpx 110rpx;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
text-align: right;
|
||||||
|
padding: 24rpx;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
.content_topview {
|
.position {
|
||||||
background: #288EFB;
|
position: absolute;
|
||||||
color: #fff;
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
background: #fff;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 400rpx;
|
||||||
|
overflow: auto;
|
||||||
|
z-index: 99;
|
||||||
|
box-shadow: 1rpx 3rpx 6rpx #ccc;
|
||||||
|
|
||||||
|
.positionitem {
|
||||||
|
padding: 16rpx 10px;
|
||||||
|
border-bottom: 1rpx solid #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.preservation {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.preservation_box {
|
||||||
|
width: 100%;
|
||||||
|
height: 72rpx;
|
||||||
|
background: #288efb;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 72rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
.preservation_boxs {
|
||||||
width: 142rpx;
|
width: 70%;
|
||||||
height: 56rpx;
|
height: 72rpx;
|
||||||
background: #fff;
|
background: #999999;
|
||||||
color: #288EFB;
|
text-align: center;
|
||||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
line-height: 72rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Box_boxbox {
|
||||||
|
width: 100%;
|
||||||
|
padding: 16rpx;
|
||||||
|
|
||||||
|
.Box_boxone {
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 56rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content_item {
|
|
||||||
width: 100%;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
|
||||||
|
|
||||||
.Box_box {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
text-align: right;
|
|
||||||
padding: 24rpx;
|
|
||||||
border-bottom: 1px solid #e5e5e5;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
||||||
.position {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
background: #fff;
|
|
||||||
width: 100%;
|
|
||||||
max-height: 400rpx;
|
|
||||||
overflow: auto;
|
|
||||||
z-index: 99;
|
|
||||||
box-shadow: 1rpx 3rpx 6rpx #ccc;
|
|
||||||
|
|
||||||
.positionitem {
|
|
||||||
padding: 16rpx 10px;
|
|
||||||
border-bottom: 1rpx solid #ccc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.preservation {
|
.Box_boxtow {
|
||||||
width: 100%;
|
display: flex;
|
||||||
text-align: center;
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
.preservation_box {
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 254rpx;
|
||||||
height: 72rpx;
|
height: 156rpx;
|
||||||
background: #288efb;
|
background: #ffffff;
|
||||||
text-align: center;
|
border: 1rpx dashed #707070;
|
||||||
line-height: 72rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preservation_boxs {
|
|
||||||
width: 70%;
|
|
||||||
height: 72rpx;
|
|
||||||
background: #999999;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 72rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.Box_boxbox {
|
|
||||||
width: 100%;
|
|
||||||
padding: 16rpx;
|
|
||||||
|
|
||||||
.Box_boxone {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Box_boxtow {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 254rpx;
|
|
||||||
height: 156rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border: 1rpx dashed #707070;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_bottom {
|
|
||||||
margin: 100rpx auto;
|
|
||||||
width: 80%;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content_bottom {
|
||||||
|
margin: 100rpx auto;
|
||||||
|
width: 80%;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,272 +2,259 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="content_boxtop flex-between">
|
<view class="content_boxtop flex-between">
|
||||||
<view class="content_boxtopone">
|
<view class="content_boxtopone">
|
||||||
{{datalsit.type}}
|
{{ datalsit.type }}
|
||||||
</view>
|
|
||||||
<view class="content_boxtoptow" v-if="datalsit.status == 0">
|
|
||||||
客户未扫码
|
|
||||||
</view>
|
|
||||||
<view class="content_boxtoptow" v-if="datalsit.status ==1">
|
|
||||||
开票中
|
|
||||||
</view>
|
|
||||||
<view class="content_boxtoptow" style="color:#FD482C;" v-if="datalsit.status == 3">
|
|
||||||
开票失败
|
|
||||||
</view>
|
|
||||||
<view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2">
|
|
||||||
开票成功
|
|
||||||
</view>
|
|
||||||
<view class="content_boxtoptow" v-if="datalsit.status == 4">
|
|
||||||
已作废
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="content_boxtoptow" v-if="datalsit.status == 0">客户未扫码</view>
|
||||||
|
<view class="content_boxtoptow" v-if="datalsit.status == 1">开票中</view>
|
||||||
|
<view class="content_boxtoptow" style="color: #fd482c" v-if="datalsit.status == 3">开票失败</view>
|
||||||
|
<view class="content_boxtoptow" style="color: #3dc85e" v-if="datalsit.status == 2">开票成功</view>
|
||||||
|
<view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_boxt_one">
|
<view class="content_boxt_one">
|
||||||
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
|
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
|
||||||
{{datalsit.string2}}
|
{{ datalsit.string2 }}
|
||||||
</view>
|
</view>
|
||||||
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
|
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
|
||||||
<text class="classvie_itemone">{{datalsit.user_type == 2 ? '公司名称':'发票抬头'}}:</text>
|
<text class="classvie_itemone">{{ datalsit.user_type == 2 ? '公司名称' : '发票抬头' }}:</text>
|
||||||
<text class="classvie_itemtow">{{datalsit.user_name}}</text>
|
<text class="classvie_itemtow">{{ datalsit.user_name }}</text>
|
||||||
</view>
|
</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_itemone">公司税号:</text>
|
||||||
<text class="classvie_itemtow">{{datalsit.user_duty}}</text>
|
<text class="classvie_itemtow">{{ datalsit.user_duty }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="classvie_item flex-start">
|
<view class="classvie_item flex-start">
|
||||||
<text class="classvie_itemone">发票金额:</text>
|
<text class="classvie_itemone">发票金额:</text>
|
||||||
<text class="classvie_itemtow" style="color: #FF6565;">¥{{datalsit.price}}</text>
|
<text class="classvie_itemtow" style="color: #ff6565">¥{{ datalsit.price }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="classvie_item flex-start" >
|
<view class="classvie_item flex-start">
|
||||||
<text class="classvie_itemone">发票类型:</text>
|
<text class="classvie_itemone">发票类型:</text>
|
||||||
<text class="classvie_itemtow">{{datalsit.type}}</text>
|
<text class="classvie_itemtow">{{ datalsit.type }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="classvie_item flex-start">
|
<view class="classvie_item flex-start">
|
||||||
<text class="classvie_itemone">项目名称:</text>
|
<text class="classvie_itemone">项目名称:</text>
|
||||||
<text class="classvie_itemtow">{{datalsit.article}}</text>
|
<text class="classvie_itemtow">{{ datalsit.article }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="classvie_item flex-start">
|
<view class="classvie_item flex-start">
|
||||||
<text class="classvie_itemone">开票时间:</text>
|
<text class="classvie_itemone">开票时间:</text>
|
||||||
<text class="classvie_itemtow">{{datalsit.createtime}}</text>
|
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
text: 'uQRCode',
|
text: 'uQRCode',
|
||||||
size: 240,
|
size: 240,
|
||||||
datalsit: {},
|
datalsit: {},
|
||||||
ID: '',
|
ID: '',
|
||||||
resurl: ''
|
resurl: ''
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.ID = e.id;
|
||||||
|
this.status = e.status;
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
this.storeinvoicelist();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
storeinvoicelist() {
|
||||||
|
uni.request({
|
||||||
|
url: uni.conf.baseUrl + 'store/invoicedetail',
|
||||||
|
data: {
|
||||||
|
id: this.ID
|
||||||
|
},
|
||||||
|
method: 'POST', //请求方式,必须为大写
|
||||||
|
success: (res) => {
|
||||||
|
this.datalsit = res.data.data;
|
||||||
|
// 获取uQRCode实例
|
||||||
|
var qr = new uQRCode();
|
||||||
|
// 设置二维码内容
|
||||||
|
qr.data = res.data.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();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
savealbum(e) {
|
||||||
this.ID = e.id
|
uni.pro.navigateBack();
|
||||||
this.status = e.status
|
|
||||||
|
|
||||||
},
|
|
||||||
onReady(){
|
|
||||||
this.storeinvoicelist()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
storeinvoicelist() {
|
|
||||||
uni.request({
|
|
||||||
url: uni.conf.baseUrl + 'store/invoicedetail',
|
|
||||||
data: {
|
|
||||||
id: this.ID,
|
|
||||||
},
|
|
||||||
method: 'POST', //请求方式,必须为大写
|
|
||||||
success: res => {
|
|
||||||
this.datalsit = res.data.data;
|
|
||||||
// 获取uQRCode实例
|
|
||||||
var qr = new uQRCode();
|
|
||||||
// 设置二维码内容
|
|
||||||
qr.data = res.data.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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #F9F9F9;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content_boxt_one {
|
||||||
padding: 32rpx 28rpx;
|
margin-top: 32rpx;
|
||||||
|
padding: 32rpx;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
|
||||||
.content_boxtop {
|
.content_boxt_oneone {
|
||||||
padding: 22rpx 16rpx;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
background: #FFFFFF;
|
font-weight: 400;
|
||||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
font-size: 28rpx;
|
||||||
|
color: #ff6565;
|
||||||
.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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_boxt_one {
|
.classvie_item {
|
||||||
margin-top: 32rpx;
|
margin-top: 16rpx;
|
||||||
padding: 32rpx;
|
|
||||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
|
|
||||||
.content_boxt_oneone {
|
.classvie_itemone {
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #FF6565;
|
color: #666666;
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
font-style: normal;
|
||||||
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_boxt_towrelative {
|
.classvie_itemtow {
|
||||||
position: relative;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
width: 484rpx;
|
font-weight: bold;
|
||||||
height: 484rpx;
|
font-size: 28rpx;
|
||||||
margin: 32rpx auto;
|
color: #999999;
|
||||||
|
font-style: normal;
|
||||||
.content_boxt_towabsolute {
|
text-transform: none;
|
||||||
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>
|
||||||
8
unpackage/dist/build/web/index.html
vendored
8
unpackage/dist/build/web/index.html
vendored
@@ -1,2 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>发票</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>发票</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
|
||||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src="/chunk-vendors.js?v=1716359286335"></script><script src="/index.js?v=1716359286335"></script></body></html>
|
.supports('top: constant(a)'))
|
||||||
|
document.write(
|
||||||
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
|
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||||
|
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src="/chunk-vendors.js?v=1716373696937"></script><script src="/index.js?v=1716373696937"></script></body></html>
|
||||||
Reference in New Issue
Block a user