Commit 406b66c4 by 张立顺

错误提示修改

1 parent 17b0476d
# 开发调试流程 # 开发调试流程
本地开发需要联系运维给配置一个https地址映射到本地的某个开发地址 调试调试要在支付宝客户端可以在路由里面去除 本地开发需要联系运维给配置一个https地址映射到本地的某个开发地址 调试调试要在支付宝客户端可以在路由里面去除
https://zlsdev.glsx.com.cn/#/alipay
# 配置中心获取的对应环境的appid # 配置中心获取的对应环境的appid
开发环境 2021003146603701 开发环境 2021003146603701
......
...@@ -11,7 +11,7 @@ axios.defaults.withCredentials = true ...@@ -11,7 +11,7 @@ axios.defaults.withCredentials = true
// 创建一个错误 // 创建一个错误
export function errorCreate(msg) { export function errorCreate(msg) {
const error = new Error(msg) const error = new Error(msg)
errorLog(error) errorLog(msg)
throw error throw error
} }
// 记录和显示错误 // 记录和显示错误
...@@ -29,10 +29,11 @@ function errorLog(error) { ...@@ -29,10 +29,11 @@ function errorLog(error) {
log.danger('>>>>>> Error >>>>>>') log.danger('>>>>>> Error >>>>>>')
console.log(error) console.log(error)
} }
// console.log(error.message)
// 显示提示 // 显示提示
Notify({ Notify({
message: error.message, message: error,
type: 'error', type: 'danger',
duration: 5 * 1000 duration: 5 * 1000
}) })
} }
...@@ -115,6 +116,7 @@ service.interceptors.response.use( ...@@ -115,6 +116,7 @@ service.interceptors.response.use(
// solution: "将添加会话ID请求参数", // solution: "将添加会话ID请求参数",
// subErrors: null // subErrors: null
// } // }
const dataAxios = response.data const dataAxios = response.data
console.log('dataAxios', dataAxios) console.log('dataAxios', dataAxios)
const ruleResult = baseConfig.axios.result const ruleResult = baseConfig.axios.result
......
...@@ -39,7 +39,7 @@ import { ...@@ -39,7 +39,7 @@ import {
// Cascader, // Cascader,
// Checkbox, // Checkbox,
// CheckboxGroup, // CheckboxGroup,
// Notify, Notify,
// Icon, // Icon,
// Empty, // Empty,
// PullRefresh, // PullRefresh,
...@@ -52,7 +52,7 @@ import { ...@@ -52,7 +52,7 @@ import {
Toast Toast
} from 'vant' } from 'vant'
export const components = [ export const components = [
Toast Toast,
// Button, // Button,
// List, // List,
// Cell, // Cell,
...@@ -84,7 +84,7 @@ export const components = [ ...@@ -84,7 +84,7 @@ export const components = [
// Cascader, // Cascader,
// Checkbox, // Checkbox,
// CheckboxGroup, // CheckboxGroup,
// Notify, Notify
// Icon, // Icon,
// Empty, // Empty,
// PullRefresh, // PullRefresh,
......
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
}, },
// 隐藏键盘 // 隐藏键盘
handleHiddenKey() { handleHiddenKey() {
this.keyHidden = true // this.keyHidden = true
}, },
// 显示键盘 // 显示键盘
handleShowKey() { handleShowKey() {
...@@ -287,10 +287,16 @@ export default { ...@@ -287,10 +287,16 @@ export default {
duration: 0 duration: 0
}) })
createWxPayH5(params).then((result) => { createWxPayH5(params).then((result) => {
const { tradeNO } = JSON.parse(result.jsapiPayInfo) console.log(result, 'result')
this.tradeNO = tradeNO const { code, data, message } = result
console.log('tradeNO', tradeNO) if (code == 0) {
this.tradeNO && this.aliPayment() const { tradeNO } = JSON.parse(result.jsapiPayInfo)
this.tradeNO = tradeNO
console.log('tradeNO', tradeNO)
this.tradeNO && this.aliPayment()
} else {
this.$toast.fail(message || '支付失败')
}
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}).finally(() => { }).finally(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!