var a = getApp();
Page({
data: {
page: 1,
Xiangmu: []
},
jishuxq: function(t) {
wx.navigateTo({
url: "/hyb_o2o/addpages/pages/jishixq/jishixq?y_id=" + t.currentTarget.dataset.id
});
},
getJiansuo: function(t, e) {
var o = this, n = o.data.page;
a.util.request({
url: "entry/wxapp/Search",
data: {
page: n,
value: t,
city: '',
openid: wx.getStorageSync("openid"),
uniacid: wx.getStorageSync("uniacid")
},
success: function(a) {
for (var t = a.data.data, e = o.data.Xiangmu, n = 0; n < t.length; n++) e.push(t[n]);
o.setData({
length1: t.length
}),o.setData({
Xiangmu: e
});
}
});
},
onShareAppMessage: function() {},
onReachBottom: function() {
var a = this;
a.setData({
page: this.data.page + 1
});
var t = a.data.value, e = a.data.city;
a.getJiansuo(t, e), 0 == a.data.length1 ? a.setData({
hidden: !1
}) : a.setData({
hidden: !0
});
}
});
<view class="jishibox pad25 list">
<view bindtap="jishuxq" class="jishi-list" data-id="{{jishi.y_id}}" wx:for="{{Xiangmu}}" wx:for-item="jishi" wx:key="a" style="width: 100%;">
<view class="jishi_top df jsb">
<view class="jishi_top_left" style="width: 100%;">
<view class="df" style="align-items: unset;">
<!-- <image class="user_Img" mode="aspectFill" src="{{jishi.y_thumb}}"></image> -->
<image class="user_Img" mode="aspectFill" src="{{jishi.y_thumb}}"></image>
<view style="width: 75%;">
<view class="df">
<view class="fs26" style="color:#333;margin-right:26rpx;">{{jishi.y_name}}</view>
<!-- <view class="jinpai">金牌</view> -->
<view class="jinpai">{{jishi.y_age}}岁</view>
<view class="jinpai">{{jishi.y_address}}</view>
</view>
<view class="stars">
<view class="fs26" style="color:#333;margin-right:26rpx;" style="text-overflow:ellipsis; display: -webkit-box; -webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;margin: 3% 0;">{{jishi.y_jinengs}}
<view class="fwfy_box">
<view class="fwfy">{{jishi.fwfy}}元左右</view> / 26天
</view>
</view>
</view>
<view class="df" class="bq_box">
<!-- <view class="jinpai">金牌</view> -->
<view class="bq">从业{{jishi.cynx}}年</view>
<view class="bq">服务{{jishi.fuwunum}}户</view>
<!-- <view class="jinpai">评价{{jishi.y_address}}条</view> -->
</view>
<view class="stars">
<view class="jishi_bot df jsb">
<view class="bot_left">
<view class="js_bot_icon" wx:if="{{jishi.y_label!=''}}" wx:for="{{jishi.y_label}}">{{item}}</view>
</view>
</view>
</view>
<!-- <view class="stars" style="padding: 0 0 4% 0;border-top: 1px solid #eee;">
<image src="/hyb_o2o/resource/images/star.png" wx:for="{{jishi.pingfen-0}}"></image>
<image src="/hyb_o2o/resource/images/star1.png" wx:for="{{5-jishi.pingfen}}"></image>
</view> -->
</view>
</view>
<view class="df fs24" style="padding-top:16rpx;" style="display:none;">
<view class="df" style="margin-right:30rpx;">
<image class="js_logo" src="/hyb_o2o/resource/images/fw.png"></image>
<view>服务人数:{{jishi.fuwunum}}</view>
</view>
<view class="df">
<image class="js_logo" src="/hyb_o2o/resource/images/jds.png"></image>
<view>接单公里数:{{jishi.y_jiedangonglishu}}</view>
</view>
</view>
</view>
<!-- <view class="jishi_top_right">
<view class="js_xd_btn fs24">查看</view>
</view> -->
</view>
<!-- <view class="jishi_bot df jsb">
<view class="bot_left">
<view class="js_bot_icon" wx:if="{{jishi.y_label!=''}}" wx:for="{{jishi.y_label}}">{{item}}</view>
</view>
</view> -->
</view>
<view class="jishuempty" wx:if="{{lists.length==0}}">
<image src="https://huan-30b930.tcb.qcloud.la/zanwusj.png?sign=478fd6807e4fad9e3a00bf0d80e3dbee&t=1553847060"></image>
<view class="f26">暂无服务人员</view>
</view>
</view>
```WXML
```PHP
public function doPageSearch(Type $var = null)
{
$y_name = $_REQUEST["value"];
$uniacid = $_REQUEST["uniacid"];
$pindex = max(1, intval($_REQUEST["page"]));
$psize = 6;
if(!$_W["attachurl"]){
$_W["attachurl"]="https://www.hioo.cn/attachment/";
}
$list = pdo_fetchall("SELECT * FROM " . tablename("hyb_o2o_yuangong") . " WHERE uniacid=:uniacid and y_styles='审核通过' and y_name like '%{$y_name}%' order by y_id desc limit " . ($pindex - 1) * $psize . "," . $psize, array(":uniacid" => $uniacid));
foreach ($list as &$value) {
goto h31R4;
avuJE:
$value["y_thumb"] = $_W["attachurl"] . $value["y_thumb"];
goto fYN9a;
cC4ew:
$value["y_jiedangonglishu"] = substr($value["y_jdnum"], 0, strrpos($value["y_jdnum"], "公里"));
goto f3Edt;
M3Dzg:
if (!(strpos($value["y_thumb"], "http") === false)) {
goto vX16l;
}
goto avuJE;
f3Edt:
$janli = pdo_get("hyb_o2o_jianli", array("u_id" => $value["u_id"]));
goto wti9Q;
YvL9g:
$pingfen = $orderpingfen[0]["pingfe"] / $orderpingfen[0]["pingfennum"];
goto tlH22;
vmxrB:
$value["pingfen"] = 5;
goto jYgMh;
YGnQA:
$orderpingfen = pdo_fetchall("SELECT count(*) as pingfennum,sum(zonghepf) as pingfe FROM " . tablename("hyb_o2o_jishiyuyuepingjia") . " WHERE uniacid=:uniacid and (js_openid=:js_openid or js_id=:js_id)", array(":uniacid" => $uniacid, ":js_openid" => $value["y_openid"], ":js_id" => $value["y_id"]));
goto znJAA;
gkW_L:
P2d6G:
goto YvL9g;
T74Nu:
$value["fuwunum"] = $orderpingfen[0]["pingfennum"];
goto aOsoH;
znJAA:
if ($orderpingfen[0]["pingfe"] != "0" && $orderpingfen[0]["pingfennum"] != "0") {
goto P2d6G;
}
goto vmxrB;
tlH22:
$value["pingfen"] = ceil($pingfen);
goto VPIEh;
h31R4:
$value["y_label"] = unserialize($value["y_label"]);
goto jT5qo;
CR_94:
RLm1Y:
goto M3Dzg;
jT5qo:
$value["y_jineng"] = unserialize($value["y_jineng"]);
goto cC4ew;
aOsoH:
ga5DM:
goto yaiS3;
ymDsL:
if(!$value["y_thumb"]){
$value["y_thumb"] = $janli["thumb"];
}
goto CR_94;
fYN9a:
vX16l:
goto YGnQA;
VPIEh:
PYjro:
goto T74Nu;
jYgMh:
goto PYjro;
goto gkW_L;
wti9Q:
if (empty($janli)) {
goto RLm1Y;
}
goto ymDsL;
yaiS3:
}
return $this->result(0, "success", $list);
}
网友评论