修改样式
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { getRechargeDetail } from "../../service/recharge";
|
||||
import { alertError, alertInfo, loadingFunc } from "../../utils/index";
|
||||
import { getRechargeOperateType, getRechargeOperateWay } from "../../utils/data";
|
||||
import request from "../../utils/request"
|
||||
const { OK } = request
|
||||
@@ -17,10 +18,16 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
const { id } = options;
|
||||
this.init(id)
|
||||
loadingFunc(async () => {
|
||||
await this.init(id)
|
||||
})
|
||||
},
|
||||
async init(id) {
|
||||
const { code, message, data } = await getRechargeDetail(id)
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
detail: { ...data, way: getRechargeOperateWay(data.way), type: getRechargeOperateType(data.type) }
|
||||
})
|
||||
|
Reference in New Issue
Block a user