|
|
@@ -94,53 +94,53 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import network from '@/utils/network'
|
|
|
- export default {
|
|
|
- name: 'config_transfer',
|
|
|
- mounted() {
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- form: {
|
|
|
- transferOpen: true,
|
|
|
- allowWallet: [],
|
|
|
- },
|
|
|
- loading: true,
|
|
|
- submitButtonStat: false,
|
|
|
- allWallet:{'bonus':'会员账户','cash':'现金钱包'}
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getWalletName(type){
|
|
|
- return this.allWallet[type]
|
|
|
- },
|
|
|
- onSubmit() {
|
|
|
- this.submitButtonStat = true
|
|
|
- network.postData('config/transfer', {
|
|
|
- transferOpen: this.form.transferOpen,
|
|
|
- allowWallet: this.form.allowWallet,
|
|
|
- }).then(response => {
|
|
|
- this.$message({
|
|
|
- message: response,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.submitButtonStat = false
|
|
|
- this.getData()
|
|
|
- }).catch(response => {
|
|
|
- this.submitButtonStat = false
|
|
|
- this.getData()
|
|
|
- })
|
|
|
+import network from '@/utils/network'
|
|
|
+export default {
|
|
|
+ name: 'config_transfer',
|
|
|
+ mounted () {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ transferOpen: true,
|
|
|
+ allowWallet: []
|
|
|
},
|
|
|
- getData() {
|
|
|
- network.getData('config/transfer').then(response => {
|
|
|
- this.form.transferOpen = response.transferOpen.VALUE
|
|
|
- this.form.allowWallet = response.allowWallet.VALUE
|
|
|
- this.loading = false
|
|
|
+ loading: true,
|
|
|
+ submitButtonStat: false,
|
|
|
+ allWallet: {'bonus': 'Bonus', 'cash': 'Ecoin'}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getWalletName (type) {
|
|
|
+ return this.allWallet[type]
|
|
|
+ },
|
|
|
+ onSubmit () {
|
|
|
+ this.submitButtonStat = true
|
|
|
+ network.postData('config/transfer', {
|
|
|
+ transferOpen: this.form.transferOpen,
|
|
|
+ allowWallet: this.form.allowWallet
|
|
|
+ }).then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: response,
|
|
|
+ type: 'success'
|
|
|
})
|
|
|
- }
|
|
|
+ this.submitButtonStat = false
|
|
|
+ this.getData()
|
|
|
+ }).catch(response => {
|
|
|
+ this.submitButtonStat = false
|
|
|
+ this.getData()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getData () {
|
|
|
+ network.getData('config/transfer').then(response => {
|
|
|
+ this.form.transferOpen = response.transferOpen.VALUE
|
|
|
+ this.form.allowWallet = response.allowWallet.VALUE
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|