Commit a99de185fbef38f8ccad272e22d13fd2670d9049

Authored by 后端研发-苏泰源
1 parent 446a88c9

搜索框优化

... ... @@ -362,7 +362,8 @@ App({
362 362 title: t,
363 363 mask: e,
364 364 duration: a,
365   - image: "/images/gt.png",
  365 + icon: 'error',
  366 + // image: "/images/gt.png",
366 367 complete: function () {
367 368 "function" == typeof o && setTimeout(o, a);
368 369 }
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -4022,6 +4022,14 @@ Page({
4022 4022 corpId: id,
4023 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 191 getApp().request.promiseGet(t, {data:data}).then(async res=>{
192 192 th.data.loading=0;
193 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 200 for(let i in res.data.data.pageData){
196 201 let item=res.data.data.pageData[i];
197 202 item.original_img = th.data.url + item.original_img;
... ... @@ -355,7 +360,7 @@ Page({
355 360 if(val==undefined) val=t.detail.value;
356 361 val=val?val.trim():'';
357 362 if(!val){
358   - a.showWarning("请输入搜索关键词");
  363 + a.showWarning("请输入关键词");
359 364 }
360 365 this.search(val);
361 366 },
... ... @@ -375,7 +380,7 @@ Page({
375 380  
376 381 //-----点击搜索按钮----
377 382 search: function(t) {
378   - if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词");
  383 + if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");
379 384 this.data.key_str=t;
380 385 this.resetData();
381 386 this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
... ...