Commit a01959003214545c50e1e3d54d82da60f2f55698

Authored by taiyuan
2 parents 2ea288c2 ec12e1ac

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

components/diy_service/diy_service.js
... ... @@ -26,7 +26,7 @@ Component({
26 26 var iurl=getApp().globalData.setting.imghost;
27 27 var ob={};
28 28 var txt="object.title_img";
29   - ob[txt] = iurl +'/miniapp/images/logo.png';
  29 + ob[txt] = iurl +'/miniapp/images/logo.png?v=1';
30 30 this.setData(ob);
31 31 },
32 32  
... ...
components/diy_title/diy_title.js
... ... @@ -22,7 +22,7 @@ Component({
22 22 var iurl=getApp().globalData.setting.imghost;
23 23 var ob={};
24 24 var txt="object.title_img";
25   - ob[txt] = iurl +'/miniapp/images/logo.png';
  25 + ob[txt] = iurl +'/miniapp/images/logo.png?v=1';
26 26 this.setData(ob);
27 27 }
28 28 }
... ...
components/diy_title/diy_title.wxml
... ... @@ -19,7 +19,7 @@
19 19 <view class="font_right_rim">
20 20 <view class="caption" style='color:{{object.title_rightcolor}}'>{{object.title_right}}</view>
21 21 </view>
22   - <view class="aa">></view>
  22 + <view class="aa"></view>
23 23 </view>
24 24 </view>
25 25 </block>
... ...
components/diy_title/diy_title.wxss
... ... @@ -5,6 +5,7 @@
5 5 height: auto;
6 6 display: flex;
7 7 padding: 10rpx 0;
  8 + align-items: center;
8 9 }
9 10  
10 11 /* 图片边框 */
... ... @@ -43,7 +44,8 @@
43 44 .right_rim {
44 45 min-width: 200rpx;
45 46 width: auto;
46   - display: inline-block;
  47 + display: flex;
  48 + align-items: center;
47 49 }
48 50  
49 51 /* 右侧文字边框 */
... ... @@ -75,3 +77,12 @@
75 77 vertical-align: top;
76 78 margin-top: 12rpx
77 79 }
  80 +.aa::after{
  81 + content: '';
  82 + display: inline-block;
  83 + width: 25rpx;
  84 + height: 25rpx;
  85 + border-top:1rpx solid #aaa;
  86 + border-right: 1rpx solid #aaa;
  87 + transform: rotate(45deg);
  88 +}
