@xysfe/actui2 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/lib/BScroll/index.js +1 -1
  2. package/lib/BScroll/index.mjs +1 -5
  3. package/lib/CouponLayer/index.js +1 -1
  4. package/lib/CouponLayer/index.mjs +2 -2
  5. package/lib/DiseaseListLayer/index.js +1 -1
  6. package/lib/DiseaseListLayer/index.mjs +2 -2
  7. package/lib/GoldBenefitDemo/benefit/slider/index.js +1 -1
  8. package/lib/GoldBenefitDemo/benefit/slider/index.mjs +2 -2
  9. package/lib/GoldBenefitDemo/costTable/index.js +1 -1
  10. package/lib/GoldBenefitDemo/costTable/index.mjs +2 -2
  11. package/lib/GoldCost/costTable/index.js +1 -1
  12. package/lib/GoldCost/costTable/index.mjs +4 -4
  13. package/lib/GoldFinance/benefit/slider/index.js +1 -1
  14. package/lib/GoldFinance/benefit/slider/index.mjs +2 -2
  15. package/lib/GoldFinance/costTable/index.js +1 -1
  16. package/lib/GoldFinance/costTable/index.mjs +2 -2
  17. package/lib/GoldFinanceChart/costTable/index.js +1 -1
  18. package/lib/GoldFinanceChart/costTable/index.mjs +2 -2
  19. package/lib/GoldFinanceChartV3/costTable/index.js +1 -1
  20. package/lib/GoldFinanceChartV3/costTable/index.mjs +4 -4
  21. package/lib/GoldFinanceV2/benefit/slider/index.js +1 -1
  22. package/lib/GoldFinanceV2/benefit/slider/index.mjs +2 -2
  23. package/lib/GoldFinanceV2/costTable/index.js +1 -1
  24. package/lib/GoldFinanceV2/costTable/index.mjs +2 -2
  25. package/lib/GoldMulSelect/mulSelect/index.js +1 -1
  26. package/lib/GoldMulSelect/mulSelect/index.mjs +2 -2
  27. package/lib/GoldPayLimitLayer/index.js +1 -1
  28. package/lib/GoldPayLimitLayer/index.mjs +2 -2
  29. package/lib/GoldPayLimitLayer/signIntroduct/index.js +1 -1
  30. package/lib/GoldPayLimitLayer/signIntroduct/index.mjs +2 -2
  31. package/lib/GoldPayLimitLayer/table/index.js +1 -1
  32. package/lib/GoldPayLimitLayer/table/index.mjs +2 -2
  33. package/lib/MedicalListLayer/index.js +1 -1
  34. package/lib/MedicalListLayer/index.mjs +2 -2
  35. package/lib/Picker/index.js +1 -1
  36. package/lib/Picker/index.mjs +2 -2
  37. package/lib/PickerLongText/index.js +1 -1
  38. package/lib/PickerLongText/index.mjs +2 -2
  39. package/lib/ProPosterLayer/index.js +1 -1
  40. package/lib/ProPosterLayer/index.mjs +1 -1
  41. package/lib/ProductLayer/productDetailLayer/index.js +1 -1
  42. package/lib/ProductLayer/productDetailLayer/index.mjs +4 -5
  43. package/lib/ProductLayer/productDetailLayer/style.css +1 -1
  44. package/lib/RecordRuleLayer/index.js +1 -1
  45. package/lib/RecordRuleLayer/index.mjs +4 -4
  46. package/lib/Rule/index.js +1 -1
  47. package/lib/Rule/index.mjs +2 -2
  48. package/lib/SlidePoster/index.js +1 -1
  49. package/lib/SlidePoster/index.mjs +1 -1
  50. package/lib/common/scroll/index.js +1 -1
  51. package/lib/common/scroll/index.mjs +2 -2
  52. package/lib/common/scrollZoom/scroll/index.js +1 -1
  53. package/lib/common/scrollZoom/scroll/index.mjs +2 -2
  54. package/lib/index.js +1 -1
  55. package/lib/index.mjs +6 -5
  56. package/lib/utils/vueAwesomeSwiper/index.js +1 -1
  57. package/lib/utils/vueAwesomeSwiper/index.mjs +7 -1
  58. package/package.json +2 -2
  59. package/types/components/BScroll/index.d.ts +1 -1
  60. package/types/utils/vueAwesomeSwiper.d.ts +2 -1
@@ -4,7 +4,7 @@ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/in
4
4
  import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
5
5
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
6
6
  import { A as ActPopup } from "../../common/popup/index.mjs";
7
- import { b as bScroll } from "../../BScroll/index.mjs";
7
+ import BScrollModule__default from "better-scroll";
8
8
  import { h as hexToRgb } from "../../utils/helpers/index.mjs";
9
9
  import { n as normalizeComponent } from "../../common/index.mjs";
10
10
  import './style.css';var _sfc_main = {
@@ -59,7 +59,7 @@ import './style.css';var _sfc_main = {
59
59
  this.isVisible = true;
60
60
  this.$nextTick(function() {
61
61
  if (!_this.scroll) {
62
- _this.scroll = new bScroll(_this.$refs.content, {
62
+ _this.scroll = new BScrollModule__default(_this.$refs.content, {
63
63
  click: true
64
64
  });
65
65
  } else {
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var GoldPayLimitLayer_table=require("./table/index.js");var GoldPayLimitLayer_signIntroduct=require("./signIntroduct/index.js");var BScroll=require("../BScroll/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_helpers=require("../utils/helpers/index.js");var common=require("../common/index.js");var paySceneMap={1:"首期限额说明",2:"续期限额说明",3:"首期+续期限额说明"};var payTypeMap={1:"微信",2:"支付宝",3:"银联"};var _sfc_main={name:"ActGoldPayLimitLayer",mixins:[mixins_visible.visibleMixin],components:{ActGoldLayer:common_goldlayer.ActGoldLayer,payTable:GoldPayLimitLayer_table.payTable,signIntroduct:GoldPayLimitLayer_signIntroduct.signIntroduct},props:{title:{type:String,default:"支付限额说明"},brandColor:{type:String,default:"#8C7FEE"},btnColor:{type:String,default:"#8C7FEE"},payLimitData:{type:Array,default:function _default(){return[]}},defaultPayScene:{type:Number,default:1},defaultPayType:{type:Number,default:1}},data:function data(){return{paySceneMap,payTypeMap,activePaySceneIndex:0,activePayTypeIndex:0,curPayRule:[],renderData:[],renderSignDesc:[],titleData:"",state:1,paySceneLineShow:false}},computed:{isCps:function isCps(){if(this.brandColor!=="#8C7FEE"){return true}return false},renderRuleDetail:function renderRuleDetail(){var ruleDetailData=[];var ruleDetailConfig={};for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active){var ruleDetail=payRule[j].ruleDetail||[];var res=this.transRuleDetail(ruleDetail);ruleDetailData=res.ruleDetailData;ruleDetailConfig=res.ruleDetailConfig;break}}}else{continue}}return{ruleDetailData,ruleDetailConfig}},selectPayTypeIndex:function selectPayTypeIndex(){for(var i=0;i<this.curPayRule.length;i++){if(this.curPayRule[i].active){return i}}return 0},payTypeWrapClass:function payTypeWrapClass(){var _context;return _concatInstanceProperty(_context="select-back-".concat(this.curPayRule.length,"-")).call(_context,this.selectPayTypeIndex)},renderPayIntroduct:function renderPayIntroduct(){var renderPayIntroduct2=[];for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active&&payRule[j].payDesc&&utils_helpers.isArray(payRule[j].payDesc)){renderPayIntroduct2=payRule[j].payDesc}}}}return renderPayIntroduct2},payTypeShow:function payTypeShow(){return this.curPayRule.length>1}},methods:{close:function close(){this.hide();this.$emit("close")},reset:function reset(){this.titleData="";this.state=1},toSignIntroduct:function toSignIntroduct(){this.titleData="名词说明";this.state=2},toPayLimitShow:function toPayLimitShow(){this.titleData="";this.state=1},paySceneSelect:function paySceneSelect(renderData,index){for(var i=0;i<renderData.length;i++){if(index===i&&!renderData[i].active){this.curPayRule=renderData[i].payRule||[];this.refreshScroller();this.scrollToActiveTab()}renderData[i].active=index===i}},transRuleDetail:function transRuleDetail(ruleDetail){var _this=this;if(!(ruleDetail&&utils_helpers.isArray(ruleDetail)))return;var transData={};var ruleDetailData=[];var realLimitShow=false;var batchLimitShow=false;var signTypeShow=false;var realAndBatchRuleShow=false;_forEachInstanceProperty(ruleDetail).call(ruleDetail,function(item){var renderRow={payItemName:item.payItemName};renderRow.payItemType=item.payItemType||"";if(~~item.canReal===1){var _context2,_context3;realLimitShow=true;var oneText=Number(item.realRule.once)?"".concat(Number(item.realRule.once)/1e4,"万"):"无";var dayText=Number(item.realRule.day)?"".concat(Number(item.realRule.day)/1e4,"万"):"无";var monthText=Number(item.realRule.month)?"".concat(Number(item.realRule.month)/1e4,"万"):"无";renderRow.payItemRealRule=_concatInstanceProperty(_context2=_concatInstanceProperty(_context3="".concat(oneText,"/")).call(_context3,dayText,"/")).call(_context2,monthText)}else{renderRow.payItemRealRule="--"}if(~~item.canBatch===1){var _context4,_context5;batchLimitShow=true;var _oneText=Number(item.batchRule.once)?"".concat(Number(item.batchRule.once)/1e4,"万"):"无";var _dayText=Number(item.batchRule.day)?"".concat(Number(item.batchRule.day)/1e4,"万"):"无";var _monthText=Number(item.batchRule.month)?"".concat(Number(item.batchRule.month)/1e4,"万"):"无";renderRow.payItemBatchRule=_concatInstanceProperty(_context4=_concatInstanceProperty(_context5="".concat(_oneText,"/")).call(_context5,_dayText,"/")).call(_context4,_monthText)}else{renderRow.payItemBatchRule="--"}if(~~item.canReal&&~~item.canBatch&&item.rbDesc){realAndBatchRuleShow=true}if(item.rbDesc){var _context6,_context7;renderRow.rbDesc={showDesc:item.rbDesc.length>6?_concatInstanceProperty(_context6="".concat(_sliceInstanceProperty(_context7=item.rbDesc).call(_context7,0,6),'...<span style="color:')).call(_context6,_this.brandColor,';">></span>'):item.rbDesc,fullDesc:item.rbDesc,needShowFullDesc:item.rbDesc.length>6}}else{renderRow.rbDesc={showDesc:"--",needShowFullDesc:false}}if(~~item.needSign===1&&item.signType!=="流程内签约"){signTypeShow=true}if(~~item.needSign===1){renderRow.signType=item.signType}else{renderRow.signType="无"}if(transData[item.payItemCode]){transData[item.payItemCode].push(renderRow)}else{transData[item.payItemCode]=[renderRow]}});for(var key in transData){if(transData[key]){ruleDetailData.push(transData[key])}}return{ruleDetailData,ruleDetailConfig:{realLimitShow,batchLimitShow,signTypeShow,realAndBatchRuleShow}}},payTypeSelect:function payTypeSelect(curPayRule,index){for(var i=0;i<curPayRule.length;i++){if(index===i&&!curPayRule[i].active){this.refreshScroller()}curPayRule[i].active=index===i}},initRenderData:function initRenderData(){var _this2=this;var data2=utils_helpers.deepCopy(this.payLimitData);var renderSignDesc=[];var matchPayScene=_findIndexInstanceProperty(data2).call(data2,function(payData){return payData.payScene===_this2.defaultPayScene});matchPayScene=matchPayScene<0?0:matchPayScene;for(var i=0;i<data2.length;i++){this.$set(data2[i],"active",i===matchPayScene);var payRule=data2[i].payRule;if(i===matchPayScene){this.curPayRule=payRule}var matchPayType=_findIndexInstanceProperty(payRule).call(payRule,function(payData){return payData.payType===_this2.defaultPayType});matchPayType=matchPayType<0?0:matchPayType;var _loop=function _loop2(){_this2.$set(payRule[j],"active",i===matchPayScene?j===matchPayType:j===0);var ruleDetail=payRule[j].ruleDetail||[];var _loop22=function _loop23(k2){if(~~ruleDetail[k2].needSign!==1)return 1;var index=_findIndexInstanceProperty(renderSignDesc).call(renderSignDesc,function(item){return item.signType===ruleDetail[k2].signType&&item.signDesc===ruleDetail[k2].signDesc});if(index<0){renderSignDesc.push({signType:ruleDetail[k2].signType,signDesc:ruleDetail[k2].signDesc})}};for(var k=0;k<ruleDetail.length;k++){if(_loop22(k))continue}};for(var j=0;j<payRule.length;j++){_loop()}}this.renderSignDesc=renderSignDesc;this.renderData=data2},refreshScroller:function refreshScroller(){var _this3=this;if(this.scroller){this.$nextTick(function(){_this3.scroller.refresh();_this3.paySceneLineShow=false})}},scrollToActiveTab:function scrollToActiveTab(){var _this4=this;this.$nextTick(function(){var activeBars=_this4.$refs.activeBar;var slideBar=_this4.$refs.slideBar;if(!activeBars||!activeBars.length||!slideBar)return;var activeBar;for(var i=0;i<activeBars.length;i++){var _context8;if(_includesInstanceProperty(_context8=activeBars[i].className).call(_context8,"isActive")){activeBar=activeBars[i];break}}if(!activeBar)return;var offsetLeft=activeBar.offsetLeft;slideBar.style.transform="translateX(".concat(offsetLeft,"px)")})},throttle:function throttle(fn,delay,atleast){var timer;var previous;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var now=+new Date;if(!previous)previous=now;if(now-previous>atleast){fn.apply(void 0,args);previous=now}else{clearTimeout(timer);timer=setTimeout(function(){fn.apply(void 0,args)},delay)}}},handelScroll:function handelScroll(pos){if(Math.abs(pos.y)>=18){this.paySceneLineShow=true}else{this.paySceneLineShow=false}}},created:function created(){this.initRenderData()},watch:{isVisible:function isVisible(value){var _this5=this;if(value){this.scrollToActiveTab();this.$nextTick(function(){var limitIntroduct=_this5.$refs.limitIntroduct;if(limitIntroduct){if(!_this5.scroller){_this5.scroller=new BScroll.bScroll(limitIntroduct,{bounce:false,click:true,probeType:3});var scrollFunc=_this5.throttle(_this5.handelScroll,50,100);_this5.scroller.on("scroll",scrollFunc)}else{_this5.scroller.refresh();_this5.paySceneLineShow=false}}})}else{this.reset()}},defaultPayScene:function defaultPayScene(){this.initRenderData()}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"center":false,"title":_vm.titleData||_vm.title},on:{"close":_vm.close}},[_c("div",{staticClass:"return",attrs:{"slot":"headerLeft"},on:{"click":_vm.toPayLimitShow},slot:"headerLeft"},[_vm.state===2?_c("i",{staticClass:"return-icon"}):_vm._e()]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.state===1,expression:"state === 1"}],staticClass:"limit-layer-body"},[_vm.renderData.length>1?_c("div",{staticClass:"pay-scene"},[_c("div",{ref:"slideBar",staticClass:"pay-scene-slide-bar",style:{"background-color":_vm.brandColor}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.paySceneLineShow,expression:"paySceneLineShow"}],staticClass:"pay-scene-line"}),_vm._l(_vm.renderData,function(item,index){return _c("div",{key:index,class:["pay-scene-tab",{"active":item.active}],on:{"click":function click($event){return _vm.paySceneSelect(_vm.renderData,index)}}},[_c("span",[_vm._v(" "+_vm._s(_vm.paySceneMap[item.payScene])+" ")]),_c("div",{ref:"activeBar",refInFor:true,class:["active-block",{"isActive":item.active}]})])})],2):_vm._e(),_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"limitIntroduct",staticClass:"introduct-wrap"},[_c("div",{staticClass:"introduct-body"},[_c("div",{staticClass:"introduct"},[_vm.payTypeShow?_c("div",{class:["pay-type-wrap",_vm.payTypeWrapClass]},[_c("div",{staticClass:"pay-type"},_vm._l(_vm.curPayRule,function(item,index){return _c("div",{key:index,class:["pay-type-tab",{"active":item.active}],style:{"color":item.active?_vm.brandColor:""},on:{"click":function click($event){return _vm.payTypeSelect(_vm.curPayRule,index)}}},[_vm._v(" "+_vm._s(item.payTypeDesc||_vm.payTypeMap[item.payType])+" ")])}),0)]):_vm._e(),_c("div",{staticClass:"pay-introduct",style:{"padding-top":!_vm.payTypeShow?"16px":""}},[_c("p",{staticClass:"title"},[_vm._v(" 支付说明: ")]),_c("div",{staticClass:"pay-introduct-content"},[_vm._v(" *实际以支付页面展示的支付方式为准 ")]),_vm.renderPayIntroduct&&_vm.renderPayIntroduct.length?_vm._l(_vm.renderPayIntroduct,function(item,index){return _c("div",{key:index,staticClass:"pay-introduct-content"},[_c("span",[_vm._v(_vm._s(index+1)+"、")]),_c("p",[_vm._v(_vm._s(item))])])}):_vm._e()],2),_c("div",{staticClass:"pay-table-content"},[_vm.isVisible?_c("pay-table",{attrs:{"ruleDetailData":_vm.renderRuleDetail.ruleDetailData,"ruleDetailConfig":_vm.renderRuleDetail.ruleDetailConfig,"brandColor":_vm.brandColor},on:{"toSignIntroduct":_vm.toSignIntroduct}}):_vm._e()],1)])])])]),_c("sign-introduct",{attrs:{"visible":_vm.state===2,"renderSignDesc":_vm.renderSignDesc,"isCps":_vm.isCps}})],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"882a85fc");var GoldPayLimitLayer=__component__.exports;GoldPayLimitLayer.install=function(Vue){Vue.component(GoldPayLimitLayer.name,GoldPayLimitLayer);Vue.prototype["$createGoldPayLimitLayer"]=utils_create.create(GoldPayLimitLayer,Vue)};exports.GoldPayLimitLayer=GoldPayLimitLayer;
1
+ "use strict";require('./style.css');var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var GoldPayLimitLayer_table=require("./table/index.js");var GoldPayLimitLayer_signIntroduct=require("./signIntroduct/index.js");var BScrollModule=require("better-scroll");var mixins_visible=require("../mixins/visible/index.js");var utils_helpers=require("../utils/helpers/index.js");var common=require("../common/index.js");var paySceneMap={1:"首期限额说明",2:"续期限额说明",3:"首期+续期限额说明"};var payTypeMap={1:"微信",2:"支付宝",3:"银联"};var _sfc_main={name:"ActGoldPayLimitLayer",mixins:[mixins_visible.visibleMixin],components:{ActGoldLayer:common_goldlayer.ActGoldLayer,payTable:GoldPayLimitLayer_table.payTable,signIntroduct:GoldPayLimitLayer_signIntroduct.signIntroduct},props:{title:{type:String,default:"支付限额说明"},brandColor:{type:String,default:"#8C7FEE"},btnColor:{type:String,default:"#8C7FEE"},payLimitData:{type:Array,default:function _default(){return[]}},defaultPayScene:{type:Number,default:1},defaultPayType:{type:Number,default:1}},data:function data(){return{paySceneMap,payTypeMap,activePaySceneIndex:0,activePayTypeIndex:0,curPayRule:[],renderData:[],renderSignDesc:[],titleData:"",state:1,paySceneLineShow:false}},computed:{isCps:function isCps(){if(this.brandColor!=="#8C7FEE"){return true}return false},renderRuleDetail:function renderRuleDetail(){var ruleDetailData=[];var ruleDetailConfig={};for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active){var ruleDetail=payRule[j].ruleDetail||[];var res=this.transRuleDetail(ruleDetail);ruleDetailData=res.ruleDetailData;ruleDetailConfig=res.ruleDetailConfig;break}}}else{continue}}return{ruleDetailData,ruleDetailConfig}},selectPayTypeIndex:function selectPayTypeIndex(){for(var i=0;i<this.curPayRule.length;i++){if(this.curPayRule[i].active){return i}}return 0},payTypeWrapClass:function payTypeWrapClass(){var _context;return _concatInstanceProperty(_context="select-back-".concat(this.curPayRule.length,"-")).call(_context,this.selectPayTypeIndex)},renderPayIntroduct:function renderPayIntroduct(){var renderPayIntroduct2=[];for(var i=0;i<this.renderData.length;i++){if(this.renderData[i].active){var payRule=this.renderData[i].payRule||[];for(var j=0;j<payRule.length;j++){if(payRule[j].active&&payRule[j].payDesc&&utils_helpers.isArray(payRule[j].payDesc)){renderPayIntroduct2=payRule[j].payDesc}}}}return renderPayIntroduct2},payTypeShow:function payTypeShow(){return this.curPayRule.length>1}},methods:{close:function close(){this.hide();this.$emit("close")},reset:function reset(){this.titleData="";this.state=1},toSignIntroduct:function toSignIntroduct(){this.titleData="名词说明";this.state=2},toPayLimitShow:function toPayLimitShow(){this.titleData="";this.state=1},paySceneSelect:function paySceneSelect(renderData,index){for(var i=0;i<renderData.length;i++){if(index===i&&!renderData[i].active){this.curPayRule=renderData[i].payRule||[];this.refreshScroller();this.scrollToActiveTab()}renderData[i].active=index===i}},transRuleDetail:function transRuleDetail(ruleDetail){var _this=this;if(!(ruleDetail&&utils_helpers.isArray(ruleDetail)))return;var transData={};var ruleDetailData=[];var realLimitShow=false;var batchLimitShow=false;var signTypeShow=false;var realAndBatchRuleShow=false;_forEachInstanceProperty(ruleDetail).call(ruleDetail,function(item){var renderRow={payItemName:item.payItemName};renderRow.payItemType=item.payItemType||"";if(~~item.canReal===1){var _context2,_context3;realLimitShow=true;var oneText=Number(item.realRule.once)?"".concat(Number(item.realRule.once)/1e4,"万"):"无";var dayText=Number(item.realRule.day)?"".concat(Number(item.realRule.day)/1e4,"万"):"无";var monthText=Number(item.realRule.month)?"".concat(Number(item.realRule.month)/1e4,"万"):"无";renderRow.payItemRealRule=_concatInstanceProperty(_context2=_concatInstanceProperty(_context3="".concat(oneText,"/")).call(_context3,dayText,"/")).call(_context2,monthText)}else{renderRow.payItemRealRule="--"}if(~~item.canBatch===1){var _context4,_context5;batchLimitShow=true;var _oneText=Number(item.batchRule.once)?"".concat(Number(item.batchRule.once)/1e4,"万"):"无";var _dayText=Number(item.batchRule.day)?"".concat(Number(item.batchRule.day)/1e4,"万"):"无";var _monthText=Number(item.batchRule.month)?"".concat(Number(item.batchRule.month)/1e4,"万"):"无";renderRow.payItemBatchRule=_concatInstanceProperty(_context4=_concatInstanceProperty(_context5="".concat(_oneText,"/")).call(_context5,_dayText,"/")).call(_context4,_monthText)}else{renderRow.payItemBatchRule="--"}if(~~item.canReal&&~~item.canBatch&&item.rbDesc){realAndBatchRuleShow=true}if(item.rbDesc){var _context6,_context7;renderRow.rbDesc={showDesc:item.rbDesc.length>6?_concatInstanceProperty(_context6="".concat(_sliceInstanceProperty(_context7=item.rbDesc).call(_context7,0,6),'...<span style="color:')).call(_context6,_this.brandColor,';">></span>'):item.rbDesc,fullDesc:item.rbDesc,needShowFullDesc:item.rbDesc.length>6}}else{renderRow.rbDesc={showDesc:"--",needShowFullDesc:false}}if(~~item.needSign===1&&item.signType!=="流程内签约"){signTypeShow=true}if(~~item.needSign===1){renderRow.signType=item.signType}else{renderRow.signType="无"}if(transData[item.payItemCode]){transData[item.payItemCode].push(renderRow)}else{transData[item.payItemCode]=[renderRow]}});for(var key in transData){if(transData[key]){ruleDetailData.push(transData[key])}}return{ruleDetailData,ruleDetailConfig:{realLimitShow,batchLimitShow,signTypeShow,realAndBatchRuleShow}}},payTypeSelect:function payTypeSelect(curPayRule,index){for(var i=0;i<curPayRule.length;i++){if(index===i&&!curPayRule[i].active){this.refreshScroller()}curPayRule[i].active=index===i}},initRenderData:function initRenderData(){var _this2=this;var data2=utils_helpers.deepCopy(this.payLimitData);var renderSignDesc=[];var matchPayScene=_findIndexInstanceProperty(data2).call(data2,function(payData){return payData.payScene===_this2.defaultPayScene});matchPayScene=matchPayScene<0?0:matchPayScene;for(var i=0;i<data2.length;i++){this.$set(data2[i],"active",i===matchPayScene);var payRule=data2[i].payRule;if(i===matchPayScene){this.curPayRule=payRule}var matchPayType=_findIndexInstanceProperty(payRule).call(payRule,function(payData){return payData.payType===_this2.defaultPayType});matchPayType=matchPayType<0?0:matchPayType;var _loop=function _loop2(){_this2.$set(payRule[j],"active",i===matchPayScene?j===matchPayType:j===0);var ruleDetail=payRule[j].ruleDetail||[];var _loop22=function _loop23(k2){if(~~ruleDetail[k2].needSign!==1)return 1;var index=_findIndexInstanceProperty(renderSignDesc).call(renderSignDesc,function(item){return item.signType===ruleDetail[k2].signType&&item.signDesc===ruleDetail[k2].signDesc});if(index<0){renderSignDesc.push({signType:ruleDetail[k2].signType,signDesc:ruleDetail[k2].signDesc})}};for(var k=0;k<ruleDetail.length;k++){if(_loop22(k))continue}};for(var j=0;j<payRule.length;j++){_loop()}}this.renderSignDesc=renderSignDesc;this.renderData=data2},refreshScroller:function refreshScroller(){var _this3=this;if(this.scroller){this.$nextTick(function(){_this3.scroller.refresh();_this3.paySceneLineShow=false})}},scrollToActiveTab:function scrollToActiveTab(){var _this4=this;this.$nextTick(function(){var activeBars=_this4.$refs.activeBar;var slideBar=_this4.$refs.slideBar;if(!activeBars||!activeBars.length||!slideBar)return;var activeBar;for(var i=0;i<activeBars.length;i++){var _context8;if(_includesInstanceProperty(_context8=activeBars[i].className).call(_context8,"isActive")){activeBar=activeBars[i];break}}if(!activeBar)return;var offsetLeft=activeBar.offsetLeft;slideBar.style.transform="translateX(".concat(offsetLeft,"px)")})},throttle:function throttle(fn,delay,atleast){var timer;var previous;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var now=+new Date;if(!previous)previous=now;if(now-previous>atleast){fn.apply(void 0,args);previous=now}else{clearTimeout(timer);timer=setTimeout(function(){fn.apply(void 0,args)},delay)}}},handelScroll:function handelScroll(pos){if(Math.abs(pos.y)>=18){this.paySceneLineShow=true}else{this.paySceneLineShow=false}}},created:function created(){this.initRenderData()},watch:{isVisible:function isVisible(value){var _this5=this;if(value){this.scrollToActiveTab();this.$nextTick(function(){var limitIntroduct=_this5.$refs.limitIntroduct;if(limitIntroduct){if(!_this5.scroller){_this5.scroller=new BScrollModule(limitIntroduct,{bounce:false,click:true,probeType:3});var scrollFunc=_this5.throttle(_this5.handelScroll,50,100);_this5.scroller.on("scroll",scrollFunc)}else{_this5.scroller.refresh();_this5.paySceneLineShow=false}}})}else{this.reset()}},defaultPayScene:function defaultPayScene(){this.initRenderData()}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"center":false,"title":_vm.titleData||_vm.title},on:{"close":_vm.close}},[_c("div",{staticClass:"return",attrs:{"slot":"headerLeft"},on:{"click":_vm.toPayLimitShow},slot:"headerLeft"},[_vm.state===2?_c("i",{staticClass:"return-icon"}):_vm._e()]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.state===1,expression:"state === 1"}],staticClass:"limit-layer-body"},[_vm.renderData.length>1?_c("div",{staticClass:"pay-scene"},[_c("div",{ref:"slideBar",staticClass:"pay-scene-slide-bar",style:{"background-color":_vm.brandColor}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.paySceneLineShow,expression:"paySceneLineShow"}],staticClass:"pay-scene-line"}),_vm._l(_vm.renderData,function(item,index){return _c("div",{key:index,class:["pay-scene-tab",{"active":item.active}],on:{"click":function click($event){return _vm.paySceneSelect(_vm.renderData,index)}}},[_c("span",[_vm._v(" "+_vm._s(_vm.paySceneMap[item.payScene])+" ")]),_c("div",{ref:"activeBar",refInFor:true,class:["active-block",{"isActive":item.active}]})])})],2):_vm._e(),_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"limitIntroduct",staticClass:"introduct-wrap"},[_c("div",{staticClass:"introduct-body"},[_c("div",{staticClass:"introduct"},[_vm.payTypeShow?_c("div",{class:["pay-type-wrap",_vm.payTypeWrapClass]},[_c("div",{staticClass:"pay-type"},_vm._l(_vm.curPayRule,function(item,index){return _c("div",{key:index,class:["pay-type-tab",{"active":item.active}],style:{"color":item.active?_vm.brandColor:""},on:{"click":function click($event){return _vm.payTypeSelect(_vm.curPayRule,index)}}},[_vm._v(" "+_vm._s(item.payTypeDesc||_vm.payTypeMap[item.payType])+" ")])}),0)]):_vm._e(),_c("div",{staticClass:"pay-introduct",style:{"padding-top":!_vm.payTypeShow?"16px":""}},[_c("p",{staticClass:"title"},[_vm._v(" 支付说明: ")]),_c("div",{staticClass:"pay-introduct-content"},[_vm._v(" *实际以支付页面展示的支付方式为准 ")]),_vm.renderPayIntroduct&&_vm.renderPayIntroduct.length?_vm._l(_vm.renderPayIntroduct,function(item,index){return _c("div",{key:index,staticClass:"pay-introduct-content"},[_c("span",[_vm._v(_vm._s(index+1)+"、")]),_c("p",[_vm._v(_vm._s(item))])])}):_vm._e()],2),_c("div",{staticClass:"pay-table-content"},[_vm.isVisible?_c("pay-table",{attrs:{"ruleDetailData":_vm.renderRuleDetail.ruleDetailData,"ruleDetailConfig":_vm.renderRuleDetail.ruleDetailConfig,"brandColor":_vm.brandColor},on:{"toSignIntroduct":_vm.toSignIntroduct}}):_vm._e()],1)])])])]),_c("sign-introduct",{attrs:{"visible":_vm.state===2,"renderSignDesc":_vm.renderSignDesc,"isCps":_vm.isCps}})],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"882a85fc");var GoldPayLimitLayer=__component__.exports;GoldPayLimitLayer.install=function(Vue){Vue.component(GoldPayLimitLayer.name,GoldPayLimitLayer);Vue.prototype["$createGoldPayLimitLayer"]=utils_create.create(GoldPayLimitLayer,Vue)};exports.GoldPayLimitLayer=GoldPayLimitLayer;
@@ -7,7 +7,7 @@ import { c as create } from "../utils/create/index.mjs";
7
7
  import { A as ActGoldLayer } from "../common/goldlayer/index.mjs";
