You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
17 KiB
1 lines
17 KiB
import{p as e,A as n,l as i,s as t,k as a,o,b as r,a as s,w as c,c as l,m as d,v as u,f as p,F as f,r as g,D as m,K as h,g as v,i as y}from"./index.22b081e2.js";import{g as I,q as S,s as _}from"./user.b3821dab.js";import{_ as k}from"./plugin-vue_export-helper.21dcd24c.js";!function(e,n){if(!e.jWeixin){var i,t={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},a=function(){var e={};for(var n in t)e[t[n]]=n;return e}(),o=e.document,r=o.title,s=navigator.userAgent.toLowerCase(),c=navigator.platform.toLowerCase(),l=!(!c.match("mac")&&!c.match("win")),d=-1!=s.indexOf("wxdebugger"),u=-1!=s.indexOf("micromessenger"),p=-1!=s.indexOf("android"),f=-1!=s.indexOf("iphone")||-1!=s.indexOf("ipad"),g=(i=s.match(/micromessenger\/(\d+\.\d+\.\d+)/)||s.match(/micromessenger\/(\d+\.\d+)/))?i[1]:"",m={initStartTime:E(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},h={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:f?1:p?2:-1,clientVersion:g,url:encodeURIComponent(location.href)},v={},y={_completes:[]},I={state:0,data:{}};B((function(){m.initEndTime=E()}));var S=!1,_=[],k={config:function(n){P("config",v=n);var i=!1!==v.check;B((function(){if(i)A(t.config,{verifyJsApiList:b(v.jsApiList),verifyOpenTagList:b(v.openTagList)},function(){y._complete=function(e){m.preVerifyEndTime=E(),I.state=1,I.data=e},y.success=function(e){h.isPreVerifyOk=0},y.fail=function(e){y._fail?y._fail(e):I.state=-1};var e=y._completes;return e.push((function(){!function(){if(!(l||d||v.debug||g<"6.0.2"||h.systemType<0)){var e=new Image;h.appId=v.appId,h.initTime=m.initEndTime-m.initStartTime,h.preVerifyTime=m.preVerifyEndTime-m.preVerifyStartTime,k.getNetworkType({isInnerInvoke:!0,success:function(n){h.networkType=n.networkType;var i="https://open.weixin.qq.com/sdk/report?v="+h.version+"&o="+h.isPreVerifyOk+"&s="+h.systemType+"&c="+h.clientVersion+"&a="+h.appId+"&n="+h.networkType+"&i="+h.initTime+"&p="+h.preVerifyTime+"&u="+h.url;e.src=i}})}}()})),y.complete=function(n){for(var i=0,t=e.length;i<t;++i)e[i]();y._completes=[]},y}()),m.preVerifyStartTime=E();else{I.state=1;for(var e=y._completes,n=0,a=e.length;n<a;++n)e[n]();y._completes=[]}})),k.invoke||(k.invoke=function(n,i,t){e.WeixinJSBridge&&WeixinJSBridge.invoke(n,C(i),t)},k.on=function(n,i){e.WeixinJSBridge&&WeixinJSBridge.on(n,i)})},ready:function(e){0!=I.state?e():(y._completes.push(e),!u&&v.debug&&e())},error:function(e){g<"6.0.2"||(-1==I.state?e(I.data):y._fail=e)},checkJsApi:function(e){A("checkJsApi",{jsApiList:b(e.jsApiList)},(e._complete=function(e){if(p){var n=e.checkResult;n&&(e.checkResult=JSON.parse(n))}e=function(e){var n=e.checkResult;for(var i in n){var t=a[i];t&&(n[t]=n[i],delete n[i])}return e}(e)},e))},onMenuShareTimeline:function(e){x(t.onMenuShareTimeline,{complete:function(){A("shareTimeline",{title:e.title||r,desc:e.title||r,img_url:e.imgUrl||"",link:e.link||location.href,type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareAppMessage:function(e){x(t.onMenuShareAppMessage,{complete:function(n){"favorite"===n.scene?A("sendAppMessage",{title:e.title||r,desc:e.desc||"",link:e.link||location.href,img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""}):A("sendAppMessage",{title:e.title||r,desc:e.desc||"",link:e.link||location.href,img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareQQ:function(e){x(t.onMenuShareQQ,{complete:function(){A("shareQQ",{title:e.title||r,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareWeibo:function(e){x(t.onMenuShareWeibo,{complete:function(){A("shareWeiboApp",{title:e.title||r,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareQZone:function(e){x(t.onMenuShareQZone,{complete:function(){A("shareQZone",{title:e.title||r,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},updateTimelineShareData:function(e){A("updateTimelineShareData",{title:e.title,link:e.link,imgUrl:e.imgUrl},e)},updateAppMessageShareData:function(e){A("updateAppMessageShareData",{title:e.title,desc:e.desc,link:e.link,imgUrl:e.imgUrl},e)},startRecord:function(e){A("startRecord",{},e)},stopRecord:function(e){A("stopRecord",{},e)},onVoiceRecordEnd:function(e){x("onVoiceRecordEnd",e)},playVoice:function(e){A("playVoice",{localId:e.localId},e)},pauseVoice:function(e){A("pauseVoice",{localId:e.localId},e)},stopVoice:function(e){A("stopVoice",{localId:e.localId},e)},onVoicePlayEnd:function(e){x("onVoicePlayEnd",e)},uploadVoice:function(e){A("uploadVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadVoice:function(e){A("downloadVoice",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},translateVoice:function(e){A("translateVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},chooseImage:function(e){A("chooseImage",{scene:"1|2",count:e.count||9,sizeType:e.sizeType||["original","compressed"],sourceType:e.sourceType||["album","camera"]},(e._complete=function(e){if(p){var n=e.localIds;try{n&&(e.localIds=JSON.parse(n))}catch(i){}}},e))},getLocation:function(e){},previewImage:function(e){A(t.previewImage,{current:e.current,urls:e.urls},e)},uploadImage:function(e){A("uploadImage",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadImage:function(e){A("downloadImage",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},getLocalImgData:function(e){!1===S?(S=!0,A("getLocalImgData",{localId:e.localId},(e._complete=function(e){if(S=!1,0<_.length){var n=_.shift();wx.getLocalImgData(n)}},e))):_.push(e)},getNetworkType:function(e){A("getNetworkType",{},(e._complete=function(e){e=function(e){var n=e.errMsg;e.errMsg="getNetworkType:ok";var i=e.subtype;if(delete e.subtype,i)e.networkType=i;else{var t=n.indexOf(":"),a=n.substring(t+1);switch(a){case"wifi":case"edge":case"wwan":e.networkType=a;break;default:e.errMsg="getNetworkType:fail"}}return e}(e)},e))},openLocation:function(e){A("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){A(t.getLocation,{type:(e=e||{}).type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){A("hideOptionMenu",{},e)},showOptionMenu:function(e){A("showOptionMenu",{},e)},closeWindow:function(e){A("closeWindow",{},e=e||{})},hideMenuItems:function(e){A("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){A("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){A("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){A("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){A("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(f){var n=e.resultStr;if(n){var i=JSON.parse(n);e.resultStr=i&&i.scan_code&&i.scan_code.scan_result}}},e))},openAddress:function(e){A(t.openAddress,{},(e._complete=function(e){var n;(n=e).postalCode=n.addressPostalCode,delete n.addressPostalCode,n.provinceName=n.proviceFirstStageName,delete n.proviceFirstStageName,n.cityName=n.addressCitySecondStageName,delete n.addressCitySecondStageName,n.countryName=n.addressCountiesThirdStageName,delete n.addressCountiesThirdStageName,n.detailInfo=n.addressDetailInfo,delete n.addressDetailInfo,e=n},e))},openProductSpecificView:function(e){A(t.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var n=e.cardList,i=[],a=0,o=n.length;a<o;++a){var r=n[a],s={card_id:r.cardId,card_ext:r.cardExt};i.push(s)}A(t.addCard,{card_list:i},(e._complete=function(e){var n=e.card_list;if(n){for(var i=0,t=(n=JSON.parse(n)).length;i<t;++i){var a=n[i];a.cardId=a.card_id,a.cardExt=a.card_ext,a.isSuccess=!!a.is_succ,delete a.card_id,delete a.card_ext,delete a.is_succ}e.cardList=n,delete e.card_list}},e))},chooseCard:function(e){A("chooseCard",{app_id:v.appId,location_id:e.shopId||"",sign_type:e.signType||"SHA1",card_id:e.cardId||"",card_type:e.cardType||"",card_sign:e.cardSign,time_stamp:e.timestamp+"",nonce_str:e.nonceStr},(e._complete=function(e){e.cardList=e.choose_card_info,delete e.choose_card_info},e))},openCard:function(e){for(var n=e.cardList,i=[],a=0,o=n.length;a<o;++a){var r=n[a],s={card_id:r.cardId,code:r.code};i.push(s)}A(t.openCard,{card_list:i},e)},consumeAndShareCard:function(e){A(t.consumeAndShareCard,{consumedCardId:e.cardId,consumedCode:e.code},e)},chooseWXPay:function(e){A(t.chooseWXPay,M(e),e)},openEnterpriseRedPacket:function(e){A(t.openEnterpriseRedPacket,M(e),e)},startSearchBeacons:function(e){A(t.startSearchBeacons,{ticket:e.ticket},e)},stopSearchBeacons:function(e){A(t.stopSearchBeacons,{},e)},onSearchBeacons:function(e){x(t.onSearchBeacons,e)},openEnterpriseChat:function(e){A("openEnterpriseChat",{useridlist:e.userIds,chatname:e.groupName},e)},launchMiniProgram:function(e){A("launchMiniProgram",{targetAppId:e.targetAppId,path:function(e){if("string"==typeof e&&0<e.length){var n=e.split("?")[0],i=e.split("?")[1];return n+=".html",void 0!==i?n+"?"+i:n}}(e.path),envVersion:e.envVersion},e)},openBusinessView:function(e){A("openBusinessView",{businessType:e.businessType,queryString:e.queryString||"",envVersion:e.envVersion},(e._complete=function(e){if(p){var n=e.extraData;if(n)try{e.extraData=JSON.parse(n)}catch(i){e.extraData={}}}},e))},miniProgram:{navigateBack:function(e){e=e||{},B((function(){A("invokeMiniProgramAPI",{name:"navigateBack",arg:{delta:e.delta||1}},e)}))},navigateTo:function(e){B((function(){A("invokeMiniProgramAPI",{name:"navigateTo",arg:{url:e.url}},e)}))},redirectTo:function(e){B((function(){A("invokeMiniProgramAPI",{name:"redirectTo",arg:{url:e.url}},e)}))},switchTab:function(e){B((function(){A("invokeMiniProgramAPI",{name:"switchTab",arg:{url:e.url}},e)}))},reLaunch:function(e){B((function(){A("invokeMiniProgramAPI",{name:"reLaunch",arg:{url:e.url}},e)}))},postMessage:function(e){B((function(){A("invokeMiniProgramAPI",{name:"postMessage",arg:e.data||{}},e)}))},getEnv:function(n){B((function(){n({miniprogram:"miniprogram"===e.__wxjs_environment})}))}}},w=1,T={};return o.addEventListener("error",(function(e){if(!p){var n=e.target,i=n.tagName,t=n.src;if(("IMG"==i||"VIDEO"==i||"AUDIO"==i||"SOURCE"==i)&&-1!=t.indexOf("wxlocalresource://")){e.preventDefault(),e.stopPropagation();var a=n["wx-id"];if(a||(a=w++,n["wx-id"]=a),T[a])return;T[a]=!0,wx.ready((function(){wx.getLocalImgData({localId:t,success:function(e){n.src=e.localData}})}))}}}),!0),o.addEventListener("load",(function(e){if(!p){var n=e.target,i=n.tagName;if(n.src,"IMG"==i||"VIDEO"==i||"AUDIO"==i||"SOURCE"==i){var t=n["wx-id"];t&&(T[t]=!1)}}}),!0),n&&(e.wx=e.jWeixin=k),k}function A(n,i,t){e.WeixinJSBridge?WeixinJSBridge.invoke(n,C(i),(function(e){V(n,e,t)})):P(n,t)}function x(n,i,t){e.WeixinJSBridge?WeixinJSBridge.on(n,(function(e){t&&t.trigger&&t.trigger(e),V(n,e,i)})):P(n,t||i)}function C(e){return(e=e||{}).appId=v.appId,e.verifyAppId=v.appId,e.verifySignType="sha1",e.verifyTimestamp=v.timestamp+"",e.verifyNonceStr=v.nonceStr,e.verifySignature=v.signature,e}function M(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function V(e,n,i){"openEnterpriseChat"!=e&&"openBusinessView"!==e||(n.errCode=n.err_code),delete n.err_code,delete n.err_desc,delete n.err_detail;var t=n.errMsg;t||(t=n.err_msg,delete n.err_msg,t=function(e,n){var i=e,t=a[i];t&&(i=t);var o="ok";if(n){var r=n.indexOf(":");"confirm"==(o=n.substring(r+1))&&(o="ok"),"failed"==o&&(o="fail"),-1!=o.indexOf("failed_")&&(o=o.substring(7)),-1!=o.indexOf("fail_")&&(o=o.substring(5)),"access denied"!=(o=(o=o.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=o||(o="permission denied"),"config"==i&&"function not exist"==o&&(o="ok"),""==o&&(o="fail")}return i+":"+o}(e,t),n.errMsg=t),(i=i||{})._complete&&(i._complete(n),delete i._complete),t=n.errMsg||"",v.debug&&!i.isInnerInvoke&&alert(JSON.stringify(n));var o=t.indexOf(":");switch(t.substring(o+1)){case"ok":i.success&&i.success(n);break;case"cancel":i.cancel&&i.cancel(n);break;default:i.fail&&i.fail(n)}i.complete&&i.complete(n)}function b(e){if(e){for(var n=0,i=e.length;n<i;++n){var a=e[n],o=t[a];o&&(e[n]=o)}return e}}function P(e,n){if(!(!v.debug||n&&n.isInnerInvoke)){var i=a[e];i&&(e=i),n&&n._complete&&delete n._complete,console.log('"'+e+'",',n||"")}}function E(){return(new Date).getTime()}function B(n){u&&(e.WeixinJSBridge?n():o.addEventListener&&o.addEventListener("WeixinJSBridgeReady",n,!1))}}(window);var w=k({props:["id"],onShow(){for(let i=0;i<=5;i++)I({id:this.id}).then((i=>{console.log(i),3==i.data.orderState||6==i.data.orderState?e({url:"../paysuccess/paysuccess"}):7==i.data.orderState&&n({url:"../index/index"})}));this.iszhifu&&(this.xh=setInterval((()=>{I({id:this.id}).then((i=>{console.log(i),3==i.data.orderState||6==i.data.orderState?(e({url:"../paysuccess/paysuccess"}),null!=this.xh&&clearInterval(this.xh)):7==i.data.orderState&&n({url:"../index/index"})}))}),200))},onHide(){null!=this.xh&&clearInterval(this.xh)},onUnload(){null!=this.xh&&clearInterval(this.xh)},setup(o){let r=i("20"),s=i("00"),c=i(null),l=i(!1);t({title:"加载中"}),function(){let e=setInterval((()=>{Number(s.value)<=0&&(0==Number(r.value)&&(n({url:"../index/index"}),clearInterval(e)),Number(r.value)-1<10?r.value="0"+(Number(r.value)-1):r.value=Number(r.value)-1,s.value=60);let i=Number(s.value)-1;i<10&&(i="0"+i),s.value=i}),1e3)}();let d=i(-1),u=i([{state:!0},{state:!0},{state:!0}]);S({}).then((e=>{console.log(e),u.value=e.data}));let p=i(0),f=i(null);return I({id:o.id}).then((e=>{console.log(e,"xq"),p.value=e.data.orderAmount.split(".")[0]+"."+e.data.orderAmount.split(".")[1].substring(0,2),f.value=e.data.expirationTime,a()})),{xzstate:d,expirationTime:f,xiugai:function(e){d.value=e},paytypes:u,queren:function(){-1!=d.value?_({orderId:o.id,payId:d.value}).then((e=>{if(console.log(e),200==e.code)if("操作成功"!=e.msg)if(1==d.value){l.value=!0;let n=e.msg.split(">")[1].split("<")[0].slice(15).replace(/"/,"");h("https",n),location.href=`${n}`}else if(2==d.value){console.log(e.msg);const n=document.createElement("div");n.id="formdata",n.innerHTML=e.msg,document.body.appendChild(n);const i=document.getElementById("formdata");document.forms[0].submit(),document.body.removeChild(i)}else 7==d.value&&(location.href=e.msg);else n({url:"../paybaipiao/paybaipiao"});else m({title:e.msg})})):m({title:"请选择支付方式",icon:"error"})},godet:function(){e({url:"../orderdetails/orderdetails?id="+o.id})},price:p,m:r,s:s,iszhifu:l,xh:c}}},[["render",function(e,n,i,t,a,m){const h=v,I=y;return o(),r(f,null,[s(h,{class:"payxx"},{default:c((()=>[t.expirationTime?p("",!0):(o(),l(h,{key:0,class:"time"},{default:c((()=>[d("剩余支付时间"+u(t.m)+" :"+u(t.s),1)])),_:1})),t.expirationTime?(o(),l(h,{key:1,class:"time"},{default:c((()=>[d("订单过期时间:"+u(t.expirationTime),1)])),_:1})):p("",!0),s(h,{class:"price"},{default:c((()=>[s(h,null,{default:c((()=>[d("¥")])),_:1}),s(h,null,{default:c((()=>[d(u(t.price),1)])),_:1})])),_:1}),s(h,{onClick:t.godet,class:"orderdetails"},{default:c((()=>[s(h,null,{default:c((()=>[d("订单详情")])),_:1}),s(I,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABD0lEQVRIS7WVIQ7CQBBFWYeABImjEsENkAiCRCAQHAKHIAEEAschEEgEAgcOEiRXqUCQlLfJNGma0Nku3SY/06Ttf52Z3VlTC3yZwP61QkCSJE9+IEYjY8zb52c0wAvTHrqgsQ9EA3QwvqHIF6L2gDJlISdAEzL5uJZLBVgjgTy4baMjgGmlAIF0iXfUQnsgcxeIUwapEZn0pRcN4hrIRoOUAkgmA+IZ1V0gpQECGRJtwy1kQSa7X5l4AQSyshmgGECzUgC9yGawBLCtDJAzVxtdqkRBVxHm4fYB5pFsMruTD9R8pq3/9LlaIjG/8oGF2PVvp2o1syhn7jWytXEd/DwIe6K5NrLoPbXJ/0KCA74CjmcZb1liggAAAABJRU5ErkJggg=="})])),_:1},8,["onClick"])])),_:1}),s(h,{class:"pay_type"},{default:c((()=>[(o(!0),r(f,null,g(t.paytypes,(e=>(o(),l(h,null,{default:c((()=>[s(h,null,{default:c((()=>[s(I,{src:"支付宝支付"==e.payWay?"../../static/zfb.png":"微信支付"==e.payWay?"../../static/wx.png":"../../static/yhk.png"},null,8,["src"]),s(h,null,{default:c((()=>[d(u(e.payWay),1)])),_:2},1024)])),_:2},1024),s(I,{onClick:n=>t.xiugai(e.id),src:t.xzstate==e.id?"../../static/yixuan.png":"../../static/weixuan.png"},null,8,["onClick","src"])])),_:2},1024)))),256))])),_:1}),s(h,{onClick:t.queren,class:"pay_btn"},{default:c((()=>[d(" 确认支付 ")])),_:1},8,["onClick"])],64)}],["__scopeId","data-v-83eef280"]]);export{w as default};
|
|
|