|
@@ -78,26 +78,28 @@ export default {
|
|
|
this.dataListLoading = true
|
|
|
this.$jsonp(api, {}).then((res) => {
|
|
|
if (res && Array.isArray(res.result)) {
|
|
|
- this.dataList = res.result.map(item => ({
|
|
|
- value: item[0],
|
|
|
- resource: resource
|
|
|
- }))
|
|
|
- this.funPayment(encodeURIComponent(api))
|
|
|
+ this.funPayment(res.result, resource)
|
|
|
+ } else {
|
|
|
+ this.$message.error('出错了,请联系客服')
|
|
|
}
|
|
|
this.dataListLoading = false
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
// 扣费接口
|
|
|
- funPayment (api = '') {
|
|
|
+ funPayment (result = [], resource = '') {
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/user/apicut'),
|
|
|
method: 'get',
|
|
|
params: this.$http.adornParams({
|
|
|
- path: api
|
|
|
+ path: 'tb/suggest'
|
|
|
})
|
|
|
}).then(({ data }) => {
|
|
|
if (data.status) {
|
|
|
+ this.dataList = result.map(item => ({
|
|
|
+ value: item[0],
|
|
|
+ resource: resource
|
|
|
+ }))
|
|
|
return
|
|
|
}
|
|
|
this.$message.error(data.msg)
|