Browse Source

yshop1.6.3新增微信退款及其模板消息,后台新增支付证书配置,修复手机端管理端拒绝退款bug

master
hupeng 5 years ago
parent
commit
48fa7adea6
  1. 71
      src/components/file-upload/index.vue
  2. 12
      src/views/wechat/config/pay.vue

71
src/components/file-upload/index.vue

@ -0,0 +1,71 @@
<template>
<div>
<el-upload
:action="fileUploadApi"
:headers="headers"
:on-remove="handleRemove"
:on-success="handleUploadSuccess"
:before-remove="beforeRemove"
:file-list="fileList"
multiple
:limit="1"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</template>
<script>
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
export default {
data () {
return {
resourcesUrl: '',
headers: {
'Authorization': 'Bearer ' + getToken()
}
}
},
props: {
value: {
default: '',
type: String
}
},
computed: {
...mapGetters([
'fileUploadApi'
]),
fileList () {
let res = []
if (this.value) {
// let fileArray = this.value.split(',')
// for (let i = 0; i < fileArray.length; i++) {
// res.push({name: fileArray[i], url: this.resourcesUrl + fileArray[i], response: fileArray[i]})
// }
console.log("aaa"+this.value)
res.push({name: this.value, url: this.resourcesUrl + this.value, response: this.value})
}
this.$emit('input', this.value)
console.log("res"+res)
return res
}
},
methods: {
//
handleUploadSuccess (response, file, fileList) {
this.$emit('input', file.response.data[0])
},
handleRemove (file, fileList) {
this.$emit('change', file)
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
}
}
}
</script>
<style lang="scss">
</style>

12
src/views/wechat/config/pay.vue

@ -10,13 +10,14 @@
<el-form-item label="商户密钥" >
<el-input v-model="form.wxpay_mchKey" style="width: 370px;" type="password" />
</el-form-item>
<el-form-item label="微信证书" >
<file-upload v-model="form.wxpay_keyPath" style="width: 500px;"/>
</el-form-item>
<el-form-item label="" >
<el-button type="primary" @click="doSubmit">提交</el-button>
</el-form-item>
</el-form>
</div>
</template>
@ -25,10 +26,10 @@ import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del, add, get } from '@/api/yxSystemConfig'
import eForm from './form'
import picUpload from '@/components/pic-upload'
import fileUpload from '@/components/file-upload'
import { Message } from 'element-ui'
export default {
components: { eForm, picUpload },
components: { eForm, fileUpload },
mixins: [initData],
data() {
return {
@ -36,7 +37,8 @@ export default {
form: {
wxpay_appId: '',
wxpay_mchId: '',
wxpay_mchKey: ''
wxpay_mchKey: '',
wxpay_keyPath: ''
},
rules: {
}

Loading…
Cancel
Save