|
|
@@ -11,6 +11,19 @@ Page({
|
|
|
list:[]
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * 评价图片预览
|
|
|
+ */
|
|
|
+ comPicPreView(e){
|
|
|
+ var idx = e.currentTarget.dataset.idx
|
|
|
+ var urls = e.currentTarget.dataset.pics
|
|
|
+
|
|
|
+ wx.previewImage({
|
|
|
+ current: urls[idx],
|
|
|
+ urls: urls
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取列表
|
|
|
getList(){
|
|
|
http.request({
|
|
|
@@ -26,12 +39,13 @@ Page({
|
|
|
let list = []
|
|
|
let img = ''
|
|
|
res.records.map(e => {
|
|
|
- if(e.pic){
|
|
|
- img = e.pic.split(',')
|
|
|
- e.pic = img[0]
|
|
|
+ if(e.pics){
|
|
|
+ img = e.pics.split(',')
|
|
|
+ e.pics = img
|
|
|
}
|
|
|
})
|
|
|
if (this.data.current == 1) {
|
|
|
+ list = res.records
|
|
|
this.setData({
|
|
|
list: res.records,
|
|
|
pages: res.pages,
|
|
|
@@ -43,12 +57,12 @@ Page({
|
|
|
this.setData({
|
|
|
list
|
|
|
})
|
|
|
- console.log(list.length,res.total);
|
|
|
- if (list.length >= res.total) {
|
|
|
- this.setData({
|
|
|
- isAll: true
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ console.log(list.length,res.total);
|
|
|
+ if (list.length >= res.total) {
|
|
|
+ this.setData({
|
|
|
+ isAll: true
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -58,21 +72,6 @@ Page({
|
|
|
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 评价图片预览
|
|
|
- */
|
|
|
- comPicPreView(e){
|
|
|
- var idx = e.currentTarget.dataset.idx
|
|
|
- var urls = []
|
|
|
- this.data.orderItemInfo.images.forEach(el => {
|
|
|
- urls.push(el.url)
|
|
|
- })
|
|
|
- wx.previewImage({
|
|
|
- current: urls[idx],
|
|
|
- urls: urls
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|