| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a33ca29e"],{"0f49":function(t,e,r){},1148:function(t,e,r){"use strict";var n=r("a691"),a=r("1d80");t.exports="".repeat||function(t){var e=String(a(this)),r="",o=n(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(r+=e);return r}},"408a":function(t,e,r){var n=r("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=n(t))throw TypeError("Incorrect invocation");return+t}},6776:function(t,e,r){"use strict";r("0f49")},b680:function(t,e,r){"use strict";var n=r("23e7"),a=r("a691"),o=r("408a"),i=r("1148"),s=r("d039"),l=1..toFixed,u=Math.floor,c=function(t,e,r){return 0===e?r:e%2===1?c(t,e-1,r*t):c(t*t,e/2,r)},m=function(t){var e=0,r=t;while(r>=4096)e+=12,r/=4096;while(r>=2)e+=1,r/=2;return e},d=l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}));n({target:"Number",proto:!0,forced:d},{toFixed:function(t){var e,r,n,s,l=o(this),d=a(t),p=[0,0,0,0,0,0],f="",b="0",_=function(t,e){var r=-1,n=e;while(++r<6)n+=t*p[r],p[r]=n%1e7,n=u(n/1e7)},h=function(t){var e=6,r=0;while(--e>=0)r+=p[e],p[e]=u(r/t),r=r%t*1e7},g=function(){var t=6,e="";while(--t>=0)if(""!==e||0===t||0!==p[t]){var r=String(p[t]);e=""===e?r:e+i.call("0",7-r.length)+r}return e};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(f="-",l=-l),l>1e-21)if(e=m(l*c(2,69,1))-69,r=e<0?l*c(2,-e,1):l/c(2,e,1),r*=4503599627370496,e=52-e,e>0){_(0,r),n=d;while(n>=7)_(1e7,0),n-=7;_(c(10,n,1),0),n=e-1;while(n>=23)h(1<<23),n-=23;h(1<<n),_(1,1),h(2),b=g()}else _(0,r),_(1<<-e,0),b=g()+i.call("0",d);return d>0?(s=b.length,b=f+(s<=d?"0."+i.call("0",d-s)+b:b.slice(0,s-d)+"."+b.slice(s-d))):b=f+b,b}})},eb6d:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;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:2==t.table.where.type?"primary":"default"},on:{click:function(e){(t.table.where.type=2)&&t.$refs.table.reload()}}},[t._v("购买广告 ")]),r("el-button",{attrs:{type:1==t.table.where.type?"primary":"default"},on:{click:function(e){(t.table.where.type=1)&&t.$refs.table.reload()}}},[t._v("出售广告 ")])],1),r("div",{staticStyle:{"margin-bottom":"10px"}})],1)],1),r("ele-data-table",{ref:"table",attrs:{config:t.table,choose:t.choose,height:"calc(100vh - 315px)","highlight-current-row":""},on:{"update:choose":function(e){t.choose=e}},scopedSlots:t._u([{key:"default",fn:function(e){e.index;return[r("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),r("el-table-column",{attrs:{label:"发布用户","min-width":"60",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("el-avatar",{class:"color"+n.logo_index,attrs:{shape:"circle",size:35}},[t._v(" "+t._s(t.substr(n.realname?n.realname:n.username,1))+" ")]),r("p",[t._v(t._s(n.username))])]}}],null,!0)}),r("el-table-column",{attrs:{prop:"limit",label:"单笔限额(USDT)","show-overflow-tooltip":"","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("span",[t._v("¥"+t._s(n.limit_mix>0?n.limit_mix:0)+"~"+t._s(n.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:t._u([{key:"default",fn:function(e){var n=e.row;return[t._l(n.pay_type,(function(e,n){return[1==e?r("span",{staticClass:"ele-text-warning",staticStyle:{"margin-right":"10px","border-radius":"2px",padding:"2px","background-color":"#fde3cf"}},[t._v("银行卡")]):t._e(),2==e?r("span",{staticClass:"ele-text-success",staticStyle:{"margin-right":"10px","border-radius":"2px",padding:"2px","background-color":"#5cd6ad"}},[t._v("微信")]):t._e(),3==e?r("span",{staticClass:"ele-text-primary",staticStyle:{"border-radius":"2px",padding:"2px","background-color":"#a0cfff"}},[t._v("支付宝")]):t._e()]}))]}}],null,!0)}),r("el-table-column",{attrs:{label:"有效期",sortable:"custom","show-overflow-tooltip":"","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v(t._s(r.expired_text))]}}],null,!0)}),r("el-table-column",{attrs:{label:"",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[2==t.table.where.type?r("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",size:"small",icon:"el-icon-shopping-cart-2"},on:{click:function(e){return t.showBuy(n)}}},[t._v("购买 USDT ")]):r("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",size:"small",icon:"el-icon-shopping-cart-2"},on:{click:function(e){return t.showBuy(n)}}},[t._v("出售 USDT ")])]}}],null,!0)})]}}])})],1),r("el-dialog",{attrs:{title:"购买确定",visible:t.showBuyEdit,width:"600px","destroy-on-close":!0,"custom-class":"ele-dialog-form","lock-scroll":!1},on:{"update:visible":function(e){t.showBuyEdit=e},closed:function(e){t.buyForm={}}}},[r("el-form",{ref:"editForm",attrs:{model:t.buyForm,rules:t.editRules,"label-width":"82px"}},[r("el-row",{attrs:{gutter:15}},[r("el-col",{attrs:{sm:16}},[r("el-form-item",{attrs:{label:"发布用户:",prop:"username"}},[r("span",[t._v(t._s(t.buyForm.username))])]),r("el-form-item",{attrs:{label:"单笔限额:",prop:"limit"}},[r("span",[t._v("¥"+t._s(t.buyForm.limit_mix?t.buyForm.limit_mix:0)+"~"+t._s(t.buyForm.limit_max))])]),r("el-form-item",{attrs:{label:"单价:",prop:"price"}},[r("span",[t._v(t._s(t.buyForm.real_price)+" CNY")])]),r("el-col",{attrs:{sm:12}},[1==t.buyForm.type?r("el-form-item",{attrs:{label:"收款方式:",prop:"payment_id"}},[r("el-select",{staticClass:"ele-fluid reassign",attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入关键词","remote-method":t.getPayment,loading:t.loading},model:{value:t.buyForm.payment_id,callback:function(e){t.$set(t.buyForm,"payment_id",e)},expression:"buyForm.payment_id"}},t._l(t.payments,(function(e,n){return r("el-option",{key:n,attrs:{label:e.username,value:e.id}},[r("span",{staticClass:"label",attrs:{title:"ID:"+e.id+", USDT:"+e.usdt_num}},[t._v(t._s(e.username))]),r("span",{staticClass:"credit"},[t._v("信誉:"+t._s(e.credit)+"分")])])})),1)],1):t._e(),r("el-form-item",{attrs:{label:"交易数量:",prop:"num"}},[r("el-input",{attrs:{placeholder:"请输入您要购买的数量",clearable:""},on:{input:function(e){return t.countTotal()}},model:{value:t.buyForm.num,callback:function(e){t.$set(t.buyForm,"num",e)},expression:"buyForm.num"}})],1)],1),r("el-form-item",{attrs:{label:"总价:",prop:"pay_total"}},[r("span",[t._v(t._s(t.buyForm.total?t.buyForm.total:"0.00")+" CNY")])])],1)],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.showBuyEdit=!1}}},[t._v("取消")]),1==t.buyForm.type?r("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.sell()}}},[t._v("确定出售")]):r("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.buy()}}},[t._v("确定购买")])],1)],1)],1)},a=[],o=(r("fb6a"),r("b680"),r("5530")),i=r("2f62"),s={name:"SysNotice",components:{},data:function(){return{table:{url:"/advert/hall",where:{type:2},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"},payments:[],timer:{buy:null,sell:null},showBuyEdit:!1,buyForm:{num:0,pay_type:1},editRules:{pay_type:[{required:!0,message:"请选择支付方式",trigger:"blur"}],num:[{required:!0,message:"请输入交易数量",trigger:"blur"}]}}},computed:Object(o["a"])({},Object(i["b"])(["permission"])),mounted:function(){this.getData()},methods:{substr:function(t,e){return t?t.slice(0,e):""},countTotal:function(){console.log(this.buyForm),this.buyForm.num>0&&(this.buyForm.total=(this.buyForm.num*this.buyForm.real_price).toFixed(2))},timeLock:function(){var t=this;clearInterval(this.times.advert),this.setting.advert_online_time>0&&(this.times.advert=setInterval((function(){t.setting.advert_online_time<=0&&(t.setting.advert_online_time_text="00:00:00",t.setting.advert_online=!1,t.settingSubmit({advert_online:!1}),clearInterval(t.times.advert)),t.setting.advert_online_time--;var e=parseInt(t.setting.advert_online_time/3600),r=parseInt(t.setting.advert_online_time%3600/60),n=parseInt(t.setting.advert_online_time%3600%60);t.setting.advert_online_time_text=(e<10?"0"+e:e)+":"+(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)}),1e3))},changeAdvert:function(t){this.settingSubmit({advert_online:t})},showBuy:function(t,e){this.buyForm=Object.assign({},t),this.buyForm.index=e,this.showBuyEdit=!0},getPayment:function(){},buy:function(){var t=this;this.$confirm("确定以该价格购买吗?","提示",{type:"warning"}).then((function(){t.$message.closeAll();var e=t.$loading({lock:!0});t.$http.post("/advert/buy",t.buyForm).then((function(r){e.close(),!0===r.data.success?(t.$refs.table.reload(),t.$message.success(r.data.msg)):t.$message.error(r.data.msg)})).catch((function(r){e.close(),t.$message.error(r.message)}))}))},sell:function(){var t=this;this.$confirm("确定以该价格出售吗?","提示",{type:"warning"}).then((function(){t.$message.closeAll();var e=t.$loading({lock:!0});t.$http.post("/advert/sell",t.buyForm).then((function(r){e.close(),!0===r.data.success?(t.$refs.table.reload(),t.$message.success(r.data.msg)):t.$message.error(r.data.msg)})).catch((function(r){e.close(),t.$message.error(r.message)}))}))},settingSubmit:function(t){var e=this;this.$message.closeAll();var r=this.$loading({lock:!0});this.$http.post("/setting/save",t).then((function(t){r.close(),0===t.data.code?(e.getData(),e.$message.success(t.data.msg)):e.$message.error(t.data.msg)})).catch((function(t){r.close(),e.$message.error(t.message)}))},getData:function(){var t=this,e=this.$loading({lock:!0});this.$http.post("/setting/business").then((function(r){e.close(),0===r.data.code?(t.setting=r.data.data.setting?r.data.data.setting:t.setting,t.trade=r.data.data.trade?r.data.data.trade:t.trade):t.$message.error(r.data.msg)})).catch((function(r){e.close(),t.$message.error(r.message)}))}}},l=s,u=(r("6776"),r("2877")),c=Object(u["a"])(l,n,a,!1,null,"5f5b3b96",null);e["default"]=c.exports}}]);
|