pnkx-admin-mongo/pnkx-app-apk/unpackage/cache/wgt/H5A8E5E14/static/js/chunk-0bd0d237.a2cac4f4.js
2024-01-13 13:29:20 +08:00

1 line
3.4 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0bd0d237"],{"1fef":function(t,r,e){"use strict";e("680e")},"680e":function(t,r,e){},"72c9":function(t,r,e){"use strict";e.d(r,"d",(function(){return a})),e.d(r,"b",(function(){return s})),e.d(r,"f",(function(){return c})),e.d(r,"a",(function(){return i})),e.d(r,"e",(function(){return o})),e.d(r,"c",(function(){return u}));var n=e("b775");function a(t){return Object(n["a"])({url:"/px/card/listRecord",method:"get",params:t})}function s(){return Object(n["a"])({url:"/px/card/getCardByUserId",method:"get"})}function c(t){return Object(n["a"])({url:"/px/card/useCard",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/px/card/confirmCard",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/px/card/scoreCard",method:"post",data:t})}function u(){return Object(n["a"])({url:"/px/card/getToDoCard",method:"get"})}},eef7:function(t,r,e){"use strict";e.r(r);var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",{staticClass:"card"},[e("van-nav-bar",{attrs:{fixed:"","left-arrow":"","left-text":"返回","right-text":"使用记录",title:"情侣卡券"},on:{"click-left":function(r){return t.$router.go(-1)},"click-right":function(r){return t.$router.push("/history")}}}),e("div",{staticClass:"card-list"},t._l(t.cardList,(function(r){return e("van-row",{key:r.cardId,staticClass:"card-item"},[e("van-col",{staticClass:"card-image",attrs:{span:8}},[e("van-image",{attrs:{width:"5rem",height:"5rem",src:r.thumbnail||r.logo}})],1),e("van-col",{staticClass:"card-content",attrs:{span:11}},[e("van-row",{staticClass:"card-title"},[t._v(t._s(r.title))]),e("van-row",{staticClass:"card-desc"},[t._v(t._s(r.describe))])],1),e("van-col",{staticClass:"card-operation",attrs:{span:5}},[e("van-row",{staticClass:"card-use",on:{click:function(e){return t.showUseCard(r)}}},[t._v(" 使用卡券 ")]),e("van-row",{staticClass:"card-count"},[t._v(" 数量:"+t._s(r.cardNumber)+" ")])],1)],1)})),1),e("van-dialog",{attrs:{title:"提示",showConfirmButton:!1},on:{confirm:t.useCard,close:t.closeUse},model:{value:t.showUse,callback:function(r){t.showUse=r},expression:"showUse"}},[e("van-row",{staticClass:"use-hint"},[t._v("确认使用"+t._s(t.card.cardName)+"吗?")]),e("van-form",{ref:"useForm"},[e("van-field",{attrs:{name:"requirements",placeholder:"请输入您的要求",rules:[{required:!0}]},model:{value:t.requirements,callback:function(r){t.requirements=r},expression:"requirements"}})],1),e("van-row",{staticClass:"use-button"},[e("van-button",{attrs:{type:"plain"},on:{click:function(r){t.showUse=!1}}},[t._v("取消")]),e("van-button",{attrs:{type:"primary",color:"#5A8DEEFF"},on:{click:t.useCard}},[t._v("确定")])],1)],1)],1)},a=[],s=e("72c9"),c={name:"index",data:function(){return{cardList:[],showUse:!1,card:{},requirements:""}},mounted:function(){this.getCardList()},methods:{getCardList:function(){var t=this;Object(s["b"])().then((function(r){t.cardList=r.data}))},showUseCard:function(t){this.showUse=!0,this.card=t},useCard:function(){var t=this;this.$refs.useForm.validate().then((function(){var r={cardId:t.card.cardId,instructions:t.requirements};Object(s["f"])(r).then((function(r){t.getCardList(),t.showUse=!1}))})).catch((function(){}))},closeUse:function(){this.$refs.useForm.resetValidation("requirements")}}},i=c,o=(e("1fef"),e("2877")),u=Object(o["a"])(i,n,a,!1,null,"1942c180",null);r["default"]=u.exports}}]);