Commit 574a3c97 by 施宇

111

parent c661025b
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
"pages/list/xj/index", "pages/list/xj/index",
"pages/tab/message/message", "pages/tab/message/message",
"pages/tab/me/me", "pages/tab/me/me",
"pages/search/index/index",
"pages/search/result/index",
"pages/form/xj/index", "pages/form/xj/index",
"pages/detail/good/index", "pages/detail/good/index",
"pages/detail/xj/index", "pages/detail/xj/index",
...@@ -46,6 +44,15 @@ ...@@ -46,6 +44,15 @@
"pages/person/invitationrecord/index", "pages/person/invitationrecord/index",
"pages/form/report/index" "pages/form/report/index"
], ],
"subPackages": [
{
"root": "pages/search/",
"pages": [
"index/index",
"result/index"
]
}
],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
......
...@@ -11,7 +11,8 @@ Page({ ...@@ -11,7 +11,8 @@ Page({
topInfo: null, topInfo: null,
total: 0, total: 0,
inquiryItemsId: "", inquiryItemsId: "",
offerId:"" offerId: "",
isShowImg: false,
}, },
/** /**
...@@ -89,14 +90,21 @@ Page({ ...@@ -89,14 +90,21 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
if (this.data.isShowImg) {
this.setData({
isShowImg: false
})
} else {
this.setData({ this.setData({
priceList: null, priceList: null,
topInfo: null, topInfo: null,
total: 0, total: 0,
}) });
this.getTopInfo(); this.getTopInfo();
this.getList() this.getList()
}
}, },
/** /**
...@@ -154,5 +162,18 @@ Page({ ...@@ -154,5 +162,18 @@ Page({
} }
},
previewImage: function () {
let img = this.data.topInfo.goods_images;
if (img) {
this.setData({
isShowImg: true
})
wx.previewImage({
urls: [img]
})
} else {
return
}
} }
}) })
\ No newline at end of file
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<text class="c-com">{{topInfo.remark||'--'}}</text> <text class="c-com">{{topInfo.remark||'--'}}</text>
</view> </view>
</view> </view>
<image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/defaultgood.png'}}"></image> <image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/defaultgood.png'}}" bindtap="previewImage"></image>
</view> </view>
</view> </view>
......
// pages/list/xj/index.js // pages/list/xj/index.js
import { getData } from '../../../utils/util.js'; import {
import { apis } from '../../../utils/api.js'; getData
} from '../../../utils/util.js';
import {
apis
} from '../../../utils/api.js';
Page({ Page({
/** /**
...@@ -9,8 +13,8 @@ Page({ ...@@ -9,8 +13,8 @@ Page({
data: { data: {
priceList: null, priceList: null,
topInfo: null, topInfo: null,
limit: 10,//每页的条数 limit: 10, //每页的条数
p: 1,//当前页面 p: 1, //当前页面
total: 0, total: 0,
id: "", id: "",
isShowBottom: false, isShowBottom: false,
...@@ -29,7 +33,10 @@ Page({ ...@@ -29,7 +33,10 @@ Page({
getTopInfo: function () { getTopInfo: function () {
let me = this; let me = this;
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
getData(apis.inquiryInfo, 'get', { "inquiry_items_id/eq": me.data.id, token: token }, function (res) { getData(apis.inquiryInfo, 'get', {
"inquiry_items_id/eq": me.data.id,
token: token
}, function (res) {
if (res.errcode == 0) { if (res.errcode == 0) {
me.setData({ me.setData({
topInfo: res.inquiry_list[me.data.id] topInfo: res.inquiry_list[me.data.id]
...@@ -44,7 +51,12 @@ Page({ ...@@ -44,7 +51,12 @@ Page({
getBjData: function () { getBjData: function () {
let me = this; let me = this;
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
getData(apis.inquiryMyOffer, 'get', { "inquiry_items_id/eq": me.data.id, offset: me.data.limit, p: me.data.p, token: token }, function (res) { getData(apis.inquiryMyOffer, 'get', {
"inquiry_items_id/eq": me.data.id,
offset: me.data.limit,
p: me.data.p,
token: token
}, function (res) {
if (res.errcode === 0) { if (res.errcode === 0) {
let newArr = []; let newArr = [];
if (me.data.p > 1) { if (me.data.p > 1) {
...@@ -123,5 +135,15 @@ Page({ ...@@ -123,5 +135,15 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
},
previewImage: function () {
let img = this.data.topInfo.goods_images;
if (img) {
wx.previewImage({
urls: [img]
})
} else {
return
}
} }
}) })
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<text class="c-com">{{topInfo.remark||'--'}}</text> <text class="c-com">{{topInfo.remark||'--'}}</text>
</view> </view>
</view> </view>
<image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/defaultgood.png'}}"></image> <image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/defaultgood.png'}}" bindtap="previewImage"></image>
</view> </view>
</view> </view>
</view> </view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment