初始化代码
This commit is contained in:
1
front/home/pages/farm/detail.js
Normal file
1
front/home/pages/farm/detail.js
Normal file
File diff suppressed because one or more lines are too long
6
front/home/pages/farm/detail.json
Normal file
6
front/home/pages/farm/detail.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "农场详情",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
front/home/pages/farm/detail.wxml
Normal file
1
front/home/pages/farm/detail.wxml
Normal file
File diff suppressed because one or more lines are too long
2
front/home/pages/farm/detail.wxss
Normal file
2
front/home/pages/farm/detail.wxss
Normal file
@@ -0,0 +1,2 @@
|
||||
.land-order-detail .farm-item .cover{width:160rpx;height:160rpx}.land-order-detail .farm-item .icon-dingwei,
|
||||
.land-order-detail .farm-item .icon-right{font-size:24rpx}.land-order-detail .farm-item .status-btn{width:80rpx;height:36rpx;font-size:20rpx}.land-order-detail .farm-item .max-title{max-width:370rpx}.land-order-detail .farm-item .addr-text{max-width:420rpx}.land-order-detail .goods-item{width:345rpx}.land-order-detail .goods-item .cover{width:345rpx;height:345rpx;border-radius:15rpx 15rpx 0 0}.land-order-detail .land-item .cover{width:100%;height:345rpx;border-radius:15rpx 15rpx 0 0}.land-order-detail .claim-item .cover{width:240rpx;height:240rpx}.land-order-detail .claim-item .line-item{width:230rpx;height:15rpx;background:rgba(112,152,64,.2);border-radius:8rpx}.land-order-detail .claim-item .line-item .cur{top:0;left:0;height:15rpx;background:linear-gradient(0deg,#709840,#91c84e);border-radius:8rpx}.land-order-detail .claim-item .count-list .count-item{width:33.33%}.land-order-detail .claim-item .count-list .count-item .dot{width:10rpx;height:10rpx;background:#b3d465;margin-right:10rpx}.land-order-detail .monitor-item{width:345rpx;margin-top:24rpx}.land-order-detail .monitor-item .live-item{top:10rpx;left:10rpx;width:109rpx;height:38rpx;background:rgba(0,0,0,.3);border-radius:18rpx}.land-order-detail .monitor-item .live-item .live-img{top:0;width:38rpx;height:38rpx}.land-order-detail .monitor-item .live-item .f-icontext{margin-left:10rpx;width:61rpx}.land-order-detail .monitor-item .view-item{top:0;right:0;width:137rpx;height:51rpx;background:rgba(0,0,0,.3);border-radius:0 15rpx 0 0}.land-order-detail .monitor-item .cover{width:345rpx;height:190rpx;border-radius:15rpx 15rpx 0 0}.land-order-detail .monitor-item .content{padding:24rpx}.land-order-detail .monitor-item .content .iconfont{font-size:26rpx}
|
||||
1
front/home/pages/farm/info.js
Normal file
1
front/home/pages/farm/info.js
Normal file
@@ -0,0 +1 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["home/pages/farm/info"],{"295c":function(t,n,e){"use strict";e.r(n);var o=e("7160"),r=e("6fcd");for(var i in r)["default"].indexOf(i)<0&&function(t){e.d(n,t,(function(){return r[t]}))}(i);e("ea67");var a=e("f0c5"),u=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=u.exports},"6fcd":function(t,n,e){"use strict";e.r(n);var o=e("f254"),r=e.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(i);n["default"]=r.a},7160:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){}));var o=function(){var t=this,n=t.$createElement,e=(t._self._c,t.detail.id?t.__map(t.detail.imgs,(function(n,e){var o=t.__get_orig(n),r=t.detail.imgs.length,i=t.detail.imgs.length;return{$orig:o,g0:r,g1:i}})):null);t._isMounted||(t.e0=function(n,e){var o=arguments[arguments.length-1].currentTarget.dataset,r=o.eventParams||o["event-params"];e=r.item;return n.stopPropagation(),t.$util.previewImage({current:e,urls:t.detail.imgs})},t.e1=function(n){return n.stopPropagation(),t.$util.goUrl({url:t.detail.mobile,openType:"call"})}),t.$mp.data=Object.assign({},{$root:{l0:e}})},r=[]},"73d5":function(t,n,e){},b54a:function(t,n,e){"use strict";(function(t,n){var o=e("4ea4");e("b03e");o(e("66fd"));var r=o(e("295c"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(r.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},ea67:function(t,n,e){"use strict";var o=e("73d5"),r=e.n(o);r.a},f254:function(t,n,e){"use strict";(function(t){var o=e("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e("2eee")),i=o(e("c973")),a=e("26cb"),u={components:{},data:function(){return{scrollTop:0,options:{},detail:{},openType:{0:"闭店中",1:"营业中"}}},computed:(0,a.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo}}),onLoad:function(t){this.options=t,this.initIndex()},onPageScroll:function(t){this.scrollTop=t.scrollTop},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},methods:{initIndex:function(){var t=this;return(0,i.default)(r.default.mark((function n(){var e,o;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e=t.options.id,n.next=3,t.$api.home.farmerInfo({id:e});case 3:o=n.sent,o.is_open=1,o.star_percent=(1*o.star/5*100).toFixed(2)+"%",o.iv=1*o.iv+1,t.detail=o;case 8:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex()},toMap:function(){var n=this;return(0,i.default)(r.default.mark((function e(){var o,i,a,u;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=n.detail,i=o.lat,a=o.lng,u=o.address,e.next=3,n.$util.checkAuth({type:"userLocation"});case 3:return e.next=5,t.getLocation({type:"gcj02"});case 5:return e.next=7,t.openLocation({latitude:1*i,longitude:1*a,name:u,scale:28});case 7:case"end":return e.stop()}}),e)})))()}}};n.default=u}).call(this,e("543d")["default"])}},[["b54a","common/runtime","common/vendor"]]]);
|
||||
6
front/home/pages/farm/info.json
Normal file
6
front/home/pages/farm/info.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "商户信息",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
front/home/pages/farm/info.wxml
Normal file
1
front/home/pages/farm/info.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<block wx:if="{{detail.id}}"><view class="home-farm-info"><uni-nav-bar vue-id="d22b7ee8-1" fixed="{{true}}" shadow="{{false}}" statusBar="{{true}}" color="#fff" backgroundColor="{{scrollTop<20?'':primaryColor}}" leftIcon="icon-left" title="商户信息" bind:__l="__l"></uni-nav-bar><view style="{{'height:'+(configInfo.navBarHeight+'px')+';'}}"></view><image class="common-bg abs" style="{{'height:'+(configInfo.navBarHeight+104+'px')+';'}}" mode="aspectFill" lazy-load="{{true}}" src="https://lbqny.migugu.com/admin/farm/bg-cash.png"></image><view class="common-top-img"></view><view class="common-top-info rel"><view class="top-box abs"><view class="farm-item fill-base flex-center ml-md mr-md pd-lg box-shadow radius-24"><image class="cover box-shadow-mini radius-24" mode="aspectFill" lazy-load="{{true}}" src="{{detail.cover}}"></image><view class="flex-1 ml-lg"><view class="f-title c-title ellipsis" style="max-width:460rpx;">{{detail.title}}</view><view class="f-caption c-caption mt-sm">{{"浏览量 "+(detail.iv||0)}}</view></view></view></view></view><view class="space-md"></view><view class="fill-base pt-sm pl-lg pr-lg pb-lg"><view class="common-nav-title flex-center c-title"><view class="common-line" style="{{'background:'+(primaryColor)+';'}}"></view><view class="f-title text-bold flex-1">店铺描述</view></view><view class="f-paragraph c-desc"><text style="word-break:break-all;" decode="emsp">{{detail.desc}}</text></view></view><view class="info-list fill-base pl-lg pb-lg"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><image class="{{['info-img','fill-body','radius-16',[(index!=item.g0)?'mr-md':''],[(index==item.g1)?'mr-lg':'']]}}" mode="aspectFill" src="{{item.$orig}}" data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" data-event-params="{{({item:item.$orig})}}" catchtap="__e"></image></block></view><view class="space-md"></view><view class="fill-base pt-sm pl-lg pr-lg pb-lg"><view class="common-nav-title flex-center c-title"><view class="common-line" style="{{'background:'+(primaryColor)+';'}}"></view><view class="f-title text-bold flex-1">基础信息</view></view><view class="f-paragraph c-desc mt-sm"><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" class="flex-between" catchtap="__e"><view>联系电话</view><view>{{detail.mobile}}</view></view><view data-event-opts="{{[['tap',[['toMap',['$event']]]]]}}" class="flex-warp mt-md" catchtap="__e"><view>店铺地址</view><view class="flex-1 ml-lg pl-lg">{{detail.address}}</view></view><view class="flex-between mt-md"><view>是否营业</view><view>{{openType[detail.is_open]}}</view></view></view></view><view class="space-footer"></view></view></block>
|
||||
2
front/home/pages/farm/info.wxss
Normal file
2
front/home/pages/farm/info.wxss
Normal file
@@ -0,0 +1,2 @@
|
||||
.home-farm-info .farm-item .cover{width:160rpx;height:160rpx}.home-farm-info .farm-item .icon-dingwei,
|
||||
.home-farm-info .farm-item .icon-right{font-size:24rpx}.home-farm-info .farm-item .status-btn{width:80rpx;height:36rpx;font-size:20rpx}.home-farm-info .farm-item .max-title{max-width:370rpx}.home-farm-info .farm-item .addr-text{max-width:420rpx}.home-farm-info .info-list{white-space:nowrap;width:100%;overflow:auto}.home-farm-info .info-list .info-img{width:200rpx;height:200rpx;display:inline-block}
|
||||
1
front/home/pages/farm/list.js
Normal file
1
front/home/pages/farm/list.js
Normal file
File diff suppressed because one or more lines are too long
5
front/home/pages/farm/list.json
Normal file
5
front/home/pages/farm/list.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "附近农场",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
front/home/pages/farm/list.wxml
Normal file
1
front/home/pages/farm/list.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<view class="home-farm-list"><fixed vue-id="048aea9c-1" bind:__l="__l" vue-slots="{{['default']}}"><view data-event-opts="{{[['tap',[['toChooseLocation',['$event']]]]]}}" class="fill-base flex-center pt-lg pb-lg pl-md pr-md f-paragraph c-title" catchtap="__e"><view class="flex-1 flex-warp"><view class="iconfont icon-dingwei mr-sm _i" style="{{'margin-top:3rpx;'+('color:'+(primaryColor)+';')}}"></view><view class="max-580 ellipsis">{{location.address||'定位中...'}}</view></view><view class="iconfont icon-right _i" style="font-size:28rpx;"></view></view></fixed><block wx:for="{{list.data}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',[index]]]]]}}" class="farm-item fill-base flex-center mt-md ml-md mr-md pd-lg box-shadow radius-24" catchtap="__e"><image class="cover radius-24" mode="aspectFill" lazy-load="{{true}}" src="{{item.cover}}"></image><view class="flex-1 ml-lg"><view class="flex-y-center f-title c-title mt-sm mb-sm"><view class="max-title ellipsis">{{item.title}}</view><view class="{{['status-btn','flex-center','c-caption','ml-sm','radius-10',[(item.is_open==0)?'fill-space':''],[(item.is_open==1)?'fill-body':'']]}}" style="{{'color:'+(item.is_open==1?primaryColor:'')+';'}}">{{''+(item.is_open==1?'营业中':'闭店中')+''}}</view></view><view class="star-fill-info rel"><view class="flex-warp star rel"><block wx:for="{{5}}" wx:for-item="aitem" wx:for-index="aindex" wx:key="aindex"><view class="item-star flex-center"><view class="iconfont icon-star-bold-fill _i"></view></view></block></view><view class="star-fill abs" style="{{'width:'+(item.star_percent)+';'}}"><view class="flex-warp"><block wx:for="{{5}}" wx:for-item="aitem" wx:for-index="aindex" wx:key="aindex"><view class="item-star flex-center"><view class="iconfont icon-star-bold-fill icon-font-color _i" style="{{'background-image:'+('-webkit-linear-gradient(90deg, #FDCD47, #FFC000)')+';'}}"></view></view></block></view></view></view><view class="flex-y-center f-caption c-caption mt-sm"><view class="iconfont icon-dingwei mr-sm _i"></view><view class="addr-text ellipsis">{{item.address}}</view></view></view></view></block><block wx:if="{{loading}}"><load-more vue-id="048aea9c-2" noMore="{{$root.g0}}" loading="{{loading}}" bind:__l="__l"></load-more></block><block wx:if="{{$root.g1}}"><abnor vue-id="048aea9c-3" bind:__l="__l"></abnor></block><block wx:if="{{!loading&&!location.lng}}"><abnor vue-id="048aea9c-4" tip="{{[{text:'定位失败,请开启地理位置授权后重试~',color:0}]}}" button="{{[{text:'开启定位',type:'confirm'}]}}" btnSize data-event-opts="{{[['^confirm',[['e0']]]]}}" bind:confirm="__e" bind:__l="__l"></abnor></block><view class="space-footer"></view></view>
|
||||
1
front/home/pages/farm/list.wxss
Normal file
1
front/home/pages/farm/list.wxss
Normal file
@@ -0,0 +1 @@
|
||||
.home-farm-list .farm-item .cover{width:160rpx;height:160rpx}.home-farm-list .farm-item .icon-dingwei{font-size:24rpx}.home-farm-list .farm-item .status-btn{width:80rpx;height:36rpx;font-size:20rpx}.home-farm-list .farm-item .max-title{max-width:370rpx}.home-farm-list .farm-item .addr-text{max-width:420rpx}
|
||||
Reference in New Issue
Block a user