diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9b43027
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+/node_modules
+.env
+.env.backup
+.phpunit.result.cache
+docker-compose.override.yml
+npm-debug.log
+yarn-error.log
+/unpackage
+.DS_Store
+*/.DS_Store
diff --git a/common/js/api.js b/common/js/api.js
new file mode 100644
index 0000000..f0d9a7e
--- /dev/null
+++ b/common/js/api.js
@@ -0,0 +1,17 @@
+export default {
+ storestorestatus(data) { //首页获取状态
+ return uni.api.post("store/storestatus", data);
+ },
+ szzpyauthorization(data) { //数电授权
+ return uni.api.post("szzpy/authorization", data);
+ },
+ invoicerregistrationszzpy(data) { //获取验证码
+ return uni.api.post("szzpy/invoicerregistration", data);
+ },
+ szzpysendverification(data) { //提交
+ return uni.api.post("szzpy/sendverification", data);
+ },
+ storeinvoicelist(data) { //记录
+ return uni.api.post("store/invoicelist", data);
+ },
+}
\ No newline at end of file
diff --git a/framework/0-conf.js b/framework/0-conf.js
index 307ea57..46e8a39 100644
--- a/framework/0-conf.js
+++ b/framework/0-conf.js
@@ -4,6 +4,7 @@ const debug = process.env.NODE_ENV == 'development' ? true : false;
// #ifdef H5
// const baseUrl = debug ? proxyApi : "http://wxgzh.sxczgkj.cn"
const baseUrl = 'https://invoice.sxczgkj.cn/api/'//正式
+// const baseUrl = 'http://192.168.2.23:8888/api/'//正式
// const baseUrl = 'http://test.invoice.sxczgkj.cn/api/'//测试
// #endif
// import VConsole from "./vConsole.js"
diff --git a/framework/11-api.js b/framework/11-api.js
index 193d1e1..a0a491e 100644
--- a/framework/11-api.js
+++ b/framework/11-api.js
@@ -43,15 +43,12 @@ async function request(options) {
'android': 1
}
options.header = {
- type: platformInfo[system.platform],
userId: uni.getStorageSync('userId'),
- token: uni.getStorageSync('token'),
- myLoginName: uni.getStorageSync('myLoginName'),
- version: uni.conf.version,
'content-type': 'application/json'
}
let res = await uni.pro.request(options)
- if (res.code >= 400) {
+ console.log(res)
+ if (res.code != 1) {
if (options.toast) {
uni.showToast({
title: res.message || res.msg,
@@ -88,25 +85,19 @@ async function request(options) {
return Promise.reject(res.message)
}
} else {
- console.log(res)
- // if (options.toast) {
- // uni.showToast({
- // title: res.message || res.msg,
- // icon: "none",
- // success: () => {
- // setTimeout(res => {
- // if (options.toast) {
- // // #ifdef MP-WEIXIN
- // uni.hideLoading()
- // // #endif
- // // #ifndef MP-WEIXIN
- // uni.pro.hideLoading()
- // // #endif
- // }
- // },2000)
- // }
- // })
- // }
+ if (!options.toast) {
+ uni.showToast({
+ title: res.message || res.msg,
+ icon: "none",
+ success() {
+ setTimeout(res => {
+ // if (options.toast) {
+ uni.hideLoading()
+ // }
+ }, 2000)
+ }
+ })
+ }
return res
}
diff --git a/main.js b/main.js
index c19bf6a..65053d6 100644
--- a/main.js
+++ b/main.js
@@ -1,6 +1,7 @@
import App from './App'
import './framework/bootstrap'
import store from './store'
+import Api from "./common/js/api.js"
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
@@ -8,6 +9,7 @@ Vue.config.productionTip = false
// main.js,注意要在use方法之后执行
import uView from 'uview-ui'
Vue.prototype.$store = store
+Vue.prototype.api = Api;
Vue.use(uView)
// 如此配置即可
App.mpType = 'app'
diff --git a/manifest.json b/manifest.json
index 506c2f5..355496e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -43,7 +43,9 @@
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
- "sdkConfigs" : {}
+ "sdkConfigs" : {
+ "geolocation" : {}
+ }
}
},
/* 快应用特有相关 */
@@ -79,7 +81,10 @@
"uniStatistics" : {
"enable" : true
},
- "title" : "发票"
+ "title" : "发票",
+ "sdkConfigs" : {
+ "maps" : {}
+ }
},
"mp-alipay" : {
"usingComponents" : true
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 739bed2..4d78ff7 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -1,8 +1,13 @@
{
- "name": "invoice_H5",
+ "name": "Hfive",
"lockfileVersion": 3,
"requires": true,
"packages": {
+ "node_modules/dayjs": {
+ "version": "1.11.11",
+ "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz",
+ "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
+ },
"node_modules/uview-ui": {
"version": "2.0.36",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz",
diff --git a/package-lock.json b/package-lock.json
index be6e7dd..c207aba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,13 +1,19 @@
{
- "name": "invoice_H5",
+ "name": "Hfive",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
+ "dayjs": "^1.11.11",
"uview-ui": "^2.0.36"
}
},
+ "node_modules/dayjs": {
+ "version": "1.11.11",
+ "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz",
+ "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
+ },
"node_modules/uview-ui": {
"version": "2.0.36",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz",
diff --git a/package.json b/package.json
index a8e9d79..e75d55d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "dayjs": "^1.11.10",
+ "dayjs": "^1.11.11",
"uview-ui": "^2.0.36"
}
}
diff --git a/pages.json b/pages.json
index d2b6f53..5269ceb 100644
--- a/pages.json
+++ b/pages.json
@@ -21,6 +21,12 @@
"navigationBarTitleText": "绑定通知",
"navigationStyle": "custom"
}
+ }, {
+ "path": "pages/index/merchant",
+ "style": {
+ "navigationBarTitleText": "商户列表",
+ "navigationStyle": "custom"
+ }
}, {
"path": "pages/index/Invoicing",
"style": {
diff --git a/pages/index/Invoicing.vue b/pages/index/Invoicing.vue
index 2e832e8..126d26b 100644
--- a/pages/index/Invoicing.vue
+++ b/pages/index/Invoicing.vue
@@ -103,14 +103,14 @@
},
onShow() {
- // uni.$on('businesscategorys', res => {
- // console.log(res);
- // this.form.mcc = res.code;
- // this.form.article = res.name;
- // this.keyword = uni.cache.get('keyword')
- // // this.form.contactLine = res.unionpayCode
- // // this.form.branchName = res.branchName
- // });
+ uni.$on('businesscategorys', res => {
+ console.log(res);
+ this.form.mcc = res.code;
+ this.form.article = res.name;
+ this.keyword = uni.cache.get('keyword')
+ // this.form.contactLine = res.unionpayCode
+ // this.form.branchName = res.branchName
+ });
},
methods: {
showpopupclick() {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6b11666..a225ba7 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,20 +2,16 @@
- 自开票
+ 极速开票
- 开票员管理
+ 后台管理
开票记录
-
绑定通知
@@ -28,54 +24,60 @@
data() {
return {
improveinformation: false,
- improveinformationlist: {}
+ improveinformationlist: {},
+ onLoaduserId: '',
+ onLoadtype: ''
};
},
- onLoad(e) {
- // getLocationInfo() {
- // uni.getLocation({
- // type: 'wgs84',
- // success: (res) => {
- // console.log(res, '获取距离')
- // // this.lng = res.longitude
- // // this.lat = res.latitude
- // // this.positionindex()
- // },
- // fail: (err) => {
- // // this.positionindex()
- // console.log(err, '获取错误')
- // }
- // });
- // },
+ async onLoad(e) {
if (e.userId) {
+ // this.onLoaduserId = e.userId
+ // this.onLoadtype = e.type
uni.cache.set('userId', e.userId);
}
- uni.request({
- url: uni.conf.baseUrl + 'store/storestatus',
- data: {
- //参数
- store_id: uni.getStorageSync('userId')
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- this.improveinformationform = res.data.data.store
- uni.cache.set('form', this.improveinformationform);
- if (res.data.data.sz_status == 0) {
- uni.reLaunch({
- url: '/pages/index/information'
- });
- // uni.redirectTo({
- // url: '/pages/index/information?store=' + JSON.stringify(this.improveinformationform)
- // });
- } else {
- this.improveinformation = true
- }
- },
+ let res = await this.api.storestorestatus({
+ store_id: uni.cache.get('userId')
+ })
+ if(res.code == 1){
+ this.improveinformationform = res.data.store
+ uni.cache.set('form', this.improveinformationform);
+ // uni.cache.set('userId', this.improveinformationform.id);
+ if (res.data.sz_status == 0) {
+ uni.reLaunch({
+ url: '/pages/index/information'
+ });
+ } else {
+ this.improveinformation = true
+ }
+ }
+ // uni.request({
+ // url: uni.conf.baseUrl + 'store/storestatus',
+ // data: {
+ // //参数
+ // store_id: uni.cache.get('userId')
+ // // type: this.onLoadtype
+ // },
+ // method: 'POST', //请求方式,必须为大写
+ // success: res => {
+ // this.improveinformationform = res.data.data.store
+ // uni.cache.set('form', this.improveinformationform);
+ // // uni.cache.set('userId', this.improveinformationform.id);
+ // if (res.data.data.sz_status == 0) {
+ // uni.reLaunch({
+ // url: '/pages/index/information'
+ // });
+ // } else {
+ // this.improveinformation = true
+ // }
+ // },
- });
+ // });
},
onShow() {},
methods: {
+ merchant() {
+ uni.pro.navigateTo('index/merchant');
+ },
information() {
uni.pro.navigateTo('index/information', this.improveinformationform);
},
diff --git a/pages/index/information - 副本.vue b/pages/index/information - 副本.vue
new file mode 100644
index 0000000..233d1ea
--- /dev/null
+++ b/pages/index/information - 副本.vue
@@ -0,0 +1,579 @@
+
+
+
+
+ 请填写公司名字
+
+
+
+ 请填写法人姓名
+
+
+
+ 请填写法人手机号
+
+
+
+ 电子税局账号
+
+
+
+ 电子税局密码
+
+
+
+ 省份
+
+ {{form.provinceno_name || ''}}
+
+
+
+ 邀请码
+
+
+
+ 办税人姓名
+
+
+
+ 办税人手机号码
+
+
+
+ 验证码
+
+
+
+
+ {{ Recapture }}
+
+
+ {{ second }}s重新发送
+
+
+
+
+
+
+ 请上传法人身份证图片
+
+
+
+
+
+
+ 请上传法人国徽身份证图片
+
+
+
+
+
+
+ 请拍摄并上传你的营业执照
+
+
+
+
+
+
+
+
+
+ 提交
+ 提交
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/information.vue b/pages/index/information.vue
index 81e7124..300aae4 100644
--- a/pages/index/information.vue
+++ b/pages/index/information.vue
@@ -37,6 +37,34 @@
+
+ 办税人姓名
+
+
+
+ 办税人手机号码
+
+
+
+ 验证码
+
+
+
+
+ {{ Recapture }}
+
+
+ {{ second }}s重新发送
+
+
+
+
请上传法人身份证图片
@@ -62,9 +90,10 @@
-
- 拒接原因:({{form.no|| '无'}})
- 审核中
+
+ 提交
提交
@@ -81,13 +110,19 @@
data() {
return {
showpicker: false,
- disabled: true,
+ disabled: false,
Uploadurlnumber: '',
namelang: '',
merchantAuditStatus: '',
columns: [
],
+ codefailed: false, //验证码是否发送成功
+ store_id: '',
+ // 注册定时器 初始值
+ second: 60,
+ showText: true,
+ Recapture: '发送验证码',
form: {
store_id: uni.getStorageSync('userId'),
title: '',
@@ -108,11 +143,12 @@
onLoad(e) {
console.log(e.store)
let data = uni.getStorageSync('form')
- if (data.status == '0') {
- this.disabled = true
- } else {
- this.disabled = false
- }
+ console.log(data)
+ // if (data.status == '0') {
+ // this.disabled = true
+ // } else {
+ // this.disabled = false
+ // }
if (data.phone) {
this.form.store_id = uni.getStorageSync('userId')
this.form.title = data.title
@@ -128,14 +164,155 @@
this.form.code = data.invitation
this.form.provinceno = data.provinceno
this.form.provinceno_name = data.provinceno_name
+ this.form.taxname = data.bsryxm
+ this.form.taxphone = data.taxphone
}
-
+
},
onShow() {
this.onShowdata()
},
methods: {
- onShowdata(){
+ async CodeRegister() {
+ if (this.form.title == null || this.form.title == '') {
+ uni.showToast({
+ title: '请填写公司名字',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.phone == null || this.form.phone == '') {
+ uni.showToast({
+ title: '请填写法人手机号',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
+ uni.showToast({
+ title: '请填写法人姓名',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
+ uni.showToast({
+ title: '请上传身份证人像面',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
+ uni.showToast({
+ title: '请上传身份证国徽面',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.business_license == null || this.form.business_license == '') {
+ uni.showToast({
+ title: '请上传营业执照',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.provinceno == null || this.form.provinceno == '') {
+ uni.showToast({
+ title: '请选择省份编码',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.code == null || this.form.code == '') {
+ uni.showToast({
+ title: '请填写邀请码',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.dlzh == null || this.form.dlzh == '') {
+ uni.showToast({
+ title: '请填写电子税局账号',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.dlmm == null || this.form.dlmm == '') {
+ uni.showToast({
+ title: '请填写电子税局账密码',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.taxname == null || this.form.taxname == '') {
+ uni.showToast({
+ title: '请填写办税人姓名',
+ icon: 'none'
+ });
+ return false;
+ }
+ if (this.form.taxphone == null || this.form.taxphone == '') {
+ uni.showToast({
+ title: '请填写办税人手机号码',
+ icon: 'none'
+ });
+ return false;
+ }
+ let res = await this.api.invoicerregistrationszzpy(this.form)
+ if (res.code == 1) {
+ uni.showToast({
+ title: res.message || res.msg,
+ icon: "none",
+ })
+ // 定时器
+ this.showText = false;
+ this.Recapture = '重新获取';
+ var interval = setInterval(() => {
+ let times = --this.second;
+ this.second = times < 10 ? '0' + times : times; //小于10秒补 0
+ }, 1000);
+ setTimeout(() => {
+ clearInterval(interval);
+ this.second = 60;
+ this.showText = true;
+ }, 60000);
+ this.store_id = res.data.store_id
+ this.codefailed = true
+ }
+
+ },
+ async saveMerchantBaseInfoV2() {
+ if (this.form.verification == null || this.form.verification == '') {
+ uni.showToast({
+ title: '请填写验证码',
+ icon: 'none'
+ });
+ return false;
+ }
+ let res = await this.api.szzpysendverification({
+ code: this.form.verification,
+ store_id: this.store_id
+ })
+ if (res.code == 1) {
+ this.store_id = res.data.store_id
+ //请求数电授权
+ this.szzpyauthorization()
+ }
+ },
+ async szzpyauthorization() {
+ let res = await this.api.szzpyauthorization({
+ store_id: this.store_id
+ })
+ if (res.code == 1) {
+ setTimeout(() => {
+ uni.cache.set('form', '');
+ uni.reLaunch({
+ url: '/pages/index/index'
+ });
+ }, 2000);
+ }
+ },
+ onShowdata() {
uni.request({
url: uni.conf.baseUrl + 'szzpy/getprovinceno',
data: this.form,
@@ -188,6 +365,7 @@
myLoginName: uni.cache.get('myLoginName')
},
success: res => {
+ console.log(res)
var thisdata_ = JSON.parse(res.data);
uni.showToast({
title: '上传成功',
@@ -224,124 +402,7 @@
}
},
- async saveMerchantBaseInfoV2() {
- console.log(this.form)
- if (this.form.title == null || this.form.title == '') {
- uni.showToast({
- title: '请填写公司名字',
- icon: 'none'
- });
- return false;
- }
- if (this.form.phone == null || this.form.phone == '') {
- uni.showToast({
- title: '请填写法人手机号',
- icon: 'none'
- });
- return false;
- }
- if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
- uni.showToast({
- title: '请填写法人姓名',
- icon: 'none'
- });
- return false;
- }
- if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
- uni.showToast({
- title: '请上传身份证人像面',
- icon: 'none'
- });
- return false;
- }
- if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
- uni.showToast({
- title: '请上传身份证国徽面',
- icon: 'none'
- });
- return false;
- }
- if (this.form.business_license == null || this.form.business_license == '') {
- uni.showToast({
- title: '请上传营业执照',
- icon: 'none'
- });
- return false;
- }
- if (this.form.provinceno == null || this.form.provinceno == '') {
- uni.showToast({
- title: '请选择省份编码',
- icon: 'none'
- });
- return false;
- }
- if (this.form.dlzh == null || this.form.dlzh == '') {
- uni.showToast({
- title: '请填写电子税局账号',
- icon: 'none'
- });
- return false;
- }
- if (this.form.dlmm == null || this.form.dlmm == '') {
- uni.showToast({
- title: '请填写电子税局账密码',
- icon: 'none'
- });
- return false;
- }
- if (this.form.code == null || this.form.code == '') {
- uni.showToast({
- title: '请填写邀请码',
- icon: 'none'
- });
- return false;
- }
- // if (/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig
- // .test(this.form.alias)) {
- // uni.showToast({
- // title: '请不要输入Emoji!!!',
- // icon: 'none'
- // });
- // return false;
- // }
- uni.request({
- url: uni.conf.baseUrl + 'store/storeinfo',
- data: this.form,
- method: 'POST', //请求方式,必须为大写
- success: res => {
- uni.showToast({
- title: res.data.message || res.data.msg,
- icon: 'none',
- success: () => {
- uni.pro.hideLoading();
- }
- });
- if (res.data.code == 1) {
- setTimeout(() => {
- uni.cache.set('form','');
- uni.reLaunch({
- url: '/pages/index/index'
- });
- // uni.navigateBack();
- }, 2000);
- }
- console.log(res)
- // this.form = res.data.data
- console.log('接口返回------', res);
- },
- fail(res) {
- uni.showToast({
- title: res.data.message || res.data.msg,
- icon: 'none',
- success: () => {
- uni.pro.hideLoading();
- }
- });
- }
- });
-
- }
}
};
@@ -365,7 +426,22 @@
color: #333333;
.Box_box_input {
+ position: relative;
width: 60%;
+
+ .Box_box_inpuinputt {
+ padding-right: 15rpx;
+ }
+
+ .repeats {
+ width: 280rpx;
+ text-align: center;
+ font-size: 24rpx;
+ font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+ font-weight: 400;
+ color: #ffffff;
+ border-radius: 12rpx;
+ }
}
}
}
diff --git a/pages/index/merchant.vue b/pages/index/merchant.vue
new file mode 100644
index 0000000..33eeaea
--- /dev/null
+++ b/pages/index/merchant.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+ 西安国强有限公司
+
+
+
+
+ 陕西省西安市五路口A口600m
+
+
+
+
+
+ 西安国强有限公司
+
+
+
+
+ 陕西省西安市五路口A口600m
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/order.vue b/pages/index/order.vue
index 4c27943..1e5585b 100644
--- a/pages/index/order.vue
+++ b/pages/index/order.vue
@@ -20,6 +20,9 @@
已开票
+
+ 开票失败
+
已作废
@@ -44,7 +47,7 @@
},
methods: {
clickoange(e) {
- if (e.status == 2 || e.status == 4) {
+ if (e.status == 2 || e.status == 4 || e.status == 3) {
uni.pro.navigateTo('index/orderinfo', {
id: e.id,
status: e.status
@@ -56,21 +59,12 @@
status: e.status
});
}
- // uni.pro.navigateTo('index/merchant/orderinfo');
},
- storeinvoicelist() {
- uni.request({
- url: uni.conf.baseUrl + 'store/invoicelist',
- // url:'http://192.168.1.117:8084/merchant/sz/merchant/authPay',
- data: {
- store_id: uni.getStorageSync('userId'),
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- this.list = res.data.data
- console.log('接口返回------', res);
- }
- });
+ async storeinvoicelist() {
+ let res = await this.api.storeinvoicelist({
+ store_id: uni.getStorageSync('userId')
+ })
+ this.list = res.data
},
}
}
diff --git a/pages/index/orderinfo.vue b/pages/index/orderinfo.vue
index 897d621..77891f9 100644
--- a/pages/index/orderinfo.vue
+++ b/pages/index/orderinfo.vue
@@ -10,6 +10,9 @@
开票中
+
+ 开票失败
+
开票成功
diff --git a/pages/index/orderinfos.vue b/pages/index/orderinfos.vue
index 9d6bb96..c02bae7 100644
--- a/pages/index/orderinfos.vue
+++ b/pages/index/orderinfos.vue
@@ -10,6 +10,9 @@
开票中
+
+ 开票失败
+
开票成功
diff --git a/pages/index/wxinvoicing.vue b/pages/index/wxinvoicing.vue
index c57a282..4d1488a 100644
--- a/pages/index/wxinvoicing.vue
+++ b/pages/index/wxinvoicing.vue
@@ -128,9 +128,6 @@
.then(canvas => {
uni.hideLoading();
// const dataURL = canvas.toDataURL('image/png');
- // this.imgShow = true;
- // this.img = dataURL;
- // console.log(this.img)
const dataURL = canvas.toDataURL('image/png');
const creatDom = document.createElement('a');
document.body.appendChild(creatDom);
@@ -138,7 +135,7 @@
console.log(creatDom.href)
creatDom.download = dayjs().valueOf();
creatDom.click();
- creatDom.remove(); // 下载之后把创建的元素删除
+ // creatDom.remove(); // 下载之后把创建的元素删除
})
.catch(err => {
console.log(err);
diff --git a/pages/webview/webview.vue b/pages/webview/webview.vue
index 5700dd2..99b2a89 100644
--- a/pages/webview/webview.vue
+++ b/pages/webview/webview.vue
@@ -23,8 +23,11 @@
method: 'POST', //请求方式,必须为大写
success: res => {
let fileUrl = options.url
- this.url = 'http://www.pfile.com.cn/api/profile/onlinePreview?url=' +
+ this.url = 'https://www.pfile.com.cn/api/profile/onlinePreview?url=' +
encodeURIComponent(res.data.data);
+ // this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data
+ // console.log(this.url)
+ // window.open('https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data)
}
});
diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html
index 2509111..df80369 100644
--- a/unpackage/dist/build/web/index.html
+++ b/unpackage/dist/build/web/index.html
@@ -1,2 +1,2 @@
发票
\ No newline at end of file
+ document.write('')