Commit 2f8104a6 by 张立顺

v4.11.0 feat

1 parent 0daeedcf
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve --open", "serve": "vue-cli-service serve --open",
"start": "npm run serve", "start": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve ",
"dev": "npm run serve", "dev": "npm run serve",
"build": "vue-cli-service build --mode nomock && rm -fr ./dist/js/*.map ", "build": "vue-cli-service build --mode nomock && rm -fr ./dist/js/*.map ",
"build:nomock": "vue-cli-service build --mode nomock", "build:nomock": "vue-cli-service build --mode nomock",
......
...@@ -54,3 +54,21 @@ export function createWeappQrcode(data) { ...@@ -54,3 +54,21 @@ export function createWeappQrcode(data) {
data.method = `dj.api.smartcarlife.common.createWeappQrcode.new` data.method = `dj.api.smartcarlife.common.createWeappQrcode.new`
return request(data, 'post') return request(data, 'post')
} }
// 获取园区店支付宝页面二维码
export function alipayQrcode(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.alipay.qrcode`
return request(data, 'post')
}
// 获取园区店配置项
export function yqMerchantConfigDetail(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.detail`
return request(data, 'post')
}
// 关联园区店加企微二维码
export function serviceMerchantRelateQrcode(data) {
data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode`
return request(data, 'post')
}
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
import sha1 from 'sha1' import sha1 from 'sha1'
import qs from 'qs' import qs from 'qs'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
// // 等后面再处理
// console.log(baseConfig)
// // const secret = // // const secret =
// // window.location.href.includes('dj.glsx.com.cn') || // // window.location.href.includes('dj.glsx.com.cn') ||
......
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog <el-dialog :title="title"
:title="title" :visible.sync="isVisible"
:visible.sync="isVisible" :show-close="showClose"
:show-close="showClose" :before-close="handleClose"
:before-close="handleClose" :close-on-click-modal="false"
:close-on-click-modal="false" :width="width">
:width="width"
>
<span slot="title"> <span slot="title">
{{title}} {{title}}
<span class="dialog-sub-title"> <span class="dialog-sub-title">
...@@ -18,15 +16,11 @@ ...@@ -18,15 +16,11 @@
<slot></slot> <slot></slot>
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
<el-button <el-button type="primary"
type="primary" @click="handleConfirm"
@click="handleConfirm" :loading="$store.state.d2admin.loading.value">{{btnOkLabel}}</el-button>
:loading="$store.state.d2admin.loading.value" <el-button v-if="!noCancel"
>{{btnOkLabel}}</el-button> @click="handleClose">取消</el-button>
<el-button
v-if="!noCancel"
@click="handleClose"
>取消</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
</div> </div>
</el-dialog> </el-dialog>
......
...@@ -16,5 +16,6 @@ Vue.component('d2-search', () => import('./d2-search/index.vue')) ...@@ -16,5 +16,6 @@ Vue.component('d2-search', () => import('./d2-search/index.vue'))
Vue.component('relateStoreDialog', () => Vue.component('relateStoreDialog', () =>
import('./d2-form/relateStoreDialog.vue') import('./d2-form/relateStoreDialog.vue')
) )
Vue.component('baseDialog', () => import('./baseDialog/index.vue'))
// Vue.component([authButton.name], authButton) // Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton) Vue.component(authButton.name, authButton)
<template> <template>
<div> <div class="d2-mr personal-wrap">
<div class="d2-mr personal-wrap"> <el-popover ref="popover1"
<el-popover ref="popover1" placement="top-start"
placement="top-start" width="400"
width="400" @show="redPotShow = false"
@show="redPotShow = false" popper-class="popper"
popper-class="popper" v-model="visible"
v-model="visible" trigger="hover">
trigger="hover"> <p class="title">导出和导出任务</p>
<p class="title">导出和导出任务</p> <p class="tips"> 导出和导出任务加载完成后将自动进行下载,加载过程中不要离开系统,否则将导致任务自动清空</p>
<p class="tips"> 导出和导出任务加载完成后将自动进行下载,加载过程中不要离开系统,否则将导致任务自动清空</p> <!-- <div v-for="(item,index) in dowloadList"
<!-- <div v-for="(item,index) in dowloadList"
:key="index" :key="index"
class="downloadSty"> class="downloadSty">
<span class="one-line-ellipsis downName">{{item.name}}</span> <span class="one-line-ellipsis downName">{{item.name}}</span>
<span class="downLabel"> {{item.labelText}}</span> <span class="downLabel"> {{item.labelText}}</span>
</div> --> </div> -->
<div v-for="(item,index) in updateList" <div v-for="(item,index) in updateList"
:key="index+'a'" :key="index+'a'"
class="updateListClass"> class="updateListClass">
<div v-if="item.progress!= 100"> <div v-if="item.progress!= 100">
<p>{{item.name}}</p> <p>{{item.name}}</p>
<el-progress :percentage="item.progress?item.progress:2"></el-progress> <el-progress :percentage="item.progress?item.progress:2"></el-progress>
</div>
<div v-else>
<p>{{item.name||''}}</p>
<p>成功{{item.succNum}}条<span v-if="item.failNum">,失败{{item.failNum}}条</span></p>
</div>
</div> </div>
<!-- @click="test" --> <div v-else>
<span slot="reference"> <p>{{item.name||''}}</p>
<i class="el-icon-bell tipsIcon " <p>成功{{item.succNum}}条<span v-if="item.failNum">,失败{{item.failNum}}条</span></p>
:class="{'redPot':redPotShow }"></i> </div>
</span> </div>
</el-popover> <!-- @click="test" -->
<span slot="reference">
<i class="el-icon-bell tipsIcon "
:class="{'redPot':redPotShow }"></i>
</span>
</el-popover>
<span v-if="show" <span v-if="show"
class="btn-text">{{info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录'}}</span> class="btn-text">{{info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录'}}</span>
<span class="btn-text out-txt" <span class="btn-text out-txt"
@click="clear">退出</span> @click="clear">退出</span>
</div>
</div> </div>
</template> </template>
......
...@@ -310,7 +310,6 @@ export default { ...@@ -310,7 +310,6 @@ export default {
...mapActions({ ...mapActions({
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = _.cloneDeep(this.searchForm) this.tableSearchForm = _.cloneDeep(this.searchForm)
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
:accountDetailVisible="accountDetailVisible" :accountDetailVisible="accountDetailVisible"
:merchantRow="merchantRow"></account-detail> :merchantRow="merchantRow"></account-detail>
</baseDialog> </baseDialog>
<settingDetail :show="settingDetailVisible"></settingDetail> <!-- <settingDetail :show="settingDetailVisible"></settingDetail> -->
</d2-container> </d2-container>
</template> </template>
...@@ -62,15 +62,15 @@ import { getListApi, getMerchantLevelApi } from '@api/publicAccount' ...@@ -62,15 +62,15 @@ import { getListApi, getMerchantLevelApi } from '@api/publicAccount'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import accountDetail from './accountDetail' import accountDetail from './accountDetail'
import { BaseData, merchantStoreServiceList } from '@/common/constants.js' import { BaseData, merchantStoreServiceList } from '@/common/constants.js'
import baseDialog from '@/components/baseDialog/baseDialog' // import baseDialog from '@/components/baseDialog/baseDialog'
import settingDetail from './settingDetail.vue' // import settingDetail from './settingDetail.vue'
export default { export default {
name: 'accountList', name: 'accountList',
data() { data() {
return { return {
// 账户详情 // 账户详情
accountDetailVisible: false, accountDetailVisible: false,
settingDetailVisible: false, // settingDetailVisible: false,
merchantRow: {}, merchantRow: {},
nameToOption: { nameToOption: {
1: 'dj', 1: 'dj',
...@@ -221,8 +221,8 @@ export default { ...@@ -221,8 +221,8 @@ export default {
}, },
components: { components: {
accountDetail, accountDetail,
baseDialog, // baseDialog,
settingDetail // settingDetail
}, },
mounted() { mounted() {
...@@ -238,9 +238,9 @@ export default { ...@@ -238,9 +238,9 @@ export default {
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
associationSettings() { // associationSettings() {
this.settingDetailVisible = true // this.settingDetailVisible = true
}, // },
async getBaseData() { async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList() this.getOptionsList()
......
<template>
<baseDialog :isShow.sync="show"
:config="dialogConfig.setting"
:dialogConfig="dialogConfig.config"
@closeDialog="handleDetailClose"
class="settingContainer">
<span class="test">222</span>
</baseDialog>
</template>
<script>
import baseDialog from '@/components/baseDialog/baseDialog'
export default {
name: 'settingDetail',
components: {
baseDialog
},
props: {
show: {
type: Boolean,
default: true
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
// width: '720px',
btnList: [
]
},
config: {
title: '查看详情',
width: '720px'
}
}
}
},
methods: {
handleDetailClose() {
}
}
}
</script>
<style lang="scss" scoped>
::v-deep.settingContainer {
// color: rebeccapurple;
.el-dialog__header {
border: none;
}
}
</style>
<template>
<d2-dialog title="加微二维码"
:isVisible="qRcodeVisible"
class="qRcodeDailog"
width="585px"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<!-- btnOkLabel="下载二维码" -->
<div class="dialogContainer">
<p class="merchantName">商户名称 {{merchantInfo.merchantName}}</p>
<p class="merchantId">商户号 {{merchantInfo.merchantId}}</p>
<el-upload action=""
class="elupload"
list-type="picture-card"
accept=".jpg,.png"
:auto-upload="false"
:show-file-list="false"
:disabled="!!imgUrl"
:on-change="e => handleChange(e,)"
:on-preview="e => handlePreview(e, )"
:on-remove="e => handleRemove(e, )">
<span class="img-btn">
<img v-if="imgUrl"
:src='imgUrl'
class="rectImg">
<span class="img-btns">
<span class="btn-item">
<i @click.stop='handleRemove()'
class="el-icon-delete"></i>
<!-- <i @click.stop="handleImgLook"
class="el-icon-zoom-in"></i> -->
</span>
</span>
</span>
<i v-if="!imgUrl "
class="el-icon-plus avatar-uploader-icon "
style="color: #8c939d;">
<span class="icon-text">上传图片</span>
</i>
<!-- <img v-if="!imgUrl "
:src='examplePicUrl'
class="rectImg"> -->
<!-- <div slot="tip"
class="el-upload__tip">只能上传jpg/png文件,且不超过1M</div> -->
</el-upload>
<!-- <span v-if="txtDescript">{{txtDescript}}</span> -->
<!-- <p v-show="!imgUrl"
slot="errorTips"
class="car-error-txt">请上传{{txtDescript}}</p> -->
</div>
</d2-dialog>
</template>
<script>
// import baseDialog from '@/components/baseDialog/baseDialog'
import { uploadImg } from '@/api/sys.base'
import { yqMerchantConfigDetail, serviceMerchantRelateQrcode } from '@/api/serviceManage'
export default {
name: 'QRcodeDialog',
components: {
// baseDialog
},
props: {
qRcodeVisible: {
type: Boolean,
default: false
},
merchantInfo: {
type: Object
// default: function () {
// return {
// merchantId: '44209883',
// merchantName: 'test'
// }
// }
}
},
data() {
return {
imgUrl: '',
defaultImgUrl: '',
oldImgUrl: ''
// dialogConfig: {
// setting: {
// showClose: true,
// appendToBody: false,
// // width: '720px',
// btnList: [
// ]
// },
// config: {
// title: '上传加微二维码',
// width: '720px'
// }
// }
}
},
mounted() {
this.yqMerchantConfigDetail()
},
methods: {
yqMerchantConfigDetail() {
// let parmas = this.merchantInfo.merchantId
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.merchantId }).then((result) => {
console.log(result)
const { workWechatQrcode } = result
this.imgUrl = workWechatQrcode
}).catch((err) => {
console.log(err)
})
},
handleClose() {
this.$emit('update:qRcodeVisible', false)
},
async handleAddConfirm() {
// 跟原来不一样认为是修改
if (this.oldImgUrl != this.imgUrl) {
const params = {
yqMerchantId: this.merchantInfo.merchantId,
imgUrl: this.imgUrl
}
const result = await serviceMerchantRelateQrcode(params)
console.log(result)
this.notice.okTips()
// .then((result) => {
// console.log(result)
// }).catch((err) => {
// console.log(err)
// });
}
this.handleClose()
},
handleChange(file, attrName, targetItem) {
if (!(file.size / 1024 / 1024 < 1)) {
this.$message.error('请上传小于1M的图片')
return false
}
this.handleImgChange({ file })
// this.$emit('handleImgChange', { file: file, attrName: attrName, targetItem: targetItem })
},
handlePreview() { },
handleRemove(attrName, targetItem) {
// this.$emit('handleImgRemove', { attrName: attrName, targetItem: targetItem })
this.imgUrl = ''
},
handleImgChange({ file, attrName, targetItem }) {
// var hasFnList = ['idCard', 'idCardBack', 'bankCard', 'businessLicense', 'authorizerIdCard']
console.log(file)
var reader = new FileReader()
var fileInfo = file.raw
reader.readAsDataURL(fileInfo)
reader.onload = e => {
const imgFile = e.target.result
const base64 = fileInfo.name.split('.')[1] + '@' + imgFile.split(',')[1]
uploadImg({ file: base64 }).then(res => {
console.log(res)
// http://qcimg01.glsx.com.cn:7060/group1/M00/02/25/wKgD3mMMeE2AIylRAADPUBbxKwQ414.png
this.imgUrl = res
// this.picObj[attrName].url = res
// this.editForm.papers[this.picObj[attrName].attrName] = this.picObj[attrName].url
// this.writeToEditForm(attrName)
// this.$refs.editFormRef.$refs.editForm.clearValidate(targetItem.name)
// if (hasFnList.includes(attrName)) {
// targetItem.autoRecognitionFn(res, attrName)
// }
})
}
},
handleImgRemove({ attrName, targetItem }) {
this.picObj[attrName].url = ''
delete this.editForm.papers[this.picObj[attrName].attrName]
// this.writeToEditForm(attrName, false)
// this.$refs.editFormRef.$refs.editForm.validateField(targetItem.name)
}
}
}
</script>
<style lang="scss" scoped>
::v-deep.qRcodeDailog {
// color: rebeccapurple;
// .el-dialog__header {
// border: none;
// }
.el-icon-plus {
position: relative;
}
.icon-text {
position: absolute;
white-space: nowrap;
top: 28px;
left: -14px;
font-size: 14px;
}
}
.dialogContainer {
box-sizing: border-box;
width: 300px;
height: 290px;
margin: auto;
padding: 16px 24px;
display: flex;
flex-direction: column;
// align-items: center;
// justify-content: center;
text-align: left;
border: 1px solid #e8e8e8;
p {
margin: 0;
}
.merchantName {
font-weight: 600;
margin-bottom: 10px;
}
.elupload {
margin: auto;
}
.disabled .el-upload--picture-card {
display: none;
}
.el-upload--picture-card {
width: 140px;
height: 92px;
line-height: 98px;
}
.rectImg {
width: 100%;
height: 100%;
// width: 137px;
// height: 90px;
}
.img-btn {
display: inline-block;
position: relative;
}
.img-btn .img-btns {
display: none;
position: absolute;
width: 146px;
height: 146px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.img-btn .img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.img-btn .img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.img-btn:hover .img-btns {
display: block;
}
.el-upload--picture-card i {
color: #fff;
}
}
// .gl-upload-img .car-error-txt {
// font-size: 12px;
// line-height: 6px;
// margin: 0 0;
// }
</style>
...@@ -120,6 +120,9 @@ ...@@ -120,6 +120,9 @@
:accountDetailVisible="financialRulesDetailVisible"> :accountDetailVisible="financialRulesDetailVisible">
</financialRulesDetail> </financialRulesDetail>
</baseDialog> </baseDialog>
<QRcodeDialog :qRcodeVisible.sync="QRcodeDialog"
v-if="QRcodeDialog"
:merchantInfo="viewDetailData"></QRcodeDialog>
</d2-container> </d2-container>
</template> </template>
...@@ -128,25 +131,26 @@ import { Util } from '@/common/util' ...@@ -128,25 +131,26 @@ import { Util } from '@/common/util'
import _ from 'lodash' import _ from 'lodash'
import viewDetail from './viewDetail' import viewDetail from './viewDetail'
import financialRulesDetail from './financialRulesDetail' import financialRulesDetail from './financialRulesDetail'
import baseDialog from '@/components/baseDialog/baseDialog' // import baseDialog from '@/components/baseDialog/baseDialog'
import { getList, deleteMerchant, serviceGetMerchantList, addServiceMerchant, getPartnerByYq } from '@api/merchant' import { getList, deleteMerchant, serviceGetMerchantList, addServiceMerchant, getPartnerByYq } from '@api/merchant'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { BaseData, userTypeList, ghUserTypeList, merchantClassifyList } from '@/common/constants.js' import { BaseData, userTypeList, ghUserTypeList, merchantClassifyList } from '@/common/constants.js'
import relateStoreMerDialog from './components/relateStoreMerDialog' import relateStoreMerDialog from './components/relateStoreMerDialog'
import QRcodeDialog from './components/QRcodeDialog'
export default { export default {
name: 'merchantManage', name: 'merchantManage',
components: { components: {
viewDetail, viewDetail,
relateStoreMerDialog, relateStoreMerDialog,
financialRulesDetail, financialRulesDetail,
baseDialog QRcodeDialog
// divisionRule
}, },
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
financialRulesDetailVisible: false, financialRulesDetailVisible: false,
QRcodeDialog: false,
dialogConfig: { dialogConfig: {
setting: { setting: {
showClose: true, showClose: true,
...@@ -394,7 +398,11 @@ export default { ...@@ -394,7 +398,11 @@ export default {
} }
}) })
}, },
// 加微二维码
handleQrcode(row) {
this.viewDetailData = _.cloneDeep(row)
this.QRcodeDialog = true
},
// 关联导流方 // 关联导流方
handleMerchantChange(value) { handleMerchantChange(value) {
getPartnerByYq({ yqMerchantId: value }).then(res => { getPartnerByYq({ yqMerchantId: value }).then(res => {
......
...@@ -3,30 +3,57 @@ ...@@ -3,30 +3,57 @@
<d2-dialog title="收款二维码" <d2-dialog title="收款二维码"
:isVisible="qRcodeVisible" :isVisible="qRcodeVisible"
class="qRcodeDailog" class="qRcodeDailog"
width="40%" width="750px"
btnOkLabel="下载二维码" btnOkLabel="全部下载"
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm">
<div class="codeDiv" <div class="qrcon">
id="view"> <div class="wxcon">
<img style="width:100%;height:100%" <div class="codeDiv"
src="./images/code3.png"> id="wxview">
<!-- v-if="qrCodeURL" <div class="imgDiv"> --> <img style="width:100%;height:100%"
<img v-if="qrCodeURL" src="./images/code3.png">
class="qrImg" <!-- v-if="qrCodeURL" <div class="imgDiv"> -->
id="img1" <img v-if="qrCodeURL"
crossorigin="anonymous" class="qrImg"
:src="qrCodeURL"> id="img1"
<div v-if="!qrCodeURL" crossorigin="anonymous"
class="el-icon-loading loadingIcon"></div> :src="qrCodeURL">
<!-- </div> --> <div v-if="!qrCodeURL"
<div class="merchantNameDiv">{{info.yqMerchantName}}</div> class="el-icon-loading loadingIcon"></div>
<!-- </div> -->
<div class="merchantNameDiv">{{info.yqMerchantName}}</div>
</div>
<el-button style="marginTop:20px"
@click="takeScreenshot('wxview')">下载</el-button>
</div>
<div class="alicon">
<div class="codeDiv"
id="aliview">
<img style="width:100%;height:100%"
src="./images/alipay.png">
<!-- v-if="qrCodeURL" <div class="imgDiv"> -->
<img v-if="aliqrCodeURL"
class="qrImg"
id="img1"
crossorigin="anonymous"
:src="aliqrCodeURL">
<div v-if="!aliqrCodeURL"
class="el-icon-loading loadingIcon"></div>
<!-- </div> -->
<div class="merchantNameDiv">{{info.yqMerchantName}}</div>
</div>
<el-button style="marginTop:20px"
@click="takeScreenshot('aliview')">下载</el-button>
</div>
</div> </div>
</d2-dialog> </d2-dialog>
</template> </template>
<script> <script>
import { createWeappQrcode } from '@api/serviceManage' import { createWeappQrcode, alipayQrcode } from '@api/serviceManage'
import { baseConfig } from '@/main'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
export default { export default {
name: 'qRcodeDialog', name: 'qRcodeDialog',
...@@ -44,6 +71,7 @@ export default { ...@@ -44,6 +71,7 @@ export default {
merchantList: [] merchantList: []
}, },
qrCodeURL: '', qrCodeURL: '',
aliqrCodeURL: '',
defaultImg: require('./images/defaultImg.png') defaultImg: require('./images/defaultImg.png')
} }
}, },
...@@ -68,6 +96,7 @@ export default { ...@@ -68,6 +96,7 @@ export default {
mounted() { mounted() {
this.createQrcodeImage() this.createQrcodeImage()
this.alipayQrcode()
}, },
methods: { methods: {
...@@ -136,11 +165,11 @@ export default { ...@@ -136,11 +165,11 @@ export default {
}, },
// 下载保存图片 // 下载保存图片
takeScreenshot() { takeScreenshot(eleId) {
// const opts = { // const opts = {
// useCORS: true // useCORS: true
// } // }
html2canvas(document.getElementById('view'), { html2canvas(document.getElementById(eleId), {
backgroundColor: null, backgroundColor: null,
allowTaint: true, // 允许污染 allowTaint: true, // 允许污染
taintTest: true, // 在渲染前测试图片(没整明白有啥用) taintTest: true, // 在渲染前测试图片(没整明白有啥用)
...@@ -149,6 +178,7 @@ export default { ...@@ -149,6 +178,7 @@ export default {
this.convertCanvasToImg(canvas) this.convertCanvasToImg(canvas)
}) })
}, },
// 转换图片格式 // 转换图片格式
convertCanvasToImg(canvas) { convertCanvasToImg(canvas) {
// canvas base64 转 blob // canvas base64 转 blob
...@@ -181,17 +211,41 @@ export default { ...@@ -181,17 +211,41 @@ export default {
a.dispatchEvent(clickEvent) a.dispatchEvent(clickEvent)
}, },
handleAddConfirm() { alipayQrcode() {
this.takeScreenshot() // this
console.log(baseConfig.alipayPath)
const params = {
path: baseConfig.alipayPath,
yqMerchantId: this.info.yqMerchantId,
yqMerchantName: this.info.yqMerchantName
}
alipayQrcode(params).then((result) => {
console.log(result)
this.aliqrCodeURL = result
}).catch((err) => {
console.log(err)
})
}, },
handleAddConfirm() {
this.takeScreenshot('wxview')
setTimeout(() => {
this.takeScreenshot('aliview')
}, 2000)
// this.takeScreenshot()
},
// downloadImg(eleName) {
// this.takeScreenshot(eleName)
// // const fnName = name
// // this[fnName]()
// },
handleClose() { handleClose() {
this.$emit('dialogClose', true) this.$emit('dialogClose', true)
} }
} }
} }
</script> </script>
<style> <style >
.dateItem { .dateItem {
display: flex; display: flex;
} }
...@@ -199,6 +253,17 @@ export default { ...@@ -199,6 +253,17 @@ export default {
display: flex; display: flex;
margin-left: 0 !important; margin-left: 0 !important;
} }
.qrcon {
display: flex;
}
.wxcon,
.alicon {
text-align: center;
}
.wxcon {
margin-right: 20px;
}
.codeDiv { .codeDiv {
width: 345px; width: 345px;
height: 468px; height: 468px;
......
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
} }
}) })
}, },
// 收款二维码按钮
collectionQRcode(row) { collectionQRcode(row) {
this.recordInfo = row this.recordInfo = row
this.qRcodeVisible = !this.qRcodeVisible this.qRcodeVisible = !this.qRcodeVisible
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!