This commit is contained in:
2025-12-20 08:34:16 +08:00
commit 9d4fdc7242
872 changed files with 3536 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/ns-adv/ns-adv"],{"12fd":function(t,e,n){},"2ebd":function(t,e,n){"use strict";n.r(e);var i=n("c189"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},8289:function(t,e,n){"use strict";n.r(e);var i=n("f863"),a=n("2ebd");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("a488");var u=n("828b"),c=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},a488:function(t,e,n){"use strict";var i=n("12fd"),a=n.n(i);a.a},c189:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"ns-advert",props:{keyword:{type:String},className:{type:String}},data:function(){return{advList:[],isImage:!1,swiperHeight:150,currentIndex:0}},created:function(){this.getAdvList()},methods:{getAdvList:function(){var t=this;this.$api.sendRequest({url:"/api/adv/detail",data:{keyword:this.keyword},success:function(e){if(0==e.code){var n=e.data.adv_list;for(var i in n)n[i].adv_url&&(n[i].adv_url=JSON.parse(n[i].adv_url));t.advList=e.data.adv_list,t.$nextTick((function(){t.setSwiperHeight()}))}}})},jumppage:function(t){this.$util.diyRedirectTo(t)},imageLoad:function(t){this.isImage=!0},changeSwiper:function(t){var e=this;this.currentIndex=t.detail.current,this.$nextTick((function(){e.setSwiperHeight()}))},setSwiperHeight:function(){var e=this;this.advList.length>1&&setTimeout((function(){var n="#content-wrap"+e.currentIndex,i=t.createSelectorQuery().in(e);i.select(n).boundingClientRect(),i.exec((function(t){t&&t[0]&&(e.swiperHeight=t[0].height)}))}),10)}}};e.default=n}).call(this,n("df3c")["default"])},f863:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.advList.length),i=n?t.advList.length:null,a=n&&i>1?t.advList.length:null,r=n&&i>1?t.__map(t.advList,(function(e,n){var i=t.__get_orig(e),a=t.$util.img(e.adv_image);return{$orig:i,g3:a}})):null,u=!n||i>1?null:t.$util.img(t.advList[0]["adv_image"]);t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:a,l0:r,g4:u}})},a=[]}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/ns-adv/ns-adv-create-component',
{
'components/ns-adv/ns-adv-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("8289"))
})
},
[['components/ns-adv/ns-adv-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<block wx:if="{{$root.g0}}"><view class="{{['container-box',className]}}"><block wx:if="{{$root.g1>1}}"><swiper class="item-wrap" style="{{'height:'+(swiperHeight+'px')+';'}}" indicator-dots="{{$root.g2>1}}" indicator-active-color="#ffffff" autoplay="{{true}}" interval="{{3000}}" duration="{{1000}}" current="{{currentIndex}}" data-event-opts="{{[['change',[['changeSwiper',['$event']]]]]}}" bindchange="__e"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item data-event-opts="{{[['tap',[['jumppage',['$0'],[[['advList','',index,'adv_url']]]]]]]}}" bindtap="__e"><view class="image-box"><image src="{{item.g3}}" mode="widthFix" id="{{'content-wrap'+index}}"></image></view></swiper-item></block></swiper></block><block wx:else><view class="container-box item-wrap"><image src="{{$root.g4}}" mode="widthFix" lazy-load="true" data-event-opts="{{[['load',[['imageLoad',['$event']]]],['tap',[['jumppage',['$0'],['advList.__$n0.adv_url']]]]]}}" bindload="__e" bindtap="__e"></image></view></block></view></block>

View File

@@ -0,0 +1 @@
.container-box{width:100%}.container-box .item-wrap{border-radius:10rpx}.container-box .item-wrap .image-box{border-radius:10rpx}.container-box .item-wrap image{width:100%;height:auto;border-radius:10rpx;will-change:transform}