... ...
components/diy_voice/diy_voice.js
... ... @@ -53,7 +53,7 @@ Component({
53 53 var v_logo=vo.logo;
54 54 if (!(vo.logo.indexOf("/public/static/images/model/logo.png"))){
55 55 this.setData({
56   - voice_logo:"https://mshopimg.yolipai.net/miniapp/images/logo.png"
  56 + voice_logo:"https://mshopimg.yolipai.net/miniapp/images/logo.png?v=1"
57 57 })
58 58 }else{
59 59 this.setData({
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -1147,7 +1147,7 @@ Page({
1147 1147 var url="/api/weshop/sharetypeList/save";
1148 1148 var req_data={
1149 1149 shareActId:actid,
1150   - shareActName:title,
  1150 + shareActName:title,
1151 1151 shareType:ind,
1152 1152 shareUserId:th.data.first_leader,
1153 1153 shareStaffId:th.data.StaffId,
... ...
packageA/pages/goods_share/goods_share.js
... ... @@ -866,7 +866,9 @@ Page({
866 866 var url="/api/weshop/sharetypeList/save";
867 867 var req_data={
868 868 shareActId:item.goods_id,
869   - shareActName:item.goods_name,
  869 + shareActName:item.goods_name,
  870 + ShareActNo:item.goods_sn,
  871 + ActMoney:item.shop_price,
870 872 shareType:2,
871 873 shareUserId:th.data.first_leader,
872 874 shareStaffId:th.data.StaffId,
... ...
packageA/pages/quan_list/filter.wxs
... ... @@ -11,13 +11,16 @@ function get_guige(color,spece){
11 11 return "";
12 12 }
13 13  
14   -function get_color(index){
15   - var i=index%3;
  14 +function get_color(index,list){
  15 + var i=index+1;
  16 + var count=list.length;
  17 + var str="purple";
  18 + i=index%count;
16 19 switch(i){
17   - case 0: return "red";
18   - case 1: return "blue";
19   - case 2: return "purple";
  20 + case 1: str="red";
  21 + case 2: str="blue";
20 22 }
  23 + return str;
21 24 }
22 25  
23 26 module.exports = {
... ...
packageA/pages/quan_list/quan_list.wxml
... ... @@ -10,7 +10,7 @@
10 10 <view class="content">
11 11 <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}">
12 12 <!-- 左边 -->
13   - <view class="left {{tool.get_color(index)}} flex ai-center jc-center co-w">
  13 + <view class="left {{tool.get_color(index,dataList)}} flex ai-center jc-center co-w">
14 14 <view class="t-c">
15 15 <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view>
16 16 <view>满{{filters.toFix(item.condition,2)}}可用</view>
... ...
packageA/pages/service_share/service_share.js
... ... @@ -846,7 +846,9 @@ Page({
846 846 var item=this.data.share_good;
847 847 var url="/api/weshop/sharetypeList/save";
848 848 var req_data={
849   - shareActId:item.id,
  849 + shareActId:item.id,
  850 + ShareActNo:item.service_sn,
  851 + ActMoney:item.money,
850 852 shareActName:item.serviceName,
851 853 shareType:8,
852 854 shareUserId:th.data.first_leader,
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -852,7 +852,7 @@ Page({
852 852 ee.get_sto();
853 853 }
854 854  
855   - ee.get_sku(o.stoid, t.data.data.sku, gid);
  855 + ee.get_sku(o.stoid, t.data.data, gid);
856 856 }
857 857 else {
858 858 var gg = "", item = t.data.data;
... ... @@ -2070,14 +2070,15 @@ Page({
2070 2070 },
2071 2071  
2072 2072 //----------装载同一条形码的商品----------
2073   - async get_sku(stoid, sku, g_id, is_normal, func) {
  2073 + async get_sku(stoid, gd, g_id, is_normal, func) {
2074 2074 var tt = this,arrdata=null;
2075 2075 var now=ut.gettimestamp();
2076 2076  
2077 2077 await getApp().request.promiseGet("/api/weshop/goods/page", {
2078 2078 data: {
2079 2079 store_id: o.stoid,
2080   - sku: sku,
  2080 + sku: gd.sku,
  2081 + more_spec:gd.more_spec,
2081 2082 isonsale: 1,
2082 2083 is_on_sale: 1,
2083 2084 pageSize:500
... ... @@ -2782,7 +2783,7 @@ Page({
2782 2783 prom_type: 0,
2783 2784 isshow: 1,
2784 2785 });
2785   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2786 + ee.get_sku(os.stoid, ee.data.data, gid);
2786 2787 return false;
2787 2788 }
2788 2789 //----已经结束-----
... ... @@ -2791,7 +2792,7 @@ Page({
2791 2792 prom_type: 0,
2792 2793 isshow: 1,
2793 2794 });
2794   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2795 + ee.get_sku(os.stoid, ee.data.data, gid);
2795 2796 ee.get_sto();
2796 2797 return false;
2797 2798 }
... ... @@ -2802,7 +2803,7 @@ Page({
2802 2803 prom_type: 0,
2803 2804 isshow: 1,
2804 2805 });
2805   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2806 + ee.get_sku(os.stoid, ee.data.data, gid);
2806 2807 return false;
2807 2808 }
2808 2809  
... ... @@ -2812,7 +2813,7 @@ Page({
2812 2813 prom_type: 0,
2813 2814 isshow: 1,
2814 2815 });
2815   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2816 + ee.get_sku(os.stoid, ee.data.data, gid);
2816 2817 ee.get_sto();
2817 2818 return false;
2818 2819 }
... ... @@ -2905,7 +2906,7 @@ Page({
2905 2906  
2906 2907 }else{
2907 2908 ee.setData({prom_type: 0, isshow: 1,});
2908   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2909 + ee.get_sku(os.stoid, ee.data.data, gid);
2909 2910 ee.get_sto();
2910 2911 return false;
2911 2912 }
... ... @@ -2936,7 +2937,7 @@ Page({
2936 2937 prom_type: 0,
2937 2938 isshow: 1,
2938 2939 });
2939   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2940 + ee.get_sku(os.stoid, ee.data.data, gid);
2940 2941 ee.get_sto();
2941 2942 return false;
2942 2943 }
... ... @@ -2946,7 +2947,7 @@ Page({
2946 2947 prom_type: 0,
2947 2948 isshow: 1,
2948 2949 });
2949   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2950 + ee.get_sku(os.stoid, ee.data.data, gid);
2950 2951 return false;
2951 2952 }
2952 2953 //----已经过期-----
... ... @@ -2956,7 +2957,7 @@ Page({
2956 2957 prom_type: 0,
2957 2958 isshow: 1,
2958 2959 });
2959   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2960 + ee.get_sku(os.stoid, ee.data.data, gid);
2960 2961 ee.get_sto();
2961 2962 return false;
2962 2963 }
... ... @@ -2967,7 +2968,7 @@ Page({
2967 2968 prom_type: 0,
2968 2969 isshow: 1,
2969 2970 });
2970   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2971 + ee.get_sku(os.stoid, ee.data.data, gid);
2971 2972 ee.get_sto();
2972 2973 return false;
2973 2974 }
... ... @@ -3313,7 +3314,7 @@ Page({
3313 3314 });
3314 3315 } else {
3315 3316 th.get_sto(1);
3316   - th.get_sku(o.stoid, th.data.data.sku, th.data.gid, 1, function() {
  3317 + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function() {
3317 3318 th.setData({
3318 3319 is_normal: ind,
3319 3320 openSpecModal_pt: 1
... ...
pages/goods/search/search.js
... ... @@ -101,6 +101,7 @@ Page({
101 101 //扫一扫过来,显示搜索的内容
102 102 var s_key = t.s_key;
103 103 if (s_key){
  104 + s_key=s_key.trim();
104 105 this.search(s_key); this.openSearchModal();
105 106 return;
106 107 }
... ... @@ -190,16 +191,24 @@ Page({
190 191 });
191 192 },
192 193 submitSearch: function(t) {
193   - console.log(111);
194   - this.search(t.detail.value.word);
195   -
196   -
  194 + console.log(111,t);
  195 + var val=t.detail.value.word;
  196 + if(val==undefined) val=t.detail.value;
  197 + val=val?val.trim():'';
  198 + if(!val){
  199 + a.showWarning("请输入搜索关键词");
  200 + }
  201 +
  202 + this.search(val);
  203 +
197 204 },
198 205  
199 206 //热搜关键字
200 207 searchHotWord: function(t) {
201   - this.historyRecord();
202   - this.search(t.currentTarget.dataset.word);
  208 +
  209 + var word= t.currentTarget.dataset.word;
  210 + this.historyRecord(word);
  211 + this.search(word);
203 212 },
204 213  
205 214 //-----点击搜索按钮----
... ... @@ -280,15 +289,34 @@ Page({
280 289 });
281 290 },
282 291  
283   - historyRecord() {
  292 + historyRecord(w) {
  293 + let keyword =w;
284 294 let self = this;
285   - let keyword = this.data.key_str;
286   - let searchRecord = this.data.searchRecord;
  295 + if(!keyword){
  296 + keyword = this.data.key_str.trim();
  297 + }
  298 + let searchRecord = this.data.searchRecord;
287 299 if(!searchRecord || searchRecord.length==0) searchRecord=wx.getStorageSync('searchRecord') || [];
288 300  
289 301 if(keyword) {
290   - if(searchRecord.indexOf(keyword) > -1) {
  302 +
  303 + var index=searchRecord.indexOf(keyword);
  304 + if(index > -1) {
291 305 // 已经存在该值
  306 + searchRecord.splice(index,1);
  307 + searchRecord.unshift(keyword);
  308 +
  309 + // 将历史记录添加到缓存中
  310 + wx.setStorage({
  311 + key: 'searchRecord',
  312 + data: searchRecord,
  313 + success: function(res) {
  314 + self.setData({
  315 + searchRecord,
  316 + })
  317 + }
  318 + })
  319 +
292 320 return;
293 321 } else {
294 322 if(searchRecord.length >= 10) {
... ...
pages/goods/search/search.wxml
... ... @@ -162,7 +162,7 @@
162 162 <view class="search-modal">
163 163 <view class="search-bar">
164 164 <form bindsubmit="submitSearch">
165   - <input autoFocus class="search-input" name="word" placeholder="搜索商品" bindinput="getInput"></input>
  165 + <input autoFocus class="search-input" name="word" placeholder="搜索商品" bindconfirm="submitSearch" bindinput="getInput"></input>
166 166 <button class="search-btn" formType="submit">
167 167 <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image>
168 168 </button>
... ...
pages/store/index.js
... ... @@ -81,6 +81,11 @@ Page({
81 81 if(th.data.cat_id){
82 82 dd.category_id=th.data.cat_id;
83 83 }
  84 + if(th.data.lat){
  85 + dd.lat=th.data.lat;
  86 + dd.lon=th.data.lon;
  87 + }
  88 +
84 89  
85 90 wx.showLoading();
86 91 //----------获取门店---------
... ...
pages/user/my_service/i_service.wxml
... ... @@ -98,6 +98,5 @@
98 98 <warn id="warn"></warn>
99 99 <my_confirm id="my_confirm"></my_confirm>
100 100  
101   -
102 101 <!-- 批量预约图标 -->
103   -<view class="icon-container" bindtap="goto" data-url="/packageA/pages/my_service2/appment_main"><text class="iconfont icon-plyy"></text></view>
104 102 \ No newline at end of file
  103 +<!-- <view class="icon-container" bindtap="goto" data-url="/packageA/pages/my_service2/appment_main"><text class="iconfont icon-plyy"></text></view> -->
105 104 \ No newline at end of file
... ...