作者 niufei

11

... ... @@ -90,7 +90,10 @@ Page({
}
app.post(url, params, header).then((res) => {
this.setData({
info: res
info: res,
imgarr: res.pic,
myimgurl: res.pic,
word: res.work_content
})
})
},
... ... @@ -146,7 +149,10 @@ Page({
id: options.id,
user_id: options.user_id ? options.user_id:null
})
this.get_info(options.id)
if (options.id){
this.get_info(options.id)
}
},
/**
... ...
... ... @@ -7,14 +7,22 @@
<text>工作内容</text>
<text>{{info.work_content}}</text>
</view>
<view class="item">
<text>参加日期</text>
<text>{{info.date}}</text>
</view>
<view class="item">
<text>参加时间</text>
<text>{{info.time}}</text>
</view>
<block wx:for="{{info.time}}" wx:key="index">
<view class="item">
<text>参加日期</text>
<text>{{item.date}}</text>
</view>
<view class="item">
<text>参加时间</text>
<text>{{item.time}}</text>
</view>
</block>
</view>
<view class="img_box">
... ... @@ -22,10 +30,9 @@
<view class="img_arr">
<view class="img_item" wx:for="{{imgarr}}" wx:key="index">
<image src="{{item}}" mode="aspectFill" class="show_img" />
<image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}"/>
<image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}" wx:if="{{!user_id}}"/>
</view>
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" />
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" wx:if="{{!user_id}}"/>
</view>
</view>
... ... @@ -35,7 +42,7 @@
<view class="title">
<image src="/imgs/must.png" /> 感想汇报
</view>
<textarea class="word" placeholder="请输入内容,内容最多500字" bindinput="get_word" value="{{word}}" />
<textarea class="word" placeholder="请输入内容,内容最多500字" bindinput="get_word" value="{{word}}" disabled="{{user_id}}"/>
</view>
<view class="submit" bindtap="submit">确认</view>
\ No newline at end of file
<view class="submit" bindtap="submit" wx:if="{{!user_id}}">确认</view>
\ No newline at end of file
... ...