//pages/type/type.js
Page({/**
* 页面的初始数据*/data: {
types:""},
editType: function (e) {var typeId = e.currentTarget.dataset['id'];
console.log("edit:"+typeId);
wx.navigateTo({
url:'../type_edit/type_edit?typeId=' +typeId
})
},
delType:function(e){var typeId = e.currentTarget.dataset['id'];
console.log("delete:"+typeId)
wx.showModal({
title:'提示',
content:'确认要删除该支出类型?',
success: function (res) {if(res.confirm) {
console.log('用户点击确定')
wx.request({
url: getApp().globalData.urlPath+ "spendingType/delete",
method:"POST",
data: {
typeId: typeId
},
header: {"Content-Type": "application