Files
BlockChainH5/unpackage/dist/build/h5/static/js/pages-verification-index.5c6e6985.js
2021-09-30 16:14:42 +08:00

1 line
19 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-verification-index"],{"02b4":function(t,e,o){"use strict";o.r(e);var i=o("0951"),n=o("651b");for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);o("3745");var s,r=o("f0c5"),c=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"1238e038",null,!1,i["a"],s);e["default"]=c.exports},"0951":function(t,e,o){"use strict";o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return i}));var i={uToast:o("4d12").default},n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",{staticClass:"Verification"},[o("v-uni-image",{staticClass:"top-img",attrs:{src:"/static/images/hexiao_bg.png",mode:"widthFix"}}),o("v-uni-view",{staticClass:"txt"},[o("v-uni-view",{staticClass:"title"},[t._v("扫描券码和权证 一键核销")]),o("v-uni-view",{staticClass:"des"},[t._v("降低核销门槛"),o("span",{staticClass:"dian"},[t._v("·")]),t._v("低成本留存优质客户")])],1),o("v-uni-view",{staticClass:"btn"},[o("v-uni-view",{staticClass:"goods",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.scanCode("goods","get")}}},[t._v("权证核销")]),o("v-uni-view",{staticClass:"coupons",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.scanCode("coupons","get")}}},[t._v("优惠券核销")])],1),o("v-uni-view",{staticClass:"history",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goHistory.apply(void 0,arguments)}}},[t._v("核销记录")]),o("u-toast",{ref:"uToast"}),t.showCode?o("v-uni-view",{staticClass:"showCode "},[o("v-uni-view",{staticClass:"showCodeBg",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showCode=!1}}}),o("v-uni-view",{class:["showCodeContent",t.showCode?"showCodeContentSelect":"showCodeContentSelectNo"]},[o("v-uni-view",{staticClass:"showCodeTitle"},[t._v(t._s("goods"===t.scanType?"确认核销该权证":"确认核销该优惠券"))]),"goods"===t.scanType?o("v-uni-view",{staticClass:"goodsInfo"},[o("v-uni-image",{staticClass:"left",attrs:{src:t.info.goods.cover,mode:"widthFix"}}),o("v-uni-view",{staticClass:"right"},[o("v-uni-view",{staticClass:"title ellipsis-2"},[t._v(t._s(t.info.goods.goods_name))]),o("v-uni-view",{staticClass:"number"},[t._v("核销数量: X "+t._s(t.info.qty))])],1)],1):o("v-uni-view",{staticClass:"goodsInfo"},[o("v-uni-view",{staticClass:"right"},[o("v-uni-view",{staticClass:"title ellipsis-2"},[t._v("优惠券名称:‘ "+t._s(t.info.coupon.title)+" ")]),o("v-uni-view",{staticClass:"number"},[t._v("优惠券类型:"+t._s(t.info.coupon.type.text)),o("span",{staticStyle:{"padding-left":"20rpx"}},[t._v("数量1")])]),o("v-uni-view",{staticClass:"number"},[t._v("备注:"+t._s(t.info.coupon.remark))])],1)],1),o("v-uni-view",{staticClass:"sureVer",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.scanInfo(t.code,"post")}}},[t._v("确认核销")]),o("v-uni-view",{staticClass:"showCodeDes"},[t._v("请谨慎核销,操作成功后无法撤回")])],1)],1):t._e()],1)},a=[]},"1f88":function(t,e,o){var i=o("bbf1");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=o("4f06").default;n("665e3c9d",i,!0,{sourceMap:!1,shadowMode:!1})},"2bb4":function(t,e,o){"use strict";o.r(e);var i=o("a752"),n=o.n(i);for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);e["default"]=n.a},"2c06":function(t,e,o){var i=o("7a54");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=o("4f06").default;n("482afed3",i,!0,{sourceMap:!1,shadowMode:!1})},3745:function(t,e,o){"use strict";var i=o("1f88"),n=o.n(i);n.a},"4d12":function(t,e,o){"use strict";o.r(e);var i=o("8c28"),n=o("2bb4");for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);o("ac42");var s,r=o("f0c5"),c=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"2a6a561c",null,!1,i["a"],s);e["default"]=c.exports},"651b":function(t,e,o){"use strict";o.r(e);var i=o("e56f"),n=o.n(i);for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);e["default"]=n.a},"77ed":function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.scanList=e.scanInfo=void 0;var i=o("89d9"),n=function(t,e,o){return(0,i.request)({url:t,method:o,data:e})};e.scanInfo=n;var a=function(t,e){return(0,i.request)({url:t,method:"GET",data:e})};e.scanList=a},"7a54":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-2a6a561c]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-2a6a561c]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-2a6a561c]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-2a6a561c]{padding-top:0}.vertical[data-v-2a6a561c]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-2a6a561c]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-2a6a561c]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-2a6a561c]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-2a6a561c]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-2a6a561c]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-toast[data-v-2a6a561c]{position:fixed;z-index:-1;transition:opacity .3s;text-align:center;color:#fff;border-radius:%?8?%;background:#585858;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;font-size:%?28?%;opacity:0;pointer-events:none;padding:%?18?% %?40?%}.u-toast.u-show[data-v-2a6a561c]{opacity:1}.u-icon[data-v-2a6a561c]{margin-right:%?10?%;\ndisplay:flex;flex-direction:row;\nalign-items:center;line-height:normal}.u-position-center[data-v-2a6a561c]{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%}.u-position-top[data-v-2a6a561c]{left:50%;top:20%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.u-position-bottom[data-v-2a6a561c]{left:50%;bottom:20%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.u-type-primary[data-v-2a6a561c]{color:#2979ff;background-color:#ecf5ff;border:1px solid #d7eafe}.u-type-success[data-v-2a6a561c]{color:#19be6b;background-color:#dbf1e1;border:1px solid #bef5c8}.u-type-error[data-v-2a6a561c]{color:#fa3534;background-color:#fef0f0;border:1px solid #fde2e2}.u-type-warning[data-v-2a6a561c]{color:#f90;background-color:#fdf6ec;border:1px solid #faecd8}.u-type-info[data-v-2a6a561c]{color:#909399;background-color:#f4f4f5;border:1px solid #ebeef5}.u-type-default[data-v-2a6a561c]{color:#fff;background-color:#585858}',""]),t.exports=e},"8c28":function(t,e,o){"use strict";o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return i}));var i={uIcon:o("08da").default},n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("v-uni-view",{staticClass:"u-toast",class:[t.isShow?"u-show":"","u-type-"+t.tmpConfig.type,"u-position-"+t.tmpConfig.position],style:{zIndex:t.uZIndex}},[o("v-uni-view",{staticClass:"u-icon-wrap"},[t.tmpConfig.icon?o("u-icon",{staticClass:"u-icon",attrs:{name:t.iconName,size:30,color:t.tmpConfig.type}}):t._e()],1),o("v-uni-text",{staticClass:"u-text"},[t._v(t._s(t.tmpConfig.title))])],1)},a=[]},a752:function(t,e,o){"use strict";o("c975"),o("a9e3"),o("b64b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"u-toast",props:{zIndex:{type:[Number,String],default:""}},data:function(){return{isShow:!1,timer:null,config:{params:{},title:"",type:"",duration:2e3,isTab:!1,url:"",icon:!0,position:"center",callback:null,back:!1},tmpConfig:{}}},computed:{iconName:function(){if(["error","warning","success","info"].indexOf(this.tmpConfig.type)>=0&&this.tmpConfig.icon){var t=this.$u.type2icon(this.tmpConfig.type);return t}},uZIndex:function(){return this.isShow?this.zIndex?this.zIndex:this.$u.zIndex.toast:"999999"}},methods:{show:function(t){var e=this;this.tmpConfig=this.$u.deepMerge(this.config,t),this.timer&&(clearTimeout(this.timer),this.timer=null),this.isShow=!0,this.timer=setTimeout((function(){e.isShow=!1,clearTimeout(e.timer),e.timer=null,"function"===typeof e.tmpConfig.callback&&e.tmpConfig.callback(),e.timeEnd()}),this.tmpConfig.duration)},hide:function(){this.isShow=!1,this.timer&&(clearTimeout(this.timer),this.timer=null)},timeEnd:function(){if(this.tmpConfig.url){if("/"!=this.tmpConfig.url[0]&&(this.tmpConfig.url="/"+this.tmpConfig.url),Object.keys(this.tmpConfig.params).length){var t="";/.*\/.*\?.*=.*/.test(this.tmpConfig.url)?(t=this.$u.queryParams(this.tmpConfig.params,!1),this.tmpConfig.url=this.tmpConfig.url+"&"+t):(t=this.$u.queryParams(this.tmpConfig.params),this.tmpConfig.url+=t)}this.tmpConfig.isTab?uni.switchTab({url:this.tmpConfig.url}):uni.navigateTo({url:this.tmpConfig.url})}else this.tmpConfig.back&&this.$u.route({type:"back"})}}};e.default=i},ac42:function(t,e,o){"use strict";var i=o("2c06"),n=o.n(i);n.a},bbf1:function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-1238e038]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-1238e038]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-1238e038]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-1238e038]{padding-top:0}.vertical[data-v-1238e038]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-1238e038]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-1238e038]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-1238e038]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-1238e038]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-1238e038]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.Verification[data-v-1238e038]{width:100%;min-height:100vh;background-color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box}.Verification .top-img[data-v-1238e038]{margin-top:%?100?%}.Verification .txt[data-v-1238e038]{padding-top:%?120?%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box}.Verification .txt .title[data-v-1238e038]{font-size:%?42?%;font-weight:500}.Verification .txt .des[data-v-1238e038]{font-size:%?34?%;color:rgba(37,90,124,.4);padding-top:%?20?%;font-weight:700}.Verification .txt .des .dian[data-v-1238e038]{color:#039bfe;padding:0 %?10?%}.Verification .btn[data-v-1238e038]{display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;margin-top:%?140?%}.Verification .btn .goods[data-v-1238e038],\n.Verification .btn .coupons[data-v-1238e038]{width:%?310?%;height:%?90?%;display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;border-radius:%?8?%;border:solid %?1?% #039bfe;color:#039bfe;font-size:%?34?%;font-weight:700}.Verification .btn .coupons[data-v-1238e038]{background-color:#039bfe;color:#fff;margin-left:%?30?%}.Verification .history[data-v-1238e038]{text-align:center;padding:%?30?%;width:100%;color:#cacaca}.showCode[data-v-1238e038]{width:100%;height:100vh;position:fixed;top:0;display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;z-index:1}.showCode .showCodeBg[data-v-1238e038]{background-color:rgba(0,0,0,.3);width:100%;height:100%;position:absolute;top:0;left:0;z-index:2}.showCode .showCodeContentSelect[data-v-1238e038]{-webkit-animation:sk-foldCubeAngle-data-v-1238e038 .6s linear both;animation:sk-foldCubeAngle-data-v-1238e038 .6s linear both}.showCode .showCodeContentSelectNo[data-v-1238e038]{-webkit-animation:sk-foldCubeAngleNo-data-v-1238e038 .6s linear both;animation:sk-foldCubeAngleNo-data-v-1238e038 .6s linear both}.showCode .showCodeContent[data-v-1238e038]{padding:%?50?% %?30?% %?30?% %?30?%;width:%?640?%;min-height:%?500?%;background-color:#fff;border-radius:%?20?%;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;padding:%?30?%;position:relative;z-index:199}.showCode .showCodeContent uni-image[data-v-1238e038]{width:60%}.showCode .showCodeContent .showCodeTitle[data-v-1238e038]{font-weight:700;padding-bottom:%?20?%;font-size:%?40?%;margin-bottom:%?20?%;margin-top:%?30?%}.showCode .showCodeContent .goodsInfo[data-v-1238e038]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;box-sizing:border-box;margin:%?30?%}.showCode .showCodeContent .goodsInfo .left[data-v-1238e038]{width:%?200?%;height:%?200?%;margin-right:%?20?%;border-radius:%?2?%}.showCode .showCodeContent .goodsInfo .right[data-v-1238e038]{flex:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;box-sizing:border-box}.showCode .showCodeContent .goodsInfo .right .title[data-v-1238e038]{font-size:%?30?%;font-weight:700}.showCode .showCodeContent .goodsInfo .right .number[data-v-1238e038]{padding-top:%?10?%;color:#999}.showCode .showCodeContent .sureVer[data-v-1238e038]{background-color:#039bfe;width:%?500?%;height:%?90?%;border-radius:%?8?%;color:#fff;margin:%?30?% 0;font-size:%?40?%;font-weight:700;text-align:center;line-height:%?90?%}.showCode .showCodeContent .showCodeDes[data-v-1238e038]{padding:%?20?% 0 %?20?% 0;color:grey;font-size:%?24?%}@-webkit-keyframes sk-foldCubeAngle-data-v-1238e038{0%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}100%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0deg);opacity:1}}@keyframes sk-foldCubeAngle-data-v-1238e038{0%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}100%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0deg);opacity:1}}@-webkit-keyframes sk-foldCubeAngleNo-data-v-1238e038{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}25%{-webkit-transform:scale(0);transform:scale(0);opacity:0}}@keyframes sk-foldCubeAngleNo-data-v-1238e038{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}25%{-webkit-transform:scale(0);transform:scale(0);opacity:0}}@-webkit-keyframes turn-data-v-1238e038{0%{-webkit-transform:rotate(0deg);opacity:1}25%{-webkit-transform:rotate(90deg);opacity:.9}50%{-webkit-transform:rotate(180deg);opacity:.8}75%{-webkit-transform:rotate(270deg);opacity:.9}100%{-webkit-transform:rotate(1turn);opacity:1}}@keyframes turn-data-v-1238e038{0%{-webkit-transform:rotate(0deg);opacity:1}25%{-webkit-transform:rotate(90deg);opacity:.9}50%{-webkit-transform:rotate(180deg);opacity:.8}75%{-webkit-transform:rotate(270deg);opacity:.9}100%{-webkit-transform:rotate(1turn);opacity:1}}',""]),t.exports=e},e56f:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o("77ed"),n={data:function(){return{scanType:"goods",showCode:!1,info:"",code:""}},onLoad:function(){uni.hideLoading()},methods:{scanCode:function(t){var e=this;console.log(t),this.scanType=t,uni.scanCode({success:function(t){console.log("条码类型:"+t.scanType),console.log("条码内容:"+t.result),e.code=t.result,e.scanInfo(t.result,"get")}})},scanInfo:function(t,e){var o=this;console.log(t,this.scanType);var n="",a={code:t};"goods"===this.scanType?(console.log("权证核销"),n="manages/warrants/verification"):(console.log("优惠券核销!"),n="coupons/verify/coupon"),(0,i.scanInfo)(n,a,e).then((function(t){"goods"===o.scanType?(uni.hideLoading(),"post"===e?(o.showCode=!1,o.$refs.uToast.show({title:"权证核销成功",type:"error",icon:!1,duration:3e3})):(o.showCode=!0,o.info=t)):(console.log("优惠券核销 有商品跳转优惠券详情页面,没有商品直接弹出核销页面!"),console.log(t,"res"),"post"===e?(o.showCode=!1,o.$refs.uToast.show({title:"优惠券核销成功",type:"error",icon:!1,duration:3e3})):t.goods.length>0?uni.showModal({title:"温馨提示",content:"该优惠券下绑定了商品,是否勾选相应商品",success:function(e){e.confirm?uni.navigateTo({url:"/pages/property/coupon/canUseList?code="+o.code}):(o.showCode=!0,o.info=t.info)}}):(o.showCode=!0,o.info=t.info))})).catch((function(t){o.$refs.uToast.show({title:t.message,type:"error",icon:!1,duration:3e3}),o.showCode=!1}))},goHistory:function(){this.$Router.push({name:"verificationHistory"})}}};e.default=n}}]);