chunk-64592a79.9e3471a8.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-64592a79"],{1148:function(e,t,r){"use strict";var i=r("a691"),a=r("1d80");e.exports="".repeat||function(e){var t=String(a(this)),r="",o=i(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},"408a":function(e,t,r){var i=r("c6b6");e.exports=function(e){if("number"!=typeof e&&"Number"!=i(e))throw TypeError("Incorrect invocation");return+e}},"68ed":function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ele-body"},[r("el-card",{attrs:{shadow:"never"}},[r("el-row",{attrs:{gutter:15}},[r("el-col",{attrs:{md:18,sm:16}},[r("el-button-group",{staticClass:"el-types"},[r("el-button",{attrs:{type:1==e.table.where.type?"primary":"default"},on:{click:function(t){(e.table.where.type=1)&&e.$refs.table.reload()}}},[e._v("购买 ")]),r("el-button",{attrs:{type:2==e.table.where.type?"primary":"default"},on:{click:function(t){(e.table.where.type=2)&&e.$refs.table.reload()}}},[e._v("出售 ")])],1)],1)],1),r("ele-data-table",{ref:"table",attrs:{config:e.table,choose:e.choose,height:"calc(100vh - 315px)","highlight-current-row":""},on:{"update:choose":function(t){e.choose=t}},scopedSlots:e._u([{key:"default",fn:function(t){t.index;return[r("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),r("el-table-column",{attrs:{prop:"username_hidden",label:"交易员","show-overflow-tooltip":"","min-width":"150"}}),r("el-table-column",{attrs:{prop:"type",label:"广告类型","show-overflow-tooltip":"","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[1==i.type?r("span",[e._v("购买广告")]):2==i.type?r("span",[e._v("出售广告")]):e._e()]}}],null,!0)}),r("el-table-column",{attrs:{prop:"coin_type",label:"币种","show-overflow-tooltip":"","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[1==i.coin_type?r("span",[e._v("USDT")]):e._e()]}}],null,!0)}),r("el-table-column",{attrs:{prop:"limit",label:"单笔限额(USDT)","show-overflow-tooltip":"","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[r("span",[e._v(e._s(i.limit_mix>0?i.limit_mix:0)+"~"+e._s(i.limit_max))])]}}],null,!0)}),r("el-table-column",{attrs:{prop:"real_price",label:"价格(CNY)","show-overflow-tooltip":"","min-width":"150"}}),r("el-table-column",{attrs:{prop:"pay_type",label:"付款方式","show-overflow-tooltip":"","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[e._l(i.pay_type,(function(t,i){return[1==t?r("span",{staticClass:"ele-text-warning",staticStyle:{"margin-right":"10px","border-radius":"2px",padding:"2px","background-color":"#fde3cf"}},[e._v("银行卡")]):e._e(),2==t?r("span",{staticClass:"ele-text-success",staticStyle:{"margin-right":"10px","border-radius":"2px",padding:"2px","background-color":"#5cd6ad"}},[e._v("微信")]):e._e(),3==t?r("span",{staticClass:"ele-text-primary",staticStyle:{"border-radius":"2px",padding:"2px","background-color":"#a0cfff"}},[e._v("支付宝")]):e._e()]}))]}}],null,!0)}),r("el-table-column",{attrs:{prop:"status",label:"状态",sortable:"custom",resizable:!1,"min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[0==i.status?r("span",{staticClass:"ele-text-success"},[e._v("待审核")]):1==i.status?r("span",{staticClass:"ele-text-success"},[e._v("已发布")]):r("span",{staticClass:"ele-text-danger"},[e._v("已下架")])]}}],null,!0)}),r("el-table-column",{attrs:{label:"有效期",sortable:"custom","show-overflow-tooltip":"","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s(r.expired_at))]}}],null,!0)}),r("el-table-column",{attrs:{label:"发布时间",sortable:"custom","show-overflow-tooltip":"","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s(r.create_time_text))]}}],null,!0)}),r("el-table-column",{attrs:{label:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(e){e.row}}],null,!0)})]}}])})],1),r("el-dialog",{attrs:{title:"发布挂单广告",visible:e.showEdit,width:"600px","destroy-on-close":!0,"custom-class":"ele-dialog-form","lock-scroll":!1},on:{"update:visible":function(t){e.showEdit=t},closed:function(t){e.editForm={type:1,price_type:1,price:0,coin_type:"1"}}}},[r("el-form",{ref:"editForm",attrs:{model:e.editForm,rules:e.editRules,"label-width":"100px"}},[r("el-row",{attrs:{gutter:15}},[r("el-col",{attrs:{sm:24}},[r("div",{staticClass:"head",staticStyle:{"margin-bottom":"15px"}},[r("el-button-group",{staticClass:"el-types"},[r("el-button",{attrs:{type:1==e.editForm.type?"primary":"default"},on:{click:function(t){e.editForm.type=1}}},[e._v("购买广告 ")]),r("el-button",{attrs:{type:2==e.editForm.type?"primary":"default"},on:{click:function(t){e.editForm.type=2}}},[e._v("出售广告 ")])],1)],1),r("el-col",{attrs:{sm:12}},[r("el-form-item",{attrs:{label:"币种:",prop:"coin_type"}},[r("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择"},model:{value:e.editForm.coin_type,callback:function(t){e.$set(e.editForm,"coin_type",t)},expression:"editForm.coin_type"}},[r("el-option",{attrs:{label:"USDT",value:"1"}})],1)],1)],1),r("el-col",{attrs:{sm:24}},[r("el-form-item",{attrs:{label:"单日限额:",prop:"limit"}},[r("el-col",{attrs:{sm:12}},[r("el-input",{attrs:{placeholder:"最小限额"},model:{value:e.editForm.limit_min,callback:function(t){e.$set(e.editForm,"limit_min",t)},expression:"editForm.limit_min"}},[r("template",{slot:"append"},[e._v("USDT")])],2)],1),r("el-col",{attrs:{sm:12}},[r("el-input",{attrs:{placeholder:"最大限额"},model:{value:e.editForm.limit_max,callback:function(t){e.$set(e.editForm,"limit_max",t)},expression:"editForm.limit_max"}},[r("template",{slot:"append"},[e._v("USDT")])],2)],1)],1)],1),r("el-col",{attrs:{sm:16}},[r("el-form-item",{attrs:{label:"报价类型:",prop:"price_type"}},[r("el-radio-group",{model:{value:e.editForm.price_type,callback:function(t){e.$set(e.editForm,"price_type",t)},expression:"editForm.price_type"}},[r("el-radio",{attrs:{label:1}},[e._v("固定价格")]),r("el-radio",{attrs:{label:2}},[e._v("浮动价格")])],1)],1),r("el-form-item",{attrs:{label:"单价(CNY):",prop:"price"}},[1==e.editForm.price_type?r("el-input-number",{attrs:{precision:2,min:0,step:.1,max:100},model:{value:e.editForm.price,callback:function(t){e.$set(e.editForm,"price",t)},expression:"editForm.price"}}):r("el-input-number",{attrs:{precision:2,step:.1,min:-100,max:100},model:{value:e.editForm.price,callback:function(t){e.$set(e.editForm,"price",t)},expression:"editForm.price"}}),r("div",{staticClass:"tip"},[1==e.editForm.type?r("span",[e._v("市场价:¥"+e._s(e.trade.usdt_buy_price))]):2==e.editForm.type?r("span",[e._v("市场价:¥"+e._s(e.trade.usdt_sell_price))]):e._e(),1==e.editForm.price_type?r("span",{staticClass:"price",staticStyle:{"margin-left":"20px"}},[e._v("当前单价:"+e._s("¥"+e.countPrice()))]):2==e.editForm.price_type?r("span",{staticClass:"price",staticStyle:{"margin-left":"20px"}},[e._v("浮动单价:"+e._s("¥"+e.countPrice()))]):e._e()])],1),r("el-form-item",{attrs:{label:"截止日期:",prop:"expired_at"}},[r("el-date-picker",{attrs:{type:"date",placeholder:"选择截止日期",size:"small","value-format":"yyyy-MM-dd",format:"yyyy-MM-dd"},model:{value:e.editForm.expired_at,callback:function(t){e.$set(e.editForm,"expired_at",t)},expression:"editForm.expired_at"}})],1),r("el-form-item",{attrs:{label:"收款方式:",prop:"pay_type"}},[r("el-select",{attrs:{multiple:"",placeholder:"请选择收款方式"},model:{value:e.editForm.pay_type,callback:function(t){e.$set(e.editForm,"pay_type",t)},expression:"editForm.pay_type"}},[r("el-option",{attrs:{label:"银行卡",value:"1"}}),r("el-option",{attrs:{label:"微信",value:"2"}}),r("el-option",{attrs:{label:"支付宝",value:"3"}})],1)],1),r("el-form-item",{attrs:{label:"其他要求:",prop:"remark"}},[r("el-input",{attrs:{placeholder:"其他要求",maxlength:"150"},model:{value:e.editForm.remark,callback:function(t){e.$set(e.editForm,"remark",t)},expression:"editForm.remark"}})],1),r("el-form-item",{attrs:{label:"交易密码:",prop:"trade_password"}},[r("el-input",{attrs:{type:"password",placeholder:"交易密码",maxlength:"50"},model:{value:e.editForm.trade_password,callback:function(t){e.$set(e.editForm,"trade_password",t)},expression:"editForm.trade_password"}})],1)],1)],1)],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.showEdit=!1}}},[e._v("取消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("确定提交")])],1)],1)],1)},a=[],o=(r("d81d"),r("b680"),r("5530")),s=r("2f62"),l={name:"SysNotice",components:{},data:function(){var e=this,t=function(t,r,i){e.editForm.limit_min<0?i(new Error("请输入最小限额")):e.editForm.limit_max<0||e.editForm.limit_max<=e.editForm.limit_min?i(new Error("请输入有效的最大限额")):i()};return{table:{url:"/advert/index",where:{type:1},page:{limit:30}},choose:[],times:{advert:null,buy:null,sell:null},trade:{usdt_buy_price:0,usdt_sell_price:0},setting:{advert_online:!0,buy_online:!0,sell_online:!0,advert_online_time:0,advert_online_time_text:"00:00:00",buy_online_time:0,buy_online_time_text:"00:00:00",sell_online_time:0,sell_online_time_text:"00:00:00"},timer:{buy:null,sell:null},showEdit:!1,editForm:{type:1,price_type:1,price:0,coin_type:"1",status:1},editRules:{coin_type:[{required:!0,message:"请选择币种",trigger:"blur"}],pay_type:[{required:!0,message:"请选择付款方式",trigger:"blur"}],limit:[{validator:t,trigger:"blur"}],price_type:[{required:!0,message:"请选择价格类型",trigger:"blur"}],price:[{required:!0,message:"请输入价格",trigger:"blur"}],expired_at:[{required:!0,message:"请选择截止日期",trigger:"blur"}],trade_password:[{required:!0,message:"请输入交易密码",trigger:"blur"}]}}},computed:Object(o["a"])({},Object(s["b"])(["permission"])),mounted:function(){},methods:{countPrice:function(){var e=this.editForm.type,t=this.editForm.price_type;if(1==e){var r="undefined"!=typeof this.editForm.price&&""!=this.editForm.price?parseFloat(this.editForm.price):0;return 1==t?r:(parseFloat(this.trade.usdt_buy_price)+r).toFixed(2)}var i="undefined"!=typeof this.editForm.price&&""!=this.editForm.price?parseFloat(this.editForm.price):0;return 1==t?i:(parseFloat(this.trade.usdt_sell_price)+i).toFixed(2)},timeLock:function(){var e=this;clearInterval(this.times.advert),this.setting.advert_online_time>0&&(this.times.advert=setInterval((function(){e.setting.advert_online_time<=0&&(e.setting.advert_online_time_text="00:00:00",e.setting.advert_online=!1,e.settingSubmit({advert_online:!1}),clearInterval(e.times.advert)),e.setting.advert_online_time--;var t=parseInt(e.setting.advert_online_time/3600),r=parseInt(e.setting.advert_online_time%3600/60),i=parseInt(e.setting.advert_online_time%3600%60);e.setting.advert_online_time_text=(t<10?"0"+t:t)+":"+(r<10?"0"+r:r)+":"+(i<10?"0"+i:i)}),1e3))},changeAdvert:function(e){this.settingSubmit({advert_online:e})},settingSubmit:function(e){var t=this;this.$message.closeAll();var r=this.$loading({lock:!0});this.$http.post("/setting/save",e).then((function(e){r.close(),0===e.data.code?(t.getData(),t.$message.success(e.data.msg)):t.$message.error(e.data.msg)})).catch((function(e){r.close(),t.$message.error(e.message)}))},edit:function(e){this.editForm=Object.assign({},e),this.showEdit=!0},save:function(){var e=this;this.$refs["editForm"].validate((function(t){if(!t)return!1;var r=e.$loading({lock:!0});e.$http.post("/advert/edit",e.editForm).then((function(t){r.close(),0===t.data.code?(e.showEdit=!1,e.$message({type:"success",message:t.data.msg}),e.$refs.table.reload()):e.$message.error(t.data.msg)})).catch((function(t){r.close(),e.$message.error(t.message)}))}))},remove:function(e){var t=this;if(e){var r=this.$loading({lock:!0});this.$http.post("/notice/delete",{id:e.id}).then((function(e){r.close(),0===e.data.code?(t.$message({type:"success",message:e.data.msg}),t.$refs.table.reload()):t.$message.error(e.data.msg)})).catch((function(e){r.close(),t.$message.error(e.message)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var i=this.choose.map((function(e){return e.id}));this.$confirm("确定要删除选中的广告吗?","提示",{type:"warning"}).then((function(){var e=t.$loading({lock:!0});t.$http.post("/notice/delete",{id:i}).then((function(r){e.close(),0===r.data.code?(t.$message({type:"success",message:r.data.msg}),t.$refs.table.reload()):t.$message.error(r.data.msg)})).catch((function(r){e.close(),t.$message.error(r.message)}))})).catch((function(){return 0}))}},editStatus:function(e){var t=this;this.$confirm("确定下架该广告?谨慎操作","提示",{type:"warning"}).then((function(){var r=t.$loading({lock:!0}),i=Object.assign({},e);t.$http.post("/advert/status",{id:i.id,status:1==i.status?2:1}).then((function(i){r.close(),0===i.data.code?t.$message({type:"success",message:i.data.msg}):(e.status=e.status?1:2,t.$message.error(i.data.msg))})).catch((function(e){r.close(),t.$message.error(e.message)}))}))}}},n=l,c=(r("f5cd"),r("2877")),d=Object(c["a"])(n,i,a,!1,null,"089867f7",null);t["default"]=d.exports},a19f:function(e,t,r){},b680:function(e,t,r){"use strict";var i=r("23e7"),a=r("a691"),o=r("408a"),s=r("1148"),l=r("d039"),n=1..toFixed,c=Math.floor,d=function(e,t,r){return 0===t?r:t%2===1?d(e,t-1,r*e):d(e*e,t/2,r)},p=function(e){var t=0,r=e;while(r>=4096)t+=12,r/=4096;while(r>=2)t+=1,r/=2;return t},u=n&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!l((function(){n.call({})}));i({target:"Number",proto:!0,forced:u},{toFixed:function(e){var t,r,i,l,n=o(this),u=a(e),m=[0,0,0,0,0,0],f="",_="0",h=function(e,t){var r=-1,i=t;while(++r<6)i+=e*m[r],m[r]=i%1e7,i=c(i/1e7)},g=function(e){var t=6,r=0;while(--t>=0)r+=m[t],m[t]=c(r/e),r=r%e*1e7},v=function(){var e=6,t="";while(--e>=0)if(""!==t||0===e||0!==m[e]){var r=String(m[e]);t=""===t?r:t+s.call("0",7-r.length)+r}return t};if(u<0||u>20)throw RangeError("Incorrect fraction digits");if(n!=n)return"NaN";if(n<=-1e21||n>=1e21)return String(n);if(n<0&&(f="-",n=-n),n>1e-21)if(t=p(n*d(2,69,1))-69,r=t<0?n*d(2,-t,1):n/d(2,t,1),r*=4503599627370496,t=52-t,t>0){h(0,r),i=u;while(i>=7)h(1e7,0),i-=7;h(d(10,i,1),0),i=t-1;while(i>=23)g(1<<23),i-=23;g(1<<i),h(1,1),g(2),_=v()}else h(0,r),h(1<<-t,0),_=v()+s.call("0",u);return u>0?(l=_.length,_=f+(l<=u?"0."+s.call("0",u-l)+_:_.slice(0,l-u)+"."+_.slice(l-u))):_=f+_,_}})},f5cd:function(e,t,r){"use strict";r("a19f")}}]);