Commit a99de185fbef38f8ccad272e22d13fd2670d9049
1 parent
446a88c9
搜索框优化
Showing
3 changed files
with
19 additions
and
5 deletions
app.js
@@ -362,7 +362,8 @@ App({ | @@ -362,7 +362,8 @@ App({ | ||
362 | title: t, | 362 | title: t, |
363 | mask: e, | 363 | mask: e, |
364 | duration: a, | 364 | duration: a, |
365 | - image: "/images/gt.png", | 365 | + icon: 'error', |
366 | + // image: "/images/gt.png", | ||
366 | complete: function () { | 367 | complete: function () { |
367 | "function" == typeof o && setTimeout(o, a); | 368 | "function" == typeof o && setTimeout(o, a); |
368 | } | 369 | } |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -4022,6 +4022,14 @@ Page({ | @@ -4022,6 +4022,14 @@ Page({ | ||
4022 | corpId: id, | 4022 | corpId: id, |
4023 | success(res) {} | 4023 | success(res) {} |
4024 | }) | 4024 | }) |
4025 | - } | 4025 | + }, |
4026 | + | ||
4027 | + // 预览海报 | ||
4028 | + previewPoster() { | ||
4029 | + wx.previewImage({ | ||
4030 | + current: this.data.shareImgPath, // 当前显示图片的http链接 | ||
4031 | + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 | ||
4032 | + }); | ||
4033 | + }, | ||
4026 | 4034 | ||
4027 | }); | 4035 | }); |
pages/goods/search/search.js
@@ -191,7 +191,12 @@ Page({ | @@ -191,7 +191,12 @@ Page({ | ||
191 | getApp().request.promiseGet(t, {data:data}).then(async res=>{ | 191 | getApp().request.promiseGet(t, {data:data}).then(async res=>{ |
192 | th.data.loading=0; | 192 | th.data.loading=0; |
193 | if(ut.ajax_ok(res)){ | 193 | if(ut.ajax_ok(res)){ |
194 | - if(!e.data.requestData) e.data.requestData=[]; | 194 | + if(!e.data.requestData) { |
195 | + // e.data.requestData=[]; | ||
196 | + e.setData({ | ||
197 | + requestData: [], | ||
198 | + }); | ||
199 | + }; | ||
195 | for(let i in res.data.data.pageData){ | 200 | for(let i in res.data.data.pageData){ |
196 | let item=res.data.data.pageData[i]; | 201 | let item=res.data.data.pageData[i]; |
197 | item.original_img = th.data.url + item.original_img; | 202 | item.original_img = th.data.url + item.original_img; |
@@ -355,7 +360,7 @@ Page({ | @@ -355,7 +360,7 @@ Page({ | ||
355 | if(val==undefined) val=t.detail.value; | 360 | if(val==undefined) val=t.detail.value; |
356 | val=val?val.trim():''; | 361 | val=val?val.trim():''; |
357 | if(!val){ | 362 | if(!val){ |
358 | - a.showWarning("请输入搜索关键词"); | 363 | + a.showWarning("请输入关键词"); |
359 | } | 364 | } |
360 | this.search(val); | 365 | this.search(val); |
361 | }, | 366 | }, |
@@ -375,7 +380,7 @@ Page({ | @@ -375,7 +380,7 @@ Page({ | ||
375 | 380 | ||
376 | //-----点击搜索按钮---- | 381 | //-----点击搜索按钮---- |
377 | search: function(t) { | 382 | search: function(t) { |
378 | - if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); | 383 | + if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词"); |
379 | this.data.key_str=t; | 384 | this.data.key_str=t; |
380 | this.resetData(); | 385 | this.resetData(); |
381 | this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); | 386 | this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); |