Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 50s
更新了前端构建产物包括JavaScript、CSS和HTML文件,主要涉及以下变更: 1. 新增了多个组件和工具函数,包括异常页面组件、iframe组件等 2. 更新了活动管理、产品管理、优惠券管理等业务模块 3. 优化了构建配置和依赖管理 4. 修复了一些样式和功能问题 5. 更新了测试相关文件 同时更新了部分后端服务接口和测试用例。这些变更主要是为了支持新功能和改进现有功能的用户体验。
2 lines
5.4 KiB
JavaScript
2 lines
5.4 KiB
JavaScript
var e=(e,t,a)=>new Promise((i,r)=>{var o=e=>{try{s(a.next(e))}catch(t){r(t)}},l=e=>{try{s(a.throw(e))}catch(t){r(t)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(o,l);s((a=a.apply(e,t)).next())});import{d as t,r as a,e as i,y as r,G as o,o as l,w as s,b as d,a as n,H as m,I as p,j as u,q as c,p as v,J as f,N as y,O as j,T as _}from"./index-BeZn6wgH.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{f as g}from"./product-BgjZetTQ.js";import{a as x,E as h}from"./index-Dn4yxdMr.js";import{E as k,a as b}from"./index-B43cMk6T.js";import{E as w}from"./index-rM5MDBEe.js";import{E as q}from"./index-BXzCnZ_d.js";import{E as P}from"./index-DfDWpFb3.js";import{_ as V}from"./_plugin-vue_export-helper-BCo6x5W8.js";import"./castArray-BakW2F2h.js";import"./_initCloneObject-BHiCRTfC.js";import"./index-CnhjG_Ys.js";import"./index-A3hG-0VQ.js";import"./index-DC47MImW.js";import"./index-s8Fl0Qzt.js";import"./token-DWNpOE8r.js";import"./debounce-C7sIggI-.js";import"./_baseIteratee-sVeOpCU9.js";import"./index-DZdoPtEQ.js";import"./index-DdvpTWQd.js";import"./use-dialog-D_t6_hoT.js";import"./refs-Cw5r5QN8.js";const I={class:"flex items-center justify-between"},C={class:"font-medium"},A={class:"text-sm text-gray-500"},E=V(t({__name:"grant-reward-dialog",props:{visible:{type:Boolean},playerId:{}},emits:["update:visible","submit"],setup(t,{emit:V}){const E=t,B=V,L=a(),U=a(!1),z=a(!1),M=i({product_id:void 0,quantity:1,activity_id:void 0,reward_id:void 0,remark:""}),F=a([]);a([]),a([]);const G=a([]),H={product_id:[{required:!0,message:"请选择商品",trigger:"change"}],quantity:[{required:!0,message:"请输入发放数量",trigger:"blur"},{type:"number",min:1,max:100,message:"发放数量必须在1-100之间",trigger:"blur"}]},J=t=>e(this,null,function*(){z.value=!0;try{const e=(yield g({name:t||void 0,status:1,page:1,page_size:50})).list.map(e=>({id:e.id,name:e.name,price:e.price,stock:e.stock||0}));F.value=e,0===e.length?_.info(t?"未找到相关商品":"暂无可用商品"):_.success(`成功加载 ${e.length} 个商品`)}catch(e){const a=[{id:1,name:"iPhone 15 Pro",stock:100,price:9999},{id:2,name:"MacBook Air",stock:50,price:8999},{id:3,name:"AirPods Pro",stock:200,price:1999},{id:4,name:"iPad Air",stock:80,price:4399},{id:5,name:"Apple Watch",stock:150,price:2999},{id:6,name:"iPhone 15",stock:120,price:7999},{id:7,name:"MacBook Pro",stock:30,price:15999},{id:8,name:"AirPods Max",stock:75,price:4399}],i=t?a.filter(e=>e.name.toLowerCase().includes(t.toLowerCase())):a;F.value=i,_.warning("商品数据加载失败,使用演示数据")}finally{z.value=!1}}),O=()=>e(this,null,function*(){if(E.playerId)try{G.value=[]}catch(e){}}),R=()=>e(this,null,function*(){L.value&&E.playerId&&(yield L.value.validate(t=>e(this,null,function*(){if(t){U.value=!0;try{const e={product_id:M.product_id,quantity:M.quantity,activity_id:M.activity_id||void 0,reward_id:M.reward_id||void 0,remark:M.remark};B("submit",e),$()}catch(e){_.error(e.message||"奖励发放失败")}finally{U.value=!1}}})))}),$=()=>{B("update:visible",!1)},D=()=>{var e;null==(e=L.value)||e.resetFields(),M.quantity=1,M.activity_id=void 0,M.reward_id=void 0,M.remark="",F.value=[]};return r(()=>E.playerId,e=>{e&&(O(),J(""))},{immediate:!0}),r(()=>E.visible,e=>{e&&0===F.value.length&&J("")}),(e,a)=>{const i=w,r=b,_=k,g=h,V=q,E=f,G=x,O=y,N=P;return l(),o(N,{title:"给用户发放奖励","model-value":t.visible,"onUpdate:modelValue":a[3]||(a[3]=e=>B("update:visible",e)),width:"600px","close-on-click-modal":!1,onClosed:D},{footer:s(()=>[d(O,{onClick:j($,["prevent"])},{default:s(()=>[...a[5]||(a[5]=[v("取消",-1)])]),_:1}),d(O,{type:"primary",loading:U.value,onClick:j(R,["prevent"])},{default:s(()=>[...a[6]||(a[6]=[v(" 确认发放 ",-1)])]),_:1},8,["loading"])]),default:s(()=>[d(G,{ref_key:"formRef",ref:L,model:M,rules:H,"label-width":"100px",class:"reward-form"},{default:s(()=>[d(g,{label:"选择商品",prop:"product_id"},{default:s(()=>[d(_,{modelValue:M.product_id,"onUpdate:modelValue":a[0]||(a[0]=e=>M.product_id=e),placeholder:"请选择要发放的商品",filterable:"",remote:"","remote-method":J,loading:z.value,style:{width:"100%"}},{default:s(()=>[(l(!0),n(m,null,p(F.value,e=>(l(),o(r,{key:e.id,label:e.name,value:e.id},{default:s(()=>[u("div",I,[u("div",null,[u("div",C,c(e.name),1),u("div",A,"¥"+c(e.price),1)]),d(i,{size:"small",type:e.stock>0?"success":"danger"},{default:s(()=>[v(" 库存: "+c(e.stock||0),1)]),_:2},1032,["type"])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),d(g,{label:"发放数量",prop:"quantity"},{default:s(()=>[d(V,{modelValue:M.quantity,"onUpdate:modelValue":a[1]||(a[1]=e=>M.quantity=e),min:1,max:100,"controls-position":"right",style:{width:"120px"}},null,8,["modelValue"]),a[4]||(a[4]=u("span",{class:"ml-2 text-sm text-gray-500"},"最多可发放100个",-1))]),_:1}),d(g,{label:"备注",prop:"remark"},{default:s(()=>[d(E,{modelValue:M.remark,"onUpdate:modelValue":a[2]||(a[2]=e=>M.remark=e),type:"textarea",rows:2,placeholder:"请输入发放备注(可选)",maxlength:"200","show-word-limit":""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}}),[["__scopeId","data-v-fca1fd3d"]]);export{E as default};
|