<view hidden="{{currentTab!==0}}">
<view wx:for="{{logs}}" wx:for-item=“item”>
{{logs.pcontent}}
</view>
<view wx:for="{{logs}}" wx:for-item=“item”>
<image src=’{{logs.ppic}}’></image>
</view>
</view>
上面的logs.pcontent可以显示 然而image src=’{{logs.ppic}}'显示不出图片
<?php
header(“Content-Type:application/json;charset=UTF-8”);
$uphonenumber = $_POST[‘phonenumber’];//post获得手机号码表单值
$json = ‘’;
$data = array();
include(‘init.php’);//链接数据库
//$sql = “SELECT * FROM yffice_project where uphonenumber = $uphonenumber”;
$sql = “SELECT * FROM yffice_project where uphonenumber = $uphonenumber”;
mysql_query(“set names utf8”);
$result = mysql_query($sql);//执行sql
if($result){
//echo “查询成功”;
while ($row = mysql_fetch_array($result))
{
$data[“uid”]=$row[“uid”];
$data[“pcontent”]=$row[“pcontent”];
$data[“ppic”]=explode(",",$row[“ppic”]);
$data[“pdate”]=$row[“pdate”];
$data[“pweek”]=$row[“pweek”];
$data[“pweather”]=$row[“pweather”];
}
$json=json_encode($data);
echo $json;
}else{
echo “查询失败”;
}
mysql_close();//关闭数据库
?>