Commit 5f9c6115 by 李嘉林

新华优化

parent 4d92445d
......@@ -4,11 +4,6 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@sentry/types": {
"version": "7.22.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.22.0.tgz",
"integrity": "sha512-LhCL+wb1Jch+OesB2CIt6xpfO1Ab6CRvoNYRRzVumWPLns1T3ZJkarYfhbLaOEIb38EIbPgREdxn2AJT560U4Q=="
},
"@types/q": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz",
......@@ -312,7 +307,8 @@
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
},
"atob": {
"version": "2.1.2",
......@@ -358,32 +354,6 @@
"integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==",
"dev": true
},
"axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"requires": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
},
"dependencies": {
"follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
......@@ -2019,6 +1989,7 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"requires": {
"delayed-stream": "~1.0.0"
}
......@@ -3346,7 +3317,8 @@
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
"delegates": {
"version": "1.0.0",
......@@ -4150,11 +4122,6 @@
"integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
"dev": true
},
"fflate": {
"version": "0.4.8",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
"integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="
},
"figures": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
......@@ -4720,11 +4687,6 @@
"minimalistic-assert": "^1.0.1"
}
},
"hashids": {
"version": "2.2.10",
"resolved": "https://registry.npmjs.org/hashids/-/hashids-2.2.10.tgz",
"integrity": "sha512-nXnYums7F8B5Y+GSThutLPlKMaamW1yjWNZVt0WModiJfdjaDZHnhYTWblS+h1OoBx3yjwiBwxldPP3nIbFSSA=="
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
......@@ -5754,9 +5716,9 @@
}
},
"mayi-front-tools": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.1.tgz",
"integrity": "sha512-xEkLnrY5VDU9ooonUwQyiKcOHuNhGq8MJ7dlNfM3QUlUWmZVxZj5r2Aa8yQI/ukfQdl1p5RUFjmIPfSZRQKMjQ=="
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.3.tgz",
"integrity": "sha512-tiMgJbyKBqbHbSApNC7zDok35ETRqu6tssyFwJZvIuwQWaJH8iiGJKOchXvDzjHm8yHiBKRb62FqqWaaG03/Kg=="
},
"md5.js": {
"version": "1.3.5",
......@@ -5878,12 +5840,14 @@
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
"dev": true
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
"dev": true,
"requires": {
"mime-db": "1.44.0"
}
......@@ -7896,24 +7860,6 @@
"uniqs": "^2.0.0"
}
},
"posthog-js": {
"version": "1.39.1",
"resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.39.1.tgz",
"integrity": "sha512-ZbLs0iSv4nCdcY9cy85lejCQtTh8JmXVzSegCVJweRCmGf4lFEJSsfrezm1j7kww4yCn0dFdVr0A245MIfsZuw==",
"requires": {
"@sentry/types": "7.22.0",
"fflate": "^0.4.1",
"rrweb-snapshot": "^1.1.14"
}
},
"posthog-node": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-2.2.3.tgz",
"integrity": "sha512-dYlLZhrDus+uRov/Hh+EiRlMoMhRKchNjNa7mNE2iWmKg/ryOTipf0XYKS9UKdki7aU1NzWFhnLe11HF615XuA==",
"requires": {
"axios": "^0.27.0"
}
},
"prepend-http": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
......@@ -8615,11 +8561,6 @@
"inherits": "^2.0.1"
}
},
"rrweb-snapshot": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-1.1.14.tgz",
"integrity": "sha512-eP5pirNjP5+GewQfcOQY4uBiDnpqxNRc65yKPW0eSoU1XamDfc4M8oqpXGMyUyvLyxFDB0q0+DChuxxiU2FXBQ=="
},
"run-async": {
"version": "2.4.1",
"resolved": "https://registry.nlark.com/run-async/download/run-async-2.4.1.tgz",
......
......@@ -27,13 +27,10 @@
"build:my": "node build/build.js my"
},
"dependencies": {
"hashids": "^2.2.8",
"mayi-analytics": "^1.1.47",
"mayi-front-tools": "^1.0.3",
"mpvue": "^2.0.0",
"mpvue-wxparse": "^0.6.5",
"posthog-js": "^1.39.1",
"posthog-node": "^2.2.3",
"vuex": "^3.0.1",
"we-cropper": "^1.4.0",
"wxbarcode": "^1.0.2"
......
......@@ -17,7 +17,6 @@
"pages/memberCode/main",
"pages/toMini/main",
"pages/paySuccess/main",
"pages/stateAccountList/main",
"pages/order/main"
],
"subPackages": [
......
<template>
<!-- uooya对账单定制 -->
<div class="statementAccount">
<div v-if="list && list.length>0">
<div class="stateList" v-for="(item,index) in list" :key="index">
<div class="dateHeader">
<p>{{item.year}}</p>
</div>
<div class="monthList flex flex-cen flex-btw van-hairline--bottom" v-for="(monthItem,index1) in item.month" :key="index1">
<div class="state">{{monthItem}}月账单</div>
<van-button @click="downloadPdf(item.year + monthItem)">下载</van-button>
</div>
</div>
</div>
<div v-else style="margin:20px auto;font-size:14px;text-align:center">暂无数据</div>
</div>
</template>
<script>
import dzd from "../../api/wy";
import live from "@/api/live"
import Hashids from 'hashids'
const hashids = new Hashids()
export default {
data() {
return {
loading: false,
finished: false,
list:[],
accountId:'',
isLoading:false,
userId:'',
baseUrl: process.env.BASE_URL,
};
},
onLoad(options){
console.log(options,'xiazai')
live.getUserInfo().then(res => {
if (res.data.code == 200) {
this.userId = res.data.data ? res.data.data.userId : ''
}
})
},
onShow() {
},
onReady(){
this.list = []
this.getList();
},
methods: {
filterDateFun(arr){
var yeras = []
arr.forEach((item) =>{
yeras.push(item.slice(0,4))
})
var currentArr = Array.from(new Set(yeras))
currentArr.forEach((ele) =>{
this.list.push({
year:ele,
month:[]
})
})
for (let i = 0; i < arr.length; i++) {
for (let j = 0; j < this.list.length; j++) {
if(this.list[j].year == arr[i].slice(0,4)){
this.list[j].month.push(arr[i].slice(4,6))
}
}
}
// 排序降序
this.list.sort(function(a,b){
return b.year < a.year ? -1 : 1
})
console.log(this.list,'mkmk')
},
getList(){
dzd
.getDzdMonthList().then(res=>{
console.log(res.data,'对账单列表')
if(res.data.code == 200&&res.data.data){
this.filterDateFun(res.data.data)
}
})
},
download(id){
console.log(window.location.protocol,'90',window.location.host,process.env.env_config,'kl')
let url = window.location.protocol +"//" +window.location.host +`/customdev/wy`+`/${hashids.encode(id)+`?mixid=${this.$route.query.mixid}`}`
window.location.href = url
},
downloadPdf(id){
wx.showLoading({ // 显示加载中loading效果
title: "下载中",
mask: true //开启蒙版遮罩
});
let Temurl = this.baseUrl + '/customdev'+`/${hashids.encode(id)}` + `/${hashids.encode(this.userId)}` +`?mixid=${this.$store.state.mixid}`
console.log(Temurl,'mkurl')
let pdfurl = this.baseUrl+`/innerApi/utilsService/genPdf?url=${Temurl}`
console.log(pdfurl,'mkurl')
let _this = this;
let down = wx.downloadFile({
url : pdfurl,
success : (data) => {
console.log('下载成功',data)
console.log(data.tempFilePath)
if(data.statusCode == 200){
wx.saveFile({
tempFilePath: data.tempFilePath,
filePath: wx.env.USER_DATA_PATH + '/' + '报告详情.pdf',
success(res) {
wx.openDocument({
filePath: res.savedFilePath,
showMenu:true,
fileType : 'pdf',
success: function (res) {
wx.showToast({
title: '打开文档成功',
})
wx.hideLoading();
// _this.isLoading = false;
console.log('打开文档成功',res)
},
fail: (err) =>{
wx.showToast({
title: '打开文档失败',
})
wx.hideLoading();
console.log('打开文档失败',err)
// _this.isLoading = false;
}
})
},
fail : (err) => {
console.log('下载失败',err)
// _this.isLoading = false;
wx.hideLoading();
wx.showToast({
title: '打开文档失败',
})
}
})
}
},
})
down.onProgressUpdate((res) => {
console.log(res,'res')
if(res.progress == 100){
console.log('下载成功')
wx.hideLoading();
}
})
},
}
};
</script>
<style scoped lang="scss">
.statementAccount{
.stateList{
width:100%;
.dateHeader{
width:100%;
height: 40px;
line-height: 40px;
font-size: 13px;
background: #F5F5F5;
padding:0 15px;
}
.monthList{
padding:12px;
display: flex;
justify-content: space-between;
align-content: center;
.state{
color:#000;
font-size: 16px;
font-weight: 500;
}
}
}
}
</style>
import Vue from 'vue'
import App from './index'
const app = new Vue(App)
app.$mount()
{
"navigationBarTitleText": "对账单",
"usingComponents": {
"van-loading": "/static/vant/loading/index",
"van-button": "/static/vant/button/index"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment