import initCtx from "@/utils/ctx.js";

export default function () {
	const {utils} = initCtx(this)

	this.deleteUserPlan = function (userPlanId) {
		utils.confirm("确定要删除此套餐吗？", function () {
			this.$post(".delete")
				.params({
					userPlanId: userPlanId
				})
				.refresh()
		})
	}

	this.renewUserPlan = function (userPlanId) {
		utils.popupSuccess(".renewPopup?userPlanId=" + userPlanId)
	}
}