Commit 13ed7a41129babcc6849947eb25ba88531ce388e

Authored by season
2 parents 381820de da3bce01

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

packageA/pages/distribution/shop/shop.js
@@ -39,6 +39,10 @@ Page({ @@ -39,6 +39,10 @@ Page({
39 * 生命周期函数--监听页面加载 39 * 生命周期函数--监听页面加载
40 */ 40 */
41 onLoad: function (options) { 41 onLoad: function (options) {
  42 +
  43 + console.log("-- shop:load --");
  44 + console.log(options);
  45 +
42 wx.setNavigationBarTitle({ 46 wx.setNavigationBarTitle({
43 title: "我的小店", 47 title: "我的小店",
44 }); 48 });
@@ -50,8 +54,12 @@ Page({ @@ -50,8 +54,12 @@ Page({
50 }); 54 });
51 }); 55 });
52 //从别人的分享的跳转过来 56 //从别人的分享的跳转过来
53 - var first_leader = decodeURIComponent(options.scene); 57 + var first_leader = decodeURIComponent(options.first_leader);
54 if (first_leader && first_leader != 'undefined') { 58 if (first_leader && first_leader != 'undefined') {
  59 +
  60 + console.log("-- shop:load2 --");
  61 + console.log("-- shop:load3 --"+first_leader);
  62 +
55 getApp().globalData.first_leader = first_leader; 63 getApp().globalData.first_leader = first_leader;
56 this.data.first_leader = first_leader; 64 this.data.first_leader = first_leader;
57 65
@@ -357,8 +365,7 @@ Page({ @@ -357,8 +365,7 @@ Page({
357 } 365 }
358 366
359 var ob = { 367 var ob = {
360 - title: title,  
361 - path: url, 368 + title: title,path: url,
362 }; 369 };
363 return ob; 370 return ob;
364 371
packageA/pages/goodsInfo/goodsInfo.js
@@ -235,6 +235,8 @@ Page({ @@ -235,6 +235,8 @@ Page({
235 room_id = t.room_id, 235 room_id = t.room_id,
236 room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id 236 room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id
237 237
  238 + var share_openid= t.share_openid;
  239 +
238 //检查测肤 240 //检查测肤
239 getApp().check_skin_face(t,1,gid); 241 getApp().check_skin_face(t,1,gid);
240 242
packageB/pages/zuhegou/index/index.wxml
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 </view> 16 </view>
17 17
18 18
19 - <view class="c_w mt20 fs28">门店: 19 + <view class="c_w mt20 fs28">选择门店:
20 <block wx:if="{{def_pick_store}}"> 20 <block wx:if="{{def_pick_store}}">
21 <text wx:if="{{all_price>0}}">{{def_pick_store.pickup_name}}</text> 21 <text wx:if="{{all_price>0}}">{{def_pick_store.pickup_name}}</text>
22 <text wx:else bindtap="choose_store">{{def_pick_store.pickup_name}}</text> 22 <text wx:else bindtap="choose_store">{{def_pick_store.pickup_name}}</text>
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml
@@ -205,7 +205,7 @@ @@ -205,7 +205,7 @@
205 <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn" 205 <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn"
206 url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator> 206 url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator>
207 <navigator wx:else class="tips-btn" 207 <navigator wx:else class="tips-btn"
208 - url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> 208 + url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}">去评价</navigator>
209 </block> 209 </block>
210 210
211 </view> 211 </view>
packageC/pages/presell/cart/cart.js
@@ -2097,7 +2097,7 @@ Page({ @@ -2097,7 +2097,7 @@ Page({
2097 if(!ord_prom && !is_get){ 2097 if(!ord_prom && !is_get){
2098 if(o_condition > 0 && this.data.pre_arr.is_useorderyh){ 2098 if(o_condition > 0 && this.data.pre_arr.is_useorderyh){
2099 await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", { 2099 await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", {
2100 - data: { store_id: os.stoid, orderAmount: condition } 2100 + data: { store_id: os.stoid, orderAmount: o_condition }
2101 }).then(res => { 2101 }).then(res => {
2102 if (res.data.code == 0) { 2102 if (res.data.code == 0) {
2103 ord_prom = res.data.data; 2103 ord_prom = res.data.data;
@@ -2107,11 +2107,12 @@ Page({ @@ -2107,11 +2107,12 @@ Page({
2107 } 2107 }
2108 2108
2109 2109
  2110 + var bn_pick = th.data.pickup.pickup_id
2110 //如果同意参与订单优惠 2111 //如果同意参与订单优惠
2111 if (ord_prom) { 2112 if (ord_prom) {
2112 //th.check_is_order_prom(o_condition,async function (ord_price) { 2113 //th.check_is_order_prom(o_condition,async function (ord_price) {
2113 var ord_price=o_condition; 2114 var ord_price=o_condition;
2114 - var bn_pick = th.data.pickup.pickup_id 2115 +
2115 var order_prom_amount = 0; 2116 var order_prom_amount = 0;
2116 var order_prom_id = 0; 2117 var order_prom_id = 0;
2117 var order_m = 0; 2118 var order_m = 0;
@@ -2227,6 +2228,57 @@ Page({ @@ -2227,6 +2228,57 @@ Page({
2227 var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); 2228 var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit);
2228 if (o_condition1 < 0) o_condition1 = 0; 2229 if (o_condition1 < 0) o_condition1 = 0;
2229 2230
  2231 + if(th.data.exp_type == 2) {
  2232 + var good = th.data.goods;
  2233 + //--------------开始计算物流------------------
  2234 + var shipping_price = 0;
  2235 + var lon = 0;
  2236 + var lat = 0;
  2237 + //-- 获取距离 --
  2238 + await getApp().request.promisePost("/api/weshop/order/sameCityExp/getGeocoder", {
  2239 + is_json: 1, data: {address: th.data.user_addr.more_address + th.data.user_addr.address}
  2240 + }).then(res => {
  2241 + if (res.data.code == 0) {
  2242 + var data = JSON.parse(res.data.data);
  2243 + if (data.status == 0) {
  2244 + lon = data.result.location.lng;
  2245 + lat = data.result.location.lat;
  2246 + }
  2247 + }
  2248 + })
  2249 + var gd_w = good['weight'] * good['buynum'];
  2250 + //-- 获取距离 --
  2251 + var req_data = {
  2252 + store_id: os.stoid,
  2253 + order_amount: parseFloat(o_condition1),
  2254 + lon: lon, lat: lat,
  2255 + pickup_id: bn_pick,
  2256 + goods_weight: gd_w,
  2257 + }
  2258 +
  2259 + var is_next = 1;
  2260 + //获取同城配送参数
  2261 + await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", {
  2262 + is_json: 1,
  2263 + data: req_data
  2264 + }).then(res => {
  2265 + if (res.data.code == 0) {
  2266 + shipping_price = res.data.data;
  2267 + } else {
  2268 + is_next = 0;
  2269 + wx.showToast({
  2270 + title: res.data.msg, icon: 'none', duration: 2000
  2271 + })
  2272 + }
  2273 + })
  2274 + if (!is_next) {
  2275 + th.setData({show_submit: 1, disabled_btn: 1})
  2276 + return false
  2277 + }
  2278 + exp_price = parseFloat(shipping_price).toFixed(2);
  2279 + }
  2280 +
  2281 +
2230 var the_price=parseFloat(o_condition1) + parseFloat(exp_price); 2282 var the_price=parseFloat(o_condition1) + parseFloat(exp_price);
2231 2283
2232 if(the_price<th.data.goods.use_commission){ 2284 if(the_price<th.data.goods.use_commission){
@@ -2352,7 +2404,7 @@ Page({ @@ -2352,7 +2404,7 @@ Page({
2352 tail_pay_type: ind,//0微信支付 1余额支付 2404 tail_pay_type: ind,//0微信支付 1余额支付
2353 }; 2405 };
2354 2406
2355 - if (th.data.exp_type == 0) { 2407 + if (th.data.exp_type == 0 || th.data.exp_type==2 ) {
2356 var index = th.data.index; 2408 var index = th.data.index;
2357 dd.shipping_code = th.data.wu_arr[index].code; 2409 dd.shipping_code = th.data.wu_arr[index].code;
2358 dd.shipping_name = th.data.wu_arr[index].name; 2410 dd.shipping_name = th.data.wu_arr[index].name;
packageC/pages/presell/cart/cart.wxml
@@ -412,7 +412,7 @@ @@ -412,7 +412,7 @@
412 412
413 413
414 <block wx:if="{{order.order_status==2 }}"> 414 <block wx:if="{{order.order_status==2 }}">
415 - <navigator class="tips-btn2" url="/packageB/pages/user/add_comment/add_comment?goods_id={{order_goods.goods_id}}&order_id={{order.order_id}}}">去评价</navigator> 415 + <navigator class="tips-btn2" url="/packageB/pages/user/add_comment/add_comment?goods_id={{order_goods.goods_id}}&order_id={{order.order_id}}">去评价</navigator>
416 </block> 416 </block>
417 417
418 </view> 418 </view>
packageE/pages/cart/cart2/cart2.js
@@ -1960,11 +1960,11 @@ Page({ @@ -1960,11 +1960,11 @@ Page({
1960 1960
1961 //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表----------- 1961 //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表-----------
1962 for (var j = 0; j < ord_goods.length; j++) { 1962 for (var j = 0; j < ord_goods.length; j++) {
1963 - if (ord_goods[j].is_gift) continue;  
1964 if (ord_goods[j].whsle_id) continue; 1963 if (ord_goods[j].whsle_id) continue;
1965 if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) { 1964 if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) {
1966 ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh; 1965 ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh;
1967 ord_goods[j].is_past = item_map.is_past; 1966 ord_goods[j].is_past = item_map.is_past;
  1967 + if (ord_goods[j].is_gift) continue; //赠品不平摊
1968 ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir; 1968 ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir;
1969 ord_goods[j].account_yu_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_yu_fir; 1969 ord_goods[j].account_yu_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_yu_fir;
1970 ord_goods[j].account = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account; 1970 ord_goods[j].account = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account;
@@ -6563,6 +6563,14 @@ Page({ @@ -6563,6 +6563,14 @@ Page({
6563 is_post_temp:1 //赠品暂时的是要包邮运算, 后面和主商品是不是包邮一样 6563 is_post_temp:1 //赠品暂时的是要包邮运算, 后面和主商品是不是包邮一样
6564 }; 6564 };
6565 6565
  6566 + var prom_goods_map=th.data.prom_goods_map[gf_pickup_id];
  6567 + var fd=prom_goods_map[th.data.gf_prom_id];
  6568 +
  6569 + if(fd){
  6570 + newd.is_past=fd.is_past;
  6571 + newd.is_xz_yh=fd.is_xz_yh;
  6572 + }
  6573 +
6566 //-- 如果是代发商品的时候 -- 6574 //-- 如果是代发商品的时候 --
6567 if (gf_item.goodsinfo.whsle_id) { 6575 if (gf_item.goodsinfo.whsle_id) {
6568 newd.whsle_id = gf_item.goodsinfo.whsle_id; 6576 newd.whsle_id = gf_item.goodsinfo.whsle_id;
pages/giftpack/giftpacklist/giftpacklist.js
@@ -179,7 +179,7 @@ Page({ @@ -179,7 +179,7 @@ Page({
179 } 179 }
180 this.init(); 180 this.init();
181 }) 181 })
182 - th.setData({ submit:0}) 182 + this.setData({ submit:0})
183 }, 183 },
184 GetBuyPrice: function (e) { 184 GetBuyPrice: function (e) {
185 var that = this.data; 185 var that = this.data;
@@ -190,9 +190,6 @@ Page({ @@ -190,9 +190,6 @@ Page({
190 return false; 190 return false;
191 } 191 }
192 192
193 - if(th.data.submit) return false;  
194 - th.setData({submit:1})  
195 -  
196 193
197 this.data.payMoney = th.data.sele_g.payMoney; 194 this.data.payMoney = th.data.sele_g.payMoney;
198 th.setData({buyType: 2}) 195 th.setData({buyType: 2})
@@ -201,6 +198,7 @@ Page({ @@ -201,6 +198,7 @@ Page({
201 openSpecModal: 1 198 openSpecModal: 1
202 }) 199 })
203 } else { 200 } else {
  201 +
204 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 202 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
205 my_confirm.open( 203 my_confirm.open(
206 "是否确定购买该礼包", 204 "是否确定购买该礼包",
@@ -210,6 +208,7 @@ Page({ @@ -210,6 +208,7 @@ Page({
210 my_confirm.open_cancel(0); 208 my_confirm.open_cancel(0);
211 }, 209 },
212 function () { 210 function () {
  211 +
213 my_confirm.open_cancel(0); 212 my_confirm.open_cancel(0);
214 com.buy_libao(th) 213 com.buy_libao(th)
215 } 214 }
pages/giftpack/public/buy_com.js
@@ -214,7 +214,9 @@ module.exports = { @@ -214,7 +214,9 @@ module.exports = {
214 } 214 }
215 } 215 }
216 216
  217 + if(th.data.submit) return false;
217 th.setData({submit:1}) 218 th.setData({submit:1})
  219 +
218 var id=th.data.sele_g.lbId; 220 var id=th.data.sele_g.lbId;
219 var that=th; 221 var that=th;
220 var json = { 222 var json = {
pages/goods/categoryList/categoryList.wxml
@@ -131,11 +131,11 @@ @@ -131,11 +131,11 @@
131 <view class="search-img left"> 131 <view class="search-img left">
132 <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> 132 <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image>
133 </view> 133 </view>
134 - <input bindfocus="goseach" class="search-cont" placeholder="输入商品关键字" type="text"></input> 134 + <input bindfocus="goseach" class="search-cont" placeholder="输入商品关键字" type="text"></input>
135 </view> --> 135 </view> -->
136 <!-- 搜索框 --> 136 <!-- 搜索框 -->
137 <view class="search-container f1"> 137 <view class="search-container f1">
138 - <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>输入商品关键字</view> 138 + <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>输入商品关键字</view>
139 </view> 139 </view>
140 <view class="pdl30" bindtap="getScancode"> 140 <view class="pdl30" bindtap="getScancode">
141 <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> 141 <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image>
pages/goods/goodsInfo/goodsInfo.js
@@ -284,7 +284,11 @@ Page({ @@ -284,7 +284,11 @@ Page({
284 prom_id = t.prom_id || 0; //活动ID 284 prom_id = t.prom_id || 0; //活动ID
285 285
286 var share_openid = t.share_openid; 286 var share_openid = t.share_openid;
287 - //群id 287 +
  288 + console.log("gd onload-- 3 --");
  289 + console.log(t);
  290 +
  291 + //群id
288 if(t && t.groupchat_id && !t.groupchat_id!='undefined' && !t.groupchat_id!='null'){ 292 if(t && t.groupchat_id && !t.groupchat_id!='undefined' && !t.groupchat_id!='null'){
289 getApp().globalData.groupchat_id=t.groupchat_id 293 getApp().globalData.groupchat_id=t.groupchat_id
290 } 294 }
@@ -378,7 +382,7 @@ Page({ @@ -378,7 +382,7 @@ Page({
378 gid: gid 382 gid: gid
379 }); 383 });
380 384
381 - console.log("gd onload--2"); 385 + console.log("gd onload-- 2 --");
382 console.log(first_leader); 386 console.log(first_leader);
383 387
384 if (first_leader) { 388 if (first_leader) {
pages/user/order_detail/order_detail.wxml
@@ -194,7 +194,7 @@ @@ -194,7 +194,7 @@
194 <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn" 194 <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn"
195 url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator> 195 url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator>
196 <navigator wx:else class="tips-btn" 196 <navigator wx:else class="tips-btn"
197 - url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> 197 + url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}">去评价</navigator>
198 </block> 198 </block>
199 <!-- 积分购 拼团 搭配购没有有再来一单 --> 199 <!-- 积分购 拼团 搭配购没有有再来一单 -->
200 <block wx:if="{{ (order.pay_status==1 || order.order_status==3) && order.pt_prom_id<=0 && order.integral<=0 && order.order_goods[0].prom_type!=5}}"> 200 <block wx:if="{{ (order.pay_status==1 || order.order_status==3) && order.pt_prom_id<=0 && order.integral<=0 && order.order_goods[0].prom_type!=5}}">
pages/user/plus/plus.js
@@ -129,7 +129,7 @@ Page({ @@ -129,7 +129,7 @@ Page({
129 if (!user_info) return false; 129 if (!user_info) return false;
130 ut.fy_back('',0); 130 ut.fy_back('',0);
131 131
132 - th.setData({ 132 + this.setData({
133 is_select:0, 133 is_select:0,
134 focus:true, 134 focus:true,
135 }) 135 })