8
8
  import { p as payTable } from "./table/index.mjs";
9
9
  import { s as signIntroduct } from "./signIntroduct/index.mjs";
10
- import { b as bScroll } from "../BScroll/index.mjs";
10
+ import BScrollModule__default from "better-scroll";
11
11
  import { v as visibleMixin } from "../mixins/visible/index.mjs";
12
12
  import { m as deepCopy, l as isArray } from "../utils/helpers/index.mjs";
13
13
  import { n as normalizeComponent } from "../common/index.mjs";
@@ -359,7 +359,7 @@ var _sfc_main = {
359
359
  var limitIntroduct = _this5.$refs.limitIntroduct;
360
360
  if (limitIntroduct) {
361
361
  if (!_this5.scroller) {
362
- _this5.scroller = new bScroll(limitIntroduct, {
362
+ _this5.scroller = new BScrollModule__default(limitIntroduct, {
363
363
  bounce: false,
364
364
  click: true,
365
365
  probeType: 3
@@ -1 +1 @@
1
- "use strict";require('./style.css');var BScroll=require("../../BScroll/index.js");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitSignIntroduct",data:function data(){return{}},props:{renderSignDesc:{type:Array,default:function _default(){return[]}},visible:{type:Boolean,default:false},isCps:{type:Boolean,default:false}},methods:{initScroll:function initScroll(){var _this=this;this.$nextTick(function(){var signWrapper=_this.$refs.signWrapper;if(signWrapper){if(!_this.scroller){_this.scroller=new BScroll.bScroll(signWrapper,{bounce:false})}else{_this.scroller.refresh()}}})}},watch:{visible:function visible(value){if(value){this.initScroll()}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"sign-introduct"},[_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"signWrapper",staticClass:"sign-introduct-body"},[_c("div",{staticClass:"sign-introduct-content"},[_c("div",{staticClass:"sign-introduct-items"},[_vm._l(_vm.renderSignDesc,function(item,index){return[_c("div",{key:"sing-introduct-item".concat(index),staticClass:"sign-introduct-item"},[_c("div",{staticClass:"head-title"},[_c("p",[_vm._v(_vm._s(item.signType))]),_c("div",{staticClass:"head-bg",class:{"cps":_vm.isCps}})]),_c("div",{staticClass:"bottom-line"}),_c("p",{staticClass:"content"},[_vm._v(" "+_vm._s(item.signDesc)+" ")])])]})],2)])])])};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"0c7b2c0b");var signIntroduct=__component__.exports;exports.signIntroduct=signIntroduct;
1
+ "use strict";require('./style.css');var BScrollModule=require("better-scroll");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitSignIntroduct",data:function data(){return{}},props:{renderSignDesc:{type:Array,default:function _default(){return[]}},visible:{type:Boolean,default:false},isCps:{type:Boolean,default:false}},methods:{initScroll:function initScroll(){var _this=this;this.$nextTick(function(){var signWrapper=_this.$refs.signWrapper;if(signWrapper){if(!_this.scroller){_this.scroller=new BScrollModule(signWrapper,{bounce:false})}else{_this.scroller.refresh()}}})}},watch:{visible:function visible(value){if(value){this.initScroll()}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"sign-introduct"},[_c("div",{staticClass:"gradual-color"}),_c("div",{ref:"signWrapper",staticClass:"sign-introduct-body"},[_c("div",{staticClass:"sign-introduct-content"},[_c("div",{staticClass:"sign-introduct-items"},[_vm._l(_vm.renderSignDesc,function(item,index){return[_c("div",{key:"sing-introduct-item".concat(index),staticClass:"sign-introduct-item"},[_c("div",{staticClass:"head-title"},[_c("p",[_vm._v(_vm._s(item.signType))]),_c("div",{staticClass:"head-bg",class:{"cps":_vm.isCps}})]),_c("div",{staticClass:"bottom-line"}),_c("p",{staticClass:"content"},[_vm._v(" "+_vm._s(item.signDesc)+" ")])])]})],2)])])])};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"0c7b2c0b");var signIntroduct=__component__.exports;exports.signIntroduct=signIntroduct;
@@ -1,4 +1,4 @@
1
- import { b as bScroll } from "../../BScroll/index.mjs";
1
+ import BScrollModule__default from "better-scroll";
2
2
  import { n as normalizeComponent } from "../../common/index.mjs";
3
3
  import './style.css';var _sfc_main = {
4
4
  name: "PayLimitSignIntroduct",
@@ -30,7 +30,7 @@ import './style.css';var _sfc_main = {
30
30
  var signWrapper = _this.$refs.signWrapper;
31
31
  if (signWrapper) {
32
32
  if (!_this.scroller) {
33
- _this.scroller = new bScroll(signWrapper, {
33
+ _this.scroller = new BScrollModule__default(signWrapper, {
34
34
  bounce: false
35
35
  });
36
36
  } else {
@@ -1 +1 @@
1
- "use strict";require('./style.css');var BScroll=require("../../BScroll/index.js");var utils_helpers=require("../../utils/helpers/index.js");var __$_require_41378d9c__=require("../../assets/question.ce8a.png");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitTable",props:{ruleDetailData:{type:Array,default:function _default(){return[]}},ruleDetailConfig:{type:Object,default:function _default2(){return[]}},brandColor:{type:String,default:"#8C7FEE"}},computed:{showTable:function showTable(){if(this.ruleDetailData&&utils_helpers.isArray(this.ruleDetailData)&&this.ruleDetailData.length){return true}return false}},data:function data(){return{dialog:null}},methods:{showFullDesc:function showFullDesc(rbDesc){if(rbDesc.needShowFullDesc){if(this.dialog){this.dialog.setData("",rbDesc.fullDesc)}else{this.dialog=this.$createGoldDialog({closable:true,content:rbDesc.fullDesc,showConfirmButton:false})}this.dialog.show()}},toSignIntroduct:function toSignIntroduct(){this.$emit("toSignIntroduct")}},watch:{ruleDetailData:{handler:function handler(value){var _this=this;if(value){this.$nextTick(function(){var tables=_this.$refs.payTable;if(tables){if(!_this.scroller){_this.scroller=new BScroll.bScroll(tables,{scrollX:true,scrollY:false,click:true,bounce:false})}else{_this.scroller.refresh()}}})}},immediate:true}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showTable,expression:"showTable"}],ref:"payTable",staticClass:"pay-table"},[_c("div",{staticStyle:{"display":"inline-block","padding":"0 12px","min-width":"100%"}},[_c("table",{staticClass:"pay-table-body"},[_c("thead",[_c("tr",[_c("th",{staticClass:"center"},[_vm._v(" 支付方式 ")]),_c("th",[_vm._v("支付类型")]),_vm.ruleDetailConfig.realLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 非实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("th",[_vm._v(" 实时扣和 "),_c("br"),_vm._v(" 非实时扣款规则 ")]):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("th",{staticClass:"with-icon",on:{"click":_vm.toSignIntroduct}},[_vm._m(0)]):_vm._e()])]),_c("tbody",[_vm._l(_vm.ruleDetailData,function(curGroupRuleDetail,i){return _vm._l(curGroupRuleDetail,function(curRuleDetail,j){return _c("tr",{key:i+j},[j===0?_c("td",{staticClass:"center",style:{"border-bottom":i===_vm.ruleDetailData.length-1?"none":""},attrs:{"rowspan":j===0?curGroupRuleDetail.length:1}},[_vm._v(" "+_vm._s(curRuleDetail.payItemName)+" ")]):_vm._e(),_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemType)+" ")]),_vm.ruleDetailConfig.realLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemRealRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemBatchRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("td",{domProps:{"innerHTML":_vm._s(curRuleDetail.rbDesc.showDesc)},on:{"click":function click($event){return _vm.showFullDesc(curRuleDetail.rbDesc)}}}):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.signType)+" ")]):_vm._e()])})})],2)])])])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",[_vm._v(" 签约方式 "),_c("img",{attrs:{"src":__$_require_41378d9c__,"alt":""}})])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"7a638d25");var payTable=__component__.exports;exports.payTable=payTable;
1
+ "use strict";require('./style.css');var BScrollModule=require("better-scroll");var utils_helpers=require("../../utils/helpers/index.js");var __$_require_41378d9c__=require("../../assets/question.ce8a.png");var common=require("../../common/index.js");var _sfc_main={name:"PayLimitTable",props:{ruleDetailData:{type:Array,default:function _default(){return[]}},ruleDetailConfig:{type:Object,default:function _default2(){return[]}},brandColor:{type:String,default:"#8C7FEE"}},computed:{showTable:function showTable(){if(this.ruleDetailData&&utils_helpers.isArray(this.ruleDetailData)&&this.ruleDetailData.length){return true}return false}},data:function data(){return{dialog:null}},methods:{showFullDesc:function showFullDesc(rbDesc){if(rbDesc.needShowFullDesc){if(this.dialog){this.dialog.setData("",rbDesc.fullDesc)}else{this.dialog=this.$createGoldDialog({closable:true,content:rbDesc.fullDesc,showConfirmButton:false})}this.dialog.show()}},toSignIntroduct:function toSignIntroduct(){this.$emit("toSignIntroduct")}},watch:{ruleDetailData:{handler:function handler(value){var _this=this;if(value){this.$nextTick(function(){var tables=_this.$refs.payTable;if(tables){if(!_this.scroller){_this.scroller=new BScrollModule(tables,{scrollX:true,scrollY:false,click:true,bounce:false})}else{_this.scroller.refresh()}}})}},immediate:true}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showTable,expression:"showTable"}],ref:"payTable",staticClass:"pay-table"},[_c("div",{staticStyle:{"display":"inline-block","padding":"0 12px","min-width":"100%"}},[_c("table",{staticClass:"pay-table-body"},[_c("thead",[_c("tr",[_c("th",{staticClass:"center"},[_vm._v(" 支付方式 ")]),_c("th",[_vm._v("支付类型")]),_vm.ruleDetailConfig.realLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("th",[_vm._v(" 单笔/单日/单月 "),_c("br"),_vm._v(" 非实时限额 ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("th",[_vm._v(" 实时扣和 "),_c("br"),_vm._v(" 非实时扣款规则 ")]):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("th",{staticClass:"with-icon",on:{"click":_vm.toSignIntroduct}},[_vm._m(0)]):_vm._e()])]),_c("tbody",[_vm._l(_vm.ruleDetailData,function(curGroupRuleDetail,i){return _vm._l(curGroupRuleDetail,function(curRuleDetail,j){return _c("tr",{key:i+j},[j===0?_c("td",{staticClass:"center",style:{"border-bottom":i===_vm.ruleDetailData.length-1?"none":""},attrs:{"rowspan":j===0?curGroupRuleDetail.length:1}},[_vm._v(" "+_vm._s(curRuleDetail.payItemName)+" ")]):_vm._e(),_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemType)+" ")]),_vm.ruleDetailConfig.realLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemRealRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.batchLimitShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.payItemBatchRule)+" ")]):_vm._e(),_vm.ruleDetailConfig.realAndBatchRuleShow?_c("td",{domProps:{"innerHTML":_vm._s(curRuleDetail.rbDesc.showDesc)},on:{"click":function click($event){return _vm.showFullDesc(curRuleDetail.rbDesc)}}}):_vm._e(),_vm.ruleDetailConfig.signTypeShow?_c("td",[_vm._v(" "+_vm._s(curRuleDetail.signType)+" ")]):_vm._e()])})})],2)])])])};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",[_vm._v(" 签约方式 "),_c("img",{attrs:{"src":__$_require_41378d9c__,"alt":""}})])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"7a638d25");var payTable=__component__.exports;exports.payTable=payTable;
@@ -1,4 +1,4 @@
1
- import { b as bScroll } from "../../BScroll/index.mjs";
1
+ import BScrollModule__default from "better-scroll";
2
2
  import { l as isArray } from "../../utils/helpers/index.mjs";
3
3
  import __$_require_41378d9c__ from "../../assets/question.ce8a.png";
4
4
  import { n as normalizeComponent } from "../../common/index.mjs";
@@ -64,7 +64,7 @@ import './style.css';var _sfc_main = {
64
64
  var tables = _this.$refs.payTable;
65
65
  if (tables) {
66
66
  if (!_this.scroller) {
67
- _this.scroller = new bScroll(tables, {
67
+ _this.scroller = new BScrollModule__default(tables, {
68
68
  scrollX: true,
69
69
  scrollY: false,
70
70
  click: true,
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _valuesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/values");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context11,_context12;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context11=ownKeys(Object(t),true)).call(_context11,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context12=ownKeys(Object(t))).call(_context12,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var Loading=require("../Loading/index.js");var BScroll=require("../BScroll/index.js");var MedicalListLayer_component_medicalList=require("./component/medicalList/index.js");var utils_helpers=require("../utils/helpers/index.js");var __$_require_263bdd0a__=require("../assets/icon-search.3c97.png");var __$_require_e9a2481a__=require("../assets/icon-close.b233.png");var __$_require_450b57d0__=require("../assets/icon-nodata.16b6.png");var __$_require_5419c642__=require("../assets/icon-nodata-cps.192f.png");var common=require("../common/index.js");var _sfc_main={name:"MedicalListLayer",data:function data(){return{selectValue:[],isVisible:false,searchKeyword:"",hasSearched:false,filterOptions:[],medicalList:[],totalCount:0,pageSize:20,currentPage:1,hasMore:false,loading:false,zIndex:999,firstFilters:[],activeFirstKey:"",isShowTagMenu:false,secondTagFilters:{},docmHeight:document.documentElement.clientHeight,pickerContentHeight:0,searchHeight:"",isShowActLoading:false}},components:{ActGoldLayer:common_goldlayer.ActGoldLayer,MedicalList:MedicalListLayer_component_medicalList.MedicalList,ActLoading:Loading.Loading},props:{paramsData:{type:Object,default:function _default(){return{}}},title:{type:String,default:"药品清单"},isCps:{type:Boolean,default:false},searchEmptyResultTips:{type:String,default:"找不到相关药品"},searchEmptyResultDesc:{type:String,default:"您可以更换一下药品名称搜索哦"},placeholder:{type:String,default:"请输入您要查询的药品名称"},brandColor:{type:String,default:"#8c7fee"}},created:function created(){var _this=this;var u=navigator.userAgent;if(_indexOfInstanceProperty(u).call(u,"Android")>-1||_indexOfInstanceProperty(u).call(u,"Adr")>-1){this.handleResize=function(){if(_this.pickerContentHeight===0){return}var showHeight=document.body.clientHeight;if(_this.docmHeight>showHeight){_this.$refs.pickerContent.style.height=_this.docmHeight-showHeight+"px";_this.searchHeight=_this.pickerContentHeight+showHeight-_this.docmHeight+"px"}else{_this.$refs.pickerContent.style.height=_this.pickerContentHeight+"px";_this.searchHeight="100%"}};window.addEventListener("resize",this.handleResize)}},beforeDestroy:function beforeDestroy(){if(this.handleResize){window.removeEventListener("resize",this.handleResize)}},methods:{maskClick:function maskClick(){this.closeDropdown();this.isVisible=false},cancel:function cancel(){this.isVisible=false},show:function show(){this.isVisible=true;if(!this.medicalList.length){this.initData()}else{this.refreshScroll()}},initData:function initData(){this.currentPage=1;this.medicalList=[];this.fetchData(true)},fetchData:function fetchData(){var _context,_this2=this;var init=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;var reset=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;if(this.loading)return;if(init){this.isShowActLoading=true}this.loading=true;var postData={filter:{},page:this.currentPage,showNum:20};for(var key in this.paramsData){var value=this.paramsData[key];if(value!==""&&value!=null&&value!==void 0){postData[key]=this.paramsData[key]}}if(this.searchKeyword){_filterInstanceProperty(postData).name=this.searchKeyword}_forEachInstanceProperty(_context=this.firstFilters).call(_context,function(filter){if(filter.selectedValue){_filterInstanceProperty(postData)[filter.key]=filter.selectedValue}});this.$fetch("/buy/getMedicineList",postData).then(function(res){var ret=res.ret,errmsg=res.errmsg,data2=res.data;if(+ret===0){if(reset){_this2.medicalList=[];_this2.scrollTop()}var newList=data2.list||[];_this2.totalCount=Number(data2.count)||0;_this2.transformMedicalList(newList);_this2.hasMore=_this2.medicalList.length<_this2.totalCount;_this2.loading=false;if(!_this2.filterOptions||!_this2.filterOptions.length){_this2.filterOptions=data2.filterLabels||[];_this2.transformFilterOptions()}_this2.refreshScroll()}else{_this2.$toast.show(errmsg)}}).catch(function(err){}).finally(function(){_this2.loading=false;_this2.isShowActLoading=false;_this2.hasSearched=true})},transformMedicalList:function transformMedicalList(list){var _context2;var color=this.isCps?"#F05A4B":"#8C7FEE";if(this.searchKeyword){var reg=new RegExp("(".concat(this.searchKeyword,")"),"g");_forEachInstanceProperty(list).call(list,function(item){item.name=item.name.replace(reg,'<span style="color: '.concat(color,';">$1</span>'))})}this.medicalList=_concatInstanceProperty(_context2=[]).call(_context2,_toConsumableArray(this.medicalList),_toConsumableArray(list))},transformFilterOptions:function transformFilterOptions(){var _context3,_context4,_this3=this;this.firstFilters=_mapInstanceProperty(_context3=this.filterOptions).call(_context3,function(filter){return _objectSpread(_objectSpread({},filter),{},{selectedValue:"",selectedText:""})});this.secondTagFilters={};_forEachInstanceProperty(_context4=this.filterOptions).call(_context4,function(filter){var _context5;var key=filter.key;var values=_mapInstanceProperty(_context5=_valuesInstanceProperty(filter)).call(_context5,function(value){return _objectSpread(_objectSpread({},value),{},{actived:false})});values.unshift({value:"",text:"全部",actived:true});_this3.secondTagFilters[key]=values})},closeDropdown:function closeDropdown(){this.isShowTagMenu=false},isOptionSelected:function isOptionSelected(option){return option.actived},toggleDropdown:function toggleDropdown(item){if(this.activeFirstKey===item.key){this.isShowTagMenu=!this.isShowTagMenu;if(!this.isShowTagMenu){this.activeFirstKey=""}}else{this.isShowTagMenu=true;this.activeFirstKey=item.key}},selectOption:function selectOption(option){var _context6,_this4=this;var filterIndex=_findIndexInstanceProperty(_context6=this.firstFilters).call(_context6,function(item){return item.key===_this4.activeFirstKey});if(filterIndex!==-1){this.firstFilters[filterIndex].selectedValue=option.value;this.firstFilters[filterIndex].selectedText=option.text;if(this.secondTagFilters[this.activeFirstKey]){var _context7;_forEachInstanceProperty(_context7=this.secondTagFilters[this.activeFirstKey]).call(_context7,function(item){item.actived=item.value===option.value})}}this.activeFirstKey=null;this.isShowTagMenu=false;this.resetSearch()},getDisplayText:function getDisplayText(item){return item.selectedValue?item.selectedText:item.text},getFilterValues:function getFilterValues(){var _context8;return _mapInstanceProperty(_context8=this.firstFilters).call(_context8,function(filter){return{key:filter.key,selectedValue:filter.selectedOption?filter.selectedOption.value:null}})},loadMore:function loadMore(){if(!this.hasMore||this.loading)return;this.currentPage++;this.fetchData()},handleSearch:function handleSearch(){var _context9,_context0,_this5=this;_forEachInstanceProperty(_context9=this.firstFilters).call(_context9,function(filter){filter.selectedValue="";filter.selectedText=""});_forEachInstanceProperty(_context0=_Object$keys(this.secondTagFilters)).call(_context0,function(key){var _context1;_forEachInstanceProperty(_context1=_this5.secondTagFilters[key]).call(_context1,function(item){item.actived=item.value===""})});this.resetSearch()},clear:function clear(){this.searchKeyword="";this.resetSearch()},resetSearch:function resetSearch(){this.currentPage=1;this.fetchData(false,true)},refreshScroll:function refreshScroll(){var _this6=this;this.$nextTick(function(){if(!_this6.scroll){_this6.scroll=new BScroll.bScroll(_this6.$refs.medicalList,{click:true,damping:.6});_this6.scroll.on("scrollEnd",function(){if(_this6.scroll.y<=_this6.scroll.maxScrollY+50){if(_this6.hasMore&&!_this6.loading){_this6.loadMore()}}})}else{_this6.scroll.refresh()}})},scrollTop:function scrollTop(){this.scroll.scrollTo(0,0,300)}},watch:{isVisible:function isVisible(newVal){var _this7=this;if(!this.pickerContentHeight&&newVal){this.$nextTick(function(){_this7.pickerContentHeight=utils_helpers.outerHeight(_this7.$refs.pickerContent)})}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"layer-wrap"},[_c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"title":_vm.title,"center":false,"mask":true,"zIndex":_vm.zIndex},on:{"close":_vm.maskClick}},[_c("div",{ref:"pickerContent",staticClass:"picker-content"},[_c("div",{staticClass:"content",on:{"click":_vm.closeDropdown}},[_c("div",{staticClass:"gradual-color"}),_c("div",{staticClass:"header-box"},[_c("form",{staticClass:"search-box",on:{"submit":function submit($event){$event.preventDefault();return _vm.handleSearch.apply(null,arguments)}}},[_c("img",{staticClass:"search-icon",attrs:{"src":__$_require_263bdd0a__,"alt":""}}),_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.searchKeyword,expression:"searchKeyword"}],attrs:{"type":"text","placeholder":_vm.placeholder},domProps:{"value":_vm.searchKeyword},on:{"keyup":function keyup($event){var _context10;if(!_indexOfInstanceProperty(_context10=$event.type).call(_context10,"key")&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter"))return null;return _vm.handleSearch.apply(null,arguments)},"input":function input($event){if($event.target.composing)return;_vm.searchKeyword=$event.target.value}}}),_vm.searchKeyword?_c("img",{staticClass:"close-icon",attrs:{"src":__$_require_e9a2481a__,"alt":""},on:{"click":_vm.clear}}):_vm._e(),_c("button",{staticStyle:{"display":"none"},attrs:{"type":"submit"}},[_vm._v("搜索")])])]),_c("div",{staticClass:"search-content"},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.firstFilters&&_vm.firstFilters.length,expression:"firstFilters && firstFilters.length"}],staticClass:"search-tags-content",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"search-tags-first"},_vm._l(_vm.firstFilters,function(item,index){return _c("div",{key:item.key,staticClass:"filter-item",on:{"click":function click($event){return _vm.toggleDropdown(item,index)}}},[_c("span",{class:{"active":item.selectedValue,"cps":_vm.isCps}},[_vm._v(_vm._s(_vm.getDisplayText(item)))]),_c("i",{class:["arrow-icon",_vm.activeFirstKey===item.key?"up":"down"]})])}),0),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isShowTagMenu,expression:"isShowTagMenu"}],staticClass:"search-tags-second dropdown-menu"},[_c("div",{staticClass:"dropdown-menu-container"},_vm._l(_vm.secondTagFilters[_vm.activeFirstKey],function(option){return _c("div",{key:option.value,staticClass:"dropdown-item",class:{"active":_vm.isOptionSelected(option),"cps":_vm.isCps},on:{"click":function click($event){return _vm.selectOption(option)}}},[_vm._v(" "+_vm._s(option.text)+" ")])}),0)])]),_c("div",{staticStyle:{"height":"4.5rem","width":"100%"}}),_c("div",{staticClass:"table-scroll-bg",style:"height: ".concat(5*_vm.medicalList.length,"rem")}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.medicalList&&_vm.medicalList.length,expression:"medicalList && medicalList.length"}],ref:"medicalList",staticClass:"medical-list-scroll"},[_c("div",{staticClass:"scroll-content"},[_c("div",{staticClass:"scroll-list"},[_c("medical-list",{attrs:{"list":_vm.medicalList}}),_vm.hasMore?_c("div",{staticClass:"load-more",on:{"click":_vm.loadMore}},[_vm._v(" 滑动加载更多 ")]):_vm._e()],1),_c("div",{staticStyle:{"height":"3.2rem","width":"100%"}})])]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.hasSearched&&_vm.medicalList.length===0,expression:"hasSearched && medicalList.length === 0"}],staticClass:"search-empty"},[!_vm.isCps?_c("img",{attrs:{"src":__$_require_450b57d0__}}):_c("img",{attrs:{"src":__$_require_5419c642__}}),_c("h4",{staticClass:"tip"},[_vm._v(_vm._s(_vm.searchEmptyResultTips))]),_c("p",{staticClass:"desc"},[_vm._v(_vm._s(_vm.searchEmptyResultDesc))])]),_vm.isShowActLoading?_c("div",{staticClass:"loading"},[_c("act-loading",{directives:[{name:"show",rawName:"v-show",value:true,expression:"true"}],attrs:{"type":"cir3","color":_vm.brandColor,"size":35}})],1):_vm._e()])])])])],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"fd644c7c");var MedicalListLayer=__component__.exports;MedicalListLayer.install=function(Vue){Vue.component(MedicalListLayer.name,MedicalListLayer);Vue.prototype["$createMedicalListLayer"]=utils_create.create(MedicalListLayer,Vue)};exports.MedicalListLayer=MedicalListLayer;
1
+ "use strict";require('./style.css');var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _concatInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/concat");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _valuesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/values");var _findIndexInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find-index");var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context11,_context12;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context11=ownKeys(Object(t),true)).call(_context11,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context12=ownKeys(Object(t))).call(_context12,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var common_goldlayer=require("../common/goldlayer/index.js");var Loading=require("../Loading/index.js");var BScrollModule=require("better-scroll");var MedicalListLayer_component_medicalList=require("./component/medicalList/index.js");var utils_helpers=require("../utils/helpers/index.js");var __$_require_263bdd0a__=require("../assets/icon-search.3c97.png");var __$_require_e9a2481a__=require("../assets/icon-close.b233.png");var __$_require_450b57d0__=require("../assets/icon-nodata.16b6.png");var __$_require_5419c642__=require("../assets/icon-nodata-cps.192f.png");var common=require("../common/index.js");var _sfc_main={name:"MedicalListLayer",data:function data(){return{selectValue:[],isVisible:false,searchKeyword:"",hasSearched:false,filterOptions:[],medicalList:[],totalCount:0,pageSize:20,currentPage:1,hasMore:false,loading:false,zIndex:999,firstFilters:[],activeFirstKey:"",isShowTagMenu:false,secondTagFilters:{},docmHeight:document.documentElement.clientHeight,pickerContentHeight:0,searchHeight:"",isShowActLoading:false}},components:{ActGoldLayer:common_goldlayer.ActGoldLayer,MedicalList:MedicalListLayer_component_medicalList.MedicalList,ActLoading:Loading.Loading},props:{paramsData:{type:Object,default:function _default(){return{}}},title:{type:String,default:"药品清单"},isCps:{type:Boolean,default:false},searchEmptyResultTips:{type:String,default:"找不到相关药品"},searchEmptyResultDesc:{type:String,default:"您可以更换一下药品名称搜索哦"},placeholder:{type:String,default:"请输入您要查询的药品名称"},brandColor:{type:String,default:"#8c7fee"}},created:function created(){var _this=this;var u=navigator.userAgent;if(_indexOfInstanceProperty(u).call(u,"Android")>-1||_indexOfInstanceProperty(u).call(u,"Adr")>-1){this.handleResize=function(){if(_this.pickerContentHeight===0){return}var showHeight=document.body.clientHeight;if(_this.docmHeight>showHeight){_this.$refs.pickerContent.style.height=_this.docmHeight-showHeight+"px";_this.searchHeight=_this.pickerContentHeight+showHeight-_this.docmHeight+"px"}else{_this.$refs.pickerContent.style.height=_this.pickerContentHeight+"px";_this.searchHeight="100%"}};window.addEventListener("resize",this.handleResize)}},beforeDestroy:function beforeDestroy(){if(this.handleResize){window.removeEventListener("resize",this.handleResize)}},methods:{maskClick:function maskClick(){this.closeDropdown();this.isVisible=false},cancel:function cancel(){this.isVisible=false},show:function show(){this.isVisible=true;if(!this.medicalList.length){this.initData()}else{this.refreshScroll()}},initData:function initData(){this.currentPage=1;this.medicalList=[];this.fetchData(true)},fetchData:function fetchData(){var _context,_this2=this;var init=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;var reset=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;if(this.loading)return;if(init){this.isShowActLoading=true}this.loading=true;var postData={filter:{},page:this.currentPage,showNum:20};for(var key in this.paramsData){var value=this.paramsData[key];if(value!==""&&value!=null&&value!==void 0){postData[key]=this.paramsData[key]}}if(this.searchKeyword){_filterInstanceProperty(postData).name=this.searchKeyword}_forEachInstanceProperty(_context=this.firstFilters).call(_context,function(filter){if(filter.selectedValue){_filterInstanceProperty(postData)[filter.key]=filter.selectedValue}});this.$fetch("/buy/getMedicineList",postData).then(function(res){var ret=res.ret,errmsg=res.errmsg,data2=res.data;if(+ret===0){if(reset){_this2.medicalList=[];_this2.scrollTop()}var newList=data2.list||[];_this2.totalCount=Number(data2.count)||0;_this2.transformMedicalList(newList);_this2.hasMore=_this2.medicalList.length<_this2.totalCount;_this2.loading=false;if(!_this2.filterOptions||!_this2.filterOptions.length){_this2.filterOptions=data2.filterLabels||[];_this2.transformFilterOptions()}_this2.refreshScroll()}else{_this2.$toast.show(errmsg)}}).catch(function(err){}).finally(function(){_this2.loading=false;_this2.isShowActLoading=false;_this2.hasSearched=true})},transformMedicalList:function transformMedicalList(list){var _context2;var color=this.isCps?"#F05A4B":"#8C7FEE";if(this.searchKeyword){var reg=new RegExp("(".concat(this.searchKeyword,")"),"g");_forEachInstanceProperty(list).call(list,function(item){item.name=item.name.replace(reg,'<span style="color: '.concat(color,';">$1</span>'))})}this.medicalList=_concatInstanceProperty(_context2=[]).call(_context2,_toConsumableArray(this.medicalList),_toConsumableArray(list))},transformFilterOptions:function transformFilterOptions(){var _context3,_context4,_this3=this;this.firstFilters=_mapInstanceProperty(_context3=this.filterOptions).call(_context3,function(filter){return _objectSpread(_objectSpread({},filter),{},{selectedValue:"",selectedText:""})});this.secondTagFilters={};_forEachInstanceProperty(_context4=this.filterOptions).call(_context4,function(filter){var _context5;var key=filter.key;var values=_mapInstanceProperty(_context5=_valuesInstanceProperty(filter)).call(_context5,function(value){return _objectSpread(_objectSpread({},value),{},{actived:false})});values.unshift({value:"",text:"全部",actived:true});_this3.secondTagFilters[key]=values})},closeDropdown:function closeDropdown(){this.isShowTagMenu=false},isOptionSelected:function isOptionSelected(option){return option.actived},toggleDropdown:function toggleDropdown(item){if(this.activeFirstKey===item.key){this.isShowTagMenu=!this.isShowTagMenu;if(!this.isShowTagMenu){this.activeFirstKey=""}}else{this.isShowTagMenu=true;this.activeFirstKey=item.key}},selectOption:function selectOption(option){var _context6,_this4=this;var filterIndex=_findIndexInstanceProperty(_context6=this.firstFilters).call(_context6,function(item){return item.key===_this4.activeFirstKey});if(filterIndex!==-1){this.firstFilters[filterIndex].selectedValue=option.value;this.firstFilters[filterIndex].selectedText=option.text;if(this.secondTagFilters[this.activeFirstKey]){var _context7;_forEachInstanceProperty(_context7=this.secondTagFilters[this.activeFirstKey]).call(_context7,function(item){item.actived=item.value===option.value})}}this.activeFirstKey=null;this.isShowTagMenu=false;this.resetSearch()},getDisplayText:function getDisplayText(item){return item.selectedValue?item.selectedText:item.text},getFilterValues:function getFilterValues(){var _context8;return _mapInstanceProperty(_context8=this.firstFilters).call(_context8,function(filter){return{key:filter.key,selectedValue:filter.selectedOption?filter.selectedOption.value:null}})},loadMore:function loadMore(){if(!this.hasMore||this.loading)return;this.currentPage++;this.fetchData()},handleSearch:function handleSearch(){var _context9,_context0,_this5=this;_forEachInstanceProperty(_context9=this.firstFilters).call(_context9,function(filter){filter.selectedValue="";filter.selectedText=""});_forEachInstanceProperty(_context0=_Object$keys(this.secondTagFilters)).call(_context0,function(key){var _context1;_forEachInstanceProperty(_context1=_this5.secondTagFilters[key]).call(_context1,function(item){item.actived=item.value===""})});this.resetSearch()},clear:function clear(){this.searchKeyword="";this.resetSearch()},resetSearch:function resetSearch(){this.currentPage=1;this.fetchData(false,true)},refreshScroll:function refreshScroll(){var _this6=this;this.$nextTick(function(){if(!_this6.scroll){_this6.scroll=new BScrollModule(_this6.$refs.medicalList,{click:true,damping:.6});_this6.scroll.on("scrollEnd",function(){if(_this6.scroll.y<=_this6.scroll.maxScrollY+50){if(_this6.hasMore&&!_this6.loading){_this6.loadMore()}}})}else{_this6.scroll.refresh()}})},scrollTop:function scrollTop(){this.scroll.scrollTo(0,0,300)}},watch:{isVisible:function isVisible(newVal){var _this7=this;if(!this.pickerContentHeight&&newVal){this.$nextTick(function(){_this7.pickerContentHeight=utils_helpers.outerHeight(_this7.$refs.pickerContent)})}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"layer-wrap"},[_c("act-gold-layer",{attrs:{"visible":_vm.isVisible,"title":_vm.title,"center":false,"mask":true,"zIndex":_vm.zIndex},on:{"close":_vm.maskClick}},[_c("div",{ref:"pickerContent",staticClass:"picker-content"},[_c("div",{staticClass:"content",on:{"click":_vm.closeDropdown}},[_c("div",{staticClass:"gradual-color"}),_c("div",{staticClass:"header-box"},[_c("form",{staticClass:"search-box",on:{"submit":function submit($event){$event.preventDefault();return _vm.handleSearch.apply(null,arguments)}}},[_c("img",{staticClass:"search-icon",attrs:{"src":__$_require_263bdd0a__,"alt":""}}),_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.searchKeyword,expression:"searchKeyword"}],attrs:{"type":"text","placeholder":_vm.placeholder},domProps:{"value":_vm.searchKeyword},on:{"keyup":function keyup($event){var _context10;if(!_indexOfInstanceProperty(_context10=$event.type).call(_context10,"key")&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter"))return null;return _vm.handleSearch.apply(null,arguments)},"input":function input($event){if($event.target.composing)return;_vm.searchKeyword=$event.target.value}}}),_vm.searchKeyword?_c("img",{staticClass:"close-icon",attrs:{"src":__$_require_e9a2481a__,"alt":""},on:{"click":_vm.clear}}):_vm._e(),_c("button",{staticStyle:{"display":"none"},attrs:{"type":"submit"}},[_vm._v("搜索")])])]),_c("div",{staticClass:"search-content"},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.firstFilters&&_vm.firstFilters.length,expression:"firstFilters && firstFilters.length"}],staticClass:"search-tags-content",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"search-tags-first"},_vm._l(_vm.firstFilters,function(item,index){return _c("div",{key:item.key,staticClass:"filter-item",on:{"click":function click($event){return _vm.toggleDropdown(item,index)}}},[_c("span",{class:{"active":item.selectedValue,"cps":_vm.isCps}},[_vm._v(_vm._s(_vm.getDisplayText(item)))]),_c("i",{class:["arrow-icon",_vm.activeFirstKey===item.key?"up":"down"]})])}),0),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isShowTagMenu,expression:"isShowTagMenu"}],staticClass:"search-tags-second dropdown-menu"},[_c("div",{staticClass:"dropdown-menu-container"},_vm._l(_vm.secondTagFilters[_vm.activeFirstKey],function(option){return _c("div",{key:option.value,staticClass:"dropdown-item",class:{"active":_vm.isOptionSelected(option),"cps":_vm.isCps},on:{"click":function click($event){return _vm.selectOption(option)}}},[_vm._v(" "+_vm._s(option.text)+" ")])}),0)])]),_c("div",{staticStyle:{"height":"4.5rem","width":"100%"}}),_c("div",{staticClass:"table-scroll-bg",style:"height: ".concat(5*_vm.medicalList.length,"rem")}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.medicalList&&_vm.medicalList.length,expression:"medicalList && medicalList.length"}],ref:"medicalList",staticClass:"medical-list-scroll"},[_c("div",{staticClass:"scroll-content"},[_c("div",{staticClass:"scroll-list"},[_c("medical-list",{attrs:{"list":_vm.medicalList}}),_vm.hasMore?_c("div",{staticClass:"load-more",on:{"click":_vm.loadMore}},[_vm._v(" 滑动加载更多 ")]):_vm._e()],1),_c("div",{staticStyle:{"height":"3.2rem","width":"100%"}})])]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.hasSearched&&_vm.medicalList.length===0,expression:"hasSearched && medicalList.length === 0"}],staticClass:"search-empty"},[!_vm.isCps?_c("img",{attrs:{"src":__$_require_450b57d0__}}):_c("img",{attrs:{"src":__$_require_5419c642__}}),_c("h4",{staticClass:"tip"},[_vm._v(_vm._s(_vm.searchEmptyResultTips))]),_c("p",{staticClass:"desc"},[_vm._v(_vm._s(_vm.searchEmptyResultDesc))])]),_vm.isShowActLoading?_c("div",{staticClass:"loading"},[_c("act-loading",{directives:[{name:"show",rawName:"v-show",value:true,expression:"true"}],attrs:{"type":"cir3","color":_vm.brandColor,"size":35}})],1):_vm._e()])])])])],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"fd644c7c");var MedicalListLayer=__component__.exports;MedicalListLayer.install=function(Vue){Vue.component(MedicalListLayer.name,MedicalListLayer);Vue.prototype["$createMedicalListLayer"]=utils_create.create(MedicalListLayer,Vue)};exports.MedicalListLayer=MedicalListLayer;
@@ -16,7 +16,7 @@ import _Object$keys from "@babel/runtime-corejs3/core-js/object/keys";
16
16
  import { c as create } from "../utils/create/index.mjs";
17
17
  import { A as ActGoldLayer } from "../common/goldlayer/index.mjs";
18
18
  import { L as Loading } from "../Loading/index.mjs";
19
- import { b as bScroll } from "../BScroll/index.mjs";
19
+ import BScrollModule__default from "better-scroll";
20
20
  import { M as MedicalList } from "./component/medicalList/index.mjs";
21
21
  import { o as outerHeight } from "../utils/helpers/index.mjs";
22
22
  import __$_require_263bdd0a__ from "../assets/icon-search.3c97.png";
@@ -338,7 +338,7 @@ var _sfc_main = {
338
338
  var _this6 = this;
339
339
  this.$nextTick(function() {
340
340
  if (!_this6.scroll) {
341
- _this6.scroll = new bScroll(_this6.$refs.medicalList, {
341
+ _this6.scroll = new BScrollModule__default(_this6.$refs.medicalList, {
342
342
  click: true,
343
343
  damping: 0.6
344
344
  });
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _spliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/splice");var _everyInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/every");var utils_create=require("../utils/create/index.js");var BScroll=require("../BScroll/index.js");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var EVENT_CHANGE="change";var _sfc_main={name:"ActPicker",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context)}},created:function created(){this._values=[];this._indexes=this.selectedIndex},methods:{confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;var pickerSelectedText=[];var length=this.finalData.length;var oldLength=this._values.length;if(oldLength!==length){changed=true;oldLength>length&&(this._values.length=this._indexes.length=length)}for(var i=0;i<length;i++){var index=this._getSelectIndex(this.wheels[i]);this._indexes[i]=index;var value=null;var text="";if(this.finalData[i].length){value=this.finalData[i][index][this.valueKey];text=this.finalData[i][index][this.textKey]}if(this._values[i]!==value){changed=true}this._values[i]=value;pickerSelectedText[i]=text}this.$emit(EVENT_SELECT,this._values,this._indexes,pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,this._indexes,pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.$emit(EVENT_CANCEL)},show:function show(){var _this=this;if(this.isVisible){return}this.isVisible=true;if(!this.wheels||this.dirty){this.$nextTick(function(){_this.wheels=_this.wheels||[];var wheelWrapper=_this.$refs.wheelWrapper;for(var i2=0;i2<_this.finalData.length;i2++){_this._createWheel(wheelWrapper,i2).enable();_this.wheels[i2].wheelTo(_this._indexes[i2])}_this.dirty&&_this._destroyExtraWheels();_this.dirty=false})}else{for(var i=0;i<this.finalData.length;i++){this.wheels[i].enable();this.wheels[i].wheelTo(this._indexes[i])}}},hide:function hide(){if(!this.isVisible){return}this.isVisible=false;for(var i=0;i<this.finalData.length;i++){this.wheels[i].disable()}},setData:function setData(data2,selectedIndex){var _this2=this;this._indexes=selectedIndex?_toConsumableArray(selectedIndex):[];this.finalData=_sliceInstanceProperty(data2).call(data2);if(this.isVisible){this.$nextTick(function(){var _context2;var wheelWrapper=_this2.$refs.wheelWrapper;_forEachInstanceProperty(_context2=_this2.finalData).call(_context2,function(item,i){_this2._createWheel(wheelWrapper,i);_this2.wheels[i].wheelTo(_this2._indexes[i])});_this2._destroyExtraWheels()})}else{this.dirty=true}},refill:function refill(datas){var _this3=this;var ret=[];if(!datas.length){return ret}_forEachInstanceProperty(datas).call(datas,function(data2,index){ret[index]=_this3.refillColumn(index,data2)});return ret},refillColumn:function refillColumn(index,data2){var _this4=this;var wheelWrapper=this.$refs.wheelWrapper;var scroll=wheelWrapper.children[index].querySelector(".act-picker-wheel-scroll");var wheel=this.wheels?this.wheels[index]:false;var dist=0;if(scroll&&wheel){var oldData=this.finalData[index];this.$set(this.finalData,index,data2);var selectedIndex=wheel.getSelectedIndex();if(oldData.length){var oldValue=oldData[selectedIndex][this.valueKey];for(var i=0;i<data2.length;i++){if(data2[i][this.valueKey]===oldValue){dist=i;break}}}this._indexes[index]=dist;this.$nextTick(function(){wheel=_this4._createWheel(wheelWrapper,index);wheel.wheelTo(dist)})}return dist},scrollTo:function scrollTo(index,dist){var wheel=this.wheels[index];this._indexes[index]=dist;wheel.wheelTo(dist)},refresh:function refresh(){var _this5=this;this.$nextTick(function(){var _context3;_forEachInstanceProperty(_context3=_this5.wheels).call(_context3,function(wheel){wheel.refresh()})})},_createWheel:function _createWheel(wheelWrapper,i){var _this6=this;if(!this.wheels[i]){var wheel=this.wheels[i]=new BScroll.bScroll(wheelWrapper.children[i],{wheel:{selectedIndex:this._indexes[i]||0,wheelWrapperClass:"act-picker-wheel-scroll",wheelItemClass:"act-picker-wheel-item"},swipeTime:this.swipeTime,observeDOM:false,useTransition:utils_BScroll_constants.USE_TRANSITION});wheel.on("scrollStart",function(){wheel.inScroll=true});wheel.on("scrollEnd",function(){_this6.$emit(EVENT_CHANGE,i,_this6._getSelectIndex(wheel));wheel.inScroll=false})}else{this.wheels[i].refresh()}return this.wheels[i]},_destroyExtraWheels:function _destroyExtraWheels(){var dataLength=this.finalData.length;if(this.wheels.length>dataLength){var _context4;var extraWheels=_spliceInstanceProperty(_context4=this.wheels).call(_context4,dataLength);_forEachInstanceProperty(extraWheels).call(extraWheels,function(wheel){wheel.destroy()})}},_canConfirm:function _canConfirm(){var _context5;return!this.pending&&_everyInstanceProperty(_context5=this.wheels).call(_context5,function(wheel){if(utils_BScroll_constants.USE_TRANSITION){return!wheel.isInTransition}return!(wheel.inScroll||wheel.isInTransition)})},_getFlexOrder:function _getFlexOrder(data2){if(data2[0]){return data2[0][this.orderKey]}return 0},_getSelectIndex:function _getSelectIndex(wheel){var y=wheel.y;var selectedIndex;if(utils_BScroll_constants.USE_TRANSITION){selectedIndex=wheel.getSelectedIndex()}else{if(y>wheel.minScrollY){selectedIndex=0}else if(y<wheel.maxScrollY){selectedIndex=wheel.items.length-1}else{selectedIndex=Math.round(Math.abs(y/wheel.itemHeight))}}return selectedIndex}},beforeDestroy:function beforeDestroy(){var _context6;this.wheels&&_forEachInstanceProperty(_context6=this.wheels).call(_context6,function(wheel){wheel.destroy()});this.wheels=null},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"wheelWrapper",staticClass:"act-picker-wheel-wrapper"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index,style:{order:_vm._getFlexOrder(data2)}},[_c("ul",{staticClass:"act-picker-wheel-scroll"},_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-wheel-item",domProps:{"innerHTML":_vm._s(item[_vm.textKey])}})}),0)])}),0)]),_c("div",{staticClass:"act-picker-footer"})])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"aa70d6e1");var Picker=__component__.exports;Picker.install=function(Vue){Vue.component(Picker.name,Picker);Vue.prototype["$createPicker"]=utils_create.create(Picker,Vue)};exports.Picker=Picker;
1
+ "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _spliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/splice");var _everyInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/every");var utils_create=require("../utils/create/index.js");var BScrollModule=require("better-scroll");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var EVENT_CHANGE="change";var _sfc_main={name:"ActPicker",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context)}},created:function created(){this._values=[];this._indexes=this.selectedIndex},methods:{confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;var pickerSelectedText=[];var length=this.finalData.length;var oldLength=this._values.length;if(oldLength!==length){changed=true;oldLength>length&&(this._values.length=this._indexes.length=length)}for(var i=0;i<length;i++){var index=this._getSelectIndex(this.wheels[i]);this._indexes[i]=index;var value=null;var text="";if(this.finalData[i].length){value=this.finalData[i][index][this.valueKey];text=this.finalData[i][index][this.textKey]}if(this._values[i]!==value){changed=true}this._values[i]=value;pickerSelectedText[i]=text}this.$emit(EVENT_SELECT,this._values,this._indexes,pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,this._indexes,pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.$emit(EVENT_CANCEL)},show:function show(){var _this=this;if(this.isVisible){return}this.isVisible=true;if(!this.wheels||this.dirty){this.$nextTick(function(){_this.wheels=_this.wheels||[];var wheelWrapper=_this.$refs.wheelWrapper;for(var i2=0;i2<_this.finalData.length;i2++){_this._createWheel(wheelWrapper,i2).enable();_this.wheels[i2].wheelTo(_this._indexes[i2])}_this.dirty&&_this._destroyExtraWheels();_this.dirty=false})}else{for(var i=0;i<this.finalData.length;i++){this.wheels[i].enable();this.wheels[i].wheelTo(this._indexes[i])}}},hide:function hide(){if(!this.isVisible){return}this.isVisible=false;for(var i=0;i<this.finalData.length;i++){this.wheels[i].disable()}},setData:function setData(data2,selectedIndex){var _this2=this;this._indexes=selectedIndex?_toConsumableArray(selectedIndex):[];this.finalData=_sliceInstanceProperty(data2).call(data2);if(this.isVisible){this.$nextTick(function(){var _context2;var wheelWrapper=_this2.$refs.wheelWrapper;_forEachInstanceProperty(_context2=_this2.finalData).call(_context2,function(item,i){_this2._createWheel(wheelWrapper,i);_this2.wheels[i].wheelTo(_this2._indexes[i])});_this2._destroyExtraWheels()})}else{this.dirty=true}},refill:function refill(datas){var _this3=this;var ret=[];if(!datas.length){return ret}_forEachInstanceProperty(datas).call(datas,function(data2,index){ret[index]=_this3.refillColumn(index,data2)});return ret},refillColumn:function refillColumn(index,data2){var _this4=this;var wheelWrapper=this.$refs.wheelWrapper;var scroll=wheelWrapper.children[index].querySelector(".act-picker-wheel-scroll");var wheel=this.wheels?this.wheels[index]:false;var dist=0;if(scroll&&wheel){var oldData=this.finalData[index];this.$set(this.finalData,index,data2);var selectedIndex=wheel.getSelectedIndex();if(oldData.length){var oldValue=oldData[selectedIndex][this.valueKey];for(var i=0;i<data2.length;i++){if(data2[i][this.valueKey]===oldValue){dist=i;break}}}this._indexes[index]=dist;this.$nextTick(function(){wheel=_this4._createWheel(wheelWrapper,index);wheel.wheelTo(dist)})}return dist},scrollTo:function scrollTo(index,dist){var wheel=this.wheels[index];this._indexes[index]=dist;wheel.wheelTo(dist)},refresh:function refresh(){var _this5=this;this.$nextTick(function(){var _context3;_forEachInstanceProperty(_context3=_this5.wheels).call(_context3,function(wheel){wheel.refresh()})})},_createWheel:function _createWheel(wheelWrapper,i){var _this6=this;if(!this.wheels[i]){var wheel=this.wheels[i]=new BScrollModule(wheelWrapper.children[i],{wheel:{selectedIndex:this._indexes[i]||0,wheelWrapperClass:"act-picker-wheel-scroll",wheelItemClass:"act-picker-wheel-item"},swipeTime:this.swipeTime,observeDOM:false,useTransition:utils_BScroll_constants.USE_TRANSITION});wheel.on("scrollStart",function(){wheel.inScroll=true});wheel.on("scrollEnd",function(){_this6.$emit(EVENT_CHANGE,i,_this6._getSelectIndex(wheel));wheel.inScroll=false})}else{this.wheels[i].refresh()}return this.wheels[i]},_destroyExtraWheels:function _destroyExtraWheels(){var dataLength=this.finalData.length;if(this.wheels.length>dataLength){var _context4;var extraWheels=_spliceInstanceProperty(_context4=this.wheels).call(_context4,dataLength);_forEachInstanceProperty(extraWheels).call(extraWheels,function(wheel){wheel.destroy()})}},_canConfirm:function _canConfirm(){var _context5;return!this.pending&&_everyInstanceProperty(_context5=this.wheels).call(_context5,function(wheel){if(utils_BScroll_constants.USE_TRANSITION){return!wheel.isInTransition}return!(wheel.inScroll||wheel.isInTransition)})},_getFlexOrder:function _getFlexOrder(data2){if(data2[0]){return data2[0][this.orderKey]}return 0},_getSelectIndex:function _getSelectIndex(wheel){var y=wheel.y;var selectedIndex;if(utils_BScroll_constants.USE_TRANSITION){selectedIndex=wheel.getSelectedIndex()}else{if(y>wheel.minScrollY){selectedIndex=0}else if(y<wheel.maxScrollY){selectedIndex=wheel.items.length-1}else{selectedIndex=Math.round(Math.abs(y/wheel.itemHeight))}}return selectedIndex}},beforeDestroy:function beforeDestroy(){var _context6;this.wheels&&_forEachInstanceProperty(_context6=this.wheels).call(_context6,function(wheel){wheel.destroy()});this.wheels=null},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"wheelWrapper",staticClass:"act-picker-wheel-wrapper"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index,style:{order:_vm._getFlexOrder(data2)}},[_c("ul",{staticClass:"act-picker-wheel-scroll"},_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-wheel-item",domProps:{"innerHTML":_vm._s(item[_vm.textKey])}})}),0)])}),0)]),_c("div",{staticClass:"act-picker-footer"})])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"aa70d6e1");var Picker=__component__.exports;Picker.install=function(Vue){Vue.component(Picker.name,Picker);Vue.prototype["$createPicker"]=utils_create.create(Picker,Vue)};exports.Picker=Picker;
@@ -4,7 +4,7 @@ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/fo
4
4
  import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
5
5
  import _everyInstanceProperty from "@babel/runtime-corejs3/core-js/instance/every";
6
6
  import { c as create } from "../utils/create/index.mjs";
7
- import { b as bScroll } from "../BScroll/index.mjs";
7
+ import BScrollModule__default from "better-scroll";
8
8
  import { A as ActPopup } from "../common/popup/index.mjs";
9
9
  import { p as popupMixin } from "../mixins/popup/index.mjs";
10
10
  import { n as noscrollMixin } from "../mixins/noscroll/index.mjs";
@@ -183,7 +183,7 @@ var _sfc_main = {
183
183
  _createWheel: function _createWheel(wheelWrapper, i) {
184
184
  var _this6 = this;
185
185
  if (!this.wheels[i]) {
186
- var wheel = this.wheels[i] = new bScroll(wheelWrapper.children[i], {
186
+ var wheel = this.wheels[i] = new BScrollModule__default(wheelWrapper.children[i], {
187
187
  wheel: {
188
188
  selectedIndex: this._indexes[i] || 0,
189
189
  wheelWrapperClass: "act-picker-wheel-scroll",
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _JSON$stringify=require("@babel/runtime-corejs3/core-js/json/stringify");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var utils_create=require("../utils/create/index.js");var BScroll=require("../BScroll/index.js");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var _sfc_main={name:"ActPickerLongText",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context),indexes:[],selectedIndexes:[],initialIndexes:[]}},watch:{data:{handler:function handler(){var _this=this;this.initData();this.$nextTick(function(){_this._initScroll()})},deep:true}},created:function created(){this.initData()},mounted:function mounted(){this._initScroll()},methods:{initData:function initData(){var _context2,_this2=this;if(!Array.isArray(this.selectedIndex)||!Array.isArray(this.data))return;var data2=this.data&&_sliceInstanceProperty(_context2=this.data).call(_context2);var valItem=data2&&_findInstanceProperty(data2).call(data2,function(item,index){var _context3;return _includesInstanceProperty(_context3=_this2.selectedIndex).call(_context3,index)});valItem&&(this._values=valItem[this.valueKey]?[valItem[this.valueKey]]:[]);this.indexes=this.selectedIndex||[];this.initialIndexes=_toConsumableArray(this.selectedIndex||[]);this.selectedIndexes=_toConsumableArray(this.selectedIndex||[])},confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;if(_JSON$stringify(this.indexes)!==_JSON$stringify(this.selectedIndexes)){changed=true;this.indexes=_toConsumableArray(this.selectedIndexes)}this.initialIndexes=_toConsumableArray(this.indexes);var emitIndex=_toConsumableArray(this.indexes);this.$emit(EVENT_SELECT,this._values,emitIndex,this.pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,emitIndex,this.pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.selectedIndexes=_toConsumableArray(this.initialIndexes);if(this.initialIndexes.length>0){var index=this.initialIndexes[0];var data2=this.data&&this.data[0];if(data2&&data2[index]){this._values=[data2[index][this.valueKey]];this.pickerSelectedText=[data2[index][this.textKey]]}}else{this._values=[];this.pickerSelectedText=[]}this.$emit(EVENT_CANCEL)},show:function show(){var _this3=this;if(this.isVisible){return}this.isVisible=true;this.selectedIndexes=_toConsumableArray(this.indexes);this.initialIndexes=_toConsumableArray(this.indexes);this.$nextTick(function(){_this3.refresh()})},hide:function hide(){if(!this.isVisible){return}this.isVisible=false},setData:function setData(data2){var selectedIndex=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];this.indexes=Array.isArray(selectedIndex)?_toConsumableArray(selectedIndex):[];data2&&(this.finalData=_sliceInstanceProperty(data2).call(data2));this.refresh()},refresh:function refresh(){var _this4=this;this.$nextTick(function(){if(_this4.scrollIns){_this4.scrollIns.refresh()}})},_initScroll:function _initScroll(){var _this5=this;if(this.scrollIns){this.scrollIns.destroy()}this.$nextTick(function(){if(!_this5.$refs.scrollWrapper){return}_this5.scrollIns=new BScroll.bScroll(_this5.$refs.scrollWrapper,{probeType:3,click:true,scrollY:true,scrollX:false,mouseWheel:{speed:20,invert:false},observeDOM:true,useTransition:utils_BScroll_constants.USE_TRANSITION,bounce:{top:true,bottom:true},momentum:true,deceleration:.001,swipeBounceTime:500,bounceTime:800});clearTimeout(_this5.refreshTimer);_this5.refreshTimer=setTimeout(function(){_this5.scrollIns&&_this5.scrollIns.refresh();_this5.refreshTimer=null},20)})},_destroyScroll:function _destroyScroll(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},_canConfirm:function _canConfirm(){return true},selectItem:function selectItem(itemIndex,item){var key=itemIndex;if(this.selectedIndexes.length===1&&this.selectedIndexes[0]===key){return}this.selectedIndexes=[key];this._values=[item[this.valueKey]];this.pickerSelectedText=[item[this.textKey]]},isSelected:function isSelected(itemIndex){var _context4;var key=itemIndex;return _indexOfInstanceProperty(_context4=this.selectedIndexes).call(_context4,key)>-1}},beforeDestroy:function beforeDestroy(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"scrollWrapper",staticClass:"act-picker-long-text-wrapper"},[_c("div",{staticClass:"act-picker-long-text-scroll"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index},[_c("ul",_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-long-text-item",class:{on:_vm.isSelected(id2)},on:{"click":function click($event){return _vm.selectItem(id2,item)}}},[_c("span",{staticClass:"act-picker-long-text-item-radio"}),_c("span",{staticClass:"act-picker-long-text-item-desc",domProps:{"textContent":_vm._s(item[_vm.textKey])}})])}),0)])}),0)])])])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"ccd8bf0f");var PickerLongText=__component__.exports;PickerLongText.install=function(Vue){Vue.component(PickerLongText.name,PickerLongText);Vue.prototype["$createPickerLongText"]=utils_create.create(PickerLongText,Vue)};exports.PickerLongText=PickerLongText;
1
+ "use strict";require('./style.css');var _toConsumableArray=require("@babel/runtime-corejs3/helpers/toConsumableArray");var _sliceInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/slice");var _findInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/find");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _JSON$stringify=require("@babel/runtime-corejs3/core-js/json/stringify");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var utils_create=require("../utils/create/index.js");var BScrollModule=require("better-scroll");var common_popup=require("../common/popup/index.js");var mixins_popup=require("../mixins/popup/index.js");var mixins_noscroll=require("../mixins/noscroll/index.js");var mixins_basicPicker=require("../mixins/basic-picker/index.js");var mixins_picker=require("../mixins/picker/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_BScroll_constants=require("../utils/BScroll/constants/index.js");var common=require("../common/index.js");var EVENT_SELECT="select";var EVENT_VALUE_CHANGE="value-change";var EVENT_CANCEL="cancel";var _sfc_main={name:"ActPickerLongText",mixins:[mixins_popup.popupMixin,mixins_visible.visibleMixin,mixins_basicPicker.basicPickerMixin,mixins_picker.pickerMixin,mixins_noscroll.noscrollMixin],props:{pending:{type:Boolean,default:false}},data:function data(){var _context;return{finalData:_sliceInstanceProperty(_context=this.data).call(_context),indexes:[],selectedIndexes:[],initialIndexes:[]}},watch:{data:{handler:function handler(){var _this=this;this.initData();this.$nextTick(function(){_this._initScroll()})},deep:true}},created:function created(){this.initData()},mounted:function mounted(){this._initScroll()},methods:{initData:function initData(){var _context2,_this2=this;if(!Array.isArray(this.selectedIndex)||!Array.isArray(this.data))return;var data2=this.data&&_sliceInstanceProperty(_context2=this.data).call(_context2);var valItem=data2&&_findInstanceProperty(data2).call(data2,function(item,index){var _context3;return _includesInstanceProperty(_context3=_this2.selectedIndex).call(_context3,index)});valItem&&(this._values=valItem[this.valueKey]?[valItem[this.valueKey]]:[]);this.indexes=this.selectedIndex||[];this.initialIndexes=_toConsumableArray(this.selectedIndex||[]);this.selectedIndexes=_toConsumableArray(this.selectedIndex||[])},confirm:function confirm(){if(!this._canConfirm()){return}this.hide();var changed=false;if(_JSON$stringify(this.indexes)!==_JSON$stringify(this.selectedIndexes)){changed=true;this.indexes=_toConsumableArray(this.selectedIndexes)}this.initialIndexes=_toConsumableArray(this.indexes);var emitIndex=_toConsumableArray(this.indexes);this.$emit(EVENT_SELECT,this._values,emitIndex,this.pickerSelectedText);if(changed){this.$emit(EVENT_VALUE_CHANGE,this._values,emitIndex,this.pickerSelectedText)}},maskClick:function maskClick(){this.maskClosable&&this.cancel()},cancel:function cancel(){this.hide();this.selectedIndexes=_toConsumableArray(this.initialIndexes);if(this.initialIndexes.length>0){var index=this.initialIndexes[0];var data2=this.data&&this.data[0];if(data2&&data2[index]){this._values=[data2[index][this.valueKey]];this.pickerSelectedText=[data2[index][this.textKey]]}}else{this._values=[];this.pickerSelectedText=[]}this.$emit(EVENT_CANCEL)},show:function show(){var _this3=this;if(this.isVisible){return}this.isVisible=true;this.selectedIndexes=_toConsumableArray(this.indexes);this.initialIndexes=_toConsumableArray(this.indexes);this.$nextTick(function(){_this3.refresh()})},hide:function hide(){if(!this.isVisible){return}this.isVisible=false},setData:function setData(data2){var selectedIndex=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];this.indexes=Array.isArray(selectedIndex)?_toConsumableArray(selectedIndex):[];data2&&(this.finalData=_sliceInstanceProperty(data2).call(data2));this.refresh()},refresh:function refresh(){var _this4=this;this.$nextTick(function(){if(_this4.scrollIns){_this4.scrollIns.refresh()}})},_initScroll:function _initScroll(){var _this5=this;if(this.scrollIns){this.scrollIns.destroy()}this.$nextTick(function(){if(!_this5.$refs.scrollWrapper){return}_this5.scrollIns=new BScrollModule(_this5.$refs.scrollWrapper,{probeType:3,click:true,scrollY:true,scrollX:false,mouseWheel:{speed:20,invert:false},observeDOM:true,useTransition:utils_BScroll_constants.USE_TRANSITION,bounce:{top:true,bottom:true},momentum:true,deceleration:.001,swipeBounceTime:500,bounceTime:800});clearTimeout(_this5.refreshTimer);_this5.refreshTimer=setTimeout(function(){_this5.scrollIns&&_this5.scrollIns.refresh();_this5.refreshTimer=null},20)})},_destroyScroll:function _destroyScroll(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},_canConfirm:function _canConfirm(){return true},selectItem:function selectItem(itemIndex,item){var key=itemIndex;if(this.selectedIndexes.length===1&&this.selectedIndexes[0]===key){return}this.selectedIndexes=[key];this._values=[item[this.valueKey]];this.pickerSelectedText=[item[this.textKey]]},isSelected:function isSelected(itemIndex){var _context4;var key=itemIndex;return _indexOfInstanceProperty(_context4=this.selectedIndexes).call(_context4,key)>-1}},beforeDestroy:function beforeDestroy(){if(this.scrollIns){this.scrollIns.destroy();this.scrollIns=null}},components:{ActPopup:common_popup.ActPopup}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("transition",{attrs:{"name":"act-picker-fade"}},[_c("act-popup",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],attrs:{"type":"picker","mask":true,"center":false,"topBorderRadius":true,"zIndex":_vm.zIndex},on:{"touchmove":function touchmove($event){$event.preventDefault()},"mask-click":_vm.maskClick}},[_c("transition",{attrs:{"name":"act-picker-move"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{"click":function click($event){$event.stopPropagation()}}},[_c("div",{staticClass:"act-picker-choose"},[_c("span",{staticClass:"act-picker-cancel",style:{color:_vm.cancelColor},on:{"click":_vm.cancel}},[_vm._v(_vm._s(_vm._cancelTxt))]),_c("span",{staticClass:"act-picker-confirm",style:{color:_vm.confirmColor},on:{"click":_vm.confirm}},[_vm._v(_vm._s(_vm._confirmTxt))]),_c("div",{staticClass:"act-picker-title-group"},[_c("h1",{staticClass:"act-picker-title",domProps:{"innerHTML":_vm._s(_vm.title)}}),_vm.subtitle?_c("h2",{staticClass:"act-picker-subtitle",domProps:{"innerHTML":_vm._s(_vm.subtitle)}}):_vm._e()])]),_c("div",{staticClass:"act-picker-content"},[_c("i",{staticClass:"border-bottom-1px"}),_c("i",{staticClass:"border-top-1px"}),_c("div",{ref:"scrollWrapper",staticClass:"act-picker-long-text-wrapper"},[_c("div",{staticClass:"act-picker-long-text-scroll"},_vm._l(_vm.finalData,function(data2,index){return _c("div",{key:index},[_c("ul",_vm._l(data2,function(item,id2){return _c("li",{key:id2,staticClass:"act-picker-long-text-item",class:{on:_vm.isSelected(id2)},on:{"click":function click($event){return _vm.selectItem(id2,item)}}},[_c("span",{staticClass:"act-picker-long-text-item-radio"}),_c("span",{staticClass:"act-picker-long-text-item-desc",domProps:{"textContent":_vm._s(item[_vm.textKey])}})])}),0)])}),0)])])])])],1)],1)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"ccd8bf0f");var PickerLongText=__component__.exports;PickerLongText.install=function(Vue){Vue.component(PickerLongText.name,PickerLongText);Vue.prototype["$createPickerLongText"]=utils_create.create(PickerLongText,Vue)};exports.PickerLongText=PickerLongText;
@@ -5,7 +5,7 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/i
5
5
  import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
6
6
  import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
7
7
  import { c as create } from "../utils/create/index.mjs";
8
- import { b as bScroll } from "../BScroll/index.mjs";
8
+ import BScrollModule__default from "better-scroll";
9
9
  import { A as ActPopup } from "../common/popup/index.mjs";
10
10
  import { p as popupMixin } from "../mixins/popup/index.mjs";
11
11
  import { n as noscrollMixin } from "../mixins/noscroll/index.mjs";
@@ -146,7 +146,7 @@ var _sfc_main = {
146
146
  if (!_this5.$refs.scrollWrapper) {
147
147
  return;
148
148
  }
149
- _this5.scrollIns = new bScroll(_this5.$refs.scrollWrapper, {
149
+ _this5.scrollIns = new BScrollModule__default(_this5.$refs.scrollWrapper, {
150
150
  probeType: 3,
151
151
  click: true,
152
152
  scrollY: true,
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _fillInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/fill");var _Promise=require("@babel/runtime-corejs3/core-js/promise");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _URL=require("@babel/runtime-corejs3/core-js/url");function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context3,_context4;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context3=ownKeys(Object(t),true)).call(_context3,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context4=ownKeys(Object(t))).call(_context4,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var mixins_visible=require("../mixins/visible/index.js");var vueAwesomeSwiper=require("vue-awesome-swiper");var ProPosterLayer_poster=require("./poster/index.js");var utils_helpers=require("../utils/helpers/index.js");var QRCode_qrcode=require("../QRCode/qrcode/index.js");var lodashEs=require("lodash-es");var Toast=require("../Toast/index.js");require("swiper/dist/css/swiper.css");var utils_post=require("../utils/post/index.js");var __$_require_25f54f43__=require("../assets/download.9753.png");var __$_require_7d5cf078__=require("../assets/share.0d0a.png");var common=require("../common/index.js");var qrcode=new QRCode_qrcode.QRCode({render:"canvas",ecLevel:"H",size:50,mode:0,mSize:.25,label:"",fontcolor:"#000",fill:"#000",background:"#ffffff"});var _sfc_main={name:"ActProPosterLayer",mixins:[mixins_visible.visibleMixin],components:{swiper:vueAwesomeSwiper.swiper,swiperSlide:vueAwesomeSwiper.swiperSlide,Poster:ProPosterLayer_poster.Poster,ActToast:Toast.Toast},props:{posterList:{default:function _default(){return[]},type:Array},posterIndex:{default:0,type:Number},agentInfo:{type:Object,default:function _default2(){return{}}},qrcodeUrl:{type:String,default:""},showQrCode:{type:[Boolean,Number],default:false}},mounted:function mounted(){this.initShow()},watch:{isVisible:function isVisible(val){var _this2=this;if(val){this.getAgentInfo().finally(function(){var _context;_this2.posters=lodashEs.cloneDeep(_this2.posterList);_this2.initRender();_this2.posters=_mapInstanceProperty(_context=_this2.posters).call(_context,function(poster){return _objectSpread(_objectSpread({},poster),{},{qrcodeUrl:_this2.qrcodeUrl||poster.qrcodeUrl||"",showPosterQrCode:typeof poster.showQrcode!=="undefined"?poster.showQrcode:_this2.showQrCode})});if(_this2.qrcodeUrl&&_this2.showQrCode){qrcode.makeCode(_this2.qrcodeUrl).then(function(data2){_this2.qrCodeImg=data2;_this2.posters.push({isQrcode:true});_this2.showSwiper=true;_this2.$nextTick(function(){_this2.mySwiper=_this2.$refs.swiper.swiper})})}else{_this2.showSwiper=true;_this2.$nextTick(function(){_this2.mySwiper=_this2.$refs.swiper.swiper})}})}}},data:function data(){return{posters:[],isApp:utils_helpers.ua.isApp,isWx:utils_helpers.ua.isWx,posterImgRedis:[],curActiveIndex:0,qrCodeImg:"",showSwiper:false,mobileShow:1,infoShow:1,mySwiper:null,checkReRender:[],licenseForm:{license:"",mobile:"",jobTitle:"",showname:"",headurl:""}}},computed:{getSwiperOptionPoster:function getSwiperOptionPoster(){var _this=this;return{initialSlide:this.posterIndex,spaceBetween:37,lazyLoading:true,pagination:{el:".poster-swiper-pagination",clickable:true},on:{init:function init(swiper){_this.curActiveIndex=this.activeIndex;if(!_this.checkReRender[this.activeIndex]){_this.drawPoster(this.activeIndex,true)}},slideChangeTransitionEnd:function slideChangeTransitionEnd(swiper){_this.curActiveIndex=this.activeIndex;if(!_this.checkReRender[this.activeIndex]){_this.drawPoster(this.activeIndex,true)}}},onInit:function onInit(swiper){_this.curActiveIndex=swiper.activeIndex;if(!_this.checkReRender[swiper.activeIndex]){_this.drawPoster(swiper.activeIndex,true)}},onSlideChangeEnd:function onSlideChangeEnd(swiper){_this.curActiveIndex=swiper.activeIndex;if(!_this.checkReRender[swiper.activeIndex]){_this.drawPoster(swiper.activeIndex,true)}}}}},methods:{initRender:function initRender(){var _context2;this.checkReRender=_fillInstanceProperty(_context2=Array(this.posters.length)).call(_context2,false)},initShow:function initShow(){var mobileShow=localStorage.getItem("cps_poster_mobile_show");var infoShow=localStorage.getItem("cps_poster_info_show");this.mobileShow=mobileShow===null?1:Number(mobileShow);this.infoShow=infoShow===null?1:Number(infoShow)},preventMove:function preventMove(e){e._prevent=true},hidePoster:function hidePoster(e){this.showSwiper=false;this.hide()},clickPoster:function clickPoster(e){var target=e.target,currentTarget=e.currentTarget;if(target===currentTarget)this.hidePoster()},appSavePoster:function appSavePoster(imgSrc){var _this3=this;window.Crossapi&&window.Crossapi("/image/storage",{src:imgSrc},function(data2){_this3.$refs.toast.show("保存成功")})},drawPoster:function drawPoster(index,isCheckoutBtn){var _this4=this;if(this.posters[index].isQrcode){return}this.checkReRender[index]=true;this.$refs.poster[index].generateImg(isCheckoutBtn).then(function(posterImg){}).catch(function(err){_this4.checkReRender[index]=false})},setPosterImgRedis:function setPosterImgRedis(index,img){this.$set(this.posterImgRedis,index,img)},getScroll:function getScroll(index){return this.$refs.poster[index].getScroll()},changeShowBtn:function changeShowBtn(type){var _this5=this;if(type===1){this.infoShow=Number(this.infoShow)===0?1:0;localStorage.setItem("cps_poster_info_show",this.infoShow)}else if(type===2){this.mobileShow=Number(this.mobileShow)===0?1:0;localStorage.setItem("cps_poster_mobile_show",this.mobileShow)}this.initRender();this.$nextTick(function(){_this5.drawPoster(_this5.curActiveIndex,true)})},imgBtn:function imgBtn(type){var imgSrc="";if(this.posters[this.curActiveIndex]&&this.posters[this.curActiveIndex].isQrcode){imgSrc=this.qrCodeImg}else{imgSrc=this.posterImgRedis[this.curActiveIndex]}if(imgSrc){if(type===1){this.appSavePoster(imgSrc)}else if(type===2){this.shareImg(imgSrc)}}else{this.$refs.toast.show("海报仍未生成,请稍等",2e3)}},shareImg:function shareImg(img){var _this6=this;var shareInfo=[{type:"weixin_friend",img:"https://sslstatic.cxisc.com/img/appShareIcon/wx.7e6d27707956284e.png",txt:"微信好友"},{type:"weixin_timeline",img:"https://sslstatic.cxisc.com/img/appShareIcon/timeline.f4e95c018142f798.png",txt:"微信朋友圈"}];window.kcbJs.invoke({path:"/ui/dialog/showNewShareDialog",data:{shareInfo},success:function success(data2){_this6.share(data2,img)},fail:function fail(data2){}})},share:function share(data2,url){var platform=data2.platform;if(platform==="weixin_friend"){window.kcbJs.invoke({path:"/weixin/share",data:{scene:"friend",type:"image",url},unsupport:function unsupport(){},success:function success(){},fail:function fail(e){if(e.code!==20001){}}})}else if(platform==="weixin_timeline"){window.kcbJs.invoke({path:"/weixin/share",data:{scene:"timeline",type:"image",url},unsupport:function unsupport(){},success:function success(){},fail:function fail(e){if(e.code!==20001){}}})}},show:function show(){this.posterImgRedis=[];this.isVisible=true},slidePoster:function slidePoster(type){if(type===1)this.mySwiper.slidePrev();else this.mySwiper.slideNext()},getAgentInfo:function getAgentInfo(){var _this7=this;return new _Promise(function(resolve,reject){var xysEnv=["https://beta.xinhulu.com","https://www.xiaoyusan.com"];if(_includesInstanceProperty(xysEnv).call(xysEnv,window.origin)){resolve();return}var bdzsEnv=["https://bdzsbeta.cxmuc.com","https://m.baodan100.com","https://baodan100.com"];var url="/agent/getBusiCard";if(_includesInstanceProperty(bdzsEnv).call(bdzsEnv,window.origin)){url="/CpsBdzs/getBusiCard"}utils_post.fetch(url).then(function(res){if(res.data.ret===0){var agent=res.data.data.agent;var headurl=agent.headurl;_this7.licenseForm.headurl=headurl;_this7.licenseForm.jobTitle=agent.jobTitle;_this7.licenseForm.showname=agent.showname;_this7.licenseForm.license=agent.license;_this7.licenseForm.mobile=agent.mobile;if(!window.fetch){resolve();return}if(_indexOfInstanceProperty(headurl).call(headurl,"qlogo")>-1||_indexOfInstanceProperty(headurl).call(headurl,"mmopen")>-1){_this7.wxUrlFetchToBlob(headurl,resolve)}else{resolve()}return}resolve()}).catch(reject)})},wxUrlFetchToBlob:function wxUrlFetchToBlob(url,resolve){var _this8=this;if(!/^https:/.test(url)){url=url.replace("http://","https://")}window.fetch(url).then(function(res){return res.blob()}).then(function(res){_this8.licenseForm.headurl=_URL.createObjectURL(res);resolve&&resolve()}).catch(function(err){resolve&&resolve()})}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _vm.isVisible?_c("div",{attrs:{"act-ProPosterLayer":""}},[_c("div",{ref:"layer_picture",staticClass:"layer",on:{"click":function click($event){if($event.target!==$event.currentTarget)return null;return _vm.hidePoster.apply(null,arguments)}}},[_c("div",{staticClass:"picture",attrs:{"id":"picture"}},[_vm.showSwiper?_c("swiper",{ref:"swiper",attrs:{"options":_vm.getSwiperOptionPoster}},[_vm._l(_vm.posters,function(item,index){return _c("swiper-slide",{key:index,staticClass:"picture_box act-row act-middle",nativeOn:{"click":function click($event){return _vm.clickPoster.apply(null,arguments)}}},[!item.isQrcode?_c("Poster",{ref:"poster",refInFor:true,attrs:{"posterImg":_vm.posters[index].img,"qrcodeUrl":item.qrcodeUrl,"cardPhone":_vm.agentInfo.mobile,"cardName":_vm.agentInfo.truename,"cardImg":_vm.agentInfo.avatar,"infoShow":_vm.infoShow,"mobileShow":_vm.mobileShow,"posterGenerImg":_vm.posterImgRedis[index],"showPosterQrCode":item.showPosterQrCode,"index":index,"licenseForm":_vm.licenseForm},on:{"generateSuccess":_vm.setPosterImgRedis}}):_c("div",{staticClass:"qrCodeContainer act-row act-middle"},[_c("div",{staticClass:"qrCode act-row act-middle"},[_c("img",{attrs:{"src":_vm.qrCodeImg,"alt":"二维码"}})])])],1)}),_c("div",{staticClass:"poster-swiper-pagination",attrs:{"slot":"pagination"},slot:"pagination"})],2):_vm._e(),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curActiveIndex!==0,expression:"curActiveIndex !== 0"}],staticClass:"swiper-button-prev",attrs:{"id":"poster_prev"},on:{"click":function click($event){return _vm.slidePoster(1)}}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curActiveIndex!==_vm.posters.length-1,expression:"curActiveIndex !== posters.length - 1"}],staticClass:"swiper-button-next",attrs:{"id":"poster_next"},on:{"click":function click($event){return _vm.slidePoster(2)}}}),_vm.isWx?_c("div",{staticClass:"long_save"},[_c("span",[_vm._v("长按图片可保存至相册或分享")])]):_vm._e(),_vm.isApp?_c("div",{staticClass:"appBtn"},[_c("div",{staticClass:"saveImg",attrs:{"data-track":"haibao_save"},on:{"click":function click($event){return _vm.imgBtn(1)}}},[_vm._m(0),_vm._m(1)]),_c("div",{staticClass:"shareImg",attrs:{"data-track":"haibao_share"},on:{"click":function click($event){return _vm.imgBtn(2)}}},[_vm._m(2),_vm._m(3)])]):_vm._e(),_vm._m(4)],1)]),_c("act-toast",{ref:"toast",attrs:{"zIndex":9999}})],1):_vm._e()};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"cir"},[_c("img",{attrs:{"src":__$_require_25f54f43__,"alt":""}})])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"tit"},[_c("span",[_vm._v("下载图片")])])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"cir"},[_c("img",{attrs:{"src":__$_require_7d5cf078__,"alt":""}})])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"tit"},[_c("span",[_vm._v("分享图片")])])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"tips"},[_c("span",[_vm._v("如需修改名片信息,可前往“我的-个人信息”页面")])])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"1b72c429");var ProPosterLayer=__component__.exports;ProPosterLayer.install=function(Vue){Vue.component(ProPosterLayer.name,ProPosterLayer);Vue.prototype["$createProPosterLayer"]=utils_create.create(ProPosterLayer,Vue)};exports.ProPosterLayer=ProPosterLayer;
1
+ "use strict";require('./style.css');var _Object$keys=require("@babel/runtime-corejs3/core-js/object/keys");var _Object$getOwnPropertySymbols=require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");var _filterInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/filter");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _forEachInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/for-each");var _Object$getOwnPropertyDescriptors=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptors");var _Object$defineProperties=require("@babel/runtime-corejs3/core-js/object/define-properties");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var _fillInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/fill");var _Promise=require("@babel/runtime-corejs3/core-js/promise");var _includesInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/includes");var _indexOfInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/index-of");var _URL=require("@babel/runtime-corejs3/core-js/url");function ownKeys(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r2){return _Object$getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var _context3,_context4;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context3=ownKeys(Object(t),true)).call(_context3,function(r2){_defineProperty(e,r2,t[r2])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context4=ownKeys(Object(t))).call(_context4,function(r2){_Object$defineProperty(e,r2,_Object$getOwnPropertyDescriptor(t,r2))})}return e}var utils_create=require("../utils/create/index.js");var mixins_visible=require("../mixins/visible/index.js");var utils_vueAwesomeSwiper=require("../utils/vueAwesomeSwiper/index.js");var ProPosterLayer_poster=require("./poster/index.js");var utils_helpers=require("../utils/helpers/index.js");var QRCode_qrcode=require("../QRCode/qrcode/index.js");var lodashEs=require("lodash-es");var Toast=require("../Toast/index.js");require("swiper/dist/css/swiper.css");var utils_post=require("../utils/post/index.js");var __$_require_25f54f43__=require("../assets/download.9753.png");var __$_require_7d5cf078__=require("../assets/share.0d0a.png");var common=require("../common/index.js");var qrcode=new QRCode_qrcode.QRCode({render:"canvas",ecLevel:"H",size:50,mode:0,mSize:.25,label:"",fontcolor:"#000",fill:"#000",background:"#ffffff"});var _sfc_main={name:"ActProPosterLayer",mixins:[mixins_visible.visibleMixin],components:{swiper:utils_vueAwesomeSwiper.swiper,swiperSlide:utils_vueAwesomeSwiper.swiperSlide,Poster:ProPosterLayer_poster.Poster,ActToast:Toast.Toast},props:{posterList:{default:function _default(){return[]},type:Array},posterIndex:{default:0,type:Number},agentInfo:{type:Object,default:function _default2(){return{}}},qrcodeUrl:{type:String,default:""},showQrCode:{type:[Boolean,Number],default:false}},mounted:function mounted(){this.initShow()},watch:{isVisible:function isVisible(val){var _this2=this;if(val){this.getAgentInfo().finally(function(){var _context;_this2.posters=lodashEs.cloneDeep(_this2.posterList);_this2.initRender();_this2.posters=_mapInstanceProperty(_context=_this2.posters).call(_context,function(poster){return _objectSpread(_objectSpread({},poster),{},{qrcodeUrl:_this2.qrcodeUrl||poster.qrcodeUrl||"",showPosterQrCode:typeof poster.showQrcode!=="undefined"?poster.showQrcode:_this2.showQrCode})});if(_this2.qrcodeUrl&&_this2.showQrCode){qrcode.makeCode(_this2.qrcodeUrl).then(function(data2){_this2.qrCodeImg=data2;_this2.posters.push({isQrcode:true});_this2.showSwiper=true;_this2.$nextTick(function(){_this2.mySwiper=_this2.$refs.swiper.swiper})})}else{_this2.showSwiper=true;_this2.$nextTick(function(){_this2.mySwiper=_this2.$refs.swiper.swiper})}})}}},data:function data(){return{posters:[],isApp:utils_helpers.ua.isApp,isWx:utils_helpers.ua.isWx,posterImgRedis:[],curActiveIndex:0,qrCodeImg:"",showSwiper:false,mobileShow:1,infoShow:1,mySwiper:null,checkReRender:[],licenseForm:{license:"",mobile:"",jobTitle:"",showname:"",headurl:""}}},computed:{getSwiperOptionPoster:function getSwiperOptionPoster(){var _this=this;return{initialSlide:this.posterIndex,spaceBetween:37,lazyLoading:true,pagination:{el:".poster-swiper-pagination",clickable:true},on:{init:function init(swiper){_this.curActiveIndex=this.activeIndex;if(!_this.checkReRender[this.activeIndex]){_this.drawPoster(this.activeIndex,true)}},slideChangeTransitionEnd:function slideChangeTransitionEnd(swiper){_this.curActiveIndex=this.activeIndex;if(!_this.checkReRender[this.activeIndex]){_this.drawPoster(this.activeIndex,true)}}},onInit:function onInit(swiper){_this.curActiveIndex=swiper.activeIndex;if(!_this.checkReRender[swiper.activeIndex]){_this.drawPoster(swiper.activeIndex,true)}},onSlideChangeEnd:function onSlideChangeEnd(swiper){_this.curActiveIndex=swiper.activeIndex;if(!_this.checkReRender[swiper.activeIndex]){_this.drawPoster(swiper.activeIndex,true)}}}}},methods:{initRender:function initRender(){var _context2;this.checkReRender=_fillInstanceProperty(_context2=Array(this.posters.length)).call(_context2,false)},initShow:function initShow(){var mobileShow=localStorage.getItem("cps_poster_mobile_show");var infoShow=localStorage.getItem("cps_poster_info_show");this.mobileShow=mobileShow===null?1:Number(mobileShow);this.infoShow=infoShow===null?1:Number(infoShow)},preventMove:function preventMove(e){e._prevent=true},hidePoster:function hidePoster(e){this.showSwiper=false;this.hide()},clickPoster:function clickPoster(e){var target=e.target,currentTarget=e.currentTarget;if(target===currentTarget)this.hidePoster()},appSavePoster:function appSavePoster(imgSrc){var _this3=this;window.Crossapi&&window.Crossapi("/image/storage",{src:imgSrc},function(data2){_this3.$refs.toast.show("保存成功")})},drawPoster:function drawPoster(index,isCheckoutBtn){var _this4=this;if(this.posters[index].isQrcode){return}this.checkReRender[index]=true;this.$refs.poster[index].generateImg(isCheckoutBtn).then(function(posterImg){}).catch(function(err){_this4.checkReRender[index]=false})},setPosterImgRedis:function setPosterImgRedis(index,img){this.$set(this.posterImgRedis,index,img)},getScroll:function getScroll(index){return this.$refs.poster[index].getScroll()},changeShowBtn:function changeShowBtn(type){var _this5=this;if(type===1){this.infoShow=Number(this.infoShow)===0?1:0;localStorage.setItem("cps_poster_info_show",this.infoShow)}else if(type===2){this.mobileShow=Number(this.mobileShow)===0?1:0;localStorage.setItem("cps_poster_mobile_show",this.mobileShow)}this.initRender();this.$nextTick(function(){_this5.drawPoster(_this5.curActiveIndex,true)})},imgBtn:function imgBtn(type){var imgSrc="";if(this.posters[this.curActiveIndex]&&this.posters[this.curActiveIndex].isQrcode){imgSrc=this.qrCodeImg}else{imgSrc=this.posterImgRedis[this.curActiveIndex]}if(imgSrc){if(type===1){this.appSavePoster(imgSrc)}else if(type===2){this.shareImg(imgSrc)}}else{this.$refs.toast.show("海报仍未生成,请稍等",2e3)}},shareImg:function shareImg(img){var _this6=this;var shareInfo=[{type:"weixin_friend",img:"https://sslstatic.cxisc.com/img/appShareIcon/wx.7e6d27707956284e.png",txt:"微信好友"},{type:"weixin_timeline",img:"https://sslstatic.cxisc.com/img/appShareIcon/timeline.f4e95c018142f798.png",txt:"微信朋友圈"}];window.kcbJs.invoke({path:"/ui/dialog/showNewShareDialog",data:{shareInfo},success:function success(data2){_this6.share(data2,img)},fail:function fail(data2){}})},share:function share(data2,url){var platform=data2.platform;if(platform==="weixin_friend"){window.kcbJs.invoke({path:"/weixin/share",data:{scene:"friend",type:"image",url},unsupport:function unsupport(){},success:function success(){},fail:function fail(e){if(e.code!==20001){}}})}else if(platform==="weixin_timeline"){window.kcbJs.invoke({path:"/weixin/share",data:{scene:"timeline",type:"image",url},unsupport:function unsupport(){},success:function success(){},fail:function fail(e){if(e.code!==20001){}}})}},show:function show(){this.posterImgRedis=[];this.isVisible=true},slidePoster:function slidePoster(type){if(type===1)this.mySwiper.slidePrev();else this.mySwiper.slideNext()},getAgentInfo:function getAgentInfo(){var _this7=this;return new _Promise(function(resolve,reject){var xysEnv=["https://beta.xinhulu.com","https://www.xiaoyusan.com"];if(_includesInstanceProperty(xysEnv).call(xysEnv,window.origin)){resolve();return}var bdzsEnv=["https://bdzsbeta.cxmuc.com","https://m.baodan100.com","https://baodan100.com"];var url="/agent/getBusiCard";if(_includesInstanceProperty(bdzsEnv).call(bdzsEnv,window.origin)){url="/CpsBdzs/getBusiCard"}utils_post.fetch(url).then(function(res){if(res.data.ret===0){var agent=res.data.data.agent;var headurl=agent.headurl;_this7.licenseForm.headurl=headurl;_this7.licenseForm.jobTitle=agent.jobTitle;_this7.licenseForm.showname=agent.showname;_this7.licenseForm.license=agent.license;_this7.licenseForm.mobile=agent.mobile;if(!window.fetch){resolve();return}if(_indexOfInstanceProperty(headurl).call(headurl,"qlogo")>-1||_indexOfInstanceProperty(headurl).call(headurl,"mmopen")>-1){_this7.wxUrlFetchToBlob(headurl,resolve)}else{resolve()}return}resolve()}).catch(reject)})},wxUrlFetchToBlob:function wxUrlFetchToBlob(url,resolve){var _this8=this;if(!/^https:/.test(url)){url=url.replace("http://","https://")}window.fetch(url).then(function(res){return res.blob()}).then(function(res){_this8.licenseForm.headurl=_URL.createObjectURL(res);resolve&&resolve()}).catch(function(err){resolve&&resolve()})}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _vm.isVisible?_c("div",{attrs:{"act-ProPosterLayer":""}},[_c("div",{ref:"layer_picture",staticClass:"layer",on:{"click":function click($event){if($event.target!==$event.currentTarget)return null;return _vm.hidePoster.apply(null,arguments)}}},[_c("div",{staticClass:"picture",attrs:{"id":"picture"}},[_vm.showSwiper?_c("swiper",{ref:"swiper",attrs:{"options":_vm.getSwiperOptionPoster}},[_vm._l(_vm.posters,function(item,index){return _c("swiper-slide",{key:index,staticClass:"picture_box act-row act-middle",nativeOn:{"click":function click($event){return _vm.clickPoster.apply(null,arguments)}}},[!item.isQrcode?_c("Poster",{ref:"poster",refInFor:true,attrs:{"posterImg":_vm.posters[index].img,"qrcodeUrl":item.qrcodeUrl,"cardPhone":_vm.agentInfo.mobile,"cardName":_vm.agentInfo.truename,"cardImg":_vm.agentInfo.avatar,"infoShow":_vm.infoShow,"mobileShow":_vm.mobileShow,"posterGenerImg":_vm.posterImgRedis[index],"showPosterQrCode":item.showPosterQrCode,"index":index,"licenseForm":_vm.licenseForm},on:{"generateSuccess":_vm.setPosterImgRedis}}):_c("div",{staticClass:"qrCodeContainer act-row act-middle"},[_c("div",{staticClass:"qrCode act-row act-middle"},[_c("img",{attrs:{"src":_vm.qrCodeImg,"alt":"二维码"}})])])],1)}),_c("div",{staticClass:"poster-swiper-pagination",attrs:{"slot":"pagination"},slot:"pagination"})],2):_vm._e(),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curActiveIndex!==0,expression:"curActiveIndex !== 0"}],staticClass:"swiper-button-prev",attrs:{"id":"poster_prev"},on:{"click":function click($event){return _vm.slidePoster(1)}}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.curActiveIndex!==_vm.posters.length-1,expression:"curActiveIndex !== posters.length - 1"}],staticClass:"swiper-button-next",attrs:{"id":"poster_next"},on:{"click":function click($event){return _vm.slidePoster(2)}}}),_vm.isWx?_c("div",{staticClass:"long_save"},[_c("span",[_vm._v("长按图片可保存至相册或分享")])]):_vm._e(),_vm.isApp?_c("div",{staticClass:"appBtn"},[_c("div",{staticClass:"saveImg",attrs:{"data-track":"haibao_save"},on:{"click":function click($event){return _vm.imgBtn(1)}}},[_vm._m(0),_vm._m(1)]),_c("div",{staticClass:"shareImg",attrs:{"data-track":"haibao_share"},on:{"click":function click($event){return _vm.imgBtn(2)}}},[_vm._m(2),_vm._m(3)])]):_vm._e(),_vm._m(4)],1)]),_c("act-toast",{ref:"toast",attrs:{"zIndex":9999}})],1):_vm._e()};var _sfc_staticRenderFns=[function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"cir"},[_c("img",{attrs:{"src":__$_require_25f54f43__,"alt":""}})])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"tit"},[_c("span",[_vm._v("下载图片")])])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"cir"},[_c("img",{attrs:{"src":__$_require_7d5cf078__,"alt":""}})])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"tit"},[_c("span",[_vm._v("分享图片")])])},function(){var _vm=this,_c=_vm._self._c;return _c("div",{staticClass:"tips"},[_c("span",[_vm._v("如需修改名片信息,可前往“我的-个人信息”页面")])])}];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"1b72c429");var ProPosterLayer=__component__.exports;ProPosterLayer.install=function(Vue){Vue.component(ProPosterLayer.name,ProPosterLayer);Vue.prototype["$createProPosterLayer"]=utils_create.create(ProPosterLayer,Vue)};exports.ProPosterLayer=ProPosterLayer;
@@ -15,7 +15,7 @@ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/in
15
15
  import _URL from "@babel/runtime-corejs3/core-js/url";
16
16
  import { c as create } from "../utils/create/index.mjs";
17
17
  import { v as visibleMixin } from "../mixins/visible/index.mjs";
18
- import { swiperSlide, swiper } from "vue-awesome-swiper";
18
+ import { s as swiperSlide, a as swiper } from "../utils/vueAwesomeSwiper/index.mjs";
19
19
  import { P as Poster } from "./poster/index.mjs";
20
20
  import { u as ua } from "../utils/helpers/index.mjs";
21
21
  import { Q as QRCode } from "../QRCode/qrcode/index.mjs";
@@ -1 +1 @@
1
- "use strict";require('./style.css');var _defineProperty=require("@babel/runtime-corejs3/helpers/defineProperty");var _Symbol$toStringTag=require("@babel/runtime-corejs3/core-js/symbol/to-string-tag");var _Object$getOwnPropertyDescriptor=require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor");var _Object$defineProperty=require("@babel/runtime-corejs3/core-js/object/define-property");var _Object$freeze=require("@babel/runtime-corejs3/core-js/object/freeze");var _someInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/some");var _Promise=require("@babel/runtime-corejs3/core-js/promise");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var mixins_visible=require("../../mixins/visible/index.js");var BScrollModule=require("better-scroll");var Loading=require("../../Loading/index.js");var utils_helpers=require("../../utils/helpers/index.js");var ProductLayer_js_util=require("../js/util/index.js");var ProductLayer_layer=require("../layer/index.js");var __$_require_5018a7bc__=require("../../assets/arrow2.caf6.png");var __$_require_8fa38bd2__=require("../../assets/play.76ca.png");var common=require("../../common/index.js");function _interopNamespaceDefault(e){var n=Object.create(null,_defineProperty({},_Symbol$toStringTag,{value:"Module"}));if(e){var _loop=function _loop2(k2){if(k2!=="default"){var d=_Object$getOwnPropertyDescriptor(e,k2);_Object$defineProperty(n,k2,d.get?d:{enumerable:true,get:function get(){return e[k2]}})}};for(var k in e){_loop(k)}}n.default=e;return _Object$freeze(n)}var BScrollModule__namespace=_interopNamespaceDefault(BScrollModule);var BScroll=BScrollModule__namespace.default||BScrollModule__namespace.BScroll||BScrollModule__namespace;var _sfc_main={name:"ProductDetailLayer",components:{Loading:Loading.Loading,layer:ProductLayer_layer.layer},mixins:[mixins_visible.visibleMixin],props:{proData:{type:Object,default:function _default(){return{}}},title:{type:String,default:"产品资料"},isKcb:Boolean,showSales:Boolean,isJdt:{type:[Boolean,Number],default:false},loading:{type:Boolean,default:false},agentId:{type:[String,Number],default:""},isSingleH5Module:{type:Boolean,default:false}},computed:{showSalesSection:function showSalesSection(){var _context;return this.proData.sales&&this.proData.sales.length&&_someInstanceProperty(_context=this.proData.sales).call(_context,function(item){return item.saleAddr&&item.saleAddr.length})}},data:function data(){return{posterContainer:null,checkDocDisabled:false,isApp:utils_helpers.ua.isApp,slMap:{"-1":"无需双录","0":"全面双录","1":"部分双录"}}},methods:{checkDetailArea:function checkDetailArea(){this.$emit("showSaleAreaLayer")},initPoster:function initPoster(){var _this=this;this.$nextTick(function(){if(_this.proData.showPoster){_this.posterContainer=new BScroll(_this.$refs.posterContainer,{click:true,scrollX:true});_this.posterContainer.refresh()}})},openFile:function openFile(_ref){var _this2=this;var _ref$items=_ref.items,items=_ref$items===void 0?[]:_ref$items,title=_ref.title;if(!utils_helpers.ua.isApp)return;this.checkDocDisabled=false;this.openFile._timer=setTimeout(function(){_this2.checkDocDisabled=true;_this2.$emit("openFile",{items,title})},500)},clearOpenFile:function clearOpenFile(){if(!utils_helpers.ua.isApp)return;clearTimeout(this.openFile._timer)},showEmailLayer:function showEmailLayer(){this.$emit("showEmailLayer",true)},checkDoc:function checkDoc(doc){var _this3=this;if(this.checkDocDisabled)return;var _doc$url=doc.url,url=_doc$url===void 0?"":_doc$url,_doc$items=doc.items,items=_doc$items===void 0?[]:_doc$items,_doc$title=doc.title,title=_doc$title===void 0?"":_doc$title;if(items&&items.length){if(items.length===1&&ProductLayer_js_util.isExcelFile(items[0].url)){if(utils_helpers.ua.isApp){this.openExcelFile(items[0].url).then(function(){}).catch(function(e){_this3.$createToast({textAlign:"center",toastTxt:e.msg,txt:e.msg,type:"txt"})})}else{if(utils_helpers.ua.isAndroid||utils_helpers.ua.isHarmonyOS){window.open(items[0].url)}else if(utils_helpers.ua.isIOS){this.$emit("openFileActionSheet",items[0].url)}}return}else if(items.length>1){this.$emit("openFileList",{items,title});return}}if(!url){var msg="暂不支持手机端查看,请登录咔嚓保PC下载查看";this.$createToast({textAlign:"center",toastTxt:msg,txt:msg,type:"txt"})}else{this.go(url)}},go:function go(url){if(this.isSingleH5Module){location.href="/app/showWebView?source=".concat(encodeURIComponent(url),"&isFullScreen=1")}else{location.href=url}},openExcelFile:function openExcelFile(url){return new _Promise(function(resolve,reject){var params={path:url};window.kcbJs.invoke({path:"/file/showExcel",data:params,success:function success(){resolve()},fail:function fail(e){reject(e)}})})},goKcbCourse:function goKcbCourse(_ref2){var url=_ref2.url;location.href=url},showPosterLayer:function showPosterLayer(index){this.$emit("showPosterLayer",index)},close:function close(){this.$emit("close")},checkDetail:function checkDetail(){var itemId=this.proData.itemId;if(utils_helpers.ua.isApp&&this.isSingleH5Module){location.href="/app/showWebView?source=".concat(encodeURIComponent(location.protocol+"//"+location.host+"/agent/dye/itemid/"+itemId),"&isFullScreen=1")}else{location.href="/agent/dye/itemid/"+itemId}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("layer",{staticClass:"proLayer",attrs:{"visible":_vm.isVisible,"title":_vm.title,"zIndex":100},on:{"close":_vm.close}},[_vm.loading?[_c("div",{staticClass:"loading-wrap"},[_c("Loading",{directives:[{name:"show",rawName:"v-show",value:_vm.loading,expression:"loading"}],attrs:{"type":"cir2","color":"#f05a4b","size":20}}),_c("p",{staticClass:"loading-txt"},[_vm._v(" 资料加载中... ")])],1)]:[_c("div",{staticClass:"product-layer-content"},[_c("section",{staticClass:"layer-section insurance"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("div",{staticClass:"left act-row act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 资料包 ")]),_vm.isApp?_c("p",{staticClass:"share-tip"},[_vm._v(" 长按图标,快捷分享 ")]):_vm._e()]),_c("p",{staticClass:"right layer-section-hd-close",attrs:{"data-track":"chanpinziliao_sendemail"},on:{"click":_vm.showEmailLayer}},[_c("span",[_vm._v("发送至邮箱")]),_c("img",{attrs:{"src":__$_require_5018a7bc__,"alt":""}})])]),_c("div",{staticClass:"layer-section-insurance"},_vm._l(_vm.proData.insurance,function(item,index){return _c("div",{key:index,staticClass:"insurance-item column justify-between items-center",attrs:{"data-track":"chanpinziliao_ziliaobao"}},[_c("div",{staticClass:"handleClickSection",on:{"click":function click($event){return _vm.checkDoc(item)},"touchstart":function touchstart($event){return _vm.openFile(item)},"touchend":function touchend($event){return _vm.clearOpenFile()},"touchcancel":function touchcancel($event){return _vm.clearOpenFile()}}}),_c("img",{attrs:{"src":item.img,"alt":""}}),_c("p",[_vm._v(_vm._s(item.title))])])}),0)]),_vm.showSalesSection?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 销售区域 ")]),_c("p",{staticClass:"right layer-section-hd-close",attrs:{"data-track":"productlist_ziliao_areadetail"},on:{"click":_vm.checkDetailArea}},[_c("span",[_vm._v("查看详细地区及双录规则")]),_c("img",{attrs:{"src":__$_require_5018a7bc__,"alt":""}})])]),_c("div",{staticClass:"layer-section-sales"},_vm._l(_vm.proData.sales,function(saleItem,idx){var _context2;return _c("div",{key:idx},[saleItem.saleAddr&&saleItem.saleAddr.length?[_c("p",{staticStyle:{"font-weight":"bold"}},[_vm._v(_vm._s(_vm.slMap[saleItem.range])+":")]),_c("p",[_vm._v(_vm._s(_mapInstanceProperty(_context2=saleItem.saleAddr).call(_context2,function(item){return item.name}).join("、")))])]:_vm._e()],2)}),0)]):_vm._e(),_vm.proData.tools&&_vm.proData.tools.length?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 展业工具 ")])]),_c("div",{staticClass:"layer-section-tools"},_vm._l(_vm.proData.tools,function(item,index){return _c("div",{key:index,staticClass:"tools-item",attrs:{"data-track":"chanpinziliao_tools"},on:{"click":function click($event){return _vm.go(item.url)}}},[_c("img",{attrs:{"src":item.img,"alt":"","width":"100%"}})])}),0)]):_vm._e(),_vm.proData.articles&&_vm.proData.articles.length?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 产品文章 ")])]),_c("div",{staticClass:"layer-section-articles"},_vm._l(_vm.proData.articles,function(item,index){return _c("div",{key:index,staticClass:"article-item act-row act-justify-between",attrs:{"data-track":"chanpinziliao_article"},on:{"click":function click($event){return _vm.go(item.url)}}},[_c("div",{staticClass:"article-item-title"},[_vm._v(" "+_vm._s(item.title)+" ")]),_c("div",{staticClass:"article-item-img"},[_c("img",{attrs:{"src":item.img,"alt":""}})])])}),0)]):_vm._e(),_vm.proData.course&&_vm.proData.course.courseid?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 产品视频 ")])]),_c("div",{staticClass:"layer-section-courses"},[_c("div",{staticClass:"course-item act-row act-justify-between",attrs:{"data-track":"chanpinziliao_video"},on:{"click":function click($event){return _vm.goKcbCourse(_vm.proData.course)}}},[_c("div",{staticClass:"course-item-title"},[_vm._v(" "+_vm._s(_vm.proData.course.courseName)+" ")]),_c("div",{staticClass:"course-item-img"},[_c("img",{staticClass:"playImg",attrs:{"src":__$_require_8fa38bd2__}}),_c("img",{attrs:{"src":_vm.proData.course.courseListPicture,"alt":""}})])])])]):_vm._e(),_vm.proData.showPoster?_c("section",{staticClass:"layer-section posters"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 产品二维码 ")])]),_c("div",{ref:"posterContainer",staticClass:"layer-section-posters"},[_c("div",{staticClass:"poster-wrapper"},_vm._l(_vm.proData.posters,function(item,index){return _c("div",{key:index,staticClass:"poster-item",class:{"isQrCode":_vm.proData.showCode&&index===_vm.proData.posters.length-1},attrs:{"data-track":"chanpinziliao_qrcode"},on:{"click":function click($event){return _vm.showPosterLayer(index)}}},[_c("img",{attrs:{"src":item.big,"alt":""}})])}),0)])]):_vm._e()]),_vm.isKcb?_c("div",{attrs:{"slot":"footer"},slot:"footer"},[_c("div",{staticClass:"product-layer-footer"},[_c("div",{staticClass:"footer-btn",on:{"click":_vm.checkDetail}},[_vm._v(" 查看产品详情 ")])])]):_vm._e()]],2)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"28c2348c");var productDetailLayer=__component__.exports;exports.productDetailLayer=productDetailLayer;
1
+ "use strict";require('./style.css');var _someInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/some");var _Promise=require("@babel/runtime-corejs3/core-js/promise");var _mapInstanceProperty=require("@babel/runtime-corejs3/core-js/instance/map");var mixins_visible=require("../../mixins/visible/index.js");var BScrollModule=require("better-scroll");var Loading=require("../../Loading/index.js");var utils_helpers=require("../../utils/helpers/index.js");var ProductLayer_js_util=require("../js/util/index.js");var ProductLayer_layer=require("../layer/index.js");var __$_require_5018a7bc__=require("../../assets/arrow2.caf6.png");var __$_require_8fa38bd2__=require("../../assets/play.76ca.png");var common=require("../../common/index.js");var _sfc_main={name:"ProductDetailLayer",components:{Loading:Loading.Loading,layer:ProductLayer_layer.layer},mixins:[mixins_visible.visibleMixin],props:{proData:{type:Object,default:function _default(){return{}}},title:{type:String,default:"产品资料"},isKcb:Boolean,showSales:Boolean,isJdt:{type:[Boolean,Number],default:false},loading:{type:Boolean,default:false},agentId:{type:[String,Number],default:""},isSingleH5Module:{type:Boolean,default:false}},computed:{showSalesSection:function showSalesSection(){var _context;return this.proData.sales&&this.proData.sales.length&&_someInstanceProperty(_context=this.proData.sales).call(_context,function(item){return item.saleAddr&&item.saleAddr.length})}},data:function data(){return{posterContainer:null,checkDocDisabled:false,isApp:utils_helpers.ua.isApp,slMap:{"-1":"无需双录","0":"全面双录","1":"部分双录"}}},methods:{checkDetailArea:function checkDetailArea(){this.$emit("showSaleAreaLayer")},initPoster:function initPoster(){var _this=this;this.$nextTick(function(){if(_this.proData.showPoster){_this.posterContainer=new BScrollModule(_this.$refs.posterContainer,{click:true,scrollX:true});_this.posterContainer.refresh()}})},openFile:function openFile(_ref){var _this2=this;var _ref$items=_ref.items,items=_ref$items===void 0?[]:_ref$items,title=_ref.title;if(!utils_helpers.ua.isApp)return;this.checkDocDisabled=false;this.openFile._timer=setTimeout(function(){_this2.checkDocDisabled=true;_this2.$emit("openFile",{items,title})},500)},clearOpenFile:function clearOpenFile(){if(!utils_helpers.ua.isApp)return;clearTimeout(this.openFile._timer)},showEmailLayer:function showEmailLayer(){this.$emit("showEmailLayer",true)},checkDoc:function checkDoc(doc){var _this3=this;if(this.checkDocDisabled)return;var _doc$url=doc.url,url=_doc$url===void 0?"":_doc$url,_doc$items=doc.items,items=_doc$items===void 0?[]:_doc$items,_doc$title=doc.title,title=_doc$title===void 0?"":_doc$title;if(items&&items.length){if(items.length===1&&ProductLayer_js_util.isExcelFile(items[0].url)){if(utils_helpers.ua.isApp){this.openExcelFile(items[0].url).then(function(){}).catch(function(e){_this3.$createToast({textAlign:"center",toastTxt:e.msg,txt:e.msg,type:"txt"})})}else{if(utils_helpers.ua.isAndroid||utils_helpers.ua.isHarmonyOS){window.open(items[0].url)}else if(utils_helpers.ua.isIOS){this.$emit("openFileActionSheet",items[0].url)}}return}else if(items.length>1){this.$emit("openFileList",{items,title});return}}if(!url){var msg="暂不支持手机端查看,请登录咔嚓保PC下载查看";this.$createToast({textAlign:"center",toastTxt:msg,txt:msg,type:"txt"})}else{this.go(url)}},go:function go(url){if(this.isSingleH5Module){location.href="/app/showWebView?source=".concat(encodeURIComponent(url),"&isFullScreen=1")}else{location.href=url}},openExcelFile:function openExcelFile(url){return new _Promise(function(resolve,reject){var params={path:url};window.kcbJs.invoke({path:"/file/showExcel",data:params,success:function success(){resolve()},fail:function fail(e){reject(e)}})})},goKcbCourse:function goKcbCourse(_ref2){var url=_ref2.url;location.href=url},showPosterLayer:function showPosterLayer(index){this.$emit("showPosterLayer",index)},close:function close(){this.$emit("close")},checkDetail:function checkDetail(){var itemId=this.proData.itemId;if(utils_helpers.ua.isApp&&this.isSingleH5Module){location.href="/app/showWebView?source=".concat(encodeURIComponent(location.protocol+"//"+location.host+"/agent/dye/itemid/"+itemId),"&isFullScreen=1")}else{location.href="/agent/dye/itemid/"+itemId}}}};var _sfc_render=function render(){var _vm=this,_c=_vm._self._c;return _c("layer",{staticClass:"proLayer",attrs:{"visible":_vm.isVisible,"title":_vm.title,"zIndex":100},on:{"close":_vm.close}},[_vm.loading?[_c("div",{staticClass:"loading-wrap"},[_c("Loading",{directives:[{name:"show",rawName:"v-show",value:_vm.loading,expression:"loading"}],attrs:{"type":"cir2","color":"#f05a4b","size":20}}),_c("p",{staticClass:"loading-txt"},[_vm._v(" 资料加载中... ")])],1)]:[_c("div",{staticClass:"product-layer-content"},[_c("section",{staticClass:"layer-section insurance"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("div",{staticClass:"left act-row act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 资料包 ")]),_vm.isApp?_c("p",{staticClass:"share-tip"},[_vm._v(" 长按图标,快捷分享 ")]):_vm._e()]),_c("p",{staticClass:"right layer-section-hd-close",attrs:{"data-track":"chanpinziliao_sendemail"},on:{"click":_vm.showEmailLayer}},[_c("span",[_vm._v("发送至邮箱")]),_c("img",{attrs:{"src":__$_require_5018a7bc__,"alt":""}})])]),_c("div",{staticClass:"layer-section-insurance"},_vm._l(_vm.proData.insurance,function(item,index){return _c("div",{key:index,staticClass:"insurance-item column justify-between items-center",attrs:{"data-track":"chanpinziliao_ziliaobao"}},[_c("div",{staticClass:"handleClickSection",on:{"click":function click($event){return _vm.checkDoc(item)},"touchstart":function touchstart($event){return _vm.openFile(item)},"touchend":function touchend($event){return _vm.clearOpenFile()},"touchcancel":function touchcancel($event){return _vm.clearOpenFile()}}}),_c("img",{attrs:{"src":item.img,"alt":""}}),_c("p",[_vm._v(_vm._s(item.title))])])}),0)]),_vm.showSalesSection?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 销售区域 ")]),_c("p",{staticClass:"right layer-section-hd-close",attrs:{"data-track":"productlist_ziliao_areadetail"},on:{"click":_vm.checkDetailArea}},[_c("span",[_vm._v("查看详细地区及双录规则")]),_c("img",{attrs:{"src":__$_require_5018a7bc__,"alt":""}})])]),_c("div",{staticClass:"layer-section-sales"},_vm._l(_vm.proData.sales,function(saleItem,idx){var _context2;return _c("div",{key:idx},[saleItem.saleAddr&&saleItem.saleAddr.length?[_c("p",{staticStyle:{"font-weight":"bold"}},[_vm._v(_vm._s(_vm.slMap[saleItem.range])+":")]),_c("p",[_vm._v(_vm._s(_mapInstanceProperty(_context2=saleItem.saleAddr).call(_context2,function(item){return item.name}).join("、")))])]:_vm._e()],2)}),0)]):_vm._e(),_vm.proData.tools&&_vm.proData.tools.length?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 展业工具 ")])]),_c("div",{staticClass:"layer-section-tools"},_vm._l(_vm.proData.tools,function(item,index){return _c("div",{key:index,staticClass:"tools-item",attrs:{"data-track":"chanpinziliao_tools"},on:{"click":function click($event){return _vm.go(item.url)}}},[_c("img",{attrs:{"src":item.img,"alt":"","width":"100%"}})])}),0)]):_vm._e(),_vm.proData.articles&&_vm.proData.articles.length?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 产品文章 ")])]),_c("div",{staticClass:"layer-section-articles"},_vm._l(_vm.proData.articles,function(item,index){return _c("div",{key:index,staticClass:"article-item act-row act-justify-between",attrs:{"data-track":"chanpinziliao_article"},on:{"click":function click($event){return _vm.go(item.url)}}},[_c("div",{staticClass:"article-item-title"},[_vm._v(" "+_vm._s(item.title)+" ")]),_c("div",{staticClass:"article-item-img"},[_c("img",{attrs:{"src":item.img,"alt":""}})])])}),0)]):_vm._e(),_vm.proData.course&&_vm.proData.course.courseid?_c("section",{staticClass:"layer-section"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 产品视频 ")])]),_c("div",{staticClass:"layer-section-courses"},[_c("div",{staticClass:"course-item act-row act-justify-between",attrs:{"data-track":"chanpinziliao_video"},on:{"click":function click($event){return _vm.goKcbCourse(_vm.proData.course)}}},[_c("div",{staticClass:"course-item-title"},[_vm._v(" "+_vm._s(_vm.proData.course.courseName)+" ")]),_c("div",{staticClass:"course-item-img"},[_c("img",{staticClass:"playImg",attrs:{"src":__$_require_8fa38bd2__}}),_c("img",{attrs:{"src":_vm.proData.course.courseListPicture,"alt":""}})])])])]):_vm._e(),_vm.proData.showPoster?_c("section",{staticClass:"layer-section posters"},[_c("div",{staticClass:"layer-section-hd act-row act-justify-between act-items-center"},[_c("p",{staticClass:"layer-section-hd-title"},[_vm._v(" 产品二维码 ")])]),_c("div",{ref:"posterContainer",staticClass:"layer-section-posters"},[_c("div",{staticClass:"poster-wrapper"},_vm._l(_vm.proData.posters,function(item,index){return _c("div",{key:index,staticClass:"poster-item",class:{"isQrCode":_vm.proData.showCode&&index===_vm.proData.posters.length-1},attrs:{"data-track":"chanpinziliao_qrcode"},on:{"click":function click($event){return _vm.showPosterLayer(index)}}},[_c("img",{attrs:{"src":item.big,"alt":""}})])}),0)])]):_vm._e()]),_vm.isKcb?_c("div",{attrs:{"slot":"footer"},slot:"footer"},[_c("div",{staticClass:"product-layer-footer"},[_c("div",{staticClass:"footer-btn",on:{"click":_vm.checkDetail}},[_vm._v(" 查看产品详情 ")])])]):_vm._e()]],2)};var _sfc_staticRenderFns=[];var __component__=common.normalizeComponent(_sfc_main,_sfc_render,_sfc_staticRenderFns,false,null,"eeada4c9");var productDetailLayer=__component__.exports;exports.productDetailLayer=productDetailLayer;
@@ -2,7 +2,7 @@ import _someInstanceProperty from "@babel/runtime-corejs3/core-js/instance/some"
2
2
  import _Promise from "@babel/runtime-corejs3/core-js/promise";
3
3
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
4
4
  import { v as visibleMixin } from "../../mixins/visible/index.mjs";
5
- import * as BScrollModule from "better-scroll";
5
+ import BScrollModule__default from "better-scroll";
6
6
  import { L as Loading } from "../../Loading/index.mjs";
7
7
  import { u as ua } from "../../utils/helpers/index.mjs";
8
8
  import { i as isExcelFile } from "../js/util/index.mjs";
@@ -10,8 +10,7 @@ import { l as layer } from "../layer/index.mjs";
10
10
  import __$_require_5018a7bc__ from "../../assets/arrow2.caf6.png";
11
11
  import __$_require_8fa38bd2__ from "../../assets/play.76ca.png";
12
12
  import { n as normalizeComponent } from "../../common/index.mjs";
13
- import './style.css';var BScroll = BScrollModule.default || BScrollModule.BScroll || BScrollModule;
14
- var _sfc_main = {
13
+ import './style.css';var _sfc_main = {
15
14
  name: "ProductDetailLayer",
16
15
  components: {
17
16
  Loading,
@@ -93,7 +92,7 @@ var _sfc_main = {
93
92
  var _this = this;
94
93
  this.$nextTick(function() {
95
94
  if (_this.proData.showPoster) {
96
- _this.posterContainer = new BScroll(_this.$refs.posterContainer, {
95
+ _this.posterContainer = new BScrollModule__default(_this.$refs.posterContainer, {
97
96
  click: true,
98
97
  scrollX: true
99
98
  // startX: 0,
@@ -463,7 +462,7 @@ var _sfc_render = function render() {
463
462
  }, [_vm._v(" 查看产品详情 ")])])]) : _vm._e()]], 2);
464
463
  };
465
464
  var _sfc_staticRenderFns = [];
466
- var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "28c2348c");
465
+ var __component__ = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "eeada4c9");
467
466
  var productDetailLayer = __component__.exports;
468
467
  export {
469
468
  productDetailLayer as p