Commit 4752cb6af5de3306c2653fd07de6a8023ef5d809
1 parent
40496a9d
增加服务卡拼单有关页面
Showing
19 changed files
with
19741 additions
and
1 deletions
app.json
| ... | ... | @@ -119,7 +119,10 @@ |
| 119 | 119 | "pages/myGiftDetails/myGiftDetails", |
| 120 | 120 | "pages/cart2_ser/cart2_ser", |
| 121 | 121 | "pages/libao_payment/payment", |
| 122 | - "pages/details_serviceCard/details_serviceCard" | |
| 122 | + "pages/details_serviceCard/details_serviceCard", | |
| 123 | + "pages/serviceCard_pd/goodsInfo/goodsInfo", | |
| 124 | + "pages/serviceCard_pd/team_show/team_show", | |
| 125 | + "pages/serviceCard_pd/cart/cart" | |
| 123 | 126 | ] |
| 124 | 127 | }, |
| 125 | 128 | { | ... | ... |
packageA/pages/serviceCard_pd/cart/cart.js
0 → 100644
| 1 | +var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.js"), | |
| 2 | + s = require("../../../../utils/util.js"), o = require("../../../../utils/md5.js"), to = getApp(); | |
| 3 | +var oo = t.globalData.setting, os = oo; | |
| 4 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 5 | +var util_pay = require("../../../../utils/pay.js"); | |
| 6 | + | |
| 7 | +Page({ | |
| 8 | + data: { | |
| 9 | + url: t.globalData.setting.url, | |
| 10 | + resourceUrl: t.globalData.setting.resourceUrl, | |
| 11 | + imgUrl: t.globalData.setting.imghost, | |
| 12 | + goods: null, | |
| 13 | + order: null, | |
| 14 | + orderPrices: null, | |
| 15 | + coupons: null, | |
| 16 | + coupon: null, | |
| 17 | + invoiceToggle: !0, | |
| 18 | + payWithUserMoney: !0, | |
| 19 | + payWithPoints: !0, | |
| 20 | + maxWord: 0, | |
| 21 | + enterAddressPage: !1, | |
| 22 | + firstEnter: !0, | |
| 23 | + //页面获取的参数 | |
| 24 | + param: null, | |
| 25 | + postdata: null, | |
| 26 | + //提交订单的格式 | |
| 27 | + formData: { | |
| 28 | + order_amount: 0,//支付金额 | |
| 29 | + total_amount: 0,//总价 | |
| 30 | + all_price: 0,//商品卖的总价 | |
| 31 | + pay_points: 0,//使用积分 | |
| 32 | + user_money: 0,//使用余额 | |
| 33 | + couponCode: "",//使用优惠券(多单就用逗号隔开) | |
| 34 | + shipping_price: 0,//物流费用 | |
| 35 | + }, | |
| 36 | + is_no_by:{}, | |
| 37 | + /*----------------立即购买---------------------*/ | |
| 38 | + is_b_now: 0, //0是购物车结算 1立即购买 | |
| 39 | + bn_goods: null, //立即购买时候的调用商品 | |
| 40 | + bn_use_money: 0,//是否使用余额 | |
| 41 | + bn_exp_type: 1, //0是物流 1自提 | |
| 42 | + bn_pick: 0, //选择的门店 | |
| 43 | + bn_pickname: "", //选择的门店名称 | |
| 44 | + bn_t_exp_t: 0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流 | |
| 45 | + /*------------------------*/ | |
| 46 | + user_addr: null,//物流 | |
| 47 | + userinfo: null, //获取会员 | |
| 48 | + /*----------物流选择--------*/ | |
| 49 | + wu_arr: null, | |
| 50 | + index: 0, | |
| 51 | + | |
| 52 | + //判断页面是返回回来的还是 首次进入的 | |
| 53 | + isclose: 1, | |
| 54 | + kt_type: 0, //开团类型 | |
| 55 | + is_pt_tz: 0,//是否开团团长 | |
| 56 | + qh: '', //期号 | |
| 57 | + pt_listno: '',//期号 | |
| 58 | + is_normal: 0, | |
| 59 | + is_express: 0,//选择物流的控制器 | |
| 60 | + yuer: 0, | |
| 61 | + | |
| 62 | + rank_switch: 0, //是不是开同等级卡 | |
| 63 | + show_card: null, //显示的等级卡 | |
| 64 | + card_name: '', //显示的卡的名称 | |
| 65 | + card_cut_price: null,//减价多少钱 | |
| 66 | + }, | |
| 67 | + onLoad: function (t) { | |
| 68 | + console.log("onLoad_pt_cart"); | |
| 69 | + var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, }); | |
| 70 | + var appD = getApp().get_b_now(); | |
| 71 | + | |
| 72 | + th.data.postdata = appD; | |
| 73 | + //如果期号有值 | |
| 74 | + if (appD.qh) { | |
| 75 | + th.data.qh = appD.qh; | |
| 76 | + th.data.pt_listno = appD.qh; | |
| 77 | + } | |
| 78 | + //th.data.kt_type=appD.kt_type; | |
| 79 | + th.setData({ kt_type: appD.kt_type }); | |
| 80 | + if (appD.is_pt_tz) th.data.is_pt_tz = appD.is_pt_tz; | |
| 81 | + th.data.param = t; | |
| 82 | + //先获取物流,再获取用户信息,再展示页面 | |
| 83 | + //th.get_wuliu(th.get_info(th.show_page)); | |
| 84 | + }, | |
| 85 | + onUnload: function () { this.setData({ isclose: 1 }) }, | |
| 86 | + | |
| 87 | + //------获取会员信息-----先获取用户信息,在进行下一步--- | |
| 88 | + get_info: function (func) { | |
| 89 | + var user_id = t.globalData.user_id; | |
| 90 | + to.auth.get_u(func); | |
| 91 | + }, | |
| 92 | + | |
| 93 | + //-------------------获取物流--------------- | |
| 94 | + get_wuliu(func) { | |
| 95 | + var th = this; | |
| 96 | + console.log("getwuliu4545"); | |
| 97 | + to.getwuliu(function (e) { | |
| 98 | + if (th.data.is_default_logistics) { | |
| 99 | + //如果第一个不是开启默认,说明要让用户自己选 | |
| 100 | + if (!e[0].is_default) { | |
| 101 | + th.setData({ is_default_logistics: 0 }); | |
| 102 | + } | |
| 103 | + } | |
| 104 | + th.setData({ wu_arr: e }) | |
| 105 | + typeof func == "function" && func(); | |
| 106 | + }) | |
| 107 | + }, | |
| 108 | + | |
| 109 | + //------获取会员收货地址----- | |
| 110 | + getuser_addr: function (func) { | |
| 111 | + if (to.globalData.baddr != null) { | |
| 112 | + var user_addr = to.globalData.baddr; | |
| 113 | + to.globalData.baddr = null; | |
| 114 | + func(user_addr); | |
| 115 | + } else { | |
| 116 | + a.get("/api/weshop/useraddress/page", { | |
| 117 | + data: { user_id: to.globalData.user_id, store_id: oo.stoid, pageSize: 600 }, | |
| 118 | + success: function (su) { | |
| 119 | + | |
| 120 | + var user_addr = su.data.data.pageData; | |
| 121 | + var item = null; | |
| 122 | + var def_item = null; | |
| 123 | + for (var i = 0; i < user_addr.length; i++) { | |
| 124 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | |
| 125 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
| 126 | + } | |
| 127 | + if (item == null) item = def_item; | |
| 128 | + if (item == null) item = user_addr[0]; | |
| 129 | + if (item == undefined) item = null; | |
| 130 | + func(item); | |
| 131 | + } | |
| 132 | + }); | |
| 133 | + } | |
| 134 | + }, | |
| 135 | + //----------------展示页面,是再获取用户信息之后-------------- | |
| 136 | + show_page: function () { | |
| 137 | + var th = this; | |
| 138 | + //th.setData({ userinfo: to.globalData.userInfo}); 会员信息要时时获取 | |
| 139 | + var user = getApp().globalData.userInfo; | |
| 140 | + getApp().request.get("/api/weshop/users/get/" + oo.stoid + "/" + user.user_id, { | |
| 141 | + data: { r: Math.random() }, | |
| 142 | + success: function (e) { | |
| 143 | + | |
| 144 | + getApp().globalData.userInfo = e.data.data; | |
| 145 | + th.setData({ userinfo: e.data.data }); | |
| 146 | + //获取立即购买的商品信息 | |
| 147 | + th.get_buy_goods(); | |
| 148 | + | |
| 149 | + //获取提现金额 | |
| 150 | + getApp().request.get("/api/weshop/withdrawals/summoney", { | |
| 151 | + data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 }, | |
| 152 | + success: function (su) { | |
| 153 | + if (su.data.code == 0) { | |
| 154 | + var yuer = parseFloat(th.data.userinfo.user_money - | |
| 155 | + (th.data.userinfo.frozen_money > 0 ? th.data.userinfo.frozen_money : 0) - su.data.data.summoney).toFixed(2); | |
| 156 | + if (yuer < 0) yuer = 0; | |
| 157 | + th.setData({ txmon: su.data.data.summoney, yuer: yuer }); | |
| 158 | + } | |
| 159 | + } | |
| 160 | + }); | |
| 161 | + } | |
| 162 | + }); | |
| 163 | + }, | |
| 164 | + | |
| 165 | + //-----获取立即购买的商品信息---- | |
| 166 | + get_buy_goods: function () { | |
| 167 | + var th = this, a = getApp().request; | |
| 168 | + var gg = th.data.postdata; | |
| 169 | + //调用商品 | |
| 170 | + a.get("/api/weshop/goods/get/" + oo.stoid + "/" + gg.goods_id, { | |
| 171 | + success: function (t) { | |
| 172 | + var gd = t.data.data; | |
| 173 | + if (!gd) return false; | |
| 174 | + | |
| 175 | + t.data.data.original_img = oo.imghost + t.data.data.original_img; | |
| 176 | + t.data.data['buynum'] = gg.goods_num; | |
| 177 | + console.log(t.data.data); | |
| 178 | + var distr_t = 0, et = 0 | |
| 179 | + if (t.data.data.distr_type == 0) { | |
| 180 | + distr_t = gg.pick_dis; | |
| 181 | + } else { | |
| 182 | + distr_t = t.data.data.distr_type; | |
| 183 | + } | |
| 184 | + switch (distr_t) { | |
| 185 | + case 0: | |
| 186 | + et = 1; | |
| 187 | + //-- 系统后台有设置要默认的 -- | |
| 188 | + if (th.data.json_d.pickupway && th.data.json_d.pickupway == 1) et = 0; | |
| 189 | + break; | |
| 190 | + case 1: | |
| 191 | + et = 1; | |
| 192 | + break; | |
| 193 | + case 2: | |
| 194 | + et = 0; | |
| 195 | + break; | |
| 196 | + } | |
| 197 | + | |
| 198 | + t.data.data.shop_price = gg.goods_price; | |
| 199 | + //--如果是普通购买的时候-- | |
| 200 | + if (gg.is_normal == 1) { | |
| 201 | + t.data.data.prom_id = 0; | |
| 202 | + t.data.data.prom_type = 0; | |
| 203 | + t.data.data.is_normal = 1; | |
| 204 | + | |
| 205 | + var gd = t.data.data; | |
| 206 | + //-- 用商品的手店价来显示 -- | |
| 207 | + gg.goods_price = gd.shop_price; | |
| 208 | + //---是不是购买等级卡成功的返回---等级卡显示的判断--- | |
| 209 | + var is_card_back = getApp().globalData.is_card_back; | |
| 210 | + if (is_card_back) { | |
| 211 | + gg.goods_price = gd[th.data.card_name]; | |
| 212 | + t.data.data.shop_price = gg.goods_price; | |
| 213 | + getApp().globalData.is_card_back = 0; | |
| 214 | + th.setData({ card_cut_price: 0 }); | |
| 215 | + } else { | |
| 216 | + //--- 商品不能是搭配购,商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格 | |
| 217 | + if (th.data.card_name && gd[th.data.card_name] > 0 && gg.goods_price > gd[th.data.card_name] && !th.data.userinfo.card_field) { | |
| 218 | + var cut_p = gg.goods_price - gd[th.data.card_name]; | |
| 219 | + th.setData({ card_cut_price: cut_p }); | |
| 220 | + } | |
| 221 | + } | |
| 222 | + | |
| 223 | + if (th.data.bn_goods) { | |
| 224 | + et = th.data.bn_exp_type; | |
| 225 | + } | |
| 226 | + | |
| 227 | + | |
| 228 | + th.setData({ | |
| 229 | + bn_goods: t.data.data, bn_pickname: gg.pick_name, | |
| 230 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal: 1, bn_exp_type: et | |
| 231 | + }); | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + th.calculatePrice2(); | |
| 236 | + } else { | |
| 237 | + | |
| 238 | + //--阶梯团很特殊,不能用总表来拿价格-- | |
| 239 | + getApp().request.get("/api/weshop/teamlist/get/" + oo.stoid + "/" + gd.prom_id, { | |
| 240 | + success: function (tt) { | |
| 241 | + | |
| 242 | + if (tt.data.code == 0) { | |
| 243 | + var pt_data = tt.data.data; | |
| 244 | + var now = s.gettimestamp(); | |
| 245 | + | |
| 246 | + if (pt_data.is_end == 1) { | |
| 247 | + t.data.data.prom_id = 0; | |
| 248 | + t.data.data.prom_type = 0; | |
| 249 | + t.data.data.is_normal = 1; | |
| 250 | + } else if (now > pt_data.end_time) { | |
| 251 | + t.data.data.prom_id = 0; | |
| 252 | + t.data.data.prom_type = 0; | |
| 253 | + t.data.data.is_normal = 1; | |
| 254 | + } else { | |
| 255 | + t.data.data.shop_price = tt.data.data.price; //活动价格 | |
| 256 | + t.data.data.is_normal = 0; | |
| 257 | + if (pt_data.kttype == 3) { | |
| 258 | + t.data.data.shop_price = tt.data.data.yf_price; //用定金来购买 | |
| 259 | + } | |
| 260 | + } | |
| 261 | + } else { | |
| 262 | + t.data.data.prom_id = 0; | |
| 263 | + t.data.data.prom_type = 0; | |
| 264 | + t.data.data.is_normal = 1; | |
| 265 | + } | |
| 266 | + | |
| 267 | + if (th.data.bn_goods) { | |
| 268 | + et = th.data.bn_exp_type; | |
| 269 | + } | |
| 270 | + | |
| 271 | + th.setData({ | |
| 272 | + bn_goods: t.data.data, bn_pickname: gg.pick_name, | |
| 273 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t, bn_exp_type: et | |
| 274 | + }); | |
| 275 | + | |
| 276 | + | |
| 277 | + //计算价格 | |
| 278 | + th.calculatePrice2(); | |
| 279 | + } | |
| 280 | + }); | |
| 281 | + } | |
| 282 | + } | |
| 283 | + }); | |
| 284 | + }, | |
| 285 | + | |
| 286 | + //----------子页返回父页触发---------- | |
| 287 | + onShow: function () { | |
| 288 | + var th = this; | |
| 289 | + if (th.data.isclose == 0) { | |
| 290 | + wx.navigateTo({ | |
| 291 | + url: "/pages/index/index/index" | |
| 292 | + }) | |
| 293 | + } else { | |
| 294 | + this.getuser_addr(function (ie) { | |
| 295 | + //更换地址回来要重新调用计算价钱的接口 | |
| 296 | + th.setData({ user_addr: ie }); | |
| 297 | + if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { | |
| 298 | + th.setData({ add_back: 1 }); | |
| 299 | + if (th.data.bn_goods) th.calculatePrice2(); | |
| 300 | + } | |
| 301 | + }) | |
| 302 | + //--更新默认地址--,看一下是不是跳到地址页面 | |
| 303 | + if (!getApp().globalData.is_cart_old) { | |
| 304 | + this.update_code(); | |
| 305 | + } else { | |
| 306 | + getApp().globalData.is_cart_old = 0; | |
| 307 | + } | |
| 308 | + } | |
| 309 | + | |
| 310 | + | |
| 311 | + //先获取是否有关闭使用优惠券 | |
| 312 | + getApp().getConfig2(function (ee) { | |
| 313 | + var json_d = JSON.parse(ee.switch_list); | |
| 314 | + th.data.json_d = json_d; | |
| 315 | + th.data.ispt_goods = json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 | |
| 316 | + var is_default_logistics = json_d.is_default_logistics; | |
| 317 | + | |
| 318 | + th.setData({ is_close_quan: json_d.is_close_quan, sales_rules: ee.sales_rules, rank_switch: json_d.rank_switch, is_default_logistics: is_default_logistics }); | |
| 319 | + | |
| 320 | + var rank_switch = json_d.rank_switch; | |
| 321 | + var max_price = -1; | |
| 322 | + var show_card = null; | |
| 323 | + var name = ""; | |
| 324 | + //如果有开等级卡的时候, | |
| 325 | + //因为都是调接口,要返回在计算 | |
| 326 | + if (rank_switch == 2) { | |
| 327 | + //-- 获取所有的等级卡, -- | |
| 328 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid, | |
| 329 | + {}).then(res => { | |
| 330 | + if (res.data.code == 0) { | |
| 331 | + var plusCard = res.data.data; | |
| 332 | + //-- 循环判断,拿到最贵的那张卡 -- | |
| 333 | + for (var ih in plusCard) { | |
| 334 | + if (plusCard[ih].IsStopBuy == true) { continue; } | |
| 335 | + if (max_price < 0) { | |
| 336 | + max_price = plusCard[ih].CardFee; | |
| 337 | + name = 'card' + plusCard[ih]['CorrPrice']; | |
| 338 | + show_card = plusCard[ih]; | |
| 339 | + } else { | |
| 340 | + if (max_price < plusCard[ih].CardFee) { | |
| 341 | + max_price = plusCard[ih].CardFee; | |
| 342 | + name = 'card' + plusCard[ih]['CorrPrice']; | |
| 343 | + show_card = plusCard[ih]; | |
| 344 | + } | |
| 345 | + } | |
| 346 | + } | |
| 347 | + | |
| 348 | + if (show_card) { | |
| 349 | + name = name.toLowerCase(); | |
| 350 | + th.setData({ card_name: name, show_card: show_card }) | |
| 351 | + } | |
| 352 | + } | |
| 353 | + //-----先获取物流,再获取用户信息,再展示页面----- | |
| 354 | + th.get_wuliu(th.get_info(th.show_page)); | |
| 355 | + }) | |
| 356 | + } else { | |
| 357 | + //-----先获取物流,再获取用户信息,再展示页面----- | |
| 358 | + th.get_wuliu(th.get_info(th.show_page)); | |
| 359 | + } | |
| 360 | + }, 1) | |
| 361 | + | |
| 362 | + }, | |
| 363 | + //---------------检查是否有收货地址------------------- | |
| 364 | + checkAddressList: function () { | |
| 365 | + var t = this; | |
| 366 | + return !(!this.data.order || null == this.data.order.userAddress) || (wx.showModal({ | |
| 367 | + title: "请先填写或选择收货地址~", | |
| 368 | + success: function (a) { | |
| 369 | + a.confirm ? t.enterAddressPage() : wx.navigateBack(); | |
| 370 | + }, | |
| 371 | + fail: function () { | |
| 372 | + wx.navigateBack(); | |
| 373 | + } | |
| 374 | + }), !1); | |
| 375 | + }, | |
| 376 | + showInvoice: function () { | |
| 377 | + this.setData({ | |
| 378 | + invoiceToggle: !this.data.invoiceToggle | |
| 379 | + }); | |
| 380 | + }, | |
| 381 | + keyUpChangePay1: function (t) { | |
| 382 | + this.setData({ | |
| 383 | + payWithUserMoney: !(t.detail.value.length > 0) | |
| 384 | + }); | |
| 385 | + }, | |
| 386 | + keyUpChangePay2: function (t) { | |
| 387 | + this.setData({ | |
| 388 | + payWithPoints: !(t.detail.value.length > 0) | |
| 389 | + }); | |
| 390 | + }, | |
| 391 | + keyUpChangeNum: function (t) { | |
| 392 | + this.setData({ | |
| 393 | + maxWord: t.detail.value.length | |
| 394 | + }); | |
| 395 | + }, | |
| 396 | + //---------计算立即购买---------- | |
| 397 | + calculatePrice2: function () { | |
| 398 | + var th = this, good = this.data.bn_goods; | |
| 399 | + //-----------计算商品总价-------------- | |
| 400 | + var allpice = good.shop_price * good.buynum; | |
| 401 | + allpice = parseFloat(allpice).toFixed(2); | |
| 402 | + var txt = "formData.all_price"; | |
| 403 | + th.setData({ [txt]: allpice, }); | |
| 404 | + console.log(th.data.formData); | |
| 405 | + | |
| 406 | + to.getConfig2(function (ee) { | |
| 407 | + to.getwuliuprice(async function (rs) { | |
| 408 | + console.log('calculatePrice2222'); | |
| 409 | + console.log(rs); | |
| 410 | + var o_shipping_price = 0, goods_weight = -1, goods_piece = -1; | |
| 411 | + var out_of_weight = null; //超出多少重量 | |
| 412 | + var freight_free = ee.freight_free; //全场满多少包邮 | |
| 413 | + var weight_free = ee.weight_free; //多少kg内包邮 | |
| 414 | + var no_ex_id = ee.no_ex_id; | |
| 415 | + var no_ex_good = null; | |
| 416 | + var by_qc = {}; | |
| 417 | + if (no_ex_id && freight_free > 0) { | |
| 418 | + //-----------获取不包邮区域,不包邮商品------- | |
| 419 | + await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods", { | |
| 420 | + data: { store_id: os.stoid, id: no_ex_id } | |
| 421 | + }).then(res => { | |
| 422 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
| 423 | + by_qc = res.data.data[0]; | |
| 424 | + } | |
| 425 | + }) | |
| 426 | + }; | |
| 427 | + //-----------当地址不为空,且是物流时,计算物流费用,同时阶梯团不计算拼团价格---------- | |
| 428 | + if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { | |
| 429 | + switch (good['exp_sum_type']) { | |
| 430 | + case 1: | |
| 431 | + //统一运费 | |
| 432 | + o_shipping_price += good['uniform_exp_sum']; break; | |
| 433 | + case 2: | |
| 434 | + if (goods_weight < 0) goods_weight = 0; | |
| 435 | + //累积商品重量 每种商品的重量 * 数量 | |
| 436 | + goods_weight += good['weight'] * good['buynum']; | |
| 437 | + if (weight_free > 0) { | |
| 438 | + out_of_weight = (weight_free * 1000) - goods_weight; | |
| 439 | + } | |
| 440 | + break; | |
| 441 | + case 3: | |
| 442 | + if (goods_piece < 0) goods_piece = 0; | |
| 443 | + //累积商品数量 | |
| 444 | + goods_piece += good['buynum']; break; | |
| 445 | + } | |
| 446 | + | |
| 447 | + console.log(th.data.wu_arr); | |
| 448 | + var code = th.data.wu_arr[th.data.index].code; | |
| 449 | + th.data.is_no_by[th.data.bn_pick] = 0; | |
| 450 | + var no_by_data = null; | |
| 451 | + //--全部金额-- | |
| 452 | + //有不包邮区域,且不免运费 | |
| 453 | + if (no_ex_id && freight_free > 0 && freight_free <= parseFloat(allpice)) { | |
| 454 | + //-----------获取不包邮区域,不包邮商品------- | |
| 455 | + await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods", { | |
| 456 | + data: { store_id: os.stoid, id: no_ex_id } | |
| 457 | + }).then(res => { | |
| 458 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
| 459 | + no_by_data = res.data.data[0]; | |
| 460 | + //如果有设置不包邮区域的时候 | |
| 461 | + if (res.data.data[0].region_list) { | |
| 462 | + if (th.check_by_area(res.data.data[0].region_list)) { | |
| 463 | + freight_free = 0; | |
| 464 | + // out_of_weight = 0; | |
| 465 | + th.data.is_no_by[th.data.bn_pick] = 1; | |
| 466 | + } | |
| 467 | + } | |
| 468 | + //如果有设置不包邮商品 | |
| 469 | + if (res.data.data[0].goods_list && freight_free) { | |
| 470 | + if (th.check_by_goods(res.data.data[0].goods_list)) { | |
| 471 | + freight_free = 0; | |
| 472 | + // out_of_weight = 0; | |
| 473 | + th.data.is_no_by[th.data.bn_pick] = 1; | |
| 474 | + } | |
| 475 | + } | |
| 476 | + } | |
| 477 | + }) | |
| 478 | + } | |
| 479 | + var shipping_price = | |
| 480 | + th.calculatewuliu(code, o_shipping_price, goods_weight, out_of_weight, | |
| 481 | + goods_piece, th.data.user_addr, freight_free, allpice, rs,th.data.bn_pick); | |
| 482 | + | |
| 483 | + shipping_price = parseFloat(shipping_price).toFixed(2); | |
| 484 | + var wl_txt = "formData.shipping_price"; | |
| 485 | + th.setData({ [wl_txt]: shipping_price, }) | |
| 486 | + | |
| 487 | + } else { | |
| 488 | + var wl_txt = "formData.shipping_price"; | |
| 489 | + th.setData({ [wl_txt]: 0, }) | |
| 490 | + } | |
| 491 | + //-----------------总价----------------- | |
| 492 | + var total_m = parseFloat(allpice) + parseFloat(th.data.formData.shipping_price); | |
| 493 | + total_m = parseFloat(total_m).toFixed(2); | |
| 494 | + | |
| 495 | + var atxt = "formData.total_amount"; | |
| 496 | + th.setData({ [atxt]: total_m, }) | |
| 497 | + var order_m = total_m; | |
| 498 | + | |
| 499 | + var txt = "formData.user_money"; | |
| 500 | + var txt2 = "formData.order_amount"; | |
| 501 | + //--------------如果使用余额--------------------- | |
| 502 | + if (th.data.bn_use_money == 1 && th.data.yuer > 0) { | |
| 503 | + if (parseFloat(th.data.yuer) > total_m) { | |
| 504 | + th.setData({ [txt]: total_m, [txt2]: 0 }) | |
| 505 | + } else { | |
| 506 | + order_m = parseFloat(order_m) - parseFloat(th.data.yuer); | |
| 507 | + order_m = order_m.toFixed(2); | |
| 508 | + th.setData({ [txt]: th.data.yuer, [txt2]: order_m }) | |
| 509 | + } | |
| 510 | + } else { | |
| 511 | + th.setData({ [txt]: 0, [txt2]: order_m }) | |
| 512 | + } | |
| 513 | + | |
| 514 | + }); | |
| 515 | + }); | |
| 516 | + }, | |
| 517 | + //--------------------提交订单----------------------- | |
| 518 | + submitForm: async function (t) { | |
| 519 | + if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | |
| 520 | + this.data.is_summit_ing = 1; | |
| 521 | + | |
| 522 | + var th = this, pdata = new Array(); | |
| 523 | + var ff = true; | |
| 524 | + //------------立即购买------------- | |
| 525 | + console.log("buy_new"); | |
| 526 | + | |
| 527 | + //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 | |
| 528 | + if (th.data.bn_exp_type == 0 && th.data.user_addr == null && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { | |
| 529 | + ff = false; | |
| 530 | + getApp().my_warnning("请选择收货地址", 0, this); | |
| 531 | + this.data.is_summit_ing = 0; | |
| 532 | + } | |
| 533 | + if (!ff) return false; | |
| 534 | + var addr = th.data.user_addr; | |
| 535 | + if (th.data.bn_exp_type == 1) addr = null; | |
| 536 | + | |
| 537 | + console.log(th.data.formData); | |
| 538 | + console.log(th.data.wu_arr); | |
| 539 | + console.log(th.data.bn_exp_type); | |
| 540 | + | |
| 541 | + if (th.data.bn_exp_type == 0 && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { | |
| 542 | + if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) { | |
| 543 | + getApp().my_warnning("读取物流失败", 0, this); | |
| 544 | + this.data.is_summit_ing = 0; | |
| 545 | + return false; | |
| 546 | + } | |
| 547 | + } | |
| 548 | + | |
| 549 | + //阶梯团强制带1,自提~~~ | |
| 550 | + if (th.data.kt_type == 3) { | |
| 551 | + th.data.bn_exp_type = 1; | |
| 552 | + } | |
| 553 | + | |
| 554 | + var item = { | |
| 555 | + 'user_id': to.globalData.user_id, | |
| 556 | + 'consignee': addr == null ? "" : addr.consignee, | |
| 557 | + 'province': addr == null ? 0 : addr.province, | |
| 558 | + 'city': addr == null ? 0 : addr.city, | |
| 559 | + 'district': addr == null ? 0 : addr.district, | |
| 560 | + 'twon': addr == null ? 0 : addr.twon, | |
| 561 | + 'address': addr == null ? "" : addr.address, | |
| 562 | + 'more_address': addr == null ? "" : addr.more_address, | |
| 563 | + 'mobile': addr == null ? th.data.userinfo.mobile : addr.mobile, | |
| 564 | + 'email': '', | |
| 565 | + 'invoice_title': '', | |
| 566 | + 'goods_price': th.data.formData.all_price, //商品总价 | |
| 567 | + 'shipping_price': th.data.formData.shipping_price, //物流金额 | |
| 568 | + 'user_money': th.data.formData.user_money, //使用余额 | |
| 569 | + 'total_amount': th.data.formData.total_amount, //订单总价 | |
| 570 | + 'order_amount': th.data.formData.order_amount, //应付 | |
| 571 | + 'user_note': t.detail.value.user_note, //用户备注 | |
| 572 | + 'store_id': oo.stoid, //商家 | |
| 573 | + 'pickup_id': th.data.bn_pick, //门店 | |
| 574 | + 'exp_type': th.data.bn_exp_type, //配送方式 | |
| 575 | + 'is_normal': th.data.bn_goods.is_normal, //是否是普通购买 | |
| 576 | + 'pt_prom_id': th.data.bn_goods.prom_id, //拼单ID | |
| 577 | + 'is_pt_tz': th.data.is_pt_tz, //开团类型 | |
| 578 | + 'order_goods': new Array(), | |
| 579 | + }; | |
| 580 | + | |
| 581 | + //如果不是阶梯团,或者是普通购买, | |
| 582 | + if ((th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { | |
| 583 | + item['shipping_code'] = th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code; | |
| 584 | + item['shipping_name'] = th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name; | |
| 585 | + } | |
| 586 | + | |
| 587 | + if (!th.data.bn_goods.is_normal) { | |
| 588 | + item.is_zsorder = th.data.kt_type + 1; //开团类型 | |
| 589 | + } | |
| 590 | + //老会员成为分销下线需要的参数 | |
| 591 | + if (getApp().globalData.first_leader && !getApp().globalData.userInfo.first_leader) { | |
| 592 | + //判断一下分享人是不是分享商 | |
| 593 | + await app.request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.first_leader, {}).then(res => { | |
| 594 | + if (res.data.code == 0) { | |
| 595 | + var user = res.data.data; | |
| 596 | + if (user.is_distribut == 1) { | |
| 597 | + item.first_leader = parseInt(getApp().globalData.first_leader); | |
| 598 | + } | |
| 599 | + } | |
| 600 | + }) | |
| 601 | + } | |
| 602 | + | |
| 603 | + if (th.data.qh != '') { | |
| 604 | + item.team_qh = th.data.qh; | |
| 605 | + item.pt_listno = th.data.qh; | |
| 606 | + } | |
| 607 | + | |
| 608 | + var gg = to.get_b_now(); | |
| 609 | + var goods = { | |
| 610 | + 'goods_id': gg.goods_id, | |
| 611 | + 'goods_name': gg.goods_name, | |
| 612 | + 'goods_sn': gg.goods_sn, | |
| 613 | + 'goods_num': gg.goods_num, | |
| 614 | + 'market_price': th.data.bn_goods.market_price, | |
| 615 | + 'goods_price': th.data.bn_goods.shop_price, | |
| 616 | + 'member_goods_price': th.data.bn_goods.shop_price, | |
| 617 | + 'store_id': oo.stoid, | |
| 618 | + 'prom_type': th.data.bn_goods.prom_type, //促销活动类型 | |
| 619 | + 'prom_id': th.data.bn_goods.prom_id, //促销活动id | |
| 620 | + }; | |
| 621 | + | |
| 622 | + //--导购分享过来的id-- | |
| 623 | + if (gg.guide_id) { | |
| 624 | + goods.guide_id = gg.guide_id; | |
| 625 | + goods.guide_type = gg.guide_type; | |
| 626 | + //调用接口判断是不是会员 | |
| 627 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + oo.stoid + "/" + gg.guide_id, {}).then(res => { | |
| 628 | + if (res.data.code == 0) { | |
| 629 | + goods.guide_name = res.data.data.salesman; | |
| 630 | + goods.guide_sn = res.data.data.salesman_no; | |
| 631 | + } | |
| 632 | + }) | |
| 633 | + } | |
| 634 | + | |
| 635 | + | |
| 636 | + //--商品的房间号-- | |
| 637 | + if (gg.room_id && gg.room_id > 0) { | |
| 638 | + item.room_ids = gg.room_id; | |
| 639 | + goods.room_id = gg.room_id; | |
| 640 | + } | |
| 641 | + | |
| 642 | + if (th.data.bn_goods.is_normal) { goods.is_pd_normal = 1; } | |
| 643 | + | |
| 644 | + item.order_goods.push(goods); | |
| 645 | + pdata.push(item); | |
| 646 | + | |
| 647 | + if (pdata.length == 0) return; | |
| 648 | + var str = JSON.stringify(pdata); | |
| 649 | + console.log("支付数据"); | |
| 650 | + console.log(str); | |
| 651 | + //return false; | |
| 652 | + wx.showLoading({ title: "加载中" }); | |
| 653 | + wx.request({ | |
| 654 | + url: oo.url + '/api/weshop/order/createWxdOrder', | |
| 655 | + data: str, | |
| 656 | + method: 'POST', | |
| 657 | + header: { | |
| 658 | + 'content-type': 'application/json' | |
| 659 | + },// 设置请求的 header | |
| 660 | + success: function (res) { | |
| 661 | + | |
| 662 | + wx.hideLoading(); | |
| 663 | + if (res.statusCode == 200) { | |
| 664 | + var data = res.data; | |
| 665 | + if (data.code == 0) { | |
| 666 | + console.log(th.data.is_b_now); | |
| 667 | + //如果是购物车结算,还要删除购物车 | |
| 668 | + if (th.data.is_b_now == 0) { | |
| 669 | + console.log(th.data.cartlist_y); | |
| 670 | + var list = th.data.cartlist_y; | |
| 671 | + for (var i = 0; i < list.length; i++) { | |
| 672 | + //删除购物车 | |
| 673 | + getApp().request.delete("/api/weshop/cart/del/" + oo.stoid + "/" + list[i].id, {}); | |
| 674 | + } | |
| 675 | + } | |
| 676 | + var order_amount = 0; | |
| 677 | + pdata.forEach(function (em, ind) { | |
| 678 | + order_amount += em.order_amount; | |
| 679 | + }) | |
| 680 | + //要进行判断,如果是用微信支付,就要跳转到支付界面 | |
| 681 | + if (order_amount > 0) { | |
| 682 | + th.setData({ isclose: 0 }); | |
| 683 | + //void e.jumpToCart4({ | |
| 684 | + // order_sn: data.data, | |
| 685 | + // type:1, | |
| 686 | + // }, 1); | |
| 687 | + util_pay.pay(data.data, function () { | |
| 688 | + setTimeout(function () { | |
| 689 | + wx.reLaunch({ | |
| 690 | + //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, | |
| 691 | + url: "/pages/team/team_success/team_success?ordersn=" + data.data, | |
| 692 | + }) | |
| 693 | + }, 1000) | |
| 694 | + }, function () { | |
| 695 | + //支付失败 | |
| 696 | + setTimeout(function () { | |
| 697 | + //wx.navigateBack({ delta: 1 }) | |
| 698 | + wx.reLaunch({ | |
| 699 | + url: "/pages/user/order_list/order_list", | |
| 700 | + }) | |
| 701 | + }, 1000) | |
| 702 | + | |
| 703 | + }, oo.stoid, 1); | |
| 704 | + | |
| 705 | + } else { | |
| 706 | + var dd = { | |
| 707 | + parent_sn: data.data, | |
| 708 | + store_id: oo.stoid, | |
| 709 | + type: 1, | |
| 710 | + }; | |
| 711 | + //return false; | |
| 712 | + getApp().request.post("/api/weshop/order/pay/createOrder", { | |
| 713 | + data: dd, | |
| 714 | + success: function (t) { | |
| 715 | + console.log(t); | |
| 716 | + // app.my_warnning("支付成功", 1, th); | |
| 717 | + wx.showToast({ | |
| 718 | + title: '支付成功', | |
| 719 | + icon: 'success', | |
| 720 | + duration: 2000 | |
| 721 | + }); | |
| 722 | + setTimeout(function () { | |
| 723 | + th.setData({ isclose: 0 }); | |
| 724 | + | |
| 725 | + if (th.data.is_normal == 1) { | |
| 726 | + /*-- | |
| 727 | + wx.navigateTo({ | |
| 728 | + url: "/pages/user/order_list/order_list", | |
| 729 | + })--*/ | |
| 730 | + var url = "/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data; | |
| 731 | + wx.reLaunch({ | |
| 732 | + url: url | |
| 733 | + }) | |
| 734 | + | |
| 735 | + } else { | |
| 736 | + wx.reLaunch({ | |
| 737 | + url: "/pages/team/team_success/team_success?ordersn=" + data.data, | |
| 738 | + }) | |
| 739 | + } | |
| 740 | + | |
| 741 | + | |
| 742 | + }, 1000) | |
| 743 | + } | |
| 744 | + }); | |
| 745 | + } | |
| 746 | + } | |
| 747 | + else { | |
| 748 | + th.data.is_summit_ing = 0; //是否提交中 | |
| 749 | + getApp().confirmBox(data.msg); | |
| 750 | + } | |
| 751 | + } else { | |
| 752 | + th.data.is_summit_ing = 0; //是否提交中 | |
| 753 | + console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); | |
| 754 | + } | |
| 755 | + }, | |
| 756 | + fail: function () { | |
| 757 | + th.data.is_summit_ing = 0; //是否提交中 | |
| 758 | + wx.hideLoading(); | |
| 759 | + console.log("index.js wx.request CheckCallUser fail"); | |
| 760 | + }, | |
| 761 | + complete: function () { } | |
| 762 | + }) | |
| 763 | + }, | |
| 764 | + useCoupon: function () { | |
| 765 | + if (this.data.order.couponNum <= 0) { | |
| 766 | + //return t.showWarning("无可用优惠券"); | |
| 767 | + getApp().my_warnning("无可用优惠券", 0, this); | |
| 768 | + return; | |
| 769 | + } | |
| 770 | + var a = { | |
| 771 | + lid: this.data.coupon ? this.data.coupon.id : "0" | |
| 772 | + }; | |
| 773 | + wx.navigateTo({ | |
| 774 | + url: "/pages/user/checkcoupon/checkcoupon?" + s.Obj2Str(a) | |
| 775 | + }); | |
| 776 | + }, | |
| 777 | + //检查区域是不是包邮 | |
| 778 | + check_area: function (arr) { | |
| 779 | + var user_addr = this.data.user_addr; | |
| 780 | + if (!user_addr) return 0; | |
| 781 | + for (var i in arr) { | |
| 782 | + var item = arr[i]; | |
| 783 | + if (user_addr.twon == item || user_addr.district == item | |
| 784 | + || user_addr.city == item || user_addr.province == item) { | |
| 785 | + return 0; | |
| 786 | + } | |
| 787 | + } | |
| 788 | + return 1; | |
| 789 | + }, | |
| 790 | + | |
| 791 | + //检查立即购买的商品是不是不包邮 | |
| 792 | + check_good: function (arr, goods_id) { | |
| 793 | + if (!goods_id) goods_id = this.data.goods.goods_id; | |
| 794 | + for (var i in arr) { | |
| 795 | + var item = arr[i]; | |
| 796 | + if (goods_id == item) return 0; | |
| 797 | + } | |
| 798 | + return 1; | |
| 799 | + }, | |
| 800 | + check_by_area: function (region_list) { | |
| 801 | + var arr = region_list.split(","); | |
| 802 | + var check = this.check_area(arr); | |
| 803 | + return !check; | |
| 804 | + }, | |
| 805 | + check_by_goods: function (goods_list, goods_id) { | |
| 806 | + var arr = goods_list.split(","); | |
| 807 | + var check = this.check_good(arr, goods_id); | |
| 808 | + return !check; | |
| 809 | + }, | |
| 810 | + enterAddressPage: function () { | |
| 811 | + getApp().globalData.is_cart_old = 1; | |
| 812 | + this.data.enterAddressPage = !0, wx.navigateTo({ | |
| 813 | + url: "/pages/user/address_list/address_list" | |
| 814 | + }); | |
| 815 | + }, | |
| 816 | + | |
| 817 | + //--------立即购买时,选择自提和物流----------- | |
| 818 | + setexptype_w: function (t) { | |
| 819 | + var th = this; | |
| 820 | + var ty = t.currentTarget.dataset.t, txt = t.currentTarget.dataset.txt; | |
| 821 | + th.setData({ [txt]: ty }); | |
| 822 | + var iszt = 1; | |
| 823 | + if (ty == 0) { | |
| 824 | + th.setData({ is_all_zt: 0 }); | |
| 825 | + } else { | |
| 826 | + for (var i = 0; i < th.data.cartlist.length; i++) { | |
| 827 | + var item = th.data.cartlist[i]; | |
| 828 | + if (item.exp_type == 0) { iszt = 0; break; } | |
| 829 | + } | |
| 830 | + th.setData({ is_all_zt: iszt }); | |
| 831 | + } | |
| 832 | + //----计算此时购物车的价格---- | |
| 833 | + th.calculatePrice(); | |
| 834 | + }, | |
| 835 | + | |
| 836 | + //--------立即购买时,选择自提和物流---------- | |
| 837 | + setexptype: function (t) { | |
| 838 | + var th = this; | |
| 839 | + var ty = t.currentTarget.dataset.t; | |
| 840 | + th.setData({ bn_exp_type: ty }); | |
| 841 | + //当物流为空的时候。 | |
| 842 | + if (ty == 0 && th.data.wu_arr == null) { | |
| 843 | + return th.get_wuliu(th.calculatePrice2()); | |
| 844 | + } | |
| 845 | + th.calculatePrice2() | |
| 846 | + console.log('setexptype'); | |
| 847 | + }, | |
| 848 | + | |
| 849 | + //--------立即购买时,使用余额-------- | |
| 850 | + set_bn_useyuer: function () { | |
| 851 | + var th = this; | |
| 852 | + th.setData({ bn_use_money: !th.data.bn_use_money }); | |
| 853 | + th.calculatePrice2(); | |
| 854 | + }, | |
| 855 | + set_js_useyuer: function () { | |
| 856 | + var th = this; | |
| 857 | + th.setData({ js_use_money: !th.data.js_use_money }); | |
| 858 | + th.calculatePrice(); | |
| 859 | + }, | |
| 860 | + | |
| 861 | + //-------------------计算物流--------------- | |
| 862 | + calculatewuliu: function (code, o_shipping_price, goods_weight, out_of_weight, | |
| 863 | + goods_piece, user_addr, freight_free, o_price, rs, pickid) { | |
| 864 | + var price = 0, th = this; | |
| 865 | + price += parseFloat(o_shipping_price); | |
| 866 | + //如果是包邮 | |
| 867 | + if (freight_free > 0 && o_price >= freight_free && out_of_weight >= 0) { return 0; } | |
| 868 | + if (user_addr == null) { return 0; } | |
| 869 | + //计算物流的config item; | |
| 870 | + var item = null; | |
| 871 | + //先根据 镇 县 区找计算的config | |
| 872 | + item = th.get_wuliu_config(user_addr.district, code, rs); | |
| 873 | + if (item == null) item = th.get_wuliu_config(user_addr.city, code, rs); | |
| 874 | + if (item == null) item = th.get_wuliu_config(user_addr.province, code, rs); | |
| 875 | + if (item == null) item = th.get_wuliu_default(code, rs); | |
| 876 | + if (item == null) return o_shipping_price; | |
| 877 | + var fw_price = 0, fp_price = 0; | |
| 878 | + item = item.config; | |
| 879 | + if (item == null) return o_shipping_price; | |
| 880 | + //------按重量---------- | |
| 881 | + if (goods_weight >= 0 && item['money']) { | |
| 882 | + fw_price = parseFloat(item['money']); | |
| 883 | + if (goods_weight > item['first_weight']) { | |
| 884 | + var fw = goods_weight - item['first_weight']; | |
| 885 | + var n = Math.ceil(fw / item['second_weight']) | |
| 886 | + fw_price = fw_price + n * parseFloat(item['add_money']); | |
| 887 | + } | |
| 888 | + } | |
| 889 | + //------超出重量---------- | |
| 890 | + if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) { | |
| 891 | + fw_price = parseFloat(item['money']); | |
| 892 | + var out_of_weight = Math.abs(out_of_weight); | |
| 893 | + if (out_of_weight > item['first_weight']) { | |
| 894 | + var fw = out_of_weight - item['first_weight']; | |
| 895 | + var n = Math.ceil(fw / item['second_weight']) | |
| 896 | + fw_price = fw_price + n * parseFloat(item['add_money']); | |
| 897 | + } | |
| 898 | + } | |
| 899 | + //------按件数---------- | |
| 900 | + if (goods_piece > 0) { | |
| 901 | + fp_price = parseFloat(item['piecemoney']); | |
| 902 | + if (goods_piece > item['first_piece']) { | |
| 903 | + var fp = goods_piece - item['first_piece']; | |
| 904 | + var m = Math.ceil(fp / item['second_piece']) | |
| 905 | + fp_price = fp_price + m * parseFloat(item['add_piecemoney']); | |
| 906 | + } | |
| 907 | + } | |
| 908 | + var rspice = parseFloat(price + fw_price + fp_price); | |
| 909 | + return rspice; | |
| 910 | + }, | |
| 911 | + | |
| 912 | + //------------循环获取config----------- | |
| 913 | + get_wuliu_config: function (region_id, code, rs) { | |
| 914 | + var item = null, rslist = rs.pageData; | |
| 915 | + for (var i = 0; i < rslist.length; i++) { | |
| 916 | + if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i]; } | |
| 917 | + } | |
| 918 | + return item; | |
| 919 | + }, | |
| 920 | + //-------循环获取config,code default------- | |
| 921 | + get_wuliu_default: function (code, rs) { | |
| 922 | + var item = null, rslist = rs.pageData; | |
| 923 | + for (var i = 0; i < rslist.length; i++) { | |
| 924 | + if (rslist[i].shipping_code == code && rslist[i].is_default == 1) { item = rslist[i]; } | |
| 925 | + } | |
| 926 | + return item; | |
| 927 | + }, | |
| 928 | + | |
| 929 | + //----------立即购买,选择物流------------- | |
| 930 | + bindPickerChange: function (e) { | |
| 931 | + var ind = e.detail.value | |
| 932 | + this.setData({ index: ind }); | |
| 933 | + this.calculatePrice2(); | |
| 934 | + }, | |
| 935 | + | |
| 936 | + //----------购物车结算,选择物流------------- | |
| 937 | + bindPickerChange_w: function (e) { | |
| 938 | + var ind = e.detail.value, txt = e.currentTarget.dataset.txt; | |
| 939 | + this.setData({ [txt]: ind }); | |
| 940 | + this.calculatePrice(); | |
| 941 | + }, | |
| 942 | + | |
| 943 | + cart_set_err: function (e) { | |
| 944 | + var txt = e.currentTarget.dataset.err; | |
| 945 | + var ob = {}; | |
| 946 | + ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; | |
| 947 | + this.setData(ob); | |
| 948 | + }, | |
| 949 | + | |
| 950 | + //// 开启物流的弹窗 | |
| 951 | + show_wu_arr: function (e) { | |
| 952 | + this.setData({ open_express: 1 }); | |
| 953 | + }, | |
| 954 | + | |
| 955 | + //更新下默认,在onshow里面 | |
| 956 | + update_code() { | |
| 957 | + var th = this, m_wind = 0, def_exp_code = getApp().globalData.userInfo.def_exp_code; | |
| 958 | + | |
| 959 | + var uii = setInterval(function () { | |
| 960 | + if (th.data.wu_arr) { | |
| 961 | + clearInterval(uii); | |
| 962 | + for (var k = 0; k < th.data.wu_arr.length; k++) { | |
| 963 | + var item = th.data.wu_arr[k]; | |
| 964 | + if (def_exp_code == item.code) { | |
| 965 | + m_wind = k; | |
| 966 | + } | |
| 967 | + } | |
| 968 | + //--如果是立即购买-- | |
| 969 | + th.setData({ index: m_wind, is_express: m_wind }); | |
| 970 | + } | |
| 971 | + }, 500) | |
| 972 | + }, | |
| 973 | + | |
| 974 | + // 关闭物流的弹窗 | |
| 975 | + close_express: function () { | |
| 976 | + this.setData({ open_express: 0 }); | |
| 977 | + }, | |
| 978 | + // 选择物流 | |
| 979 | + click_express_name: function (e) { | |
| 980 | + var express_name = e.currentTarget.dataset.name, shippingcode = e.currentTarget.dataset.shippingcode; | |
| 981 | + var index = e.currentTarget.dataset.idxe; | |
| 982 | + var ob = { is_express: index, is_shipping_code: shippingcode, index: index }; | |
| 983 | + this.setData(ob); | |
| 984 | + }, | |
| 985 | + | |
| 986 | + //点击确定物流 | |
| 987 | + determine_expres: function (e) { | |
| 988 | + this.setData({ open_express: 0 }); | |
| 989 | + this.calculatePrice2(); | |
| 990 | + }, | |
| 991 | + //设置默认物流 | |
| 992 | + select_default_logistics: function () { | |
| 993 | + var th = this; | |
| 994 | + var is_shipping_code = this.data.is_shipping_code | |
| 995 | + getApp().request.put("/api/weshop/users/update", { | |
| 996 | + data: { user_id: getApp().globalData.user_id, store_id: oo.stoid, def_exp_code: is_shipping_code }, | |
| 997 | + success: function (rse) { | |
| 998 | + if (rse.data.code == 0) { | |
| 999 | + getApp().globalData.userInfo.def_exp_code = is_shipping_code; | |
| 1000 | + th.setData({ open_express: 0 }); | |
| 1001 | + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19---- | |
| 1002 | + //if(th.data.is_b_now==1) th.calculatePrice2(); | |
| 1003 | + //else th.calculatePrice(); | |
| 1004 | + th.calculatePrice2(); | |
| 1005 | + } | |
| 1006 | + } | |
| 1007 | + }) | |
| 1008 | + }, | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + //跳转到购买卡 | |
| 1012 | + buycard: function () { | |
| 1013 | + getApp().goto("/pages/user/plus/plus"); | |
| 1014 | + getApp().globalData.plus_buy_back = 1; | |
| 1015 | + } | |
| 1016 | +}); | ... | ... |
packageA/pages/serviceCard_pd/cart/cart.json
0 → 100644
packageA/pages/serviceCard_pd/cart/cart.wxml
0 → 100644
| 1 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
| 2 | +<form bindsubmit="submitForm"> | |
| 3 | + <view class="container"> | |
| 4 | + | |
| 5 | + <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | |
| 6 | + <view class="tab-wrapper"> | |
| 7 | + <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | |
| 8 | + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | |
| 9 | + | |
| 10 | + <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" | |
| 11 | + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> | |
| 12 | + | |
| 13 | + </view> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + | |
| 17 | + <!--要进行判断地址是否显示----> | |
| 18 | + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | |
| 19 | + <!---默认地址显示------> | |
| 20 | + <block wx:if="{{user_addr!=null}}"> | |
| 21 | + <view class="user-contact">收货人:{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> | |
| 22 | + <view class="location"> | |
| 23 | + <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> | |
| 24 | + <view class="pos-icon"> | |
| 25 | + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
| 26 | + </view> | |
| 27 | + </view> | |
| 28 | + <view class="update-logistics"> | |
| 29 | + <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image> | |
| 30 | + </view> | |
| 31 | + </block> | |
| 32 | + <!---先增地址------> | |
| 33 | + <block wx:else> | |
| 34 | + <view class="add_new"> | |
| 35 | + <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 | |
| 36 | + </view> | |
| 37 | + </block> | |
| 38 | + <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> --> | |
| 39 | + </view> | |
| 40 | + | |
| 41 | + | |
| 42 | + <!------立即购买--------> | |
| 43 | + <block> | |
| 44 | + <!-- <view class="xc-border main-top"></view> --> | |
| 45 | + <view class="use-item bfff bdr_t-14 mgt20"> | |
| 46 | + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>{{bn_pickname}}</view></view> | |
| 47 | + <view class="order-detail"> | |
| 48 | + <view class="goods-img"> | |
| 49 | + <image class="wh100 bdr14" src="{{bn_goods.original_img}}" | |
| 50 | + binderror='cart_set_err' data-err="bn_goods.original_img"></image> | |
| 51 | + </view> | |
| 52 | + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | |
| 53 | + <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | |
| 54 | + <!-- 商品属性 --> | |
| 55 | + <view class="flex-vertical fs28 color-gray n_guige"> | |
| 56 | + <view class="goods-color"><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text> | |
| 57 | + </view></view> | |
| 58 | + | |
| 59 | + <!-----商品名称规格------> | |
| 60 | + <view class="order-num flex-space-between"> | |
| 61 | + <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view> | |
| 62 | + <view class="goods-num">x{{bn_goods.buynum}}</view> | |
| 63 | + </view> | |
| 64 | + </navigator> | |
| 65 | + <!-- <view class="order-num"> | |
| 66 | + <view class="co-red">¥{{bn_goods.shop_price}}</view> | |
| 67 | + <view class="goods-num">x{{bn_goods.buynum}}</view> | |
| 68 | + </view> --> | |
| 69 | + </view> | |
| 70 | + | |
| 71 | + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> | |
| 72 | + <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> | |
| 73 | + <view class="flex"> | |
| 74 | + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> | |
| 75 | + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 76 | + <text class="card_name">{{show_card.CardName}}</text> | |
| 77 | + </view> | |
| 78 | + <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view> | |
| 79 | + </view> | |
| 80 | + <view> | |
| 81 | + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text> | |
| 82 | + </view> | |
| 83 | + <!-- 三角形 --> | |
| 84 | + <view class="car_tri_up"></view> | |
| 85 | + <!-- 立即开通跳转 --> | |
| 86 | + <view bindtap="buycard" class="card_op">立即开通</view> | |
| 87 | + </view> | |
| 88 | + | |
| 89 | + | |
| 90 | + <view class="set-mes bdr_b-14"> | |
| 91 | + <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} | |
| 92 | + </view> | |
| 93 | + | |
| 94 | + <!--阶梯团是不显示的--> | |
| 95 | + <block wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | |
| 96 | + <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}"> | |
| 97 | + <view>选择物流</view> | |
| 98 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;"> | |
| 99 | + <view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view> | |
| 100 | + </view> | |
| 101 | + </view> | |
| 102 | + </block> | |
| 103 | + | |
| 104 | + <!--阶梯团是不显示的 | |
| 105 | + <block wx:if="{{kt_type!=3 || is_normal==1 }}"> | |
| 106 | + <view class="use-item" hidden='{{bn_exp_type==1}}'> | |
| 107 | + <view>使用物流:</view> | |
| 108 | + <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name"> | |
| 109 | + <view >{{wu_arr[index].name}}</view> | |
| 110 | + </picker> | |
| 111 | + </view> | |
| 112 | + </block>--> | |
| 113 | + | |
| 114 | + </view> | |
| 115 | + | |
| 116 | + | |
| 117 | + <view class="coupon-mes flex-vertical"> | |
| 118 | + <view>留言</view> | |
| 119 | + <view class="leave-word"> | |
| 120 | + <input placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></input> | |
| 121 | + | |
| 122 | + </view> | |
| 123 | + </view> | |
| 124 | + </block> | |
| 125 | + | |
| 126 | + <view class="information bdr14"> | |
| 127 | + <!-----使用余额------> | |
| 128 | + <view class="set-mes" wx:if="{{userinfo.user_money>0 && yuer>0}}"> | |
| 129 | + <view class="use-item" bindtap='set_bn_useyuer' style="padding-left:0;padding-right:0;"> | |
| 130 | + <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 131 | + <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 132 | + </view> | |
| 133 | + </view> | |
| 134 | + <view class="item" wx:if="{{kt_type<3 || is_normal==1}}"> | |
| 135 | + <view>商品金额</view> | |
| 136 | + <view class="co-red">¥ {{formData.all_price}}元</view> | |
| 137 | + </view> | |
| 138 | + | |
| 139 | + <view class="item" wx:else> | |
| 140 | + <view>定金金额</view> | |
| 141 | + <view class="co-red">¥ {{formData.all_price}}元</view> | |
| 142 | + </view> | |
| 143 | + | |
| 144 | + <view class="item" wx:if="{{formData.shipping_price>0}}"> | |
| 145 | + <view>配送费用</view> | |
| 146 | + <view class="co-red">¥ {{formData.shipping_price}}元</view> | |
| 147 | + </view> | |
| 148 | + <view class="item" wx:if="{{formData.user_money>0}}"> | |
| 149 | + <view>使用余额</view> | |
| 150 | + <view class="co-red">- ¥ {{formData.user_money}}元</view> | |
| 151 | + </view> | |
| 152 | + | |
| 153 | + </view> | |
| 154 | + </view> | |
| 155 | + | |
| 156 | + <view class="btn-wrap"> | |
| 157 | + <view class="pay-amount"> | |
| 158 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 159 | + <!-- <view class="co-red big"></view> --> | |
| 160 | + </view> | |
| 161 | + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 162 | + </view> | |
| 163 | +</form> | |
| 164 | + | |
| 165 | +<!----弹起选择物流名的列表----> | |
| 166 | +<view wx:if='{{open_express==1}}' > | |
| 167 | + <view class="cover-layer flex-center " bindtap='close_express'> | |
| 168 | + </view> | |
| 169 | + | |
| 170 | + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" > | |
| 171 | + <view class="tops flex"> | |
| 172 | + <view class="top-content fs32"> | |
| 173 | + <view> | |
| 174 | + 选择物流名字 | |
| 175 | + </view> | |
| 176 | + </view> | |
| 177 | + <view class="close-frame" bindtap='close_express' > | |
| 178 | + <view class="xc-close-express">×</view> | |
| 179 | + </view> | |
| 180 | + </view> | |
| 181 | + <view class="express_list"> | |
| 182 | + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | |
| 183 | + <view class="express_list_frame" bindtap="click_express_name" | |
| 184 | + data-shippingcode="{{express_list.shipping_code}}" | |
| 185 | + data-name="{{express_list.name}}" data-idxe="{{idx}}"> | |
| 186 | + | |
| 187 | + <block wx:if="{{is_express==idx}}"> | |
| 188 | + <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> | |
| 189 | + </block> | |
| 190 | + <block wx:else> | |
| 191 | + <view class="circle xc-hooks"></view> | |
| 192 | + </block> | |
| 193 | + <view class="fs30">{{express_list.name}}</view> | |
| 194 | + | |
| 195 | + </view> | |
| 196 | + </view> | |
| 197 | + </view> | |
| 198 | + <view class="flex click-buttem" > | |
| 199 | + <view class="xc-determine flex-center" bindtap="determine_expres"> | |
| 200 | + <view class="flex-vertical t-c">确定</view> | |
| 201 | + </view> | |
| 202 | + <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | |
| 203 | + <view class="flex-vertical t-c">设为默认</view> | |
| 204 | + </view> | |
| 205 | + </view> | |
| 206 | + | |
| 207 | + </view > | |
| 208 | +</view> | |
| 209 | + | |
| 210 | +<warn id="warn"></warn> | ... | ... |
packageA/pages/serviceCard_pd/cart/cart.wxss
0 → 100644
| 1 | +.bdr_t-14 { | |
| 2 | + border-top-left-radius: 14rpx; | |
| 3 | + border-top-right-radius: 14rpx; | |
| 4 | +} | |
| 5 | +.bdr_b-14 { | |
| 6 | + border-bottom-left-radius: 14rpx; | |
| 7 | + border-bottom-right-radius: 14rpx; | |
| 8 | +} | |
| 9 | +.bdr14 { | |
| 10 | + border-radius: 14rpx; | |
| 11 | +} | |
| 12 | +.mgt20 { | |
| 13 | + margin-top: 20rpx; | |
| 14 | +} | |
| 15 | +.shadow { | |
| 16 | + box-shadow: 0 4rpx 12px #e7e9eb; | |
| 17 | +} | |
| 18 | +.shadow-1 { | |
| 19 | + box-shadow: 16rpx 0px 12px #e7e9eb; | |
| 20 | +} | |
| 21 | + | |
| 22 | + | |
| 23 | +page { | |
| 24 | + /* background-color: #FAFAFA; */ | |
| 25 | + background-color: #F0F0F0; | |
| 26 | + padding: 0 22rpx; | |
| 27 | + box-sizing: border-box; | |
| 28 | +} | |
| 29 | +.container { | |
| 30 | + background-color: #F0F0F0; | |
| 31 | + /* padding-top: 28rpx; */ | |
| 32 | + padding-bottom: 120rpx; | |
| 33 | +} | |
| 34 | +.user-mes { | |
| 35 | + position: relative; | |
| 36 | + background-color: #fff; | |
| 37 | + font-size: 32rpx; | |
| 38 | + color: #444; | |
| 39 | + /* margin-top: 28rpx; */ | |
| 40 | + border-radius: 14rpx; | |
| 41 | +} | |
| 42 | +.user-contact { | |
| 43 | + padding: 24rpx 26rpx; | |
| 44 | + font-weight: 600; | |
| 45 | +} | |
| 46 | + | |
| 47 | +.location { | |
| 48 | + position: relative; | |
| 49 | + padding: 0 70rpx 24rpx; | |
| 50 | +} | |
| 51 | + | |
| 52 | +.pos-icon { | |
| 53 | + position: absolute; | |
| 54 | + left: 28rpx; | |
| 55 | + top: 6rpx; | |
| 56 | + width: 30rpx; | |
| 57 | + height: 36rpx; | |
| 58 | +} | |
| 59 | + | |
| 60 | +.border-img { | |
| 61 | + width: 100%; | |
| 62 | + height: 12rpx; | |
| 63 | +} | |
| 64 | + | |
| 65 | +.update-logistics { | |
| 66 | + position: absolute; | |
| 67 | + right: 0; | |
| 68 | + top: 0; | |
| 69 | + width: 80rpx; | |
| 70 | + height: 100%; | |
| 71 | + display: flex; | |
| 72 | + align-items: center; | |
| 73 | + justify-content: center; | |
| 74 | +} | |
| 75 | + | |
| 76 | +.arrow-rigth { | |
| 77 | + width: 32rpx; | |
| 78 | + height: 32rpx; | |
| 79 | +} | |
| 80 | + | |
| 81 | +.order-meg { | |
| 82 | + margin-bottom: 20rpx; | |
| 83 | + font-size: 28rpx; | |
| 84 | + | |
| 85 | +} | |
| 86 | + | |
| 87 | +.order-detail { | |
| 88 | + padding: 30rpx 0; | |
| 89 | + border-bottom: 2rpx solid #eee; | |
| 90 | + color: #777; | |
| 91 | + min-height: 190rpx; | |
| 92 | + background-color: #fff; | |
| 93 | + | |
| 94 | +} | |
| 95 | + | |
| 96 | +.goods-img { | |
| 97 | + float: left; | |
| 98 | + width: 200rpx; | |
| 99 | + height: 200rpx; | |
| 100 | + margin: 0 20rpx; | |
| 101 | +} | |
| 102 | + | |
| 103 | +.order-cont { | |
| 104 | + float: left; | |
| 105 | + width: 438rpx; | |
| 106 | +} | |
| 107 | + | |
| 108 | +.goods-name { | |
| 109 | + height: 74rpx; | |
| 110 | + line-height: 40rpx; | |
| 111 | + overflow: hidden; | |
| 112 | + margin-bottom: 16rpx; | |
| 113 | + font-size: 28rpx; | |
| 114 | + color: #333; | |
| 115 | + | |
| 116 | +} | |
| 117 | + | |
| 118 | +.goods-color { | |
| 119 | + font-size: 24rpx; | |
| 120 | +} | |
| 121 | + | |
| 122 | +.order-num { | |
| 123 | + margin-top: 25rpx; | |
| 124 | + font-size: 24rpx; | |
| 125 | + line-height: 42rpx; | |
| 126 | +} | |
| 127 | + | |
| 128 | +.set-mes{ | |
| 129 | + background-color: #fff; | |
| 130 | + /* margin-top: 20rpx; */ | |
| 131 | +} | |
| 132 | +.use-item{ | |
| 133 | + display: flex; | |
| 134 | + align-items: center; | |
| 135 | + height: 80rpx; | |
| 136 | + /* border-bottom: 1px solid #ddd; */ | |
| 137 | + font-size: 30rpx; | |
| 138 | + /* width:95%; | |
| 139 | +margin:auto; */ | |
| 140 | + padding: 0 26rpx; | |
| 141 | +} | |
| 142 | +.use-item>view{ | |
| 143 | + display: flex; | |
| 144 | + /* margin-right: 12rpx; */ | |
| 145 | +} | |
| 146 | +.use-item.bfff{ | |
| 147 | + background-color: #fff; | |
| 148 | +} | |
| 149 | +.use-item .dp{ | |
| 150 | + display: block; | |
| 151 | + width: 50rpx; | |
| 152 | + height: 50rpx; | |
| 153 | + margin-left: -6rpx; | |
| 154 | +} | |
| 155 | + | |
| 156 | +.set-item { | |
| 157 | + justify-content: space-between; | |
| 158 | + background-color: #fff; | |
| 159 | +} | |
| 160 | + | |
| 161 | +.set-btn { | |
| 162 | + display: flex; | |
| 163 | + font-size: 24rpx; | |
| 164 | +} | |
| 165 | + | |
| 166 | +.set-mes input { | |
| 167 | + width: 380rpx; | |
| 168 | + height: 50rpx; | |
| 169 | + line-height: 50rpx; | |
| 170 | + border: 1px solid #ddd; | |
| 171 | +} | |
| 172 | + | |
| 173 | +.use-btn { | |
| 174 | + width: 100rpx; | |
| 175 | + height: 50rpx; | |
| 176 | + margin-left: 20rpx; | |
| 177 | + line-height: 50rpx; | |
| 178 | + text-align: center; | |
| 179 | + background-color: #f23030; | |
| 180 | + color: #fff; | |
| 181 | +} | |
| 182 | + | |
| 183 | +.coupon-mes { | |
| 184 | + /* box-sizing: border-box; */ | |
| 185 | + height:95rpx; | |
| 186 | + padding: 0 26rpx; | |
| 187 | + background-color: #fff; | |
| 188 | + font-size: 30rpx; | |
| 189 | + color: #444; | |
| 190 | + /* width: 100%; */ | |
| 191 | + border-radius: 14rpx; | |
| 192 | + margin-top: 20rpx; | |
| 193 | + margin-bottom: 20rpx; | |
| 194 | +} | |
| 195 | + | |
| 196 | +.coupon-title { | |
| 197 | + display: flex; | |
| 198 | + justify-content: space-between; | |
| 199 | + align-items: center; | |
| 200 | + height: 92rpx; | |
| 201 | +} | |
| 202 | + | |
| 203 | +.coupon-title>view { | |
| 204 | + display: flex; | |
| 205 | +} | |
| 206 | + | |
| 207 | +.coupon-num { | |
| 208 | + height: 36rpx; | |
| 209 | + margin-left: 20rpx; | |
| 210 | + padding: 0 16rpx; | |
| 211 | + line-height: 36rpx; | |
| 212 | + text-align: center; | |
| 213 | + background-color: #f23030; | |
| 214 | + color: #fff; | |
| 215 | + font-size: 24rpx; | |
| 216 | +} | |
| 217 | + | |
| 218 | +.leave-word { | |
| 219 | + position: relative; | |
| 220 | + font-size: 24rpx; | |
| 221 | + margin-left: 20rpx; | |
| 222 | + flex-grow: 1; | |
| 223 | +} | |
| 224 | + | |
| 225 | +.word-box { | |
| 226 | + font-size: 26rpx; | |
| 227 | + /* width: 600rpx; */ | |
| 228 | + padding: 10rpx; | |
| 229 | + height: 28rpx; | |
| 230 | + line-height: 40rpx; | |
| 231 | +} | |
| 232 | + | |
| 233 | +.max-word { | |
| 234 | + position: absolute; | |
| 235 | + right: 0; | |
| 236 | + bottom: 0; | |
| 237 | +} | |
| 238 | + | |
| 239 | +.information { | |
| 240 | + padding: 0 26rpx; | |
| 241 | + background-color: #fff; | |
| 242 | + /* margin-bottom: 120rpx; */ | |
| 243 | +} | |
| 244 | + | |
| 245 | +.information .item { | |
| 246 | + display: flex; | |
| 247 | + justify-content: space-between; | |
| 248 | + height: 60rpx; | |
| 249 | + line-height: 60rpx; | |
| 250 | + font-size: 26rpx; | |
| 251 | + color: #777; | |
| 252 | +} | |
| 253 | + | |
| 254 | +.btn-wrap { | |
| 255 | + height: 94rpx; | |
| 256 | + box-sizing: border-box; | |
| 257 | + display: flex; | |
| 258 | + justify-content: space-between; | |
| 259 | + background-color: white; | |
| 260 | + align-items: center; | |
| 261 | + position: fixed; | |
| 262 | + bottom: 0; | |
| 263 | + left: 0; | |
| 264 | + width: 100%; | |
| 265 | + padding: 0 30rpx; | |
| 266 | +} | |
| 267 | + | |
| 268 | +.tips-btn { | |
| 269 | + /* float: right; | |
| 270 | + width: 200rpx; | |
| 271 | + height: 100rpx; | |
| 272 | + line-height: 100rpx; | |
| 273 | + text-align: center; | |
| 274 | + font-size: 30rpx; | |
| 275 | + color: #fff; | |
| 276 | + background-color: #f23030; */ | |
| 277 | + color: white; | |
| 278 | + background-color: #FE4445; | |
| 279 | + height: 72rpx; | |
| 280 | + line-height: 72rpx; | |
| 281 | + padding: 0 42rpx; | |
| 282 | + border-radius: 36rpx; | |
| 283 | + margin-left: 0; | |
| 284 | + margin-right: 0; | |
| 285 | +} | |
| 286 | + | |
| 287 | +.pay-amount { | |
| 288 | + /* float: right; | |
| 289 | + display: flex; | |
| 290 | + align-items: center; | |
| 291 | + height: 100rpx; | |
| 292 | + font-size: 26rpx; | |
| 293 | + margin-right: 40rpx; */ | |
| 294 | +} | |
| 295 | + | |
| 296 | +.payable { | |
| 297 | + color: #444; | |
| 298 | + /* margin-right: 20rpx; */ | |
| 299 | +} | |
| 300 | + | |
| 301 | +.shipping-modal { | |
| 302 | + z-index: 20; | |
| 303 | + position: fixed; | |
| 304 | + bottom: 0; | |
| 305 | + left: 0; | |
| 306 | + right: 0; | |
| 307 | + overflow-y: hidden; | |
| 308 | + color: #666666; | |
| 309 | + background-color: white; | |
| 310 | +} | |
| 311 | + | |
| 312 | +.shipping-nav { | |
| 313 | + text-align: center; | |
| 314 | + font-size: 35rpx; | |
| 315 | + padding-top: 30rpx; | |
| 316 | +} | |
| 317 | + | |
| 318 | +.shipping-list { | |
| 319 | + padding: 20rpx 30rpx 40rpx; | |
| 320 | + font-size: 28rpx; | |
| 321 | +} | |
| 322 | + | |
| 323 | +.shipping-item { | |
| 324 | + display: block; | |
| 325 | + padding: 20rpx 0; | |
| 326 | +} | |
| 327 | + | |
| 328 | +.shipping-btn { | |
| 329 | + width: 100%; | |
| 330 | + color: white; | |
| 331 | + background-color: #f23030; | |
| 332 | + line-height: 90rpx; | |
| 333 | + text-align: center; | |
| 334 | + font-size: 40rpx; | |
| 335 | +} | |
| 336 | + | |
| 337 | +/*----------nyf新增,地址---------*/ | |
| 338 | +.add_new{ | |
| 339 | + height: 90rpx; | |
| 340 | + display: flex; | |
| 341 | + align-items: center; | |
| 342 | + padding: 0 26rpx; | |
| 343 | +} | |
| 344 | +.addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; | |
| 345 | + margin-right: 15rpx;vertical-align: middle;} | |
| 346 | +.yu_er{ | |
| 347 | + margin-left: 10rpx; | |
| 348 | + /* margin-right: 60rpx; */ | |
| 349 | +} | |
| 350 | +.wuliu{margin-left: 20rpx;} | |
| 351 | + | |
| 352 | + | |
| 353 | +/*---- 优惠券列表 -----*/ | |
| 354 | +.xc-coupon-frame{ | |
| 355 | + width: 100%; | |
| 356 | + height: 92rpx; | |
| 357 | + | |
| 358 | +} | |
| 359 | +.xc-coupon-frame .work-frame{ | |
| 360 | + width: 100%; | |
| 361 | + height: 100%; | |
| 362 | + border-bottom:3rpx solid #eee; | |
| 363 | + padding: 0 26rpx; | |
| 364 | + background-color: white; | |
| 365 | +} | |
| 366 | +.xc-right{ | |
| 367 | + width:20rpx; | |
| 368 | + height:20rpx; | |
| 369 | + border-top:2rpx solid #000; | |
| 370 | + border-right:2rpx solid #000; | |
| 371 | + transform:rotate(45deg); | |
| 372 | + display:inline-block; | |
| 373 | +} | |
| 374 | + | |
| 375 | +.xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; } | |
| 376 | +.xc-right-frame{font-size: 30rpx;line-height: 92rpx; margin-right: 10rpx } | |
| 377 | + | |
| 378 | +/* 自定义弹出窗口 */ | |
| 379 | +.cx-popup{ | |
| 380 | + width:100%; | |
| 381 | + height:880rpx; | |
| 382 | + background: #fff; | |
| 383 | + z-index: 35; | |
| 384 | + border-top-left-radius: 20rpx; | |
| 385 | + border-top-right-radius: 20rpx; | |
| 386 | + position:fixed; | |
| 387 | + bottom:0; | |
| 388 | + left: 0; | |
| 389 | + /* padding-bottom: 25rpx; */ | |
| 390 | +} | |
| 391 | + | |
| 392 | +.cx-popup .top{ | |
| 393 | + width:95%; | |
| 394 | + height:100rpx; | |
| 395 | + border-bottom:3rpx solid #ddd; | |
| 396 | + margin: auto; | |
| 397 | + margin-top: 30rpx; | |
| 398 | + | |
| 399 | +} | |
| 400 | +.xc-top-content{ | |
| 401 | + width: 93%; | |
| 402 | + height:85rpx; | |
| 403 | + padding-top: 30rpx; | |
| 404 | + font-size: 34rpx; | |
| 405 | + font-weight: 600; | |
| 406 | + | |
| 407 | +} | |
| 408 | + | |
| 409 | + | |
| 410 | +.xc-valid-coupon{ | |
| 411 | + width: 90%; | |
| 412 | + height:40rpx; | |
| 413 | + padding-top: 24rpx; | |
| 414 | + overflow: hidden; | |
| 415 | +} | |
| 416 | +.xc-frame{ | |
| 417 | + width: 100%; | |
| 418 | + height:60%; | |
| 419 | +} | |
| 420 | + | |
| 421 | +.xc-frame .list-frame{ | |
| 422 | + width: 95%; | |
| 423 | + height: 100%; | |
| 424 | + overflow-y:scroll; | |
| 425 | + | |
| 426 | +} | |
| 427 | +.xc-close-frame{ | |
| 428 | + margin-top:-10rpx; | |
| 429 | + | |
| 430 | +} | |
| 431 | + | |
| 432 | +.xc-close{ | |
| 433 | + width: 37rpx; | |
| 434 | +height: 37rpx; | |
| 435 | +border-radius: 50%; | |
| 436 | +border: 3rpx solid #333; | |
| 437 | +text-align: center; | |
| 438 | +line-height: 34rpx; | |
| 439 | +font-size: 29rpx; | |
| 440 | +color: #333; | |
| 441 | + | |
| 442 | +} | |
| 443 | +.xc-money{ | |
| 444 | + color: #af2346; | |
| 445 | + font-size: 35rpx; | |
| 446 | +} | |
| 447 | + | |
| 448 | +.xc-money-frame{ | |
| 449 | + margin-left:35rpx; | |
| 450 | + | |
| 451 | +} | |
| 452 | +.xc-coupon-effect{ | |
| 453 | + width: 99%; | |
| 454 | + min-height: 100rpx; | |
| 455 | + border-bottom:3rpx solid #ddd; | |
| 456 | + | |
| 457 | + | |
| 458 | +} | |
| 459 | +.xc-goods-coupon{ | |
| 460 | + width: 85%; | |
| 461 | + height:100%; | |
| 462 | + | |
| 463 | +} | |
| 464 | +.xc-title{ | |
| 465 | + width:50%; | |
| 466 | + margin-left:222rpx; | |
| 467 | + | |
| 468 | +} | |
| 469 | +.xc-coupon-money0{ | |
| 470 | + color: #c91e31; | |
| 471 | + font-size: 35rpx; | |
| 472 | + line-height: 40rpx; | |
| 473 | + | |
| 474 | +} | |
| 475 | +.xc-coupon-money{ | |
| 476 | + color: #c91e31; | |
| 477 | + font-size: 35rpx; | |
| 478 | + line-height: 40rpx; | |
| 479 | + padding-top: 10px; | |
| 480 | + | |
| 481 | +} | |
| 482 | +.xc-coupon-money1{ | |
| 483 | + color: #444; | |
| 484 | + font-size: 28rpx; | |
| 485 | + line-height: 60rpx; | |
| 486 | + | |
| 487 | + | |
| 488 | +} | |
| 489 | +.xc-coupon-time{ | |
| 490 | + height: 50rpx; | |
| 491 | + font-size: 27rpx; | |
| 492 | + color: #a4a4a4; | |
| 493 | +} | |
| 494 | +.xc-coupon-time .time{ | |
| 495 | + margin-left: 15rpx; | |
| 496 | + font-size: 27rpx; | |
| 497 | +} | |
| 498 | +.xc-coupon-selection{ | |
| 499 | + height:100%; | |
| 500 | +} | |
| 501 | + | |
| 502 | +.xc-confirm { | |
| 503 | + width: 50%; | |
| 504 | + border-radius: 50rpx; | |
| 505 | + height: 80rpx; | |
| 506 | + margin:0 auto; | |
| 507 | + background:#d60021; | |
| 508 | + color:#fff; | |
| 509 | + font-size:28rpx; | |
| 510 | + margin-top: 28rpx; | |
| 511 | +} | |
| 512 | + | |
| 513 | +.up{ animation: up .7s; } | |
| 514 | +.down{ animation: down 1s; } | |
| 515 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | |
| 516 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | |
| 517 | + | |
| 518 | +.xc-not-Selection{ | |
| 519 | + width: 40rpx; | |
| 520 | +height: 40rpx; | |
| 521 | + background: #eeeeee; | |
| 522 | +} | |
| 523 | + | |
| 524 | + | |
| 525 | +.xc-close-express{ | |
| 526 | + width: 40rpx; | |
| 527 | +height: 40rpx; | |
| 528 | +border-radius: 50%; | |
| 529 | +border: 3rpx solid #333; | |
| 530 | +text-align: center; | |
| 531 | +font-size:32rpx; | |
| 532 | +line-height: 38rpx; | |
| 533 | +color: #333; | |
| 534 | +margin-top: 5rpx; | |
| 535 | +} | |
| 536 | +.cx-popup .tops{ | |
| 537 | + width: 100%; | |
| 538 | +height: 145rpx; | |
| 539 | +border-bottom: 3rpx solid #eee; | |
| 540 | + | |
| 541 | +} | |
| 542 | +.top-content { | |
| 543 | + width: 82%; | |
| 544 | +padding-top: 33px; | |
| 545 | +height: 100%; | |
| 546 | +padding-left: 40rpx; | |
| 547 | +} | |
| 548 | +.close-frame{ | |
| 549 | + margin-top: 30rpx; | |
| 550 | + | |
| 551 | +} | |
| 552 | + | |
| 553 | +.xc-hook { | |
| 554 | +width: 33rpx; | |
| 555 | +height: 33rpx; | |
| 556 | +transform: rotate(-135deg); | |
| 557 | +line-height: 35rpx; | |
| 558 | +text-align: center; | |
| 559 | +margin-right: 20rpx | |
| 560 | + | |
| 561 | + | |
| 562 | +} | |
| 563 | +.xc-hooks { | |
| 564 | +width: 30rpx; | |
| 565 | +height: 30rpx; | |
| 566 | +border: 1rpx solid #999; | |
| 567 | +margin-right: 20rpx; | |
| 568 | +} | |
| 569 | +.express_list_frame{ | |
| 570 | + display: flex; | |
| 571 | +height: 80rpx; | |
| 572 | +align-items: center; | |
| 573 | +padding-left: 40rpx; | |
| 574 | +border-bottom: 1rpx solid #eee; | |
| 575 | + | |
| 576 | +} | |
| 577 | +.express_list{ | |
| 578 | + width: 100%; | |
| 579 | + height: 65%; | |
| 580 | + overflow-y: auto; | |
| 581 | + margin-bottom: 40rpx; | |
| 582 | + | |
| 583 | +} | |
| 584 | +.xc-confirms { | |
| 585 | + box-sizing: border-box; | |
| 586 | + width: 40%; | |
| 587 | + border-radius: 50rpx; | |
| 588 | + height: 80rpx; | |
| 589 | + margin:0 auto; | |
| 590 | + font-size:28rpx; | |
| 591 | + background: #fff; | |
| 592 | + color: #333; | |
| 593 | + border: 2rpx solid #333; | |
| 594 | +} | |
| 595 | + | |
| 596 | + | |
| 597 | +/* 优惠券的改版样式 */ | |
| 598 | +.xc-coupon-frame{ | |
| 599 | + /* width: 710rpx; */ | |
| 600 | + width: 100%; | |
| 601 | + height:auto; | |
| 602 | + margin: 0 auto; | |
| 603 | + | |
| 604 | +} | |
| 605 | +.xc-coupon-frame .coupon-frame{ | |
| 606 | + width: 100%; | |
| 607 | + height: 200rpx; | |
| 608 | + margin-top:10rpx; | |
| 609 | + border-bottom: 1rpx solid #eee; | |
| 610 | + | |
| 611 | +} | |
| 612 | +.xc-coupon-frame .coupon-frame .coupon-left{ | |
| 613 | + width: 215rpx; | |
| 614 | + height:100%; | |
| 615 | + overflow: hidden; | |
| 616 | +} | |
| 617 | +.xc-money-frames{ | |
| 618 | + width:96%; | |
| 619 | + margin-top: -10px; | |
| 620 | +} | |
| 621 | + | |
| 622 | +.xc-rmb-symbol{ | |
| 623 | + font-size:40rpx; | |
| 624 | + | |
| 625 | +} | |
| 626 | + | |
| 627 | +.xc-rmb-val{ | |
| 628 | + font-size:60rpx; | |
| 629 | + | |
| 630 | +} | |
| 631 | +.coupon-explain{ | |
| 632 | + font-size:25rpx; | |
| 633 | +width:100%; | |
| 634 | + | |
| 635 | + | |
| 636 | +} | |
| 637 | +.xc-valuer{ | |
| 638 | + margin-top:39rpx; | |
| 639 | + margin-left:28rpx; | |
| 640 | + font-size:25rpx; | |
| 641 | +} | |
| 642 | +.coupon-frame .oval{ | |
| 643 | + width:155rpx; | |
| 644 | + height:83rpx; | |
| 645 | + border-radius: 50%; | |
| 646 | + right:-78rpx; | |
| 647 | + top:-37rpx; | |
| 648 | +} | |
| 649 | +.coupon-right{ | |
| 650 | + /* width:490rpx; */ | |
| 651 | + height: 99%; | |
| 652 | + border-top: 1rpx solid #eaeaea; | |
| 653 | + /* //border-bottom: 1rpx solid #eaeaea; */ | |
| 654 | + border-right: 1rpx solid #eaeaea; | |
| 655 | + flex-grow: 1; | |
| 656 | +} | |
| 657 | +.coupon-annotation{ | |
| 658 | + width: 95%; | |
| 659 | + height: 100%; | |
| 660 | + | |
| 661 | +} | |
| 662 | +.xc-brand{ | |
| 663 | + width:100rpx; | |
| 664 | + height:35rpx; | |
| 665 | + line-height: 35rpx; | |
| 666 | + font-size:21rpx; | |
| 667 | + border-radius:10rpx; position: relative; top:-1px; | |
| 668 | + margin-right: 8rpx | |
| 669 | +} | |
| 670 | +.top-frame{ | |
| 671 | + width:82%; | |
| 672 | + height: 75rpx; | |
| 673 | + margin-top:10rpx; | |
| 674 | +} | |
| 675 | +.top-frame .coupon-wode{ | |
| 676 | + font-size: 25rpx; | |
| 677 | + margin-left:10rpx; | |
| 678 | + width:340rpx; | |
| 679 | + height:88rpx; | |
| 680 | +} | |
| 681 | +.coupon-code{ | |
| 682 | + width:60rpx; | |
| 683 | + height:60rpx; | |
| 684 | + margin-top:5rpx; | |
| 685 | + | |
| 686 | +} | |
| 687 | +.frame{ | |
| 688 | + width: 100% | |
| 689 | +} | |
| 690 | +.coupon-time{ | |
| 691 | + font-size: 23rpx; | |
| 692 | + line-height:33rpx; | |
| 693 | + color: #333; | |
| 694 | +} | |
| 695 | + | |
| 696 | +.clik-get{ | |
| 697 | + width:125rpx; | |
| 698 | + height:45rpx; | |
| 699 | + border-radius: 25rpx; | |
| 700 | + line-height: 45rpx; | |
| 701 | + font-size:25rpx; | |
| 702 | + bottom:67rpx; | |
| 703 | + right:6px; | |
| 704 | +} | |
| 705 | + | |
| 706 | +.code-img{ | |
| 707 | + margin-left:20rpx; | |
| 708 | +} | |
| 709 | +.bottmo-explain{ | |
| 710 | +top:145rpx; | |
| 711 | +width:94%; | |
| 712 | +border-top:1rpx dashed #eee; | |
| 713 | +padding-top:8rpx; | |
| 714 | +height:38rpx; | |
| 715 | +line-height: 51rpx; | |
| 716 | + | |
| 717 | +} | |
| 718 | +.font-word{ | |
| 719 | + font-size: 22rpx; | |
| 720 | +} | |
| 721 | +.circle-size{ | |
| 722 | + background: #a0a0a0; | |
| 723 | + width: 27rpx; | |
| 724 | + height: 27rpx; | |
| 725 | + margin-top:13rpx; | |
| 726 | +margin-left:8rpx; | |
| 727 | +display: flex; | |
| 728 | + | |
| 729 | +align-items: center; | |
| 730 | +} | |
| 731 | +.xc-jiantou{ | |
| 732 | + /* width: 9rpx; | |
| 733 | + height: 9rpx; */ | |
| 734 | + /* border-top: 2rpx solid #fff; | |
| 735 | + border-right: 2rpx solid #fff; */ | |
| 736 | + transform: rotate(-90deg); | |
| 737 | + color: #fff; | |
| 738 | + font-size: 15rpx; | |
| 739 | + /* display:inline-block; | |
| 740 | + margin-top: 6.5rpx; */ | |
| 741 | + text-align: center; | |
| 742 | +width: 24rpx; | |
| 743 | +} | |
| 744 | +.xc-buttom{ | |
| 745 | + box-sizing: border-box; | |
| 746 | + width:100%; | |
| 747 | + min-height:76rpx; | |
| 748 | + height:auto; | |
| 749 | + line-height:40rpx; | |
| 750 | + border-left:1rpx solid #eee; | |
| 751 | + border-right:1rpx solid #eee; | |
| 752 | + border-bottom:1rpx solid #eee; | |
| 753 | +/* margin-left: 6rpx; */ | |
| 754 | +} | |
| 755 | + | |
| 756 | +.goods-num{ | |
| 757 | + font-size: 28rpx; | |
| 758 | + color: #333; | |
| 759 | +} | |
| 760 | + | |
| 761 | +.explain-coupon{ | |
| 762 | + font-size:25rpx; | |
| 763 | + padding: 10rpx 10rpx | |
| 764 | +} | |
| 765 | +.circle-frame{ | |
| 766 | + width: 20rpx; | |
| 767 | + height: auto; | |
| 768 | + z-index:1; | |
| 769 | + left:210rpx; | |
| 770 | + | |
| 771 | +} | |
| 772 | +.circle-sawtooth{ | |
| 773 | + width: 11rpx; | |
| 774 | + height: 11rpx; | |
| 775 | + background: #fff; | |
| 776 | +} | |
| 777 | + | |
| 778 | +.red{background-color: #fe7496;} | |
| 779 | +.green{ background-color: #22c7c1;} | |
| 780 | +.blue{background-color:#5e82e3;} | |
| 781 | +.g_gray{background-color: #aaaaaa} | |
| 782 | + | |
| 783 | +.f_text{text-align: center; height:96rpx; } | |
| 784 | +.xc-hook.sn { | |
| 785 | + margin-top:12%; | |
| 786 | +width:45rpx; | |
| 787 | +height:45rpx; | |
| 788 | +font-size:28rpx; | |
| 789 | +line-height:44rpx; | |
| 790 | + | |
| 791 | + | |
| 792 | +} | |
| 793 | +.xc-hooks.on{ | |
| 794 | + margin-top:12%; | |
| 795 | +width:42rpx; | |
| 796 | +height:42rpx; | |
| 797 | +} | |
| 798 | +.may_use_coupon{ | |
| 799 | + /* width: 95%; */ | |
| 800 | + /* height: 68rpx; */ | |
| 801 | + line-height:78rpx; | |
| 802 | + padding: 0 26rpx; | |
| 803 | + justify-content: space-between; | |
| 804 | + align-items: center; | |
| 805 | +} | |
| 806 | +.determine-frame{ | |
| 807 | + width: 100%; | |
| 808 | + height: 130rpx; | |
| 809 | + | |
| 810 | +} | |
| 811 | +.xc-determine{ | |
| 812 | + height: 80rpx; | |
| 813 | + width: 40%; | |
| 814 | + border-radius: 50rpx; | |
| 815 | +background: #d60021; | |
| 816 | +color: #fff; | |
| 817 | +font-size: 28rpx; | |
| 818 | +margin: 0 auto; | |
| 819 | + | |
| 820 | +} | |
| 821 | +.click-buttem{ | |
| 822 | +width: 90%; | |
| 823 | +margin: auto; | |
| 824 | +} | |
| 825 | +.logistics-name{ | |
| 826 | + margin-right:20rpx; | |
| 827 | +} | |
| 828 | +.xc-border{ | |
| 829 | + border-top:8rpx solid #eee; | |
| 830 | +width: 100% | |
| 831 | +} | |
| 832 | +.main-top{ | |
| 833 | +margin-top: 20rpx; | |
| 834 | + | |
| 835 | +} | |
| 836 | +.xc-hookts{ | |
| 837 | +border: 1rpx solid #999; | |
| 838 | + | |
| 839 | +} | |
| 840 | +.xc-hookts.on{ | |
| 841 | + width:30rpx; | |
| 842 | +height:30rpx; | |
| 843 | + | |
| 844 | +} | |
| 845 | +.xc-hookt.sn{ | |
| 846 | + width: 32rpx; | |
| 847 | +height: 32rpx; | |
| 848 | +font-size: 28rpx; | |
| 849 | +line-height: 34rpx; | |
| 850 | +} | |
| 851 | +.xc-hookt{ | |
| 852 | + transform: rotate(-135deg); | |
| 853 | +text-align: center; | |
| 854 | + | |
| 855 | +} | |
| 856 | +.main-bottom{ | |
| 857 | + margin-bottom: 20rpx; | |
| 858 | + | |
| 859 | +} | |
| 860 | +.xc-hookst{ | |
| 861 | + border: 1rpx solid #999; | |
| 862 | + | |
| 863 | +} | |
| 864 | +.xc-hookst.ons{ | |
| 865 | + width: 42rpx; | |
| 866 | +height: 42rpx; | |
| 867 | +margin-left: 20rpx; | |
| 868 | + | |
| 869 | +} | |
| 870 | +.is_use_coupon{ | |
| 871 | + width: 65%; | |
| 872 | +justify-content: flex-end; | |
| 873 | +padding-top: 10rpx; | |
| 874 | + | |
| 875 | + | |
| 876 | +} | |
| 877 | +.xc-hooka{ | |
| 878 | + transform: rotate(-135deg); | |
| 879 | +text-align: center; | |
| 880 | + | |
| 881 | +} | |
| 882 | +.xc-hooka.sn{ | |
| 883 | + width: 45rpx; | |
| 884 | +height: 45rpx; | |
| 885 | +font-size: 28rpx; | |
| 886 | +line-height: 44rpx; | |
| 887 | +margin-left: 20rpx; | |
| 888 | + | |
| 889 | +} | |
| 890 | +.color-gray{ | |
| 891 | + color: #808080; | |
| 892 | +} | |
| 893 | +.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | |
| 894 | +.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} | |
| 895 | + | |
| 896 | +.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;} | |
| 897 | + | |
| 898 | +.navigator-hover { | |
| 899 | + background: none; | |
| 900 | + opacity: 1; | |
| 901 | +} | |
| 902 | + | |
| 903 | +.plus_buy{ | |
| 904 | + background-color: #fff; | |
| 905 | + margin:15rpx 0; | |
| 906 | + padding: 20rpx 10rpx; | |
| 907 | + position: relative; | |
| 908 | +} | |
| 909 | + | |
| 910 | + | |
| 911 | +.card_bg { | |
| 912 | + box-sizing: border-box; | |
| 913 | + padding: 2rpx 10rpx; | |
| 914 | + height: 28rpx; | |
| 915 | + border-radius: 26rpx; | |
| 916 | + font-size: 18rpx; | |
| 917 | + line-height: 28rpx; | |
| 918 | + max-width: 210rpx; | |
| 919 | + background: #333; | |
| 920 | + color: #fff; | |
| 921 | + margin-left: 8rpx; | |
| 922 | + position:relative; | |
| 923 | + top:7rpx; | |
| 924 | +} | |
| 925 | + | |
| 926 | +.card_bg image { | |
| 927 | + width: 19rpx; | |
| 928 | + height: 19rpx; | |
| 929 | + margin-right: 8rpx; | |
| 930 | +} | |
| 931 | + | |
| 932 | +/* .card_bg .card_name { | |
| 933 | + max-width: 76rpx; | |
| 934 | + width: auto; | |
| 935 | + overflow: hidden; | |
| 936 | + white-space: nowrap; | |
| 937 | +} */ | |
| 938 | + | |
| 939 | +.card_name { | |
| 940 | + position: relative; | |
| 941 | + top: -4rpx; | |
| 942 | + margin-left: 6px; | |
| 943 | +} | |
| 944 | + | |
| 945 | +.car_tri_up { | |
| 946 | + width: 0;height: 0; | |
| 947 | + border-left: 20rpx solid transparent; | |
| 948 | + border-right: 20rpx solid transparent; | |
| 949 | + border-bottom: 20rpx solid #fff; | |
| 950 | + position: absolute; | |
| 951 | + right: 20rpx; | |
| 952 | + top:-10rpx | |
| 953 | +} | |
| 954 | +.card_op{ | |
| 955 | + position: absolute; | |
| 956 | + right: 20rpx; | |
| 957 | + top:36rpx | |
| 958 | +} | |
| 959 | + | |
| 960 | + | |
| 961 | +.tab-container { | |
| 962 | + font-size: 28rpx; | |
| 963 | + margin-top: 20rpx; | |
| 964 | + display: flex; | |
| 965 | +} | |
| 966 | + | |
| 967 | +.tab-wrapper { | |
| 968 | + background-color: #ccc; | |
| 969 | + display: flex; | |
| 970 | + border-radius: 40rpx; | |
| 971 | + overflow: hidden; | |
| 972 | +} | |
| 973 | + | |
| 974 | +.tab { | |
| 975 | + padding: 20rpx 30rpx; | |
| 976 | + | |
| 977 | +} | |
| 978 | + | |
| 979 | + | |
| 980 | +.tab.active { | |
| 981 | + background-color: white; | |
| 982 | + border-radius: 40rpx; | |
| 983 | +} | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/buy_flash_normal.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> | |
| 2 | + <view class="spec-model"> | |
| 3 | + <view class="pding"> | |
| 4 | + <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 5 | + <view class="spec-goods"> | |
| 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 7 | + <view class="spec-goods-info"> | |
| 8 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | |
| 9 | + <view class="flex ai_end xc-val-money"> | |
| 10 | + <text class="fs20">¥</text> | |
| 11 | + <!-- 如果是等级会员,且有等级价 --> | |
| 12 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | |
| 13 | + <block wx:else>{{sele_g.shop_price}}</block> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + <view class="flex"> | |
| 17 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 18 | + <block wx:if="{{sales_rules==2}}"> | |
| 19 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
| 20 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 21 | + </block> | |
| 22 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 23 | + </view> | |
| 24 | + | |
| 25 | + | |
| 26 | + </view> | |
| 27 | + | |
| 28 | + <!-- 选择门店模块 --> | |
| 29 | + <view class="flex-space-between address ai_end xc-width "> | |
| 30 | + | |
| 31 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 32 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 33 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 34 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 35 | + | |
| 36 | + </view> | |
| 37 | + </view> | |
| 38 | + | |
| 39 | + <!-- 没有门店的时候 --> | |
| 40 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 41 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 42 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 43 | + </view> | |
| 44 | + | |
| 45 | + <view class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
| 46 | + </view> | |
| 47 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 48 | + <block wx:else> | |
| 49 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 50 | + <block wx:else> | |
| 51 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 52 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
| 53 | + </block> | |
| 54 | + </block> | |
| 55 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 56 | + | |
| 57 | + | |
| 58 | + <!--商品的属性项目--> | |
| 59 | + <view class="xc-goods-attribute"> | |
| 60 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 61 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 62 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
| 63 | + {{item.gg}} | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + </view> | |
| 67 | + | |
| 68 | + <view class="b_num"> | |
| 69 | + <view>购买数量</view> | |
| 70 | + <view class="count"> | |
| 71 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 72 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 73 | + <view bindtap="addCartNum" class="add">+</view> | |
| 74 | + </view> | |
| 75 | + </view> | |
| 76 | + </view> | |
| 77 | + | |
| 78 | + | |
| 79 | + <!-- 提示再买多少优惠 --> | |
| 80 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 81 | + 再买{{hui_condition.need}} | |
| 82 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 83 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 84 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 85 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 86 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 87 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 88 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 89 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 90 | + </view> | |
| 91 | + | |
| 92 | + | |
| 93 | + <!-- 按钮部分 --> | |
| 94 | + <view class="spec-cart-btns"> | |
| 95 | + | |
| 96 | + <!-- 根本就找不到门店 --> | |
| 97 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 98 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 99 | + </block> | |
| 100 | + <block wx:else> | |
| 101 | + <!-- 根本就找不到门店 --> | |
| 102 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 103 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 104 | + </block> | |
| 105 | + <block wx:else> | |
| 106 | + | |
| 107 | + | |
| 108 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 109 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 110 | + </block> | |
| 111 | + <block wx:else> | |
| 112 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 113 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 114 | + </block> | |
| 115 | + <block wx:else> | |
| 116 | + <block wx:if="{{!def_pick_store}}"> | |
| 117 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 118 | + </block> | |
| 119 | + <block wx:else> | |
| 120 | + <block wx:if="{{data.store_count<=0}}"> | |
| 121 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 122 | + </block> | |
| 123 | + <block wx:else> | |
| 124 | + <view class="flex jc_sb"> | |
| 125 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 126 | + data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 127 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 128 | + data-action="buy">立即购买</view> | |
| 129 | + </view> | |
| 130 | + </block> | |
| 131 | + | |
| 132 | + </block> | |
| 133 | + </block> | |
| 134 | + </block> | |
| 135 | + </block> | |
| 136 | + </block> | |
| 137 | + </view> | |
| 138 | + | |
| 139 | + </view> | |
| 140 | + </view> | |
| 141 | + <view class="clear"></view> | |
| 0 | 142 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/buy_integral.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal_inte" class="cover-layer"></view> | |
| 2 | + <view class="spec-model"> | |
| 3 | + <view class="pding"> | |
| 4 | + <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 5 | + <view class="spec-goods"> | |
| 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 7 | + <view class="spec-goods-info"> | |
| 8 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | |
| 9 | + <view class="flex ai_end xc-val-money"> | |
| 10 | + <view class="spec-goods-price"> | |
| 11 | + <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> | |
| 12 | + <text wx:if="{{prom_integral && prom_price}}">+</text> | |
| 13 | + <text wx:if="{{prom_price}}">{{prom_price}}元</text> | |
| 14 | + <text wx:if="{{!prom_integral && !prom_price}}">0积分</text> | |
| 15 | + </view> | |
| 16 | + </view> | |
| 17 | + | |
| 18 | + | |
| 19 | + <view class="flex"> | |
| 20 | + <view class="spec-goods-stock">已售:{{prom_act.buy_num+prom_act.virtual}}</view> | |
| 21 | + <view class="spec-goods-stock">可售:{{prom_act.limitqty-prom_act.buy_num}}</view> | |
| 22 | + </view> | |
| 23 | + | |
| 24 | + </view> | |
| 25 | + | |
| 26 | + <!-- 选择门店模块 --> | |
| 27 | + <view class="flex-space-between address ai_end xc-width "> | |
| 28 | + | |
| 29 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 30 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 31 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 32 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 33 | + | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + | |
| 37 | + <!-- 没有门店的时候 --> | |
| 38 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 39 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 40 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 41 | + </view> | |
| 42 | + | |
| 43 | + <view class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | |
| 44 | + </view> | |
| 45 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 46 | + <block wx:else> | |
| 47 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 48 | + <block wx:else> | |
| 49 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 50 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
| 51 | + </block> | |
| 52 | + </block> | |
| 53 | + | |
| 54 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 55 | + | |
| 56 | + | |
| 57 | + <!--商品的属性项目--> | |
| 58 | + <view class="xc-goods-attribute"> | |
| 59 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 60 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 61 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | |
| 62 | + {{item.gg}} | |
| 63 | + </view> | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + | |
| 67 | + <view class="b_num"> | |
| 68 | + <view>购买数量</view> | |
| 69 | + <view class="count"> | |
| 70 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum_inte'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 71 | + <input bindblur="inputCartNum_inte" type="number" value="{{goodsInputNum}}"></input> | |
| 72 | + <view bindtap="addCartNum_inte" class="add">+</view> | |
| 73 | + </view> | |
| 74 | + </view> | |
| 75 | + </view> | |
| 76 | + | |
| 77 | + <!-- 按钮部分 --> | |
| 78 | + <view class="spec-cart-btns"> | |
| 79 | + <!-- 根本就找不到门店 --> | |
| 80 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 81 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 82 | + </block> | |
| 83 | + | |
| 84 | + <block wx:else> | |
| 85 | + | |
| 86 | + <!-- 根本就找不到门店 --> | |
| 87 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 88 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 89 | + </block> | |
| 90 | + <block wx:else> | |
| 91 | + | |
| 92 | + | |
| 93 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 94 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 95 | + </block> | |
| 96 | + <block wx:else> | |
| 97 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 98 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 99 | + </block> | |
| 100 | + <block wx:else> | |
| 101 | + <block wx:if="{{!def_pick_store}}"> | |
| 102 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 103 | + </block> | |
| 104 | + <block wx:else> | |
| 105 | + <block wx:if="{{data.store_count<=0}}"> | |
| 106 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 107 | + </block> | |
| 108 | + <block wx:else> | |
| 109 | + <view bindtap="addCart_inte" class="spec-cart-btn spec-buy" data-action="buy">立即兑换</view> | |
| 110 | + </block> | |
| 111 | + | |
| 112 | + </block> | |
| 113 | + </block> | |
| 114 | + </block> | |
| 115 | + </block> | |
| 116 | + </block> | |
| 117 | + </view> | |
| 118 | + | |
| 119 | + | |
| 120 | + </view> | |
| 121 | + </view> | |
| 122 | + <view class="clear"></view> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/buy_integral_normal.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view> | |
| 2 | + <view class="spec-model"> | |
| 3 | + <view class="pding"> | |
| 4 | + <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 5 | + <view class="spec-goods"> | |
| 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 7 | + <view class="spec-goods-info"> | |
| 8 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | |
| 9 | + <view class="flex ai_end xc-val-money"> | |
| 10 | + <text class="fs20">¥</text> | |
| 11 | + <!-- 如果是等级会员,且有等级价 --> | |
| 12 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | |
| 13 | + <block wx:else>{{sele_g.shop_price}}</block> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + <view class="flex"> | |
| 17 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 18 | + <block wx:if="{{sales_rules==2}}"> | |
| 19 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
| 20 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 21 | + </block> | |
| 22 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 23 | + </view> | |
| 24 | + | |
| 25 | + | |
| 26 | + </view> | |
| 27 | + | |
| 28 | + <!-- 选择门店模块 --> | |
| 29 | + <view class="flex-space-between address ai_end xc-width "> | |
| 30 | + | |
| 31 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 32 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 33 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 34 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 35 | + | |
| 36 | + </view> | |
| 37 | + </view> | |
| 38 | + | |
| 39 | + <!-- 没有门店的时候 --> | |
| 40 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 41 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 42 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 43 | + </view> | |
| 44 | + | |
| 45 | + <view class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
| 46 | + </view> | |
| 47 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 48 | + <block wx:else> | |
| 49 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 50 | + <block wx:else> | |
| 51 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 52 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
| 53 | + </block> | |
| 54 | + </block> | |
| 55 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 56 | + | |
| 57 | + | |
| 58 | + <!--商品的属性项目--> | |
| 59 | + <view class="xc-goods-attribute"> | |
| 60 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 61 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 62 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
| 63 | + {{item.gg}} | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + </view> | |
| 67 | + | |
| 68 | + <view class="b_num"> | |
| 69 | + <view>购买数量</view> | |
| 70 | + <view class="count"> | |
| 71 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 72 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 73 | + <view bindtap="addCartNum" class="add">+</view> | |
| 74 | + </view> | |
| 75 | + </view> | |
| 76 | + </view> | |
| 77 | + | |
| 78 | + | |
| 79 | + <!-- 提示再买多少优惠 --> | |
| 80 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 81 | + 再买{{hui_condition.need}} | |
| 82 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 83 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 84 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 85 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 86 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 87 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 88 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 89 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 90 | + </view> | |
| 91 | + | |
| 92 | + | |
| 93 | + <!-- 按钮部分 --> | |
| 94 | + <view class="spec-cart-btns"> | |
| 95 | + | |
| 96 | + | |
| 97 | + <!-- 根本就找不到门店 --> | |
| 98 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 99 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 100 | + </block> | |
| 101 | + <block wx:else> | |
| 102 | + <!-- 根本就找不到门店 --> | |
| 103 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 104 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 105 | + </block> | |
| 106 | + <block wx:else> | |
| 107 | + | |
| 108 | + | |
| 109 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 110 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 111 | + </block> | |
| 112 | + <block wx:else> | |
| 113 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 114 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 115 | + </block> | |
| 116 | + <block wx:else> | |
| 117 | + <block wx:if="{{!def_pick_store}}"> | |
| 118 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 119 | + </block> | |
| 120 | + <block wx:else> | |
| 121 | + <block wx:if="{{data.store_count<=0}}"> | |
| 122 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 123 | + </block> | |
| 124 | + <block wx:else> | |
| 125 | + <view class="flex jc_sb"> | |
| 126 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 127 | + data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 128 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 129 | + data-action="buy">立即购买</view> | |
| 130 | + </view> | |
| 131 | + </block> | |
| 132 | + | |
| 133 | + </block> | |
| 134 | + </block> | |
| 135 | + </block> | |
| 136 | + </block> | |
| 137 | + </block> | |
| 138 | + </view> | |
| 139 | + | |
| 140 | + | |
| 141 | + </view> | |
| 142 | + </view> | |
| 143 | + <view class="clear"></view> | |
| 0 | 144 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/buy_pt.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal" class="cover-layer"></view> | |
| 2 | + <view class="spec-model"> | |
| 3 | + <view class="pding"> | |
| 4 | + <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 5 | + | |
| 6 | + <!-- 商品名称 --> | |
| 7 | + <view class="spec-goods"> | |
| 8 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 9 | + <view class="spec-goods-info"> | |
| 10 | + <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | |
| 11 | + <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > | |
| 12 | + <view class="spec-goods-price" wx:if="{{is_normal==1}}" > | |
| 13 | + <!-- 如果是等级会员,且有等级价 --> | |
| 14 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | |
| 15 | + ¥ {{sele_g[card_field]}} | |
| 16 | + </block> | |
| 17 | + <block wx:else> | |
| 18 | + ¥ {{sele_g.shop_price}} | |
| 19 | + </block> | |
| 20 | + </view> | |
| 21 | + <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | |
| 22 | + </view> | |
| 23 | + | |
| 24 | + <block wx:if="{{is_normal==1}}"> | |
| 25 | + <view class="flex"> | |
| 26 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 27 | + <block wx:if="{{sales_rules==2}}"> | |
| 28 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
| 29 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 30 | + </block> | |
| 31 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 32 | + </view> | |
| 33 | + </block> | |
| 34 | + <block wx:if="{{is_normal==0}}"> | |
| 35 | + <view class="flex"> | |
| 36 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num}}</view> | |
| 37 | + <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | |
| 38 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | |
| 39 | + </view> | |
| 40 | + </block> | |
| 41 | + </view> | |
| 42 | + | |
| 43 | + </view> | |
| 44 | + | |
| 45 | + | |
| 46 | + <view style="clear: both"></view> | |
| 47 | + <view style="margin-top: 20rpx"> | |
| 48 | + <view class="flex-space-between address ai_end xc-width "> | |
| 49 | + | |
| 50 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 51 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 52 | + | |
| 53 | + | |
| 54 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 55 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 56 | + | |
| 57 | + </view> | |
| 58 | + </view> | |
| 59 | + | |
| 60 | + <!-- 没有门店的时候 --> | |
| 61 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 62 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 63 | + <view class="fs28 xc-ash-9f">选择门店</view> | |
| 64 | + </view> | |
| 65 | + | |
| 66 | + <view class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
| 67 | + </view> | |
| 68 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 69 | + <view class="no_store" wx:elif="{{is_normal && def_pick_store && def_pick_store.CanOutQty<=0}}">(库存不足)</view> | |
| 70 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.pickup_name}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 71 | + </view> | |
| 72 | + <!----商品的属性项目----> | |
| 73 | + <view> | |
| 74 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 75 | + <block wx:if="{{is_normal==0}}"> | |
| 76 | + <view hidden="{{ismend==1}}" class="flex"> | |
| 77 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} | |
| 78 | + </view> | |
| 79 | + </view> | |
| 80 | + </block> | |
| 81 | + | |
| 82 | + <block wx:else> | |
| 83 | + <view hidden="{{ismend==1}}" class="flex"> | |
| 84 | + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}" | |
| 85 | + bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">{{item.gg}}</view> | |
| 86 | + </view> | |
| 87 | + </block> | |
| 88 | + <view class="clear"></view> | |
| 89 | + </view> | |
| 90 | + | |
| 91 | + | |
| 92 | + <view> | |
| 93 | + <!--<view bindtap="getmendian" class="quhuo logistics-item" hidden="{{ismend==1}}">--> | |
| 94 | + <!--<view wx:if="{{sto_sele_name==''}}">取货门店--> | |
| 95 | + <!--<text class='small'>(选择门店)</text>--> | |
| 96 | + <!--</view>--> | |
| 97 | + <!--<view wx:else>{{sto_sele_name}}</view>--> | |
| 98 | + <!--<view class="item-img">--> | |
| 99 | + <!--<image class="wh100" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image>--> | |
| 100 | + <!--</view>--> | |
| 101 | + <!--</view>--> | |
| 102 | + | |
| 103 | + | |
| 104 | + <view class="b_num" hidden="{{ismend==1}}" style="margin-top: 20rpx"> | |
| 105 | + <view>购买数量</view> | |
| 106 | + <view class="count"> | |
| 107 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 108 | + <input bindblur="inputCartNum" class="xc-val-fream" type="number" value="{{goodsInputNum}}"></input> | |
| 109 | + <view bindtap="addCartNum" class="add">+</view> | |
| 110 | + </view> | |
| 111 | + </view> | |
| 112 | + | |
| 113 | + | |
| 114 | + <!-- 提示再买多少优惠 --> | |
| 115 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && is_normal==1}}"> | |
| 116 | + 再买{{hui_condition.need}} | |
| 117 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 118 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 119 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 120 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 121 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 122 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 123 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 124 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 125 | + </view> | |
| 126 | + | |
| 127 | + | |
| 128 | + <view class="clear"></view> | |
| 129 | + <!---当选取门店的时候会显示门店的选项----> | |
| 130 | + <view hidden="{{ismend==0}}" class="sto_v"> | |
| 131 | + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | |
| 132 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>选择门店 | |
| 133 | + </view> | |
| 134 | + <!-----第一级显示------> | |
| 135 | + <view class="itemlists" hidden="{{is_sec_mend==1}}"> | |
| 136 | + <block wx:if="{{is_show_sto_cat>0}}"> | |
| 137 | + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">{{item.name}}</view> | |
| 138 | + </block> | |
| 139 | + <block wx:else> | |
| 140 | + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">{{item.pickup_name}} | |
| 141 | + </view> | |
| 142 | + </block> | |
| 143 | + </view> | |
| 144 | + <!-----第二级显示------> | |
| 145 | + <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | |
| 146 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>{{sec_sto.name}}</view> | |
| 147 | + <view class="itemlists" hidden="{{is_sec_mend==0}}"> | |
| 148 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="index" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">{{item.pickup_name}} | |
| 149 | + </view> | |
| 150 | + </view> | |
| 151 | + </view> | |
| 152 | + </view> | |
| 153 | + </view> | |
| 154 | + <view class="pt_qd"> | |
| 155 | + <block wx:if="{{is_normal==1}}"> | |
| 156 | + <!-- 按钮部分 --> | |
| 157 | + <view class="spec-cart-btns"> | |
| 158 | + <!-- 根本就找不到门店 --> | |
| 159 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 160 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 161 | + </block> | |
| 162 | + <block wx:else> | |
| 163 | + | |
| 164 | + <!-- 根本就找不到门店 --> | |
| 165 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 166 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 167 | + </block> | |
| 168 | + <block wx:else> | |
| 169 | + | |
| 170 | + | |
| 171 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 172 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 173 | + </block> | |
| 174 | + <block wx:else> | |
| 175 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 176 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 177 | + </block> | |
| 178 | + <block wx:else> | |
| 179 | + <block wx:if="{{!def_pick_store}}"> | |
| 180 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 181 | + </block> | |
| 182 | + <block wx:else> | |
| 183 | + <block wx:if="{{data.store_count<=0}}"> | |
| 184 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 185 | + </block> | |
| 186 | + <block wx:else> | |
| 187 | + <view bindtap="addCart_pt" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | |
| 188 | + </block> | |
| 189 | + | |
| 190 | + </block> | |
| 191 | + </block> | |
| 192 | + </block> | |
| 193 | + </block> | |
| 194 | + </block> | |
| 195 | + </view> | |
| 196 | + | |
| 197 | + </block> | |
| 198 | + <block wx:else> | |
| 199 | + <!-- 根本就找不到门店 --> | |
| 200 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 201 | + <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 202 | + </block> | |
| 203 | + <block wx:else> | |
| 204 | + <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | |
| 205 | + </block> | |
| 206 | + </block> | |
| 207 | + | |
| 208 | + | |
| 209 | + </view> | |
| 210 | + </view> | |
| 211 | + | |
| 0 | 212 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/filter.wxs
0 → 100644
| 1 | +var is_has = function (text,val) { | |
| 2 | + if(text.indexOf(","+val+",")==-1) return false; | |
| 3 | + return true | |
| 4 | +} | |
| 5 | +function format_tt(ts) { | |
| 6 | + if(ts==null || ts==undefined || ts=='') return ""; | |
| 7 | + var d = getDate(ts*1000) | |
| 8 | + var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日"; | |
| 9 | + return fm; | |
| 10 | +} | |
| 11 | + | |
| 12 | +function act_type(ty){ | |
| 13 | + switch(ty){ | |
| 14 | + case 1: return '秒杀'; | |
| 15 | + case 2: return '团购'; | |
| 16 | + case 4: return '积分购'; | |
| 17 | + case 6: return '拼单'; | |
| 18 | + case 7: return '组合购'; | |
| 19 | + case 8: return '预售'; | |
| 20 | + } | |
| 21 | +} | |
| 22 | + | |
| 23 | +module.exports = { | |
| 24 | + is_has: is_has, | |
| 25 | + format_tt:format_tt, | |
| 26 | + act_type:act_type | |
| 27 | +} | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | |
| 2 | + //-- 判断是不是有等级价 -- | |
| 3 | + is_has_rank:function(rank_switch,item){ | |
| 4 | + if(!rank_switch) return false; | |
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | |
| 6 | + return false; | |
| 7 | + }, | |
| 8 | + | |
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | |
| 10 | + get_card_price:function(goods,all_card,type){ | |
| 11 | + var price1=parseFloat(goods['cardprice1']); | |
| 12 | + var price2=parseFloat(goods['cardprice2']); | |
| 13 | + var price3=parseFloat(goods['cardprice3']); | |
| 14 | + if(!all_card){ | |
| 15 | + if(type==0) return 0; | |
| 16 | + return ""; | |
| 17 | + } | |
| 18 | + | |
| 19 | + var arr=[]; | |
| 20 | + var min_price= 0; | |
| 21 | + var min_name=""; | |
| 22 | + | |
| 23 | + var min_price=null; | |
| 24 | + var min_name=null; | |
| 25 | + //---设置对应的价格名字---- | |
| 26 | + for(var i=0;i<3;i++) { | |
| 27 | + var vl=all_card[i]; | |
| 28 | + if(!vl) continue; | |
| 29 | + if(vl['CorrPrice']=="Price1" && price1>0) | |
| 30 | + { | |
| 31 | + if(min_price==null) { | |
| 32 | + min_price=price1;min_name=vl['CardName']; | |
| 33 | + } | |
| 34 | + else if(price1<min_price) { | |
| 35 | + min_price=price1;min_name=vl['CardName']; | |
| 36 | + } | |
| 37 | + } | |
| 38 | + if(vl['CorrPrice']=="Price2" && price2>0) | |
| 39 | + { | |
| 40 | + if(min_price==null) { | |
| 41 | + min_price=price2;min_name=vl['CardName']; | |
| 42 | + } | |
| 43 | + else if(price2<min_price) { | |
| 44 | + min_price=price2;min_name=vl['CardName']; | |
| 45 | + } | |
| 46 | + } | |
| 47 | + | |
| 48 | + if(vl['CorrPrice']=="Price3" && price3>0) | |
| 49 | + { | |
| 50 | + if(min_price==null) { | |
| 51 | + min_price=price3;min_name=vl['CardName']; | |
| 52 | + } | |
| 53 | + else if(price3<min_price) { | |
| 54 | + min_price=price3;min_name=vl['CardName']; | |
| 55 | + } | |
| 56 | + } | |
| 57 | + | |
| 58 | + } | |
| 59 | + if(min_price==null){ | |
| 60 | + if(type==0) return 0; | |
| 61 | + return ""; | |
| 62 | + } | |
| 63 | + | |
| 64 | + //if(type==0) return arr.length; | |
| 65 | + //--进行排序,升序--- | |
| 66 | + /*--- | |
| 67 | + arr.sort(function(a,b){ | |
| 68 | + if (a.price < b.price) { | |
| 69 | + return -1; | |
| 70 | + } else if (a.fee == b.fee) { | |
| 71 | + return 0; | |
| 72 | + } else { | |
| 73 | + return 1; | |
| 74 | + } | |
| 75 | + })--*/ | |
| 76 | + //-- 获取最下价钱,和相应的卡的名称 -- | |
| 77 | + //min_price=min.price; | |
| 78 | + //min_name=min.name; | |
| 79 | + if(type==0) return min_price.toFixed(2); | |
| 80 | + if(min_name.length>4) min_name=min_name.substring(0, 8); | |
| 81 | + return min_name; | |
| 82 | + }, | |
| 83 | + | |
| 84 | + toFix: function (val, count,set) { | |
| 85 | + if(val===undefined) return 0; | |
| 86 | + if(val===null) return 0; | |
| 87 | + if(val==='') return 0; | |
| 88 | + val = parseFloat(val); | |
| 89 | + if(set==1 && val==0) return val; | |
| 90 | + return val.toFixed(count) | |
| 91 | + }, | |
| 92 | + | |
| 93 | + //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位; | |
| 94 | + num: function(value) { | |
| 95 | + if(value != 0) { | |
| 96 | + var r=value.toFixed(2)+""; | |
| 97 | + return parseFloat(r); | |
| 98 | + } else { | |
| 99 | + return value.toFixed(0); | |
| 100 | + }; | |
| 101 | + }, | |
| 102 | +} | |
| 103 | +module.exports = { | |
| 104 | + is_has_rank:g_filters.is_has_rank, | |
| 105 | + get_card_price:g_filters.get_card_price, | |
| 106 | + num:g_filters.num, | |
| 107 | +} | |
| 0 | 108 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
0 → 100644
Changes suppressed. Click to show
| 1 | +var t = require("../../../../utils/util.js"), | |
| 2 | + ut = t, | |
| 3 | + e = require("../../../../utils/common.js"), | |
| 4 | + a = require("../../../../utils/wxParse/wxParse.js"), | |
| 5 | + s = getApp(), | |
| 6 | + i = s.request, | |
| 7 | + rq = i, | |
| 8 | + oo = s.globalData, | |
| 9 | + o = s.globalData.setting, | |
| 10 | + os = o; | |
| 11 | + | |
| 12 | +let self = null; | |
| 13 | + | |
| 14 | +//评价加载更多 | |
| 15 | +var more = function (e) { | |
| 16 | + return e && e.__esModule ? e : { | |
| 17 | + default: e | |
| 18 | + }; | |
| 19 | +}(require("../../../../utils/LoadMore.js")), | |
| 20 | + n = new more.default(); | |
| 21 | +var utils = require('../../../../utils/util.js'); | |
| 22 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 23 | +const { app } = require("../../../../utils/common.js"); | |
| 24 | + | |
| 25 | +Page({ | |
| 26 | + data: { | |
| 27 | + start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) | |
| 28 | + color_type: 0, //线条控制 | |
| 29 | + color_type_one: 0, | |
| 30 | + color_type_two: 1, | |
| 31 | + is_no_plus:1, | |
| 32 | + gid: "", | |
| 33 | + stoid: o.stoid, | |
| 34 | + url: o.url, | |
| 35 | + resourceUrl: o.h5_url, //公众号那边的图片文件域名 | |
| 36 | + iurl: o.imghost, | |
| 37 | + defaultAvatar: o.resourceUrl + "/static/images/user68.jpg", | |
| 38 | + | |
| 39 | + data: null, | |
| 40 | + content: "", //商品详情 | |
| 41 | + comments: null, //商品评论 | |
| 42 | + c_curr_p: 1, //评论分页 | |
| 43 | + com_num: 0, //评论人数 | |
| 44 | + gallery: null, //图片滚动 | |
| 45 | + is_collect: 0, | |
| 46 | + collect_id: 0, | |
| 47 | + cartGoodsNum: 0, | |
| 48 | + specSelect: 0, | |
| 49 | + optionItemId: 0, | |
| 50 | + goodsInputNum: 1, | |
| 51 | + openSpecModal: !1, | |
| 52 | + openSpecModal_pt: !1, //拼单的弹起, | |
| 53 | + openPromModal: !1, | |
| 54 | + activeCategoryId: 0, | |
| 55 | + supportPageScroll: !1, | |
| 56 | + address: { | |
| 57 | + address: "", | |
| 58 | + district: 0 | |
| 59 | + }, | |
| 60 | + shipping: "", | |
| 61 | + shippingCost: 0, | |
| 62 | + enterAddressPage: !1, | |
| 63 | + categories: [{ | |
| 64 | + name: "商品", | |
| 65 | + id: 0 | |
| 66 | + }, { | |
| 67 | + name: "详情", | |
| 68 | + id: 1 | |
| 69 | + }, { | |
| 70 | + name: "评价", | |
| 71 | + id: 2 | |
| 72 | + }], | |
| 73 | + activeCategoryId2: 0, | |
| 74 | + categories2: [{ | |
| 75 | + name: "商品详情", | |
| 76 | + id: 0 | |
| 77 | + }, { | |
| 78 | + name: "规格参数", | |
| 79 | + id: 1 | |
| 80 | + }], | |
| 81 | + activeCategoryId3: 1, | |
| 82 | + categories3: [{ | |
| 83 | + name: "全部", | |
| 84 | + id: 1, | |
| 85 | + num: 0 | |
| 86 | + }, | |
| 87 | + { | |
| 88 | + name: "有图", | |
| 89 | + id: 5, | |
| 90 | + num: 0 | |
| 91 | + }, | |
| 92 | + | |
| 93 | + { | |
| 94 | + name: "好评", | |
| 95 | + id: 2, | |
| 96 | + num: 0 | |
| 97 | + }, { | |
| 98 | + name: "中评", | |
| 99 | + id: 3, | |
| 100 | + num: 0 | |
| 101 | + }, { | |
| 102 | + name: "差评", | |
| 103 | + id: 4, | |
| 104 | + num: 0 | |
| 105 | + }, | |
| 106 | + ], | |
| 107 | + | |
| 108 | + select: { | |
| 109 | + price: 0, | |
| 110 | + stock: 0, | |
| 111 | + specName: "", | |
| 112 | + activity: null | |
| 113 | + }, | |
| 114 | + | |
| 115 | + //已选的商品(属性) | |
| 116 | + sele_g_spec_name: '', | |
| 117 | + sele_g_id: '', | |
| 118 | + sele_g: null, | |
| 119 | + //门店相关 | |
| 120 | + ismend: 0, | |
| 121 | + is_sec_mend: 0, | |
| 122 | + sto_sele_name: "", //选中的门店名称 | |
| 123 | + sto_sele_id: "", //选中的门店id | |
| 124 | + sto_sele_distr: "", //选择的门店的配送方式 | |
| 125 | + is_show_sto_cat: 1, //是否显示门店分类 | |
| 126 | + only_pk: null, | |
| 127 | + all_sto: null, | |
| 128 | + sec_sto: null, //选择了的门店分类 | |
| 129 | + pickpu_list: null, //读出的所有门店list | |
| 130 | + def_pickpu_list: null, //一开始5个门店list | |
| 131 | + sec_pick_index: 0, //第二级门店选择ID | |
| 132 | + fir_pick_index: 0, //第一级门店选择ID | |
| 133 | + all_pick_list: null,//所有的门店先记录起来 | |
| 134 | + //同一条形码的所有商品 | |
| 135 | + sku_g: null, | |
| 136 | + sku_g_pt: null, //---拼单的普通购买--- | |
| 137 | + //联系电话 | |
| 138 | + mobile: '', | |
| 139 | + //分类,品牌,国别名称 | |
| 140 | + cat_name: '', | |
| 141 | + brand_name: '', | |
| 142 | + nation_name: '', | |
| 143 | + | |
| 144 | + //商品的活动类型 0普通 1秒杀 2团购 3优惠 4 积分购 6拼单 | |
| 145 | + prom_type: 0, | |
| 146 | + prom_time_text: "", | |
| 147 | + prom_price: null, | |
| 148 | + prom_buy_limit: 0, | |
| 149 | + djs: null, | |
| 150 | + prom_st: 0, | |
| 151 | + prom_r_null: 0, | |
| 152 | + prom_end_time: null, | |
| 153 | + prom_start_time: null, | |
| 154 | + prom_act: null, | |
| 155 | + pd_xx: 0, | |
| 156 | + is_normal: 0, //是否普通购买 | |
| 157 | + teamgroup: null, //有多少人开团 | |
| 158 | + grounp_tatal: 0, //有几个人开团 | |
| 159 | + timer: [], | |
| 160 | + | |
| 161 | + //商品的购买次数 | |
| 162 | + prom_buy_num: -1, | |
| 163 | + g_buy_num: null, | |
| 164 | + prom_goods_num: 0, //活动商品数量 | |
| 165 | + prom_buy_num: 0, //活动商品购买数量 | |
| 166 | + prom_redis_num: 0, //活动商品redis数量 | |
| 167 | + | |
| 168 | + //拼单的规则显示 | |
| 169 | + is_show_gz: 0, | |
| 170 | + //会员自己的购买的拼单商品的情况 | |
| 171 | + user_order_pt_state: 0, | |
| 172 | + //购买的订单 | |
| 173 | + buy_order: null, | |
| 174 | + //1加入购物车 2立即购买 | |
| 175 | + openSpecModal_ind: 0, | |
| 176 | + | |
| 177 | + //---计时器开关---- | |
| 178 | + is_timer: 1, | |
| 179 | + isshow: 0, | |
| 180 | + bconfig: null, //基础配置 | |
| 181 | + | |
| 182 | + fir_comments: null, //详情页上的评价 | |
| 183 | + fir_quan: null, //详情页上的券 | |
| 184 | + quan_list: null, //券列表 | |
| 185 | + | |
| 186 | + coupon: 0, | |
| 187 | + //会员分享的头像 | |
| 188 | + share_head: "", | |
| 189 | + share_goods_img: "", | |
| 190 | + | |
| 191 | + //----------视频图片data参数--------- | |
| 192 | + current: 0, //图片计数 | |
| 193 | + swiperCurrent: 0, //轮播的下标 | |
| 194 | + hiddenn: 0, //控制轮播计数显示 | |
| 195 | + | |
| 196 | + currentTab: 0, // 选择器控制参数 | |
| 197 | + mapurl: "", | |
| 198 | + mapurl_f_img: "", | |
| 199 | + videopicture: 0, //视频图片的控制 | |
| 200 | + | |
| 201 | + video: 0, //视频图片切换器 | |
| 202 | + index: 0, | |
| 203 | + noon: 0, //开始视频的隐藏 | |
| 204 | + | |
| 205 | + screenWidth: 0, | |
| 206 | + canvasHidden: 1, | |
| 207 | + | |
| 208 | + //--推荐-- | |
| 209 | + store_config: null, | |
| 210 | + is_show_pl: 0, //是否品类 | |
| 211 | + is_show_pp: 0, //是否品牌 | |
| 212 | + is_show_gb: 0, //是否国别 | |
| 213 | + is_closecoupon: 0, | |
| 214 | + | |
| 215 | + //是否点赞中 | |
| 216 | + iszaning: 0, | |
| 217 | + | |
| 218 | + select_store: 0, //选择更多 | |
| 219 | + index: 1, | |
| 220 | + more_store: 0, //选择门店 | |
| 221 | + sort_store: 0, //门店分类 | |
| 222 | + choice_sort_store: 0, //选择分类门店 | |
| 223 | + new_user: 0, //新用户 | |
| 224 | + | |
| 225 | + def_pick_store: null, // 默认的门店 | |
| 226 | + fir_def_store: null, //客户默认的门店的 | |
| 227 | + lat: null, //维度 | |
| 228 | + lon: null, //经度 | |
| 229 | + | |
| 230 | + is_get_local_ok: 0, //获取坐标是否完成 | |
| 231 | + region_name: "门店分类", //区域的名字 | |
| 232 | + is_gps: 1, | |
| 233 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | |
| 234 | + default_store: {}, //创建添加默认门店地址的对象 | |
| 235 | + | |
| 236 | + comments_no_more: 0, | |
| 237 | + get_c: 0, //获取评价是不是成 | |
| 238 | + is_collect_load: 0, //是不是处理 | |
| 239 | + is_newsales_rules: 0, //是否开启最新的门店规则,此时会新读门店,当点击选择门店时会触发读取线下库存 | |
| 240 | + sales_rules: 1, //默认是线上销售 | |
| 241 | + | |
| 242 | + wait_for_user_store: null, | |
| 243 | + prom_goods: null, //商品优惠列表 | |
| 244 | + order_prom: null, //订单优惠 | |
| 245 | + collocationGoods: null, //搭配购 | |
| 246 | + | |
| 247 | + poster: null, //自定义海报 | |
| 248 | + share_b_img: '', //自定义分享的背景 | |
| 249 | + | |
| 250 | + showPoster: false, | |
| 251 | + hui_condition: null, | |
| 252 | + sto_sele_name_1: '',//分享的门店名称 | |
| 253 | + fir_goods: null, | |
| 254 | + | |
| 255 | + share_hidden: false, | |
| 256 | + all_activity_list: null, //所有活动的列表 | |
| 257 | + | |
| 258 | + hiddenCS: true, | |
| 259 | + }, | |
| 260 | + | |
| 261 | + //------初始化加载---------- | |
| 262 | + onLoad: function (t) { | |
| 263 | + var ee = this, | |
| 264 | + that = ee, | |
| 265 | + th = ee, | |
| 266 | + gid = t.goods_id, | |
| 267 | + first_leader = t.first_leader, | |
| 268 | + room_id = t.room_id, | |
| 269 | + room_user_share = t.room_user_share, //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | |
| 270 | + prom_type = t.prom_type, | |
| 271 | + prom_id = t.prom_id; //活动ID | |
| 272 | + | |
| 273 | + self = this; | |
| 274 | + | |
| 275 | + | |
| 276 | + console.log("gd onload"); | |
| 277 | + console.log(t); | |
| 278 | + | |
| 279 | + //-- 自定义海报 -- | |
| 280 | + getApp().request.promiseGet("/api/weshop/goods/poster/page", { | |
| 281 | + data: {store_id: os.stoid, type: 1, is_use: 1} | |
| 282 | + }).then(res => { | |
| 283 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]) { | |
| 284 | + | |
| 285 | + var poster_data = res.data.data.pageData[0]; | |
| 286 | + var json_str = poster_data.jsonStr; | |
| 287 | + | |
| 288 | + if (json_str) { | |
| 289 | + var json_data = JSON.parse(json_str); | |
| 290 | + if (json_data.bg_img) { | |
| 291 | + | |
| 292 | + //-- 把图片那到本地 -- | |
| 293 | + wx.getImageInfo({ | |
| 294 | + src: json_data.bg_img, | |
| 295 | + success: function (res) { | |
| 296 | + var path = res.path; | |
| 297 | + th.setData({share_b_img: path}) | |
| 298 | + }, | |
| 299 | + fail: function (res) { | |
| 300 | + } | |
| 301 | + }); | |
| 302 | + } | |
| 303 | + th.setData({poster: json_data}) | |
| 304 | + | |
| 305 | + } | |
| 306 | + } | |
| 307 | + }) | |
| 308 | + | |
| 309 | + //---获取手机地址坐标-- | |
| 310 | + //--如果tg_id是空的话,分享回来-- | |
| 311 | + if (gid == undefined || gid == null || gid == "") { | |
| 312 | + var gid_str = decodeURIComponent(t.scene); | |
| 313 | + gid_str = gid_str.split("_"); | |
| 314 | + gid = gid_str[0]; | |
| 315 | + if (gid.indexOf('.') != -1) { | |
| 316 | + var fir_arr = gid.split("."); | |
| 317 | + gid = fir_arr[0]; | |
| 318 | + prom_type = fir_arr[1]; | |
| 319 | + prom_id = fir_arr[2]; | |
| 320 | + this.data.prom_type = prom_type; | |
| 321 | + this.data.prom_id = prom_id; | |
| 322 | + } | |
| 323 | + | |
| 324 | + if (gid_str.length > 1) { | |
| 325 | + first_leader = gid_str[1]; | |
| 326 | + } | |
| 327 | + //-- 如果有room_id的获取 -- | |
| 328 | + if (gid_str.length > 2 && gid_str[2]) { | |
| 329 | + room_id = gid_str[2]; | |
| 330 | + room_user_share = 1; | |
| 331 | + } | |
| 332 | + | |
| 333 | + } | |
| 334 | + | |
| 335 | + | |
| 336 | + //判断活动 | |
| 337 | + if (prom_type) { | |
| 338 | + this.data.prom_type = prom_type; | |
| 339 | + this.data.prom_id = prom_id; | |
| 340 | + } | |
| 341 | + ee.setData({gid: gid}); | |
| 342 | + | |
| 343 | + console.log("gd onload--2"); | |
| 344 | + console.log(first_leader); | |
| 345 | + | |
| 346 | + if(first_leader) { | |
| 347 | + console.log("gd onload--3"); | |
| 348 | + console.log("log---"+first_leader); | |
| 349 | + getApp().globalData.first_leader = first_leader; | |
| 350 | + //调用接口判断是不是会员 | |
| 351 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
| 352 | + if (res.data.code == 0) { | |
| 353 | + getApp().globalData.guide_id = res.data.data.id; | |
| 354 | + } | |
| 355 | + }) | |
| 356 | + } | |
| 357 | + | |
| 358 | + //-- 如果有房间号 -- | |
| 359 | + if (room_id) { | |
| 360 | + getApp().globalData.room_id = room_id; | |
| 361 | + getApp().globalData.room_goods_id = gid; | |
| 362 | + //如果是会员分享过来的要记录 | |
| 363 | + if (room_user_share) | |
| 364 | + getApp().globalData.room_user_share = room_user_share; | |
| 365 | + } | |
| 366 | + | |
| 367 | + var c_guide_id = t.c_guide_id; | |
| 368 | + if (c_guide_id) { | |
| 369 | + th.data.c_guide_id = c_guide_id; | |
| 370 | + } | |
| 371 | + | |
| 372 | + //调用接口判断商家plus有没有过期 | |
| 373 | + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=3", {}).then(res => { | |
| 374 | + if (res.data.code == 0) { | |
| 375 | + var arr = res.data.data.pageData; | |
| 376 | + if (arr.length > 0) { | |
| 377 | + var item = arr[0]; | |
| 378 | + if (item.is_sy == 0) { | |
| 379 | + var now = Date.parse(new Date()); now = now / 1000; | |
| 380 | + if (item.end_time < now) { | |
| 381 | + th.setData({ is_no_plus: 0 }) | |
| 382 | + } | |
| 383 | + } | |
| 384 | + } | |
| 385 | + } | |
| 386 | + }) | |
| 387 | + | |
| 388 | + getApp().getConfig(function (e) { | |
| 389 | + ee.setData({sto_sele_name_1: e.store_name}) | |
| 390 | + }) | |
| 391 | + | |
| 392 | + //----获取系统参数----- | |
| 393 | + getApp().getConfig2(function (e) { | |
| 394 | + ee.setData({ | |
| 395 | + bconfig: e, | |
| 396 | + sales_rules: e.sales_rules, | |
| 397 | + }); | |
| 398 | + | |
| 399 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { | |
| 400 | + ee.setData({ | |
| 401 | + is_show_pl: 1 | |
| 402 | + }); | |
| 403 | + } | |
| 404 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { | |
| 405 | + ee.setData({ | |
| 406 | + is_show_pp: 1 | |
| 407 | + }); | |
| 408 | + } | |
| 409 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { | |
| 410 | + ee.setData({ | |
| 411 | + is_show_gb: 1 | |
| 412 | + }); | |
| 413 | + } | |
| 414 | + console.log(e); | |
| 415 | + var json_d = JSON.parse(e.switch_list); | |
| 416 | + ee.setData({ | |
| 417 | + store_config: e, | |
| 418 | + sys_switch: json_d, | |
| 419 | + is_closecoupon: json_d.is_closecoupon, | |
| 420 | + is_newsales_rules: json_d.is_newsales_rules | |
| 421 | + }); | |
| 422 | + ee.init(gid); | |
| 423 | + //------几人评价------- | |
| 424 | + //n.init(th, "", "comments"); | |
| 425 | + | |
| 426 | + th.requestCardNum(), wx.pageScrollTo && th.setData({ | |
| 427 | + supportPageScroll: !0 | |
| 428 | + }); | |
| 429 | + | |
| 430 | + //计算等级价相关 | |
| 431 | + var swithc_list = e.switch_list; | |
| 432 | + var sw_arr = JSON.parse(swithc_list); | |
| 433 | + //---如果后台又开等级卡的开关--- | |
| 434 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 435 | + th.setData({rank_switch: true}); | |
| 436 | + //---回调卡的列表--- | |
| 437 | + th.getPlusCardType(function (ob) { | |
| 438 | + th.setData({card_list: ob.card_list}); | |
| 439 | + var ti = setInterval(function () { | |
| 440 | + var user = getApp().globalData.userInfo; | |
| 441 | + if (!user) return false; | |
| 442 | + clearInterval(ti); | |
| 443 | + if (user.card_field && user['card_expiredate']) { | |
| 444 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 445 | + var end = new Date(str); | |
| 446 | + end = Date.parse(end) / 1000; | |
| 447 | + var now = ut.gettimestamp(); | |
| 448 | + //--- 判断是等级会员,且在有效期范围内 --- | |
| 449 | + if (user.card_field && now < end) { | |
| 450 | + var card_name = ob.name_map.get(user.card_field); | |
| 451 | + //if(card_name.length>6) card_name=card_name.substring(0,6); | |
| 452 | + | |
| 453 | + var is_near_date = 0; | |
| 454 | + if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天 | |
| 455 | + th.setData({ | |
| 456 | + card_field: user.card_field, | |
| 457 | + card_name: card_name, | |
| 458 | + card_list: ob.card_list, | |
| 459 | + is_near_date: is_near_date | |
| 460 | + }); | |
| 461 | + } | |
| 462 | + } | |
| 463 | + }, 500) | |
| 464 | + }) | |
| 465 | + } | |
| 466 | + | |
| 467 | + }, 1); | |
| 468 | + | |
| 469 | + //获取用户设备信息,屏幕宽度 | |
| 470 | + wx.getSystemInfo({ | |
| 471 | + success: res => { | |
| 472 | + that.setData({ | |
| 473 | + screenWidth: res.screenWidth | |
| 474 | + }) | |
| 475 | + } | |
| 476 | + }); | |
| 477 | + | |
| 478 | + //获取用户的默认门店 | |
| 479 | + getApp().get_user_store(function (e) { | |
| 480 | + if (!e) { | |
| 481 | + th.data.fir_def_store = {}; //赋值空对象 | |
| 482 | + return false; | |
| 483 | + } | |
| 484 | + var ee = JSON.parse(JSON.stringify(e)); | |
| 485 | + //--定时器推迟一下-- | |
| 486 | + setTimeout(function () { | |
| 487 | + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type; | |
| 488 | + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对-- | |
| 489 | + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) { | |
| 490 | + ee.is_no_dis = 1; | |
| 491 | + } | |
| 492 | + | |
| 493 | + var appd = getApp().globalData; | |
| 494 | + var w_time = setInterval(function () { | |
| 495 | + if (that.data.is_get_local_ok == 0) return false; | |
| 496 | + clearInterval(w_time); | |
| 497 | + var distance = null; | |
| 498 | + var e = JSON.parse(JSON.stringify(ee)); | |
| 499 | + | |
| 500 | + //如果有开启近距离的话,同时距离优不一样了 | |
| 501 | + if (that.data.lat != null) { | |
| 502 | + //如果经纬度有变化的话 | |
| 503 | + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) { | |
| 504 | + that.set_def_storage(e); | |
| 505 | + } else { | |
| 506 | + //要用接口是获取距离,js的计算不准 | |
| 507 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 508 | + data: { | |
| 509 | + store_id: os.stoid, | |
| 510 | + pickup_id: e.pickup_id, | |
| 511 | + lat: th.data.lat, | |
| 512 | + lon: th.data.lon, | |
| 513 | + isstop: 0, | |
| 514 | + is_pos: 1 | |
| 515 | + }, | |
| 516 | + }).then(res => { | |
| 517 | + if (res.data.code == 0) { | |
| 518 | + e = res.data.data.pageData[0]; | |
| 519 | + if (e) { | |
| 520 | + e.is_no_dis = ee.is_no_dis; | |
| 521 | + appd.pk_store = e; | |
| 522 | + that.set_def_storage(e); | |
| 523 | + } | |
| 524 | + | |
| 525 | + } | |
| 526 | + }) | |
| 527 | + } | |
| 528 | + //e.distance = distance; | |
| 529 | + appd.lat = that.data.lat; | |
| 530 | + appd.lon = that.data.lon; | |
| 531 | + | |
| 532 | + } else { | |
| 533 | + if (e) { | |
| 534 | + e.distance = null; | |
| 535 | + that.set_def_storage(e); | |
| 536 | + } | |
| 537 | + } | |
| 538 | + }, 500) | |
| 539 | + }, 700) | |
| 540 | + }); | |
| 541 | + | |
| 542 | + //更新点击量 | |
| 543 | + getApp().request.put("/api/weshop/goods/updateClick", { | |
| 544 | + data: {store_id: os.stoid, goods_id: gid} | |
| 545 | + }); | |
| 546 | + | |
| 547 | + | |
| 548 | + }, | |
| 549 | + | |
| 550 | + | |
| 551 | + //--- 设置一下默认库存的数量 ---- | |
| 552 | + set_def_storage(ee) { | |
| 553 | + var that = this, th = this; | |
| 554 | + getApp().getConfig2(function (e) { | |
| 555 | + var sales_rules = e.sales_rules; | |
| 556 | + if (sales_rules == 2) { | |
| 557 | + getApp().waitfor2(that, "wait_for_user_store", "fir_goods", function () { | |
| 558 | + var lock = 0, plist = null; | |
| 559 | + var gd = that.data.fir_goods; | |
| 560 | + //先读取门店的lock,采用链式写法,少用await | |
| 561 | + getApp().request.promiseGet("/api/weshop/order/ware/lock/page", { | |
| 562 | + data: { | |
| 563 | + store_id: os.stoid, | |
| 564 | + wareId: that.data.fir_goods.goods_id, | |
| 565 | + storageId: ee.pickup_id, | |
| 566 | + pageSize: 1000 | |
| 567 | + } | |
| 568 | + }).then(res => { | |
| 569 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 570 | + for (var i in res.data.data.pageData) | |
| 571 | + lock += res.data.data.pageData[i].outQty | |
| 572 | + } | |
| 573 | + //---通过接口获取门店的线下库存信息-- | |
| 574 | + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", { | |
| 575 | + data: { | |
| 576 | + storageNos: ee.pickup_no, | |
| 577 | + wareIds: encodeURIComponent(th.data.data.erpwareid), | |
| 578 | + storeId: os.stoid | |
| 579 | + } | |
| 580 | + }) | |
| 581 | + }).then(res => { | |
| 582 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 583 | + plist = res.data.data.pageData[0]; | |
| 584 | + } else { | |
| 585 | + wx.showToast({ | |
| 586 | + title: '库存不足,请更换其他门店', | |
| 587 | + icon: 'none', | |
| 588 | + }); | |
| 589 | + } | |
| 590 | + ; | |
| 591 | + if (plist && plist.CanOutQty - lock > 0) { | |
| 592 | + ee.CanOutQty = plist.CanOutQty - lock; | |
| 593 | + } else { | |
| 594 | + ee.CanOutQty = 0; | |
| 595 | + } | |
| 596 | + //--给门店赋值线下库存-- | |
| 597 | + that.data.fir_def_store = ee; | |
| 598 | + that.setData({ | |
| 599 | + def_pick_store: ee, | |
| 600 | + sto_sele_name: ee.pickup_name, | |
| 601 | + sto_sele_id: ee.pickup_id, | |
| 602 | + sto_sele_distr: ee.distr_type | |
| 603 | + }) | |
| 604 | + }) | |
| 605 | + }) | |
| 606 | + } else { | |
| 607 | + that.data.fir_def_store = ee; | |
| 608 | + that.setData({ | |
| 609 | + def_pick_store: ee, | |
| 610 | + sto_sele_name: ee.pickup_name, | |
| 611 | + sto_sele_id: ee.pickup_id, | |
| 612 | + sto_sele_distr: ee.distr_type | |
| 613 | + }) | |
| 614 | + } | |
| 615 | + }) | |
| 616 | + | |
| 617 | + }, | |
| 618 | + | |
| 619 | + | |
| 620 | + //------------程序初始化入口------------- | |
| 621 | + async init(gid) { | |
| 622 | + var ee = this, | |
| 623 | + th = ee, | |
| 624 | + gallery = null, | |
| 625 | + is_collect = 0, | |
| 626 | + collect_id = 0, | |
| 627 | + categories3 = ee.data.categories3, | |
| 628 | + fir_com = null, | |
| 629 | + fir_quan = null, | |
| 630 | + mapurl = null, | |
| 631 | + mapurl_f_img = null; | |
| 632 | + | |
| 633 | + | |
| 634 | + //------图片滚动---------- | |
| 635 | + await getApp().request.promiseGet("/api/weshop/goodsimages/page", { | |
| 636 | + data: { | |
| 637 | + store_id: os.stoid, | |
| 638 | + goods_id: gid, | |
| 639 | + }, | |
| 640 | + }).then(res => { | |
| 641 | + | |
| 642 | + var t = res; | |
| 643 | + var g = t.data.data.pageData; | |
| 644 | + if (g.length == 0) { | |
| 645 | + var ie = { | |
| 646 | + "image_url": o.imghost + "/public/images/default_goods_image_240.gif" | |
| 647 | + }; | |
| 648 | + g.push(ie); | |
| 649 | + gallery = g; | |
| 650 | + return; | |
| 651 | + } | |
| 652 | + for (var i = 0; i < g.length; i++) { | |
| 653 | + if (g[i].image_url.indexOf(o.imghost) == -1) | |
| 654 | + g[i].image_url = o.imghost + g[i].image_url; | |
| 655 | + } | |
| 656 | + gallery = g; | |
| 657 | + }) | |
| 658 | + //------是否收藏---------- | |
| 659 | + await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | |
| 660 | + data: { | |
| 661 | + store_id: os.stoid, | |
| 662 | + goods_id: gid, | |
| 663 | + user_id: oo.user_id, | |
| 664 | + } | |
| 665 | + }).then(res => { | |
| 666 | + var t = res; | |
| 667 | + var data = t.data.data.pageData; | |
| 668 | + if (data && data.length > 0) { | |
| 669 | + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); | |
| 670 | + is_collect = 1; | |
| 671 | + collect_id = data[0].collect_id; | |
| 672 | + } | |
| 673 | + }) | |
| 674 | + | |
| 675 | + //------获取评价的统计数量---- | |
| 676 | + await getApp().request.promiseGet("/api/weshop/comment/countlist/", { | |
| 677 | + data: { | |
| 678 | + store_id: os.stoid, | |
| 679 | + goods_id: gid | |
| 680 | + }, | |
| 681 | + //failRollback: !0, | |
| 682 | + | |
| 683 | + }).then(res => { | |
| 684 | + var t = res; | |
| 685 | + var g = t.data.data[0]; | |
| 686 | + if (g != null && g != undefined) { | |
| 687 | + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5; | |
| 688 | + var num2 = g.c4 + g.c5; | |
| 689 | + var num3 = g.c3; | |
| 690 | + var num4 = g.c0 + g.c1 + g.c2; | |
| 691 | + | |
| 692 | + var dd = ee.data.categories3; | |
| 693 | + dd[0].num = allnum; | |
| 694 | + dd[1].num = g.cimg; | |
| 695 | + dd[2].num = num2; | |
| 696 | + dd[3].num = num3; | |
| 697 | + dd[4].num = num4; | |
| 698 | + | |
| 699 | + categories3 = dd; | |
| 700 | + } | |
| 701 | + }) | |
| 702 | + | |
| 703 | + //----获取详情页的评价---- | |
| 704 | + await getApp().request.promiseGet("/api/weshop/comment/pageComment", { | |
| 705 | + data: { | |
| 706 | + store_id: os.stoid, | |
| 707 | + goods_id: gid, | |
| 708 | + pageSize: 3, | |
| 709 | + parent_id: 0, | |
| 710 | + page: 1, | |
| 711 | + is_show: 1, | |
| 712 | + }, | |
| 713 | + }).then(res => { | |
| 714 | + fir_com = res.data.data.pageData; | |
| 715 | + }) | |
| 716 | + | |
| 717 | + if (fir_com) { | |
| 718 | + for (var ind in fir_com) { | |
| 719 | + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png"; | |
| 720 | + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); | |
| 721 | + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); | |
| 722 | + } | |
| 723 | + } | |
| 724 | + | |
| 725 | + if (th.data.is_closecoupon != 1 && (!th.data.fir_quan || th.data.fir_quan.length <= 0)) { | |
| 726 | + //----获取详情页的券的数量---- | |
| 727 | + await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { | |
| 728 | + data: { | |
| 729 | + store_id: os.stoid, | |
| 730 | + type: 1, | |
| 731 | + pageSize: 3, | |
| 732 | + page: 1, | |
| 733 | + is_share: 0, | |
| 734 | + }, | |
| 735 | + }).then(res1 => { | |
| 736 | + fir_quan = res1.data.data.pageData; | |
| 737 | + }) | |
| 738 | + } | |
| 739 | + | |
| 740 | + //--------获取视频图片--------- | |
| 741 | + await getApp().request.promiseGet("/api/weshop/goodsVideos/get/" + os.stoid + "/" + ee.data.gid, { | |
| 742 | + 1: 1 | |
| 743 | + }).then(res1 => { | |
| 744 | + if (res1.data.code == 0) { | |
| 745 | + mapurl = res1.data.data.video_url; | |
| 746 | + mapurl_f_img = res1.data.data.video_img; | |
| 747 | + } | |
| 748 | + }) | |
| 749 | + this.getHistoryBuy(); //获取历史购买 | |
| 750 | + ee.setData({ | |
| 751 | + gallery: gallery, | |
| 752 | + is_collect: is_collect, | |
| 753 | + collect_id: collect_id, | |
| 754 | + categories3: categories3, | |
| 755 | + fir_quan: fir_quan, | |
| 756 | + fir_comments: fir_com, | |
| 757 | + mapurl_f_img: mapurl_f_img, | |
| 758 | + mapurl: mapurl, | |
| 759 | + }); | |
| 760 | + | |
| 761 | + }, | |
| 762 | + | |
| 763 | + //---展示--- | |
| 764 | + onShow: function () { | |
| 765 | + | |
| 766 | + getApp().check_can_share(); | |
| 767 | + | |
| 768 | + var goods_list = null, th = this, that = this; | |
| 769 | + var show_prew_img = this.data.show_prew_img | |
| 770 | + if (show_prew_img) { | |
| 771 | + show_prew_img = 0; | |
| 772 | + return false; | |
| 773 | + } | |
| 774 | + | |
| 775 | + if(this.data.show_video) { | |
| 776 | + this.data.show_video=0; | |
| 777 | + return false; | |
| 778 | + } | |
| 779 | + | |
| 780 | + //优惠券要实时更新 | |
| 781 | + getApp().getConfig2(function (e) { | |
| 782 | + var json_d = JSON.parse(e.switch_list); | |
| 783 | + th.setData({is_closecoupon: json_d.is_closecoupon}) | |
| 784 | + th.setData({is_open_offline: json_d.is_pricing_open}) | |
| 785 | + }, 1) | |
| 786 | + | |
| 787 | + | |
| 788 | + var ui = setInterval(function () { | |
| 789 | + goods_list = th.selectComponent("#goods_list"); | |
| 790 | + if (goods_list) { | |
| 791 | + clearInterval(ui); | |
| 792 | + goods_list.init(); | |
| 793 | + return false | |
| 794 | + } | |
| 795 | + }, 300) | |
| 796 | + | |
| 797 | + this.data.is_timer = 1; | |
| 798 | + var ee = this, | |
| 799 | + gid = this.data.gid, | |
| 800 | + i = getApp().request; | |
| 801 | + | |
| 802 | + this.wait_for_store_config(); | |
| 803 | + //先检验一下商品的活动情况 | |
| 804 | + this.check_gd_prom_new(function () { | |
| 805 | + i.get("/api/weshop/goods/get/" + o.stoid + "/" + ee.data.gid, { | |
| 806 | + failRollback: !0, | |
| 807 | + success: function (t) { | |
| 808 | + console.log(t); | |
| 809 | + if (t.data.code == 0) { | |
| 810 | + if (t.data.data.is_on_sale != 1) { | |
| 811 | + wx.showModal({ | |
| 812 | + title: '商品已经下架', | |
| 813 | + showCancel: !1, | |
| 814 | + complete: function () { | |
| 815 | + wx.navigateBack(); | |
| 816 | + } | |
| 817 | + }); | |
| 818 | + } | |
| 819 | + | |
| 820 | + var timestamp = Date.parse(new Date()); | |
| 821 | + timestamp = timestamp / 1000; | |
| 822 | + if (t.data.data.on_time > timestamp) { | |
| 823 | + wx.showModal({ | |
| 824 | + title: '商品还未上架', | |
| 825 | + showCancel: !1, | |
| 826 | + complete: function () { | |
| 827 | + wx.navigateBack(); | |
| 828 | + } | |
| 829 | + }); | |
| 830 | + } | |
| 831 | + | |
| 832 | + if (t.data.data.down_time > 0) { | |
| 833 | + if (t.data.data.down_time < timestamp) { | |
| 834 | + wx.showModal({ | |
| 835 | + title: '商品已经到期下架', | |
| 836 | + showCancel: !1, | |
| 837 | + complete: function () { | |
| 838 | + wx.navigateBack(); | |
| 839 | + } | |
| 840 | + }); | |
| 841 | + } | |
| 842 | + } | |
| 843 | + //动态获取商品名称 | |
| 844 | + wx.setNavigationBarTitle({ | |
| 845 | + title: t.data.data.goods_name, | |
| 846 | + }); | |
| 847 | + | |
| 848 | + //-- 判断是不是组合购活动,必须要登录后才能判断 -- | |
| 849 | + if (getApp().globalData.userInfo && t.data.data.prom_type == 7) { | |
| 850 | + //获取活动信息 | |
| 851 | + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + | |
| 852 | + t.data.data.prom_id + "/" + getApp().globalData.user_id; | |
| 853 | + getApp().request.get(url, { | |
| 854 | + success: function (e) { | |
| 855 | + if (e.data.code == 0 && e.data.data) { | |
| 856 | + if (ut.gettimestamp() < e.data.data.start_time) { | |
| 857 | + return false; | |
| 858 | + } | |
| 859 | + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) { | |
| 860 | + //-- 获取商品列表 -- | |
| 861 | + th.setData({zh_act: e.data.data}); | |
| 862 | + } | |
| 863 | + | |
| 864 | + } | |
| 865 | + } | |
| 866 | + }); | |
| 867 | + } | |
| 868 | + | |
| 869 | + //-- 把商品的赋值,同时给活动赋值 -- | |
| 870 | + ee.data.fir_goods = JSON.parse(JSON.stringify(t.data.data)); | |
| 871 | + if (t.data.data.prom_type && t.data.data.prom_id) { | |
| 872 | + ee.data.prom_type = t.data.data.prom_type; | |
| 873 | + ee.data.prom_id = t.data.data.prom_id; | |
| 874 | + } | |
| 875 | + | |
| 876 | + | |
| 877 | + if (ee.data.prom_type != 1 && ee.data.prom_type != 4 && ee.data.prom_type != 6 && ee.data.prom_type != 2) { | |
| 878 | + ee.check_is_youhui(ee.data.gid); | |
| 879 | + } | |
| 880 | + | |
| 881 | + t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss'); | |
| 882 | + | |
| 883 | + var cur_price = t.data.data.shop_price; | |
| 884 | + if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) { | |
| 885 | + var cfile = getApp().globalData.userInfo.card_field; | |
| 886 | + if (t.data.data[cfile]) { | |
| 887 | + cur_price = t.data.data[cfile]; | |
| 888 | + } | |
| 889 | + } | |
| 890 | + var txt = (cur_price / t.data.data.market_price * 10).toFixed(2).toString(); | |
| 891 | + txt = parseFloat(txt); | |
| 892 | + | |
| 893 | + t.data.data['disc'] = txt; | |
| 894 | + | |
| 895 | + if (t.data.data.original_img.indexOf(o.imghost) == -1) | |
| 896 | + t.data.data.original_img = o.imghost + t.data.data.original_img; | |
| 897 | + | |
| 898 | + if (t.data.data.goods_content == null) t.data.data.goods_content = ""; | |
| 899 | + | |
| 900 | + //-----商品详情--- | |
| 901 | + if (!t.data.data.goods_content) t.data.data.goods_content = " "; | |
| 902 | + a.wxParse("content", "html", t.data.data.goods_content, ee, 6); | |
| 903 | + e.wxParseAddFullImageUrl(ee, "content"); | |
| 904 | + | |
| 905 | + if (ee.data.prom_type) { | |
| 906 | + t.data.data.prom_type = ee.data.prom_type; | |
| 907 | + t.data.data.prom_id = ee.data.prom_id; | |
| 908 | + } | |
| 909 | + ee.setData({ | |
| 910 | + data: t.data.data, | |
| 911 | + sele_g: t.data.data, | |
| 912 | + userInfo: getApp().globalData.userInfo | |
| 913 | + }); | |
| 914 | + | |
| 915 | + | |
| 916 | + //获取统一条形码,普通商品和优惠促销的商品 | |
| 917 | + if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 3 || ee.data.data.prom_type == 5 || ee.data.data.prom_type == 7 || ee.data.data.prom_type == 9 || ee.data.data.prom_type == 10) { | |
| 918 | + //默认门店要拿下门店库存 | |
| 919 | + if (that.data.sales_rules == 2 && that.data.is_newsales_rules) { | |
| 920 | + //获取门店 | |
| 921 | + ee.get_sto(); | |
| 922 | + | |
| 923 | + } else { | |
| 924 | + //获取门店 | |
| 925 | + ee.get_sto(); | |
| 926 | + } | |
| 927 | + | |
| 928 | + ee.get_sku(o.stoid, t.data.data, gid); | |
| 929 | + ee.check_has_flash(); | |
| 930 | + | |
| 931 | + } | |
| 932 | + else { | |
| 933 | + var gg = "", item = t.data.data; | |
| 934 | + | |
| 935 | + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = ""; | |
| 936 | + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = ""; | |
| 937 | + | |
| 938 | + if (item.goods_spec != "" && item.goods_color != "") { | |
| 939 | + gg = item.goods_spec + "/" + item.goods_color; | |
| 940 | + } else if (item.goods_spec != "" || item.goods_color != "") { | |
| 941 | + gg = item.goods_spec + item.goods_color; | |
| 942 | + } else { | |
| 943 | + gg = "规格1"; | |
| 944 | + } | |
| 945 | + t.data.data.gg = gg; | |
| 946 | + var uu = []; | |
| 947 | + uu.push(t.data.data); | |
| 948 | + ee.setData({ | |
| 949 | + sku_g: uu, | |
| 950 | + }); | |
| 951 | + } | |
| 952 | + ee.data.g_buy_num = new Map(); | |
| 953 | + ee.check_prom(gid, ee.data.data.prom_type, ee.data.data.prom_id); | |
| 954 | + | |
| 955 | + var th = ee; | |
| 956 | + if (ee.data.cat_name == '') { | |
| 957 | + //过去国别,分类,品牌的名称 | |
| 958 | + i.get("/api/weshop/goodscategory/get/" + o.stoid + "/" + th.data.data.cat_id, { | |
| 959 | + success: function (t) { | |
| 960 | + var dd = t.data.data; | |
| 961 | + if (t.data.code == 0) { | |
| 962 | + th.setData({ | |
| 963 | + cat_name: dd.name | |
| 964 | + }); | |
| 965 | + } | |
| 966 | + } | |
| 967 | + }); | |
| 968 | + //过去国别,分类,品牌的名称 | |
| 969 | + i.get("/api/weshop/brand/get/" + o.stoid + "/" + th.data.data.brand_id, { | |
| 970 | + success: function (t) { | |
| 971 | + var dd = t.data.data; | |
| 972 | + if (t.data.code == 0) { | |
| 973 | + th.setData({ | |
| 974 | + brand_name: dd.name | |
| 975 | + }); | |
| 976 | + } | |
| 977 | + } | |
| 978 | + }); | |
| 979 | + //过去国别,分类,品牌的名称 | |
| 980 | + i.get("/api/weshop/nation/get/" + o.stoid + "/" + th.data.data.nation_id, { | |
| 981 | + success: function (t) { | |
| 982 | + var dd = t.data.data; | |
| 983 | + if (t.data.code == 0) { | |
| 984 | + th.setData({ | |
| 985 | + nation_name: dd.name | |
| 986 | + }); | |
| 987 | + } | |
| 988 | + } | |
| 989 | + }); | |
| 990 | + } | |
| 991 | + | |
| 992 | + } | |
| 993 | + else { | |
| 994 | + wx.showModal({ | |
| 995 | + title: t.data.msg, | |
| 996 | + showCancel: !1, | |
| 997 | + complete: function () { | |
| 998 | + wx.navigateBack(); | |
| 999 | + } | |
| 1000 | + }); | |
| 1001 | + } | |
| 1002 | + } | |
| 1003 | + }); | |
| 1004 | + }) | |
| 1005 | + | |
| 1006 | + this.data.enterAddressPage && (this.data.enterAddressPage = !1); | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + }, | |
| 1011 | + | |
| 1012 | + onReady() { | |
| 1013 | + | |
| 1014 | + setTimeout(()=>{ | |
| 1015 | + wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { | |
| 1016 | + // console.log('node@@@@@@@', res); | |
| 1017 | + if(res.length != 0) { | |
| 1018 | + this.setData({ | |
| 1019 | + showFold: res[0].height < res[1].height, | |
| 1020 | + }); | |
| 1021 | + }; | |
| 1022 | + | |
| 1023 | + }).exec(); | |
| 1024 | + }, 1000); | |
| 1025 | + | |
| 1026 | + }, | |
| 1027 | + | |
| 1028 | + enterAddress: function () { | |
| 1029 | + this.data.enterAddressPage = !0, wx.navigateTo({ | |
| 1030 | + url: "/pages/user/address_list/address_list?operate=selectAddress" | |
| 1031 | + }); | |
| 1032 | + }, | |
| 1033 | + onUnload: function () { | |
| 1034 | + for (var i = 1; i < 100; i++) { | |
| 1035 | + clearInterval(i); | |
| 1036 | + } | |
| 1037 | + }, | |
| 1038 | + onHide: function () { | |
| 1039 | + this.data.is_timer = 0; | |
| 1040 | + for (var i = 1; i < 100; i++) { | |
| 1041 | + clearInterval(i); | |
| 1042 | + } | |
| 1043 | + }, | |
| 1044 | + //----------三个选项按钮----------- | |
| 1045 | + tabClick: function (t) { | |
| 1046 | + var e = t.currentTarget.id; | |
| 1047 | + this.setData({ | |
| 1048 | + activeCategoryId: e | |
| 1049 | + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | |
| 1050 | + }, | |
| 1051 | + tabClick2: function (t) { | |
| 1052 | + this.setData({ | |
| 1053 | + activeCategoryId2: t.currentTarget.id | |
| 1054 | + }); | |
| 1055 | + }, | |
| 1056 | + | |
| 1057 | + tabClick3: function (t) { | |
| 1058 | + var e = this; | |
| 1059 | + if (t.currentTarget.id != this.data.activeCategoryId3) { | |
| 1060 | + e.data.c_curr_p = 1; | |
| 1061 | + this.setData({ | |
| 1062 | + activeCategoryId3: t.currentTarget.id, | |
| 1063 | + comments: null, comments_no_more: 0, get_c: 0, | |
| 1064 | + }); | |
| 1065 | + this.requestComments_new(); | |
| 1066 | + } | |
| 1067 | + }, | |
| 1068 | + | |
| 1069 | + doScrollTop: function () { | |
| 1070 | + wx.pageScrollTo({ | |
| 1071 | + scrollTop: 0 | |
| 1072 | + }); | |
| 1073 | + }, | |
| 1074 | + | |
| 1075 | + tabComment: function () { | |
| 1076 | + this.setData({ | |
| 1077 | + activeCategoryId: 2, comments_no_more: 0, get_c: 0 | |
| 1078 | + }), this.data.comments || this.requestComments_new(); | |
| 1079 | + }, | |
| 1080 | + | |
| 1081 | + //商品详情的时候调用 | |
| 1082 | + tabGoodsContent: function () { | |
| 1083 | + var th = this, | |
| 1084 | + i = getApp().request; | |
| 1085 | + this.setData({ | |
| 1086 | + activeCategoryId: 1 | |
| 1087 | + }); | |
| 1088 | + | |
| 1089 | + if (th.data.cat_name == '') { | |
| 1090 | + //过去国别,分类,品牌的名称 | |
| 1091 | + i.get("/api/weshop/goodscategory/get/" + o.stoid + "/" + th.data.data.cat_id, { | |
| 1092 | + success: function (t) { | |
| 1093 | + var dd = t.data.data; | |
| 1094 | + if (t.data.code == 0) { | |
| 1095 | + th.setData({ | |
| 1096 | + cat_name: dd.name | |
| 1097 | + }); | |
| 1098 | + } | |
| 1099 | + } | |
| 1100 | + }); | |
| 1101 | + //过去国别,分类,品牌的名称 | |
| 1102 | + i.get("/api/weshop/brand/get/" + o.stoid + "/" + th.data.data.brand_id, { | |
| 1103 | + success: function (t) { | |
| 1104 | + var dd = t.data.data; | |
| 1105 | + if (t.data.code == 0) { | |
| 1106 | + th.setData({ | |
| 1107 | + brand_name: dd.name | |
| 1108 | + }); | |
| 1109 | + } | |
| 1110 | + } | |
| 1111 | + }); | |
| 1112 | + //过去国别,分类,品牌的名称 | |
| 1113 | + i.get("/api/weshop/nation/get/" + o.stoid + "/" + th.data.data.nation_id, { | |
| 1114 | + success: function (t) { | |
| 1115 | + var dd = t.data.data; | |
| 1116 | + if (t.data.code == 0) { | |
| 1117 | + th.setData({ | |
| 1118 | + nation_name: dd.name | |
| 1119 | + }); | |
| 1120 | + } | |
| 1121 | + } | |
| 1122 | + }); | |
| 1123 | + } | |
| 1124 | + }, | |
| 1125 | + | |
| 1126 | + //获取redis中的数量 | |
| 1127 | + async getactLen(func) { | |
| 1128 | + var r_num = 0, | |
| 1129 | + prom_type = this.data.prom_type, | |
| 1130 | + prom_id = this.data.prom_id; | |
| 1131 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 1132 | + 1: 1 | |
| 1133 | + }).then(res => { | |
| 1134 | + var em = res; | |
| 1135 | + if (em.data.code == 0) { | |
| 1136 | + r_num = em.data.data; | |
| 1137 | + } | |
| 1138 | + }) | |
| 1139 | + func(r_num); | |
| 1140 | + }, | |
| 1141 | + | |
| 1142 | + //------------加入购物车-------------- | |
| 1143 | + addCart: function (t) { | |
| 1144 | + var th = this; | |
| 1145 | + var ind = t.currentTarget.dataset.openSpecModal_ind; | |
| 1146 | + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | |
| 1147 | + th.setData({ | |
| 1148 | + open_ind_store: ind | |
| 1149 | + }); | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + //如果是秒杀的话,要看redis够不够 | |
| 1153 | + if (this.data.prom_type == 1 || this.data.prom_type == 2) { | |
| 1154 | + | |
| 1155 | + if (this.data.openSpecModal_flash_normal) { | |
| 1156 | + this.data.is_normal=1; //是普通购买 | |
| 1157 | + th.add_cart_func(t); | |
| 1158 | + return false; | |
| 1159 | + } | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + this.getactLen(function (num) { | |
| 1163 | + if (num < th.data.goodsInputNum) { | |
| 1164 | + getApp().my_warnning("活动库存不足!", 0, th); | |
| 1165 | + return false; | |
| 1166 | + } else { | |
| 1167 | + th.add_cart_func(t); | |
| 1168 | + } | |
| 1169 | + }); | |
| 1170 | + } else { | |
| 1171 | + th.add_cart_func(t); | |
| 1172 | + } | |
| 1173 | + }, | |
| 1174 | + | |
| 1175 | + //-- 加入购物的函数 -- | |
| 1176 | + add_cart_func_inte: function (t) { | |
| 1177 | + var i = getApp().request; | |
| 1178 | + if (oo.user_id == null) { | |
| 1179 | + return s.my_warnning("还未登录!", 0, this); | |
| 1180 | + } | |
| 1181 | + if (!getApp().globalData.userInfo) { | |
| 1182 | + return s.my_warnning("还未登录!", 0, this); | |
| 1183 | + } | |
| 1184 | + | |
| 1185 | + var e = this, | |
| 1186 | + th = e, | |
| 1187 | + a = 0, | |
| 1188 | + o = this.data.data; | |
| 1189 | + a = o.goods_id; | |
| 1190 | + | |
| 1191 | + //----------添加到购物车时,要判断限购数量,-------- | |
| 1192 | + e.get_buy_num(o, function (ee) { | |
| 1193 | + //---判断商品是否超出限购--- | |
| 1194 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | |
| 1195 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | |
| 1196 | + // wx.showModal({ | |
| 1197 | + // title: '提示', | |
| 1198 | + // content: '超出商品限购' | |
| 1199 | + // }); | |
| 1200 | + s.my_warnning('超出商品限购', 0, th); | |
| 1201 | + return false; | |
| 1202 | + } | |
| 1203 | + } | |
| 1204 | + //---判断商品是否超出活动限购--- | |
| 1205 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) { | |
| 1206 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | |
| 1207 | + // wx.showModal({ | |
| 1208 | + // title: '提示', | |
| 1209 | + // content: '超出商品活动限购' | |
| 1210 | + // }); | |
| 1211 | + s.my_warnning('超出商品活动限购', 0, th); | |
| 1212 | + return false; | |
| 1213 | + } | |
| 1214 | + } | |
| 1215 | + | |
| 1216 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | |
| 1217 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | |
| 1218 | + this.setData({ | |
| 1219 | + sto_sele_name: "" | |
| 1220 | + }); | |
| 1221 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | |
| 1222 | + | |
| 1223 | + //--------------此时操作的数据------------ | |
| 1224 | + var newd = { | |
| 1225 | + goods_id: o.goods_id, | |
| 1226 | + goods_num: th.data.goodsInputNum, | |
| 1227 | + pick_id: th.data.sto_sele_id, | |
| 1228 | + user_id: oo.user_id, | |
| 1229 | + store_id: th.data.stoid, | |
| 1230 | + goods_price: th.data.prom_price, | |
| 1231 | + integral: th.data.prom_integral, | |
| 1232 | + member_goods_price: o.shop_price, | |
| 1233 | + goods_name: o.goods_name, | |
| 1234 | + goods_sn: o.goods_sn, | |
| 1235 | + sku: o.sku, | |
| 1236 | + }; | |
| 1237 | + | |
| 1238 | + //---是不是从收藏夹出来的--- | |
| 1239 | + if (th.data.c_guide_id) { | |
| 1240 | + newd['guide_id'] = th.data.c_guide_id; | |
| 1241 | + newd['guide_type'] = 2; | |
| 1242 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3; | |
| 1243 | + } else { | |
| 1244 | + if (getApp().globalData.guide_id) { | |
| 1245 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 1246 | + newd['guide_type'] = 0; | |
| 1247 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1; | |
| 1248 | + } | |
| 1249 | + } | |
| 1250 | + | |
| 1251 | + //让商品带上房间号 | |
| 1252 | + //让商品带上房间号 | |
| 1253 | + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) { | |
| 1254 | + if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | |
| 1255 | + newd.room_id = getApp().globalData.room_id; | |
| 1256 | + } | |
| 1257 | + } else { | |
| 1258 | + if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id; | |
| 1259 | + } | |
| 1260 | + | |
| 1261 | + //如果是积分够,is_integral_normal就要有积分购普通购买字段 | |
| 1262 | + //if(o.prom_type==4){ | |
| 1263 | + //newd.is_integral_normal=1; | |
| 1264 | + //} | |
| 1265 | + | |
| 1266 | + //-----如果是秒杀,团购,积分购,拼团----- | |
| 1267 | + newd.prom_type = th.data.prom_type; | |
| 1268 | + newd.prom_id = th.data.prom_id; | |
| 1269 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 1270 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | |
| 1271 | + | |
| 1272 | + var i_canbuy = th.data.prom_act.limitqty - th.data.prom_act.buy_num; | |
| 1273 | + if (i_canbuy < e.data.goodsInputNum) { | |
| 1274 | + return s.my_warnning("活动库存不足!", 0, th); | |
| 1275 | + } | |
| 1276 | + th.add_cart_next(e, t, a, o, newd); //立即购买下一步 | |
| 1277 | + | |
| 1278 | + }) | |
| 1279 | + }, | |
| 1280 | + | |
| 1281 | + //-- 加入购物的函数 -- | |
| 1282 | + add_cart_func: function (t) { | |
| 1283 | + var i = getApp().request; | |
| 1284 | + if (oo.user_id == null) { | |
| 1285 | + return s.my_warnning("还未登录!", 0, this); | |
| 1286 | + } | |
| 1287 | + | |
| 1288 | + if (!getApp().globalData.userInfo) { | |
| 1289 | + return s.my_warnning("还未登录!", 0, this); | |
| 1290 | + } | |
| 1291 | + | |
| 1292 | + var e = this, | |
| 1293 | + th = e, | |
| 1294 | + a = 0, | |
| 1295 | + o = this.data.sele_g; | |
| 1296 | + a = o.goods_id; | |
| 1297 | + | |
| 1298 | + //----------添加到购物车时,要判断限购数量,-------- | |
| 1299 | + e.get_buy_num(o, function (ee) { | |
| 1300 | + //---判断商品是否超出限购--- | |
| 1301 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | |
| 1302 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | |
| 1303 | + // wx.showModal({ | |
| 1304 | + // title: '提示', | |
| 1305 | + // content: '超出商品限购' | |
| 1306 | + // }); | |
| 1307 | + s.my_warnning('超出商品限购', 0, th); | |
| 1308 | + return false; | |
| 1309 | + } | |
| 1310 | + } | |
| 1311 | + //---判断商品是否超出活动限购--- | |
| 1312 | + if ((th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) && !th.data.is_normal) { | |
| 1313 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | |
| 1314 | + // wx.showModal({ | |
| 1315 | + // title: '提示', | |
| 1316 | + // content: '超出商品活动限购' | |
| 1317 | + // }); | |
| 1318 | + s.my_warnning('超出商品活动限购', 0, th); | |
| 1319 | + return false; | |
| 1320 | + } | |
| 1321 | + } | |
| 1322 | + | |
| 1323 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | |
| 1324 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | |
| 1325 | + this.setData({ | |
| 1326 | + sto_sele_name: "" | |
| 1327 | + }); | |
| 1328 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | |
| 1329 | + | |
| 1330 | + //--------------此时操作的数据------------ | |
| 1331 | + var newd = { | |
| 1332 | + goods_id: o.goods_id, | |
| 1333 | + goods_num: th.data.goodsInputNum, | |
| 1334 | + pick_id: th.data.sto_sele_id, | |
| 1335 | + user_id: oo.user_id, | |
| 1336 | + store_id: th.data.stoid, | |
| 1337 | + goods_price: o.shop_price, | |
| 1338 | + member_goods_price: o.shop_price, | |
| 1339 | + goods_name: o.goods_name, | |
| 1340 | + goods_sn: o.goods_sn, | |
| 1341 | + sku: o.sku, | |
| 1342 | + prom_id: th.data.sele_g.prom_id, | |
| 1343 | + prom_type: th.data.sele_g.prom_type, | |
| 1344 | + }; | |
| 1345 | + | |
| 1346 | + //---是不是从收藏夹出来的--- | |
| 1347 | + if (th.data.c_guide_id) { | |
| 1348 | + newd['guide_id'] = th.data.c_guide_id; | |
| 1349 | + newd['guide_type'] = 2; | |
| 1350 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3; | |
| 1351 | + } else { | |
| 1352 | + if (getApp().globalData.guide_id) { | |
| 1353 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 1354 | + newd['guide_type'] = 0; | |
| 1355 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1; | |
| 1356 | + } | |
| 1357 | + } | |
| 1358 | + | |
| 1359 | + //让商品带上房间号 | |
| 1360 | + //让商品带上房间号 | |
| 1361 | + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) { | |
| 1362 | + if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | |
| 1363 | + newd.room_id = getApp().globalData.room_id; | |
| 1364 | + } | |
| 1365 | + } else { | |
| 1366 | + if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id; | |
| 1367 | + } | |
| 1368 | + | |
| 1369 | + //如果是积分够,is_integral_normal就要有积分购普通购买字段 | |
| 1370 | + if (o.prom_type == 4) { | |
| 1371 | + newd.is_integral_normal = 1; | |
| 1372 | + } | |
| 1373 | + | |
| 1374 | + //如果有线下取价 | |
| 1375 | + if (o.offline_price) { | |
| 1376 | + newd.offline_price = o.offline_price; | |
| 1377 | + newd.pricing_type = o.pricing_type; | |
| 1378 | + } | |
| 1379 | + | |
| 1380 | + //-----如果是秒杀,团购,积分购,拼团----- | |
| 1381 | + if (th.data.prom_type == 1 || th.data.prom_type == 2) { | |
| 1382 | + | |
| 1383 | + if (th.data.openSpecModal_flash_normal) { | |
| 1384 | + | |
| 1385 | + newd.prom_type = 0; | |
| 1386 | + newd.prom_id = 0; | |
| 1387 | + | |
| 1388 | + //---如果是线下门店销售的时候--- | |
| 1389 | + if (th.data.sales_rules == 2) { | |
| 1390 | + var pick = th.get_pick_from_list(th.data.sto_sele_id) | |
| 1391 | + //---通过接口获取门店的线下库存信息-- | |
| 1392 | + getApp().request.get("/api/weshop/goods/getWareStorages", { | |
| 1393 | + data: { | |
| 1394 | + storageNos: pick.pickup_no, | |
| 1395 | + wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | |
| 1396 | + storeId: os.stoid | |
| 1397 | + }, | |
| 1398 | + success: function (res) { | |
| 1399 | + if (res.data.code == 0) { | |
| 1400 | + if (res.data.data.pageData.length > 0) { | |
| 1401 | + var CanOutQty = res.data.data.pageData[0].CanOutQty; | |
| 1402 | + if (CanOutQty < e.data.goodsInputNum) { | |
| 1403 | + return s.my_warnning("库存不足!", 0, th); | |
| 1404 | + } | |
| 1405 | + //在调一次接口,读取商品的预出库的数量,lock | |
| 1406 | + getApp().request.get("/api/weshop/order/ware/lock/page", { | |
| 1407 | + data: { | |
| 1408 | + store_id: os.stoid, | |
| 1409 | + wareId: th.data.sele_g.goods_id, | |
| 1410 | + storageId: pick.pickup_id, | |
| 1411 | + pageSize: 1000 | |
| 1412 | + }, | |
| 1413 | + success: function (res_data) { | |
| 1414 | + if (res_data.data.code == 0 && res_data.data.data.total > 0) { | |
| 1415 | + | |
| 1416 | + var lock = 0; | |
| 1417 | + for (var i in res_data.data.data.pageData) { | |
| 1418 | + lock += res_data.data.data.pageData[i].outQty; | |
| 1419 | + } | |
| 1420 | + | |
| 1421 | + if (CanOutQty <= lock) { | |
| 1422 | + return s.my_warnning("库存不足!", 0, th); | |
| 1423 | + } | |
| 1424 | + th.add_cart_next(e, t, a, o, newd, CanOutQty - lock); | |
| 1425 | + } else { | |
| 1426 | + th.add_cart_next(e, t, a, o, newd, CanOutQty); | |
| 1427 | + } | |
| 1428 | + } | |
| 1429 | + }) | |
| 1430 | + } else { | |
| 1431 | + return s.my_warnning("库存不足!", 0, th); | |
| 1432 | + } | |
| 1433 | + | |
| 1434 | + } | |
| 1435 | + } | |
| 1436 | + }) | |
| 1437 | + } else { | |
| 1438 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 1439 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | |
| 1440 | + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | |
| 1441 | + } | |
| 1442 | + | |
| 1443 | + return false; | |
| 1444 | + } | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + newd.goods_price = th.data.prom_price; | |
| 1448 | + newd.member_goods_price = th.data.prom_price, | |
| 1449 | + newd.prom_type = th.data.prom_type; | |
| 1450 | + newd.prom_id = th.data.prom_id; | |
| 1451 | + | |
| 1452 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 1453 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | |
| 1454 | + | |
| 1455 | + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | |
| 1456 | + | |
| 1457 | + } else if (o.prom_type == 7) { | |
| 1458 | + | |
| 1459 | + //判断进行中的活动,是不是要判断线下库存 | |
| 1460 | + th.check_zh_acting(function (ee) { | |
| 1461 | + newd.prom_id = 0; | |
| 1462 | + newd.prom_type = 0; | |
| 1463 | + if (ee && th.data.sele_g.act) { | |
| 1464 | + newd.prom_id = th.data.sele_g.act.id; | |
| 1465 | + newd.prom_type = 7; | |
| 1466 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 1467 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | |
| 1468 | + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | |
| 1469 | + return false; | |
| 1470 | + } else { | |
| 1471 | + //---如果是线下门店销售的时候--- | |
| 1472 | + if (th.data.sales_rules == 2) { | |
| 1473 | + var pick = th.get_pick_from_list(th.data.sto_sele_id) | |
| 1474 | + //---通过接口获取门店的线下库存信息-- | |
| 1475 | + getApp().request.get("/api/weshop/goods/getWareStorages", { | |
| 1476 | + data: { | |
| 1477 | + storageNos: pick.pickup_no, | |
| 1478 | + wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | |
| 1479 | + storeId: os.stoid | |
| 1480 | + }, | |
| 1481 | + success: function (res) { | |
| 1482 | + if (res.data.code == 0) { | |
| 1483 | + if (res.data.data.pageData.length > 0) { | |
| 1484 | + var CanOutQty = res.data.data.pageData[0].CanOutQty; | |
| 1485 | + if (CanOutQty < e.data.goodsInputNum) { | |
| 1486 | + return s.my_warnning("库存不足!", 0, th); | |
| 1487 | + } | |
| 1488 | + //在调一次接口,读取商品的预出库的数量,lock | |
| 1489 | + getApp().request.get("/api/weshop/order/ware/lock/page", { | |
| 1490 | + data: { | |
| 1491 | + store_id: os.stoid, | |
| 1492 | + wareId: th.data.sele_g.goods_id, | |
| 1493 | + storageId: pick.pickup_id, | |
| 1494 | + pageSize: 1000 | |
| 1495 | + }, | |
| 1496 | + success: function (res_data) { | |
| 1497 | + if (res_data.data.code == 0 && res_data.data.data.total > 0) { | |
| 1498 | + | |
| 1499 | + var lock = 0; | |
| 1500 | + for (var i in res_data.data.data.pageData) { | |
| 1501 | + lock += res_data.data.data.pageData[i].outQty; | |
| 1502 | + } | |
| 1503 | + | |
| 1504 | + if (CanOutQty <= lock) { | |
| 1505 | + return s.my_warnning("库存不足!", 0, th); | |
| 1506 | + } | |
| 1507 | + th.add_cart_next(e, t, a, o, newd, CanOutQty - lock); | |
| 1508 | + } else { | |
| 1509 | + th.add_cart_next(e, t, a, o, newd, CanOutQty); | |
| 1510 | + } | |
| 1511 | + } | |
| 1512 | + }) | |
| 1513 | + } else { | |
| 1514 | + return s.my_warnning("库存不足!", 0, th); | |
| 1515 | + } | |
| 1516 | + | |
| 1517 | + } | |
| 1518 | + } | |
| 1519 | + }) | |
| 1520 | + } else { | |
| 1521 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 1522 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | |
| 1523 | + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | |
| 1524 | + } | |
| 1525 | + } | |
| 1526 | + }) | |
| 1527 | + | |
| 1528 | + } | |
| 1529 | + else if (th.data.prom_type == 0 || th.data.prom_type == 3 || th.data.prom_type == 4 || th.data.prom_type == 5 || th.data.prom_type == 10) { | |
| 1530 | + newd.prom_type = 0; | |
| 1531 | + newd.prom_id = 0; | |
| 1532 | + | |
| 1533 | + if (th.data.prom_type == 10) { | |
| 1534 | + newd.prom_type = th.data.prom_type; | |
| 1535 | + newd.prom_id = th.data.prom_id; | |
| 1536 | + } | |
| 1537 | + | |
| 1538 | + //---如果是线下门店销售的时候--- | |
| 1539 | + if (th.data.sales_rules == 2) { | |
| 1540 | + var pick = th.get_pick_from_list(th.data.sto_sele_id) | |
| 1541 | + //---通过接口获取门店的线下库存信息-- | |
| 1542 | + getApp().request.get("/api/weshop/goods/getWareStorages", { | |
| 1543 | + data: { | |
| 1544 | + storageNos: pick.pickup_no, | |
| 1545 | + wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | |
| 1546 | + storeId: os.stoid | |
| 1547 | + }, | |
| 1548 | + success: function (res) { | |
| 1549 | + if (res.data.code == 0) { | |
| 1550 | + if (res.data.data.pageData.length > 0) { | |
| 1551 | + var CanOutQty = res.data.data.pageData[0].CanOutQty; | |
| 1552 | + if (CanOutQty < e.data.goodsInputNum) { | |
| 1553 | + return s.my_warnning("库存不足!", 0, th); | |
| 1554 | + } | |
| 1555 | + //在调一次接口,读取商品的预出库的数量,lock | |
| 1556 | + getApp().request.get("/api/weshop/order/ware/lock/page", { | |
| 1557 | + data: { | |
| 1558 | + store_id: os.stoid, | |
| 1559 | + wareId: th.data.sele_g.goods_id, | |
| 1560 | + storageId: pick.pickup_id, | |
| 1561 | + pageSize: 1000 | |
| 1562 | + }, | |
| 1563 | + success: function (res_data) { | |
| 1564 | + if (res_data.data.code == 0 && res_data.data.data.total > 0) { | |
| 1565 | + | |
| 1566 | + var lock = 0; | |
| 1567 | + for (var i in res_data.data.data.pageData) { | |
| 1568 | + lock += res_data.data.data.pageData[i].outQty; | |
| 1569 | + } | |
| 1570 | + | |
| 1571 | + if (CanOutQty <= lock) { | |
| 1572 | + return s.my_warnning("库存不足!", 0, th); | |
| 1573 | + } | |
| 1574 | + th.add_cart_next(e, t, a, o, newd, CanOutQty - lock); | |
| 1575 | + } else { | |
| 1576 | + th.add_cart_next(e, t, a, o, newd, CanOutQty); | |
| 1577 | + } | |
| 1578 | + } | |
| 1579 | + }) | |
| 1580 | + } else { | |
| 1581 | + return s.my_warnning("库存不足!", 0, th); | |
| 1582 | + } | |
| 1583 | + | |
| 1584 | + } | |
| 1585 | + } | |
| 1586 | + }) | |
| 1587 | + } else { | |
| 1588 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 1589 | + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | |
| 1590 | + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | |
| 1591 | + } | |
| 1592 | + } | |
| 1593 | + }) | |
| 1594 | + }, | |
| 1595 | + | |
| 1596 | + //---加入购物车的最后一步--- | |
| 1597 | + add_cart_next(e, t, a, o, newd, CanOutQty) { | |
| 1598 | + var th = this, i = getApp().request; | |
| 1599 | + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | |
| 1600 | + if ((o.prom_type != 1 || o.prom_id <= 0) && ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 ) || th.data.is_normal)) { | |
| 1601 | + var conf = th.data.bconfig; | |
| 1602 | + if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) { | |
| 1603 | + var s_list = JSON.parse(conf.switch_list); | |
| 1604 | + var now = ut.gettimestamp(); | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/'); | |
| 1608 | + var end = new Date(str); | |
| 1609 | + end = Date.parse(end) / 1000; | |
| 1610 | + | |
| 1611 | + //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下-- | |
| 1612 | + if (parseInt(s_list.rank_switch) == 2 && end > now) { | |
| 1613 | + var card_price = o[getApp().globalData.userInfo['card_field']]; | |
| 1614 | + //如果会员有等级价 | |
| 1615 | + if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null | |
| 1616 | + && getApp().globalData.userInfo['card_field'] != "" && card_price > 0) { | |
| 1617 | + newd.goods_price = card_price; | |
| 1618 | + newd.member_goods_price = card_price; | |
| 1619 | + } | |
| 1620 | + } | |
| 1621 | + } | |
| 1622 | + } | |
| 1623 | + | |
| 1624 | + //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d); | |
| 1625 | + if ("add" == t.currentTarget.dataset.action) { | |
| 1626 | + | |
| 1627 | + if (th.data.prom_goods) { | |
| 1628 | + newd.prom_type = 3; | |
| 1629 | + newd.prom_id = th.data.prom_goods[0].prom_id; | |
| 1630 | + } | |
| 1631 | + | |
| 1632 | + //----先看会员在购物车中是否加入了该商品----- | |
| 1633 | + i.get("/api/weshop/cart/page", { | |
| 1634 | + data: { | |
| 1635 | + store_id: e.data.stoid, | |
| 1636 | + user_id: oo.user_id, | |
| 1637 | + goods_id: a, | |
| 1638 | + pick_id: e.data.sto_sele_id, | |
| 1639 | + state: 0 | |
| 1640 | + }, | |
| 1641 | + success: function (re) { | |
| 1642 | + | |
| 1643 | + //-------如果购物车中有相关的数据--------- | |
| 1644 | + if (re.data.data.total > 0) { | |
| 1645 | + | |
| 1646 | + var item = re.data.data.pageData[0]; | |
| 1647 | + | |
| 1648 | + //判断数量,要看下购物车中有没有该商品 | |
| 1649 | + if (CanOutQty) { | |
| 1650 | + if (item.goods_num + th.data.goodsInputNum > CanOutQty) { | |
| 1651 | + return s.my_warnning("库存不足!", 0, th); | |
| 1652 | + } | |
| 1653 | + } else { | |
| 1654 | + if (item.goods_num + th.data.goodsInputNum > o.store_count) { | |
| 1655 | + return s.my_warnning("库存不足!", 0, th); | |
| 1656 | + } | |
| 1657 | + } | |
| 1658 | + | |
| 1659 | + var updata = { | |
| 1660 | + id: item.id, | |
| 1661 | + goods_num: e.data.goodsInputNum + item.goods_num, | |
| 1662 | + goods_price: newd.goods_price, | |
| 1663 | + member_goods_price: newd.goods_price, | |
| 1664 | + store_id: th.data.stoid, | |
| 1665 | + }; | |
| 1666 | + | |
| 1667 | + //---是不是从收藏夹出来的--- | |
| 1668 | + if (th.data.c_guide_id) { | |
| 1669 | + updata['guide_id'] = th.data.c_guide_id; | |
| 1670 | + updata['guide_type'] = 3; //加入购物车之后就变成了3 | |
| 1671 | + } else { | |
| 1672 | + if (getApp().globalData.guide_id) { | |
| 1673 | + updata['guide_id'] = getApp().globalData.guide_id; | |
| 1674 | + updata['guide_type'] = 0; | |
| 1675 | + } | |
| 1676 | + } | |
| 1677 | + | |
| 1678 | + i.put("/api/weshop/cart/update", { | |
| 1679 | + data: updata, | |
| 1680 | + success: function (t) { | |
| 1681 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
| 1682 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | |
| 1683 | + th.setData({ | |
| 1684 | + cartGoodsNum: c_num | |
| 1685 | + }); | |
| 1686 | + th.closeSpecModal(); | |
| 1687 | + } | |
| 1688 | + }); | |
| 1689 | + } else { | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + i.post("/api/weshop/cart/save", { | |
| 1693 | + data: newd, | |
| 1694 | + success: function (t) { | |
| 1695 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
| 1696 | + var c_num = th.data.cartGoodsNum + e.data.goodsInputNum; | |
| 1697 | + th.setData({ | |
| 1698 | + cartGoodsNum: c_num | |
| 1699 | + }); | |
| 1700 | + th.closeSpecModal(); | |
| 1701 | + } | |
| 1702 | + }); | |
| 1703 | + } | |
| 1704 | + } | |
| 1705 | + }); | |
| 1706 | + | |
| 1707 | + } | |
| 1708 | + else { | |
| 1709 | + | |
| 1710 | + //这一步主要是要让立即购买 走 购物车的逻辑 参与活动 | |
| 1711 | + if (newd.prom_type == 10 || newd.prom_type == 7) { | |
| 1712 | + //----先看会员在购物车中是否加入了该商品,立即购买的----- | |
| 1713 | + getApp().request.get("/api/weshop/cart/page", { | |
| 1714 | + data: { | |
| 1715 | + store_id: e.data.stoid, | |
| 1716 | + user_id: oo.user_id, | |
| 1717 | + state: 1 | |
| 1718 | + }, | |
| 1719 | + success: function (res) { | |
| 1720 | + //-------如果购物车中有相关的数据--------- | |
| 1721 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 1722 | + for (let j in res.data.data.pageData) { | |
| 1723 | + let item_j = res.data.data.pageData[j]; | |
| 1724 | + var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id; | |
| 1725 | + getApp().request.delete(url, {}); | |
| 1726 | + } | |
| 1727 | + } | |
| 1728 | + newd.state = 1; | |
| 1729 | + getApp().request.post("/api/weshop/cart/save", { | |
| 1730 | + data: newd, | |
| 1731 | + success: function (t) { | |
| 1732 | + th.closeSpecModal(); | |
| 1733 | + getApp().goto("/pages/cart/cart2/cart2?state=1"); | |
| 1734 | + } | |
| 1735 | + }); | |
| 1736 | + } | |
| 1737 | + }) | |
| 1738 | + return false; | |
| 1739 | + } | |
| 1740 | + | |
| 1741 | + if (th.data.prom_goods) { | |
| 1742 | + var prom_d = th.data.prom_goods; | |
| 1743 | + for (var i in prom_d) { | |
| 1744 | + //判断活动有俩种条件,0元 1件 | |
| 1745 | + var condition_t = prom_d[i].prom_type; | |
| 1746 | + switch (condition_t) { | |
| 1747 | + case 0: //按钱 | |
| 1748 | + if (newd.goods_price >= condition_t) { | |
| 1749 | + newd.prom_type = 3; | |
| 1750 | + newd.prom_id = prom_d[i].prom_id; | |
| 1751 | + } | |
| 1752 | + break | |
| 1753 | + case 1://按购买数量 | |
| 1754 | + if (newd.goods_num >= condition_t) { | |
| 1755 | + newd.prom_type = 3; | |
| 1756 | + newd.prom_id = prom_d[i].prom_id; | |
| 1757 | + } | |
| 1758 | + break; | |
| 1759 | + } | |
| 1760 | + } | |
| 1761 | + | |
| 1762 | + } | |
| 1763 | + | |
| 1764 | + newd['pick_name'] = th.data.sto_sele_name; | |
| 1765 | + newd['pick_dis'] = th.data.sto_sele_distr; | |
| 1766 | + th.buyNow(newd); | |
| 1767 | + } | |
| 1768 | + }, | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + //----------购买虚拟商品------ | |
| 1772 | + buyVirtualGoods: function (e) { | |
| 1773 | + Object.assign(e, { | |
| 1774 | + goods_name: this.data.data.goods.goods_name, | |
| 1775 | + spec_name: this.data.select.specName, | |
| 1776 | + price: this.data.select.price | |
| 1777 | + }), wx.navigateTo({ | |
| 1778 | + url: "/pages/virtual/buy_step/buy_step?" + t.Obj2Str(e) | |
| 1779 | + }); | |
| 1780 | + }, | |
| 1781 | + //----------积分兑换--------- | |
| 1782 | + exchange: function (e) { | |
| 1783 | + this.data.shippingCost < 0 || this.data.select.stock <= 0 || wx.navigateTo({ | |
| 1784 | + url: "/pages/cart/integral/integral?" + t.Obj2Str(e) | |
| 1785 | + }); | |
| 1786 | + }, | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + //----------立即购买----------- | |
| 1790 | + buyNow: function (e) { | |
| 1791 | + // this.data.shippingCost < 0 || this.data.select.stock <= 0 || (Object.assign(e, { | |
| 1792 | + // action: "buy_now" | |
| 1793 | + // }), | |
| 1794 | + this.setData({ | |
| 1795 | + openSpecModal: 0, | |
| 1796 | + openSpecModal_inte: 0, | |
| 1797 | + openSpecModal_inte_normal: 0, | |
| 1798 | + openSpecModal_pt: 0, | |
| 1799 | + }) | |
| 1800 | + | |
| 1801 | + if (e.prom_type == 4) { | |
| 1802 | + s.set_b_now(e); | |
| 1803 | + var url = "/pages/cart/cart2_inte/cart2_inte?is_bnow=1&goods_id=" + e.goods_id; | |
| 1804 | + getApp().goto(url); | |
| 1805 | + } else { | |
| 1806 | + //要判断积分购的普通购买有没有参加优惠活动 | |
| 1807 | + if (e.is_integral_normal == 1) { | |
| 1808 | + this.check_nor_promgood(e.goods_id, function (res) { | |
| 1809 | + if (res && res.cat_id) { | |
| 1810 | + e.prom_type = 3; | |
| 1811 | + e.prom_id = res.cat_id | |
| 1812 | + } | |
| 1813 | + s.set_b_now(e); | |
| 1814 | + /*-- | |
| 1815 | + wx.redirectTo({ | |
| 1816 | + url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | |
| 1817 | + });--*/ | |
| 1818 | + getApp().goto("/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id) | |
| 1819 | + | |
| 1820 | + }) | |
| 1821 | + } else { | |
| 1822 | + s.set_b_now(e); | |
| 1823 | + /*-- | |
| 1824 | + wx.redirectTo({ | |
| 1825 | + url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | |
| 1826 | + });--*/ | |
| 1827 | + getApp().goto("/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id) | |
| 1828 | + } | |
| 1829 | + | |
| 1830 | + } | |
| 1831 | + }, | |
| 1832 | + | |
| 1833 | + //----------增加购买数量----------- | |
| 1834 | + addCartNum: function (t) { | |
| 1835 | + this.checkCartNum(this.data.goodsInputNum + 1); | |
| 1836 | + }, | |
| 1837 | + //----------减少购买数量----------- | |
| 1838 | + subCartNum: function (t) { | |
| 1839 | + this.checkCartNum(this.data.goodsInputNum - 1); | |
| 1840 | + }, | |
| 1841 | + //----------输入框输入购买数量----------- | |
| 1842 | + inputCartNum: function (t) { | |
| 1843 | + this.checkCartNum(Number(t.detail.value)); | |
| 1844 | + }, | |
| 1845 | + | |
| 1846 | + //----------增加购买数量----------- | |
| 1847 | + addCartNum_inte: function (t) { | |
| 1848 | + this.checkCartNum_inte(this.data.goodsInputNum + 1); | |
| 1849 | + }, | |
| 1850 | + //----------减少购买数量----------- | |
| 1851 | + subCartNum_inte: function (t) { | |
| 1852 | + this.checkCartNum_inte(this.data.goodsInputNum - 1); | |
| 1853 | + }, | |
| 1854 | + //----------输入框输入购买数量----------- | |
| 1855 | + inputCartNum_inte: function (t) { | |
| 1856 | + this.checkCartNum_inte(Number(t.detail.value)); | |
| 1857 | + }, | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + //------检查数量是不是超出限购------ | |
| 1861 | + checkCartNum: function (t) { | |
| 1862 | + var th = this; | |
| 1863 | + this.get_buy_num(this.data.sele_g, async function () { | |
| 1864 | + | |
| 1865 | + //--判断商品是否超出限购-- | |
| 1866 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | |
| 1867 | + | |
| 1868 | + var gd_buy_num = th.data.g_buy_num.get(th.data.sele_g.goods_id); | |
| 1869 | + | |
| 1870 | + if (t + gd_buy_num > th.data.sele_g.viplimited) { | |
| 1871 | + // wx.showModal({ | |
| 1872 | + // title: '超出商品限购', | |
| 1873 | + // }); | |
| 1874 | + s.my_warnning('超出商品限购', 0, th); | |
| 1875 | + var num = th.data.sele_g.viplimited - gd_buy_num; | |
| 1876 | + if (num < 0) num = 0; | |
| 1877 | + th.setData({goodsInputNum: num}) | |
| 1878 | + return false; | |
| 1879 | + } | |
| 1880 | + } | |
| 1881 | + | |
| 1882 | + //如果是普通购买的情况下 | |
| 1883 | + if(th.data.openSpecModal_flash_normal) th.data.is_normal=1; | |
| 1884 | + | |
| 1885 | + //--判断商品是否超出活动限购-- | |
| 1886 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) { | |
| 1887 | + if (t + th.data.prom_buy_num > th.data.prom_buy_limit) { | |
| 1888 | + // wx.showModal({ | |
| 1889 | + // title: '超出商品活动限购', | |
| 1890 | + // }); | |
| 1891 | + s.my_warnning('超出商品活动限购', 0, th); | |
| 1892 | + var num = th.data.prom_buy_limit - th.data.prom_buy_num; | |
| 1893 | + if (num < 0) num = 0; | |
| 1894 | + th.setData({goodsInputNum: num}) | |
| 1895 | + return false; | |
| 1896 | + } | |
| 1897 | + } | |
| 1898 | + | |
| 1899 | + if ((th.data.sele_g.prom_type == 1 || th.data.sele_g.prom_type == 6) && !th.data.is_normal) { | |
| 1900 | + var redis_num = 0; | |
| 1901 | + //------判断活动是否抢光----- | |
| 1902 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
| 1903 | + os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, { | |
| 1904 | + 1: 1 | |
| 1905 | + }).then(res => { | |
| 1906 | + redis_num = res.data.data; | |
| 1907 | + }); | |
| 1908 | + | |
| 1909 | + if (t > redis_num) { | |
| 1910 | + // wx.showModal({ | |
| 1911 | + // title: '超出商品活动库存', | |
| 1912 | + // }); | |
| 1913 | + s.my_warnning('超出商品活动库存', 0, th); | |
| 1914 | + th.setData({goodsInputNum: redis_num}) | |
| 1915 | + return false; | |
| 1916 | + } | |
| 1917 | + } | |
| 1918 | + var e = th.data.sele_g.store_count; | |
| 1919 | + var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4 | |
| 1920 | + if (th.data.sales_rules == 2 && (p_type != 1 && p_type != 4 && p_type != 6 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) { | |
| 1921 | + if (!th.data.def_pick_store) { | |
| 1922 | + wx.showModal({title: '请选择门店',}); | |
| 1923 | + return false; | |
| 1924 | + } else { | |
| 1925 | + e = th.data.def_pick_store.CanOutQty; | |
| 1926 | + } | |
| 1927 | + } | |
| 1928 | + if (!e) e = 0; | |
| 1929 | + //库存不足,不增加 | |
| 1930 | + if (e < t) { | |
| 1931 | + wx.showModal({title: '库存不足',}); | |
| 1932 | + if (e < 0) e = 0; | |
| 1933 | + th.setData({goodsInputNum: e}); | |
| 1934 | + return false; | |
| 1935 | + } | |
| 1936 | + t > e || 0 == e ? t = e : t < 1 && (t = 1); | |
| 1937 | + th.setData({goodsInputNum: t}); | |
| 1938 | + th.is_show_more_buy(); | |
| 1939 | + | |
| 1940 | + }) | |
| 1941 | + }, | |
| 1942 | + | |
| 1943 | + //----- 检查一下积分购的限购之类的问题 ----- | |
| 1944 | + checkCartNum_inte: function (t) { | |
| 1945 | + var th = this; | |
| 1946 | + this.get_buy_num(this.data.data, async function () { | |
| 1947 | + ; | |
| 1948 | + //--判断商品是否超出限购-- | |
| 1949 | + if (th.data.g_buy_num != null && th.data.data.viplimited > 0) { | |
| 1950 | + | |
| 1951 | + var gd_buy_num = th.data.g_buy_num.get(th.data.sele_g.goods_id); | |
| 1952 | + | |
| 1953 | + if (t + gd_buy_num > th.data.sele_g.viplimited) { | |
| 1954 | + // wx.showModal({ | |
| 1955 | + // title: '超出商品限购', | |
| 1956 | + // }); | |
| 1957 | + s.my_warnning('超出商品限购', 0, th); | |
| 1958 | + var num = th.data.sele_g.viplimited - gd_buy_num; | |
| 1959 | + if (num < 0) num = 0; | |
| 1960 | + th.setData({goodsInputNum: num}) | |
| 1961 | + return false; | |
| 1962 | + } | |
| 1963 | + } | |
| 1964 | + | |
| 1965 | + //--判断商品是否超出活动限购-- | |
| 1966 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) { | |
| 1967 | + if (t + th.data.prom_buy_num > th.data.prom_buy_limit) { | |
| 1968 | + // wx.showModal({ | |
| 1969 | + // title: '超出商品活动限购', | |
| 1970 | + // }); | |
| 1971 | + s.my_warnning('超出商品活动限购', 0, th); | |
| 1972 | + var num = th.data.prom_buy_limit - th.data.prom_buy_num; | |
| 1973 | + if (num < 0) num = 0; | |
| 1974 | + th.setData({goodsInputNum: num}) | |
| 1975 | + return false; | |
| 1976 | + } | |
| 1977 | + } | |
| 1978 | + | |
| 1979 | + if (th.data.sele_g.prom_type == 1 || th.data.sele_g.prom_type == 6) { | |
| 1980 | + var redis_num = 0; | |
| 1981 | + //------判断活动是否抢光----- | |
| 1982 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
| 1983 | + os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, { | |
| 1984 | + 1: 1 | |
| 1985 | + }).then(res => { | |
| 1986 | + redis_num = res.data.data; | |
| 1987 | + }); | |
| 1988 | + | |
| 1989 | + if (t > redis_num) { | |
| 1990 | + // wx.showModal({ | |
| 1991 | + // title: '超出商品活动库存', | |
| 1992 | + // }); | |
| 1993 | + s.my_warnning('超出商品活动库存', 0, th); | |
| 1994 | + th.setData({goodsInputNum: redis_num}) | |
| 1995 | + return false; | |
| 1996 | + } | |
| 1997 | + } | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + //判断积分购库存 | |
| 2001 | + if (!th.data.is_normal && th.data.prom_type == 4) { | |
| 2002 | + var i_canbuy = th.data.prom_act.limitqty - th.data.prom_act.buy_num; | |
| 2003 | + if (t > i_canbuy) { | |
| 2004 | + // wx.showModal({ | |
| 2005 | + // title: '超出商品活动库存', | |
| 2006 | + // }); | |
| 2007 | + s.my_warnning('超出商品活动库存', 0, th); | |
| 2008 | + return false; | |
| 2009 | + } | |
| 2010 | + } | |
| 2011 | + | |
| 2012 | + var e = th.data.sele_g.store_count; | |
| 2013 | + var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4 | |
| 2014 | + if (th.data.sales_rules == 2 && (p_type != 1 && p_type != 4 && p_type != 6 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) { | |
| 2015 | + if (!th.data.def_pick_store) { | |
| 2016 | + wx.showModal({title: '请选择门店',}); | |
| 2017 | + return false; | |
| 2018 | + } else { | |
| 2019 | + e = th.data.def_pick_store.CanOutQty; | |
| 2020 | + } | |
| 2021 | + } | |
| 2022 | + if (!e) e = 0; | |
| 2023 | + //库存不足,不增加 | |
| 2024 | + if (e < t) { | |
| 2025 | + wx.showModal({title: '库存不足',}); | |
| 2026 | + if (e < 0) e = 0; | |
| 2027 | + th.setData({goodsInputNum: e}); | |
| 2028 | + return false; | |
| 2029 | + } | |
| 2030 | + t > e || 0 == e ? t = e : t < 1 && (t = 1); | |
| 2031 | + th.setData({goodsInputNum: t}); | |
| 2032 | + }) | |
| 2033 | + }, | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + closeSpecModal: function () { | |
| 2037 | + if (this.data.openSpecModal_pt && this.data.is_normal) { | |
| 2038 | + this.get_sto(); | |
| 2039 | + this.setData({ | |
| 2040 | + sele_g: this.data.data, | |
| 2041 | + gid: this.data.data.goods_id | |
| 2042 | + }) | |
| 2043 | + | |
| 2044 | + this.sele_spec_chech_activity(); | |
| 2045 | + | |
| 2046 | + } | |
| 2047 | + | |
| 2048 | + this.setData({ | |
| 2049 | + openSpecModal: !1, | |
| 2050 | + openSpecModal_pt: !1 | |
| 2051 | + }); | |
| 2052 | + }, | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + openSpecModel: function (t) { | |
| 2056 | + var th = this; | |
| 2057 | + var open_store = t.currentTarget.dataset.ind; | |
| 2058 | + this.setData({ | |
| 2059 | + store: 0, | |
| 2060 | + choice_sort_store: 0, | |
| 2061 | + sort_store: 0, | |
| 2062 | + open_ind_store: open_store, | |
| 2063 | + }) | |
| 2064 | + //--先判断会员状态-- | |
| 2065 | + var user_info = getApp().globalData.userInfo; | |
| 2066 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 2067 | + wx.navigateTo({ | |
| 2068 | + url: '/pages/togoin/togoin', | |
| 2069 | + }) | |
| 2070 | + return false; | |
| 2071 | + } | |
| 2072 | + | |
| 2073 | + var check_up = 0; | |
| 2074 | + if (th.data.more_flash) { | |
| 2075 | + for (var i in th.data.more_flash) { | |
| 2076 | + var item = th.data.more_flash[i]; | |
| 2077 | + if (item.prom_type == 1) { | |
| 2078 | + check_up = 1; | |
| 2079 | + break | |
| 2080 | + } | |
| 2081 | + } | |
| 2082 | + } | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + if (check_up && open_store == 1) { | |
| 2086 | + th.setData({is_pop_more: 1}); | |
| 2087 | + } else { | |
| 2088 | + var ind = t.currentTarget.dataset.ind; | |
| 2089 | + //回调。判断是不是优惠促销 | |
| 2090 | + th.check_is_prom_goods(function () { | |
| 2091 | + th.setData({ | |
| 2092 | + openSpecModal: !0, | |
| 2093 | + openSpecModal_ind: ind, | |
| 2094 | + }); | |
| 2095 | + //var is_open=th.data.config | |
| 2096 | + th.get_off_price(); | |
| 2097 | + }) | |
| 2098 | + //--先判断会员状态-- | |
| 2099 | + var user_info = getApp().globalData.userInfo; | |
| 2100 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 2101 | + wx.navigateTo({ | |
| 2102 | + url: '/pages/togoin/togoin', | |
| 2103 | + }) | |
| 2104 | + return false; | |
| 2105 | + } | |
| 2106 | + var is_go_next = 1; | |
| 2107 | + if (th.data.more_flash && th.data.more_flash.length > 1 && open_store == 1) { | |
| 2108 | + is_go_next = 0; | |
| 2109 | + } | |
| 2110 | + if (is_go_next) { | |
| 2111 | + var ind = t.currentTarget.dataset.ind; | |
| 2112 | + //回调。判断是不是优惠促销 | |
| 2113 | + th.check_is_prom_goods(function () { | |
| 2114 | + th.setData({ | |
| 2115 | + openSpecModal: !0, | |
| 2116 | + openSpecModal_ind: ind, | |
| 2117 | + }); | |
| 2118 | + //var is_open=th.data.config | |
| 2119 | + th.get_off_price(); | |
| 2120 | + }) | |
| 2121 | + } else { | |
| 2122 | + th.setData({is_pop_more: 1}); | |
| 2123 | + | |
| 2124 | + } | |
| 2125 | + } | |
| 2126 | + }, | |
| 2127 | + open_next(){ | |
| 2128 | + var th = this; | |
| 2129 | + //回调。判断是不是优惠促销 | |
| 2130 | + th.check_is_prom_goods(function () { | |
| 2131 | + th.setData({ | |
| 2132 | + openSpecModal: !0, | |
| 2133 | + openSpecModal_ind: 1, | |
| 2134 | + is_pop_more: 0 | |
| 2135 | + }); | |
| 2136 | + th.get_off_price(); | |
| 2137 | + }) | |
| 2138 | + }, | |
| 2139 | + | |
| 2140 | + //判断是不是优惠促销 | |
| 2141 | + check_is_prom_goods: function (callback) { | |
| 2142 | + var th = this; | |
| 2143 | + var usr = getApp().globalData.userInfo; | |
| 2144 | + if (this.data.sele_g.prom_type != 0 && this.data.sele_g.prom_type != 3) { | |
| 2145 | + callback(); | |
| 2146 | + } else { | |
| 2147 | + //-- 判断有没有优惠活动 -- | |
| 2148 | + getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + th.data.sele_g.goods_id + "/0"+"/"+usr.user_id, {}).then(res => { | |
| 2149 | + if (res.data.code == 0) { | |
| 2150 | + var r_data = res.data.data; | |
| 2151 | + th.data.prom_goods = r_data.promGoodsLists; | |
| 2152 | + if (!th.data.prom_goods) { | |
| 2153 | + callback(); | |
| 2154 | + return false; | |
| 2155 | + } | |
| 2156 | + | |
| 2157 | + ///api/weshop/order/getWPayOrder?store_id=1&user_id=5682366&prom_id=1&goods_id=1 | |
| 2158 | + getApp().promiseGet("/api/weshop/order/getWPayOrder", { | |
| 2159 | + data: { | |
| 2160 | + store_id: os.stoid, | |
| 2161 | + user_id: usr.user_id, | |
| 2162 | + goods_id: th.data.sele_g.goods_id, | |
| 2163 | + prom_id: th.data.prom_goods[0].prom_id | |
| 2164 | + } | |
| 2165 | + }).then(res => { | |
| 2166 | + if (res.data.code == 0) { | |
| 2167 | + wx.showToast({ | |
| 2168 | + title: "您已经购买了该商品待支付中", | |
| 2169 | + icon: 'none', | |
| 2170 | + duration: 2000 | |
| 2171 | + }) | |
| 2172 | + setTimeout(function () { | |
| 2173 | + getApp().goto("/pages/user/order_detail/order_detail?order_id=" + res.data.data.order_id,) | |
| 2174 | + }, 1000) | |
| 2175 | + } | |
| 2176 | + //未找到相关记录 | |
| 2177 | + else { | |
| 2178 | + callback(); | |
| 2179 | + } | |
| 2180 | + }) | |
| 2181 | + } | |
| 2182 | + | |
| 2183 | + }) | |
| 2184 | + | |
| 2185 | + } | |
| 2186 | + }, | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + //----获取线下价格------- | |
| 2190 | + get_off_price() { | |
| 2191 | + var th = this; | |
| 2192 | + //没有开启就返回 | |
| 2193 | + if (!th.data.is_open_offline) return false; | |
| 2194 | + //先看下购买的功能有没有到期 | |
| 2195 | + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=6", {}).then(res => { | |
| 2196 | + //未购买 | |
| 2197 | + if (res.data.code != 0 || !res.data.data || !res.data.data.pageData || !res.data.data.pageData.length) { | |
| 2198 | + return false; | |
| 2199 | + } else { | |
| 2200 | + //已经过期 | |
| 2201 | + var item = res.data.data.pageData[0]; | |
| 2202 | + if (item.end_time < ut.gettimestamp()) { | |
| 2203 | + return false; | |
| 2204 | + } | |
| 2205 | + } | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + var cur_goods = this.data.sele_g; | |
| 2209 | + var cur_price = cur_goods.shop_price; | |
| 2210 | + if (th.data.card_field && cur_goods[th.data.card_field] > 0) { | |
| 2211 | + cur_price = cur_goods[th.data.card_field]; | |
| 2212 | + } | |
| 2213 | + | |
| 2214 | + var user_info = getApp().globalData.userInfo; | |
| 2215 | + //获取一下接口,判断是不是有线下接口,必须是普通商品,全局优惠活动也是不行 | |
| 2216 | + if (cur_goods.prom_type == 0 && !this.data.prom_goods) { | |
| 2217 | + cur_goods.offline_price = null; | |
| 2218 | + //如果没有门店,不用计算线下价格 | |
| 2219 | + var def_pick_store = this.data.def_pick_store; | |
| 2220 | + if (!def_pick_store) return false; | |
| 2221 | + getApp().request.get("/api/weshop/goods/listWarePrice", { | |
| 2222 | + data: { | |
| 2223 | + VIPId: encodeURIComponent(user_info.erpvipid), | |
| 2224 | + store_id: os.stoid, | |
| 2225 | + PickupId: def_pick_store.pickup_id, | |
| 2226 | + WareIds: encodeURIComponent(cur_goods.erpwareid) | |
| 2227 | + }, | |
| 2228 | + success: function (res) { | |
| 2229 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
| 2230 | + var datalist = res.data.data; | |
| 2231 | + if (datalist[0].WarePrice < cur_price) { | |
| 2232 | + cur_goods.offline_price = datalist[0].WarePrice; //存储线下活动的价格 | |
| 2233 | + cur_goods.pricing_type = datalist[0].PriceType; //存储线下活动的类型 | |
| 2234 | + } | |
| 2235 | + } | |
| 2236 | + th.setData({sele_g: cur_goods}); | |
| 2237 | + } | |
| 2238 | + | |
| 2239 | + }) | |
| 2240 | + } | |
| 2241 | + | |
| 2242 | + }) | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + }, | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + //---------点击收藏和不收藏------------ | |
| 2249 | + collectGoods: function () { | |
| 2250 | + var t = this, | |
| 2251 | + i = getApp().request; | |
| 2252 | + var user_id = s.globalData.user_id; | |
| 2253 | + if (user_id == '') { | |
| 2254 | + getApp().getUserFir(function () { | |
| 2255 | + }); | |
| 2256 | + getApp().showWarning("未登录"); | |
| 2257 | + return false; | |
| 2258 | + } else { | |
| 2259 | + | |
| 2260 | + if (t.data.is_collect_load) return false; | |
| 2261 | + t.data.is_collect_load = 1; | |
| 2262 | + | |
| 2263 | + if (t.data.is_collect == 1) { //删除收藏 | |
| 2264 | + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { | |
| 2265 | + success: function (e) { | |
| 2266 | + t.data.is_collect_load = 0; | |
| 2267 | + if (e.data.code == 0) { | |
| 2268 | + t.setData({ | |
| 2269 | + is_collect: 0, | |
| 2270 | + collect_id: 0, | |
| 2271 | + }); | |
| 2272 | + } | |
| 2273 | + } | |
| 2274 | + }); | |
| 2275 | + } else { | |
| 2276 | + var timestamp = Date.parse(new Date()); | |
| 2277 | + timestamp = timestamp / 1000; | |
| 2278 | + var d = { | |
| 2279 | + goods_id: t.data.data.goods_id, | |
| 2280 | + user_id: s.globalData.user_id, | |
| 2281 | + store_id: o.stoid, | |
| 2282 | + add_time: timestamp, | |
| 2283 | + }; | |
| 2284 | + //加入收藏夹就是导购的ID | |
| 2285 | + if (getApp().globalData.guide_id) { | |
| 2286 | + d.guide_id = getApp().globalData.guide_id; | |
| 2287 | + d.guide_type = 2; | |
| 2288 | + } | |
| 2289 | + | |
| 2290 | + i.post("/api/weshop/goodscollect/save", { //添加收藏 | |
| 2291 | + data: d, | |
| 2292 | + success: function (e) { | |
| 2293 | + t.data.is_collect_load = 0; | |
| 2294 | + if (e.data.code == 0) { | |
| 2295 | + t.setData({ | |
| 2296 | + is_collect: 1, | |
| 2297 | + collect_id: e.data.data.collect_id, | |
| 2298 | + }); | |
| 2299 | + } | |
| 2300 | + } | |
| 2301 | + }); | |
| 2302 | + } | |
| 2303 | + } | |
| 2304 | + }, | |
| 2305 | + | |
| 2306 | + //---------联系客服------------ | |
| 2307 | + contactService: function () { | |
| 2308 | + getApp().com_call(this); | |
| 2309 | + }, | |
| 2310 | + | |
| 2311 | + // 获取客服电话 | |
| 2312 | + getTel() { | |
| 2313 | + return new Promise((resolve, reject) => { | |
| 2314 | + s.getConfig(function (t) { | |
| 2315 | + if (t.store_tel == undefined) { | |
| 2316 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | |
| 2317 | + isShowLoading: 1, | |
| 2318 | + data: {}, | |
| 2319 | + success: function (rs) { | |
| 2320 | + getApp().globalData.config = rs.data.data; | |
| 2321 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | |
| 2322 | + getApp().my_warnning("商家未设置电话", 0, th); | |
| 2323 | + return false; | |
| 2324 | + } | |
| 2325 | + self.setData({ | |
| 2326 | + store_tel: rs.data.data.store_tel, | |
| 2327 | + }); | |
| 2328 | + // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | |
| 2329 | + } | |
| 2330 | + }) | |
| 2331 | + } else { | |
| 2332 | + self.setData({ | |
| 2333 | + store_tel: t.store_tel, | |
| 2334 | + }); | |
| 2335 | + // s.confirmBox("请联系客服:" + t.store_tel); | |
| 2336 | + }; | |
| 2337 | + resolve(); | |
| 2338 | + }); | |
| 2339 | + }); | |
| 2340 | + }, | |
| 2341 | + | |
| 2342 | + //-------获取购物车数量---------- | |
| 2343 | + requestCardNum: function () { | |
| 2344 | + var t = this; | |
| 2345 | + getApp().request.get("/api/weshop/cart/page", { | |
| 2346 | + data: { | |
| 2347 | + store_id: o.stoid, | |
| 2348 | + user_id: s.globalData.user_id, | |
| 2349 | + state: 0, | |
| 2350 | + is_gift: 0 | |
| 2351 | + }, | |
| 2352 | + success: function (e) { | |
| 2353 | + var num = 0; | |
| 2354 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | |
| 2355 | + num += e.data.data.pageData[i].goods_num; | |
| 2356 | + } | |
| 2357 | + | |
| 2358 | + //-- 读取服务卡的数量 -- | |
| 2359 | + getApp().promiseGet("/api/weshop/cartService/page", { | |
| 2360 | + data: { | |
| 2361 | + store_id: s.globalData.setting.stoid, | |
| 2362 | + user_id: s.globalData.user_id, | |
| 2363 | + } | |
| 2364 | + }).then(res => { | |
| 2365 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 2366 | + num += res.data.data.pageData[i].goods_num; | |
| 2367 | + } | |
| 2368 | + t.setData({cartGoodsNum: num}); | |
| 2369 | + }) | |
| 2370 | + } | |
| 2371 | + }); | |
| 2372 | + }, | |
| 2373 | + | |
| 2374 | + previewCommentImgs: function (t) { | |
| 2375 | + var e = this.data.comments[t.currentTarget.dataset.cidx].img; | |
| 2376 | + var b = e.slice() | |
| 2377 | + for (var i in b) { | |
| 2378 | + b[i] = this.data.iurl + e[i]; | |
| 2379 | + } | |
| 2380 | + this.data.show_prew_img = 1; | |
| 2381 | + getApp().pre_img2(b,t) | |
| 2382 | + }, | |
| 2383 | + | |
| 2384 | + previewCommentImgs_w: function (t) { | |
| 2385 | + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img; | |
| 2386 | + var b = e.slice() | |
| 2387 | + for (var i in b) { | |
| 2388 | + b[i] = this.data.iurl + e[i]; | |
| 2389 | + } | |
| 2390 | + this.data.show_prew_img = 1; | |
| 2391 | + getApp().pre_img2(b,t) | |
| 2392 | + }, | |
| 2393 | + | |
| 2394 | + previewGoodsCommentImgs: function (t) { | |
| 2395 | + var e = this, | |
| 2396 | + a = this.data.data.comment[t.currentTarget.dataset.cidx].img; | |
| 2397 | + a = a.map(function (t) { | |
| 2398 | + return e.data.url + t; | |
| 2399 | + }), getApp().pre_img2(a,t); | |
| 2400 | + this.data.show_prew_img = 1; | |
| 2401 | + }, | |
| 2402 | + closePromModal: function () { | |
| 2403 | + this.setData({ | |
| 2404 | + openPromModal: !1 | |
| 2405 | + }); | |
| 2406 | + }, | |
| 2407 | + openPromModal: function () { | |
| 2408 | + this.setData({ | |
| 2409 | + openPromModal: !0 | |
| 2410 | + }); | |
| 2411 | + }, | |
| 2412 | + | |
| 2413 | + //--点击分享事件--- | |
| 2414 | + onShareAppMessage: function (t) { | |
| 2415 | + getApp().globalData.no_clear=1; | |
| 2416 | + | |
| 2417 | + var th = this; | |
| 2418 | + var price = th.data.sele_g.shop_price; | |
| 2419 | + if (th.data.prom_act) { | |
| 2420 | + price = th.data.prom_act.price; | |
| 2421 | + | |
| 2422 | + } | |
| 2423 | + var title = th.data.sele_g.goods_name; | |
| 2424 | + var img = th.data.sele_g.original_img; | |
| 2425 | + if (th.data.prom_type == 6 || th.data.prom_type == 1 || th.data.prom_type == 4) { | |
| 2426 | + title = th.data.prom_act.share_title; | |
| 2427 | + if (!title) title = th.data.prom_act.title; | |
| 2428 | + if (th.data.prom_type == 4) title = th.data.prom_act.name; | |
| 2429 | + | |
| 2430 | + if (th.data.prom_act.share_imgurl) | |
| 2431 | + img = th.data.iurl + th.data.prom_act.share_imgurl; | |
| 2432 | + } | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" | |
| 2436 | + + th.data.sele_g.goods_id + "&prom_type=" + th.data.sele_g.prom_type + "&prom_id=" + th.data.sele_g.prom_id; | |
| 2437 | + if (getApp().globalData.user_id) { | |
| 2438 | + url += "&first_leader=" + getApp().globalData.user_id; | |
| 2439 | + } | |
| 2440 | + | |
| 2441 | + //-- 如果房间分享,且不是会员分享的 -- | |
| 2442 | + if (getApp().globalData.room_id && | |
| 2443 | + th.data.sele_g.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share | |
| 2444 | + ) { | |
| 2445 | + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; | |
| 2446 | + } | |
| 2447 | + | |
| 2448 | + var ob = { | |
| 2449 | + title: price + "元 " + title, | |
| 2450 | + path: url, | |
| 2451 | + imageUrl: img, | |
| 2452 | + }; | |
| 2453 | + if (th.data.prom_type == 6) { | |
| 2454 | + title += '\n' + th.data.prom_act.share_remark; | |
| 2455 | + ob.title = title; | |
| 2456 | + ob.desc = th.data.prom_act.share_remark; | |
| 2457 | + } | |
| 2458 | + | |
| 2459 | + //如果是积分购的时候 | |
| 2460 | + if (th.data.prom_type == 4) { | |
| 2461 | + var name = th.data.prom_act.name; | |
| 2462 | + //-- 积分购的 -- | |
| 2463 | + var pri0 = th.data.prom_act.addmoney; | |
| 2464 | + var integral = th.data.prom_act.integral; | |
| 2465 | + var text = ""; | |
| 2466 | + if (integral) { text = integral + "积分"; } | |
| 2467 | + if (pri0 && integral) { text += "+"; } | |
| 2468 | + if (pri0) { text += "¥" + pri0; } | |
| 2469 | + | |
| 2470 | + ob.title = text + " " + name; | |
| 2471 | + } | |
| 2472 | + //-- 页面不能刷新 -- | |
| 2473 | + this.data.show_prew_img=1; | |
| 2474 | + | |
| 2475 | + console.log("share.."); | |
| 2476 | + console.log(ob); | |
| 2477 | + return ob; | |
| 2478 | + | |
| 2479 | + }, | |
| 2480 | + | |
| 2481 | + //-----图片失败,默认图片----- | |
| 2482 | + bind_bnerr: function (e) { | |
| 2483 | + var _errImg = e.target.dataset.errorimg; | |
| 2484 | + var _errObj = {}; | |
| 2485 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
| 2486 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 2487 | + }, | |
| 2488 | + | |
| 2489 | + //-----图片失败,默认图片----- | |
| 2490 | + bind_bnerr2: function (e) { | |
| 2491 | + | |
| 2492 | + var _errImg = e.target.dataset.errorimg; | |
| 2493 | + var _errObj = {}; | |
| 2494 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png" | |
| 2495 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 2496 | + }, | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + //----------装载同一条形码的商品---------- | |
| 2500 | + async get_sku(stoid, gd, g_id, is_normal, func) { | |
| 2501 | + console.log('get_sku'); | |
| 2502 | + var tt = this, arrdata = null; | |
| 2503 | + var now = ut.gettimestamp(); | |
| 2504 | + await getApp().request.promiseGet("/api/weshop/goods/page", { | |
| 2505 | + data: { | |
| 2506 | + store_id: o.stoid, | |
| 2507 | + sku: gd.sku, | |
| 2508 | + more_spec: gd.more_spec, | |
| 2509 | + isonsale: 1, | |
| 2510 | + is_on_sale: 1, | |
| 2511 | + pageSize: 500, | |
| 2512 | + orderField: 'gg_ordid,goods_spec,sort' | |
| 2513 | + } | |
| 2514 | + }).then(res => { | |
| 2515 | + var e = res; | |
| 2516 | + if (e.data.code == 0) arrdata = e.data.data.pageData; | |
| 2517 | + }) | |
| 2518 | + if (!arrdata) return false; | |
| 2519 | + | |
| 2520 | + var arrsku = new Array(); | |
| 2521 | + var gitem = null; | |
| 2522 | + var gb = 1, gg = ""; | |
| 2523 | + for (var i = 0; i < arrdata.length; i++) { | |
| 2524 | + var goodsinfo = arrdata[i], prom = null; | |
| 2525 | + if (goodsinfo.goods_id != g_id) { | |
| 2526 | + | |
| 2527 | + switch (goodsinfo.prom_type) { | |
| 2528 | + case 1: | |
| 2529 | + | |
| 2530 | + if(goodsinfo.prom_id) { | |
| 2531 | + await getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2532 | + if (res.data.code == 0) prom = res.data.data; | |
| 2533 | + }) | |
| 2534 | + } | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + break; | |
| 2538 | + case 6: | |
| 2539 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2540 | + console.log(res); | |
| 2541 | + if (res.data.code == 0) prom = res.data.data; | |
| 2542 | + }) | |
| 2543 | + | |
| 2544 | + break; | |
| 2545 | + case 2: | |
| 2546 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2547 | + if (res.data.code == 0) prom = res.data.data; | |
| 2548 | + }) | |
| 2549 | + break; | |
| 2550 | + case 4: | |
| 2551 | + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2552 | + if (res.data.code == 0) prom = res.data.data; | |
| 2553 | + }) | |
| 2554 | + break | |
| 2555 | + //预售和幸运购不参与 | |
| 2556 | + case 8: | |
| 2557 | + case 9: | |
| 2558 | + continue; | |
| 2559 | + } | |
| 2560 | + | |
| 2561 | + } | |
| 2562 | + //---如果有活动,不算在一起--- | |
| 2563 | + if (prom) { | |
| 2564 | + if (goodsinfo.prom_type == 1 || goodsinfo.prom_type == 6) { | |
| 2565 | + console.log(prom); | |
| 2566 | + if (prom.is_end == 0 && prom.end_time > now && prom.start_time < now) continue; | |
| 2567 | + } else { | |
| 2568 | + continue; | |
| 2569 | + } | |
| 2570 | + } | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + var item = arrdata[i], gg = ""; | |
| 2574 | + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = ""; | |
| 2575 | + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = ""; | |
| 2576 | + | |
| 2577 | + if (item.goods_spec != "" && item.goods_color != "") { | |
| 2578 | + gg = item.goods_spec + "/" + item.goods_color; | |
| 2579 | + } else if (item.goods_spec != "" || item.goods_color != "") { | |
| 2580 | + gg = item.goods_spec + item.goods_color; | |
| 2581 | + } else { | |
| 2582 | + gg = "规格" + gb; | |
| 2583 | + gb++; | |
| 2584 | + } | |
| 2585 | + item.gg = gg; | |
| 2586 | + | |
| 2587 | + if (item.spec_img) | |
| 2588 | + item.original_img = os.imghost + item.spec_img; | |
| 2589 | + else | |
| 2590 | + item.original_img = os.imghost + item.original_img; | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + if (item.goods_id == g_id) { | |
| 2594 | + gitem = item; | |
| 2595 | + } else { | |
| 2596 | + arrsku.push(item); | |
| 2597 | + } | |
| 2598 | + } | |
| 2599 | + //-----------排列在最前面------------- | |
| 2600 | + arrsku.splice(0, 0, gitem); | |
| 2601 | + if (is_normal == 1) { | |
| 2602 | + tt.setData({ | |
| 2603 | + sku_g_pt: arrsku, | |
| 2604 | + sele_g: gitem | |
| 2605 | + }); | |
| 2606 | + func(); | |
| 2607 | + } else { | |
| 2608 | + tt.setData({ | |
| 2609 | + sku_g: arrsku, | |
| 2610 | + sele_g: gitem | |
| 2611 | + }); | |
| 2612 | + } | |
| 2613 | + }, | |
| 2614 | + | |
| 2615 | + //-----------选择属性的按钮事件---------- | |
| 2616 | + sele_spec: function (e) { | |
| 2617 | + var that = this; | |
| 2618 | + var gid = e.currentTarget.dataset.gid; | |
| 2619 | + var nor = e.currentTarget.dataset.nor; | |
| 2620 | + | |
| 2621 | + var sku_g = this.data.sku_g; | |
| 2622 | + if (nor) { | |
| 2623 | + sku_g = this.data.sku_g_pt; | |
| 2624 | + } | |
| 2625 | + | |
| 2626 | + var item = null; | |
| 2627 | + for (var i in sku_g) { | |
| 2628 | + if (sku_g[i].goods_id == gid) { | |
| 2629 | + item = sku_g[i]; | |
| 2630 | + if (item.original_img.indexOf(that.data.iurl) == -1) { | |
| 2631 | + item.original_img = that.data.iurl + item.original_img; | |
| 2632 | + } | |
| 2633 | + break | |
| 2634 | + } | |
| 2635 | + } | |
| 2636 | + console.log(item, 2000); | |
| 2637 | + var cur_price = item.shop_price; | |
| 2638 | + if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) { | |
| 2639 | + var cfile = getApp().globalData.userInfo.card_field; | |
| 2640 | + console.log('cfile', cfile); | |
| 2641 | + if (item[cfile]) { | |
| 2642 | + cur_price = item[cfile]; | |
| 2643 | + } | |
| 2644 | + } | |
| 2645 | + var txt = (cur_price / item.market_price * 10).toFixed(2).toString(); | |
| 2646 | + txt = parseFloat(txt); | |
| 2647 | + item['disc'] = txt; | |
| 2648 | + if (item) this.setData({ | |
| 2649 | + sele_g: item, | |
| 2650 | + gid: gid, | |
| 2651 | + data: item, | |
| 2652 | + }); | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + that.check_is_youhui(gid, that.data.is_normal); | |
| 2656 | + | |
| 2657 | + //默认门店要拿下门店库存 | |
| 2658 | + if (that.data.sales_rules == 2 && that.data.def_pick_store) { | |
| 2659 | + var lock = 0, plist = null; | |
| 2660 | + //先读取门店的lock,采用链式写法,少用await | |
| 2661 | + getApp().request.promiseGet("/api/weshop/order/ware/lock/page", { | |
| 2662 | + data: { | |
| 2663 | + store_id: os.stoid, | |
| 2664 | + wareId: that.data.sele_g.goods_id, | |
| 2665 | + storageId: that.data.def_pick_store.pickup_id, | |
| 2666 | + pageSize: 1000 | |
| 2667 | + } | |
| 2668 | + }).then(res => { | |
| 2669 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 2670 | + for (var i in res.data.data.pageData) | |
| 2671 | + lock += res.data.data.pageData[i].outQty | |
| 2672 | + } | |
| 2673 | + //---通过接口获取门店的线下库存信息-- | |
| 2674 | + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", { | |
| 2675 | + data: { | |
| 2676 | + storageNos: that.data.def_pick_store.pickup_no, | |
| 2677 | + wareIds: encodeURIComponent(that.data.sele_g.erpwareid), | |
| 2678 | + storeId: os.stoid | |
| 2679 | + } | |
| 2680 | + }) | |
| 2681 | + }).then(res => { | |
| 2682 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 2683 | + plist = res.data.data.pageData[0]; | |
| 2684 | + } | |
| 2685 | + if (plist && plist.CanOutQty - lock > 0) { | |
| 2686 | + that.data.def_pick_store.CanOutQty = plist.CanOutQty - lock; | |
| 2687 | + } else { | |
| 2688 | + that.data.def_pick_store.CanOutQty = 0; | |
| 2689 | + } | |
| 2690 | + //--给门店赋值线下库存-- | |
| 2691 | + that.setData({def_pick_store: that.data.def_pick_store}); | |
| 2692 | + }) | |
| 2693 | + } | |
| 2694 | + this.sele_spec_chech_activity(); | |
| 2695 | + }, | |
| 2696 | + | |
| 2697 | + //选择了不同的规格的时候要判断是不是有活动正在进行中 | |
| 2698 | + async sele_spec_chech_activity() { | |
| 2699 | + //---如果是活动的时候--- | |
| 2700 | + var prom = null, goodsinfo = this.data.sele_g, th = this; | |
| 2701 | + var user_id = getApp().globalData.user_id; | |
| 2702 | + if (!user_id) user_id = 0; | |
| 2703 | + if (goodsinfo.prom_type == 1) { | |
| 2704 | + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2705 | + if (res.data.code == 0) { | |
| 2706 | + prom = res.data.data; | |
| 2707 | + prom.price = prom.user_price; | |
| 2708 | + } | |
| 2709 | + }) | |
| 2710 | + } | |
| 2711 | + if (goodsinfo.prom_type == 6) { | |
| 2712 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2713 | + if (res.data.code == 0) { | |
| 2714 | + prom = res.data.data; | |
| 2715 | + } | |
| 2716 | + }) | |
| 2717 | + } | |
| 2718 | + | |
| 2719 | + if (goodsinfo.prom_type == 4) { | |
| 2720 | + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => { | |
| 2721 | + if (res.data.code == 0) { | |
| 2722 | + prom = res.data.data; | |
| 2723 | + } | |
| 2724 | + }) | |
| 2725 | + } | |
| 2726 | + | |
| 2727 | + //----------如果有活动,并且在进行中,就不计算线下库存--------------- | |
| 2728 | + var now = ut.gettimestamp(); | |
| 2729 | + if (prom) { | |
| 2730 | + | |
| 2731 | + var t1 = prom.start_time; | |
| 2732 | + var prom_st = 1; | |
| 2733 | + if (prom.show_time) { | |
| 2734 | + t1 = prom.show_time; | |
| 2735 | + if (prom.start_time > now) prom_st = 0; | |
| 2736 | + } | |
| 2737 | + if (prom.is_end == 0 && prom.end_time > now && t1 < now) { | |
| 2738 | + th.setData({ | |
| 2739 | + prom_type: goodsinfo.prom_type, | |
| 2740 | + prom_price: prom.price, | |
| 2741 | + prom_buy_limit: prom.buy_limit ? prom.buy_limit : (prom.limitvipqty ? prom.limitvipqty : 0), | |
| 2742 | + prom_end_time: prom.end_time, | |
| 2743 | + prom_start_time: prom.start_time, | |
| 2744 | + prom_st: prom_st, | |
| 2745 | + prom_act: prom, | |
| 2746 | + prom_id: prom.id | |
| 2747 | + }) | |
| 2748 | + | |
| 2749 | + //却换图片 | |
| 2750 | + th.init(goodsinfo.goods_id); | |
| 2751 | + var newTime = ut.gettimestamp(); | |
| 2752 | + var endTime2 = prom.end_time; | |
| 2753 | + var endTime1 = prom.start_time; | |
| 2754 | + | |
| 2755 | + this.data.is_timer = 0; | |
| 2756 | + | |
| 2757 | + setTimeout(function () { | |
| 2758 | + th.data.is_timer = 1; | |
| 2759 | + if (endTime1 > newTime) { | |
| 2760 | + th.setData({ | |
| 2761 | + prom_time_text: '距秒杀开始还有' | |
| 2762 | + }) | |
| 2763 | + th.countDown(endTime1, 0); | |
| 2764 | + } else { | |
| 2765 | + if (endTime2 > newTime) { | |
| 2766 | + th.setData({ | |
| 2767 | + prom_time_text: '距秒杀结束还有', | |
| 2768 | + prom_st: 1 | |
| 2769 | + }) | |
| 2770 | + th.countDown(endTime2); | |
| 2771 | + } | |
| 2772 | + } | |
| 2773 | + | |
| 2774 | + }, 1000) | |
| 2775 | + | |
| 2776 | + return false; | |
| 2777 | + } | |
| 2778 | + } | |
| 2779 | + //---设置普通商品--- | |
| 2780 | + th.setData({ | |
| 2781 | + prom_type: 0, | |
| 2782 | + prom_price: null, | |
| 2783 | + prom_buy_limit: null, | |
| 2784 | + prom_end_time: null, | |
| 2785 | + prom_start_time: null, | |
| 2786 | + prom_st: null, | |
| 2787 | + }) | |
| 2788 | + | |
| 2789 | + }, | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + //---------拿出门店分类和门店------------ | |
| 2793 | + get_sto(e) { | |
| 2794 | + console.log('get_sto') | |
| 2795 | + var th = this, that = this; | |
| 2796 | + var is_normal = e; | |
| 2797 | + | |
| 2798 | + if (e == 1) { | |
| 2799 | + th.setData({is_normal: 1}) | |
| 2800 | + } else { | |
| 2801 | + th.setData({is_normal: 0}) | |
| 2802 | + } | |
| 2803 | + | |
| 2804 | + var timer_get = setInterval(function () { | |
| 2805 | + if (th.data.is_get_local_ok == 0) return false; | |
| 2806 | + var dd = null, i = getApp().request; | |
| 2807 | + if (!th.data.sele_g) return false; | |
| 2808 | + | |
| 2809 | + var g_distr_type = th.data.sele_g.distr_type; | |
| 2810 | + if (g_distr_type != 0) { | |
| 2811 | + dd = { | |
| 2812 | + store_id: o.stoid, | |
| 2813 | + distr_type: g_distr_type, | |
| 2814 | + isstop: 0, | |
| 2815 | + is_pos: 1, | |
| 2816 | + pageSize: 2000 | |
| 2817 | + } | |
| 2818 | + } else { | |
| 2819 | + dd = { | |
| 2820 | + store_id: o.stoid, | |
| 2821 | + isstop: 0, | |
| 2822 | + is_pos: 1, | |
| 2823 | + pageSize: 2000 | |
| 2824 | + } | |
| 2825 | + } | |
| 2826 | + //如果有距离的话 | |
| 2827 | + if (th.data.lat != null) { | |
| 2828 | + dd.lat = th.data.lat; | |
| 2829 | + dd.lon = th.data.lon; | |
| 2830 | + } | |
| 2831 | + clearInterval(timer_get); | |
| 2832 | + | |
| 2833 | + //如果会员是有默认的门店话 | |
| 2834 | + if (!th.data.def_pick_store && th.data.fir_def_store) { | |
| 2835 | + th.setData({def_pick_store: th.data.fir_def_store}); | |
| 2836 | + } | |
| 2837 | + wx.showLoading({ | |
| 2838 | + title: '加载中.' | |
| 2839 | + }); | |
| 2840 | + //----------获取门店---------------- | |
| 2841 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 2842 | + data: dd, | |
| 2843 | + }).then(res => { | |
| 2844 | + var e = res; | |
| 2845 | + | |
| 2846 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { | |
| 2847 | + | |
| 2848 | + var his_cate_num = 0; | |
| 2849 | + for (let i in e.data.data.pageData) { | |
| 2850 | + let item = e.data.data.pageData[i]; | |
| 2851 | + if (item.category_id > 0) { | |
| 2852 | + his_cate_num = 1; | |
| 2853 | + break; | |
| 2854 | + } | |
| 2855 | + } | |
| 2856 | + e.his_cate_num = his_cate_num; | |
| 2857 | + | |
| 2858 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
| 2859 | + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
| 2860 | + th.setData({ | |
| 2861 | + def_pick_store: e.data.data.pageData[0], | |
| 2862 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 2863 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 2864 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
| 2865 | + }); | |
| 2866 | + th.data.fir_def_store = e.data.data.pageData[0]; | |
| 2867 | + } | |
| 2868 | + | |
| 2869 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
| 2870 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
| 2871 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
| 2872 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
| 2873 | + e.data.data.pageData.splice(k, 1); //删除 | |
| 2874 | + break; | |
| 2875 | + } | |
| 2876 | + } | |
| 2877 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
| 2878 | + } | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + th.setData({all_pick_list: e.data.data.pageData}); | |
| 2882 | + | |
| 2883 | + //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购-- | |
| 2884 | + if (th.data.sales_rules == 2 && !th.data.is_newsales_rules && ((th.data.prom_type != 1 && th.data.prom_type != 6 && th.data.prom_type != 4) || is_normal == 1)) { | |
| 2885 | + setTimeout(function () { | |
| 2886 | + th.deal_pickup_dline(e); | |
| 2887 | + }, 800) | |
| 2888 | + } else { | |
| 2889 | + setTimeout(function () { | |
| 2890 | + th.deal_pickup(e); //--普通门店排版-- | |
| 2891 | + }, 800) | |
| 2892 | + } | |
| 2893 | + } | |
| 2894 | + }) | |
| 2895 | + }, 200) | |
| 2896 | + | |
| 2897 | + }, | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + //------------处理门店--------------- | |
| 2901 | + deal_pickup(e) { | |
| 2902 | + var th = this; | |
| 2903 | + if (!th.data.sele_g) return false | |
| 2904 | + | |
| 2905 | + var g_distr_type = th.data.sele_g.distr_type; | |
| 2906 | + wx.hideLoading(); | |
| 2907 | + | |
| 2908 | + //单总量超出10个的时候,同时门店有分类 | |
| 2909 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
| 2910 | + getApp().request.get("/api/weshop/storagecategory/page", { | |
| 2911 | + data: { | |
| 2912 | + store_id: o.stoid, | |
| 2913 | + pageSize: 1000, | |
| 2914 | + orderField: "sort", | |
| 2915 | + orderType: 'asc', | |
| 2916 | + }, | |
| 2917 | + success: function (ee) { | |
| 2918 | + if (ee.data.code == 0) { | |
| 2919 | + var check_all_cate = 0; | |
| 2920 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { | |
| 2921 | + for (let i in ee.data.data.pageData) { | |
| 2922 | + let item = ee.data.data.pageData[i]; | |
| 2923 | + if (item.is_show == 1) { | |
| 2924 | + check_all_cate = 1; | |
| 2925 | + break | |
| 2926 | + } | |
| 2927 | + } | |
| 2928 | + } | |
| 2929 | + if (check_all_cate) { | |
| 2930 | + var sto_cate = ee.data.data.pageData; | |
| 2931 | + var sto_arr = e.data.data.pageData; | |
| 2932 | + var newarr = new Array(); | |
| 2933 | + var qita = new Array(); | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + var is_del_pk = 0; | |
| 2937 | + //----要进行门店分组-------- | |
| 2938 | + for (var i = 0; i < sto_arr.length; i++) { | |
| 2939 | + //找一下这个门店有没有在分类数组内 | |
| 2940 | + var find2 = 0, find2name = "", sort = 0; | |
| 2941 | + is_del_pk = 0; | |
| 2942 | + for (var m = 0; m < sto_cate.length; m++) { | |
| 2943 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | |
| 2944 | + if (sto_cate[m].is_show != 1) { | |
| 2945 | + is_del_pk = 1; | |
| 2946 | + sto_arr.splice(i, 1); | |
| 2947 | + i--; | |
| 2948 | + } else { | |
| 2949 | + find2 = sto_cate[m].cat_id; | |
| 2950 | + find2name = sto_cate[m].cat_name; | |
| 2951 | + sort = sto_cate[m].sort; | |
| 2952 | + is_del_pk = 0; | |
| 2953 | + } | |
| 2954 | + break; | |
| 2955 | + } | |
| 2956 | + } | |
| 2957 | + if (is_del_pk) continue; | |
| 2958 | + | |
| 2959 | + if (newarr.length > 0) { | |
| 2960 | + var find = 0; | |
| 2961 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 2962 | + if (find2 != 0) { | |
| 2963 | + for (var ii = 0; ii < newarr.length; ii++) { | |
| 2964 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | |
| 2965 | + newarr[ii].s_arr.push(sto_arr[i]); | |
| 2966 | + find = 1; | |
| 2967 | + break; | |
| 2968 | + } | |
| 2969 | + } | |
| 2970 | + if (find == 0) { | |
| 2971 | + var arr0 = new Array(); | |
| 2972 | + arr0.push(sto_arr[i]); | |
| 2973 | + var item = { | |
| 2974 | + cat_id: find2, | |
| 2975 | + name: find2name, | |
| 2976 | + sort: sort, | |
| 2977 | + s_arr: arr0 | |
| 2978 | + }; | |
| 2979 | + newarr.push(item); | |
| 2980 | + } | |
| 2981 | + } else { | |
| 2982 | + qita.push(sto_arr[i]); | |
| 2983 | + } | |
| 2984 | + } else { | |
| 2985 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 2986 | + if (find2 != 0) { | |
| 2987 | + var arr0 = new Array(); | |
| 2988 | + arr0.push(sto_arr[i]); | |
| 2989 | + var item = { | |
| 2990 | + cat_id: find2, | |
| 2991 | + name: find2name, | |
| 2992 | + sort: sort, | |
| 2993 | + s_arr: arr0 | |
| 2994 | + }; | |
| 2995 | + newarr.push(item); | |
| 2996 | + } else { | |
| 2997 | + qita.push(sto_arr[i]); | |
| 2998 | + } | |
| 2999 | + } | |
| 3000 | + } | |
| 3001 | + | |
| 3002 | + var def_arr = new Array(); | |
| 3003 | + //-- 开始就看10个门店 -- | |
| 3004 | + for (var k = 0; k < 10; k++) { | |
| 3005 | + if (k == sto_arr.length) break; | |
| 3006 | + def_arr.push(sto_arr[k]); | |
| 3007 | + } | |
| 3008 | + | |
| 3009 | + th.setData({ | |
| 3010 | + def_pickpu_list: def_arr, | |
| 3011 | + pickpu_list: ee.data.data.pageData | |
| 3012 | + }); | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + //门店分类要排序下 | |
| 3016 | + function compare(property) { | |
| 3017 | + return function (a, b) { | |
| 3018 | + var value1 = a[property]; | |
| 3019 | + var value2 = b[property]; | |
| 3020 | + return value1 - value2; | |
| 3021 | + } | |
| 3022 | + } | |
| 3023 | + | |
| 3024 | + if (newarr.length > 0) | |
| 3025 | + newarr.sort(compare("sort")); | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + //----安排其他的分类----- | |
| 3029 | + if (qita.length > 0) { | |
| 3030 | + var item = { | |
| 3031 | + cat_id: -1, | |
| 3032 | + name: "其他", | |
| 3033 | + s_arr: qita | |
| 3034 | + }; | |
| 3035 | + newarr.push(item); | |
| 3036 | + } | |
| 3037 | + | |
| 3038 | + var sd = { | |
| 3039 | + all_sto: newarr, | |
| 3040 | + is_show_sto_cat: 1 | |
| 3041 | + } | |
| 3042 | + if (!sto_arr || sto_arr.length <= 10) { | |
| 3043 | + sd.is_show_sto_cat = -1; | |
| 3044 | + sd.only_pk = sto_arr; | |
| 3045 | + } | |
| 3046 | + th.setData(sd); | |
| 3047 | + | |
| 3048 | + } else { | |
| 3049 | + th.setData({ | |
| 3050 | + is_show_sto_cat: -1, | |
| 3051 | + only_pk: e.data.data.pageData | |
| 3052 | + }); | |
| 3053 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
| 3054 | + if (!th.data.def_pick_store) { | |
| 3055 | + th.setData({ | |
| 3056 | + def_pick_store: e.data.data.pageData[0], | |
| 3057 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 3058 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 3059 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
| 3060 | + }) | |
| 3061 | + } | |
| 3062 | + } | |
| 3063 | + } else { | |
| 3064 | + th.setData({ | |
| 3065 | + is_show_sto_cat: -1, | |
| 3066 | + only_pk: e.data.data.pageData | |
| 3067 | + }); | |
| 3068 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
| 3069 | + if (!th.data.def_pick_store) { | |
| 3070 | + th.setData({ | |
| 3071 | + def_pick_store: e.data.data.pageData[0], | |
| 3072 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 3073 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 3074 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
| 3075 | + }) | |
| 3076 | + } | |
| 3077 | + | |
| 3078 | + } | |
| 3079 | + } | |
| 3080 | + }); | |
| 3081 | + } else { | |
| 3082 | + th.setData({ | |
| 3083 | + is_show_sto_cat: 0, | |
| 3084 | + only_pk: e.data.data.pageData | |
| 3085 | + }); | |
| 3086 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | |
| 3087 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
| 3088 | + th.setData({ | |
| 3089 | + def_pick_store: e.data.data.pageData[0], | |
| 3090 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 3091 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 3092 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
| 3093 | + }) | |
| 3094 | + } | |
| 3095 | + } | |
| 3096 | + }, | |
| 3097 | + | |
| 3098 | + //------------处理线下门店库存-------- | |
| 3099 | + deal_pickup_dline(e) { | |
| 3100 | + var pkno = [], th = this; | |
| 3101 | + if (!th.data.sele_g) return false; | |
| 3102 | + | |
| 3103 | + if (this.data.def_pick_store) { | |
| 3104 | + pkno.push(this.data.def_pick_store.pickup_no); | |
| 3105 | + } | |
| 3106 | + for (var i in e.data.data.pageData) { | |
| 3107 | + var item = e.data.data.pageData[i]; | |
| 3108 | + if (pkno.indexOf(item.pickup_no) < 0) | |
| 3109 | + pkno.push(item.pickup_no); | |
| 3110 | + } | |
| 3111 | + pkno.sort(); | |
| 3112 | + var pkno_str = pkno.join(","); | |
| 3113 | + var o_plist = e.data.data.pageData; | |
| 3114 | + var new_list = []; | |
| 3115 | + var is_find_def_store = 0; | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + var g_distr_type = th.data.sele_g.distr_type; | |
| 3119 | + var lock = []; | |
| 3120 | + //先读取门店的lock,采用链式写法,少用await | |
| 3121 | + getApp().request.promiseGet("/api/weshop/order/ware/lock/page", { | |
| 3122 | + data: {store_id: os.stoid, wareId: th.data.sele_g.goods_id, pageSize: 1000} | |
| 3123 | + }).then(res => { | |
| 3124 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 3125 | + lock = res.data.data.pageData | |
| 3126 | + } | |
| 3127 | + //---通过接口获取门店的线下库存信息-- | |
| 3128 | + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", { | |
| 3129 | + data: { | |
| 3130 | + storageNos: pkno_str, | |
| 3131 | + wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | |
| 3132 | + storeId: os.stoid, | |
| 3133 | + pageSize: 2000 | |
| 3134 | + } | |
| 3135 | + }) | |
| 3136 | + }).then(res => { | |
| 3137 | + | |
| 3138 | + wx.hideLoading(); | |
| 3139 | + if (res.data.code == 0) { | |
| 3140 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 3141 | + var plist = res.data.data.pageData; | |
| 3142 | + var def_pick_store = th.data.def_pick_store; | |
| 3143 | + //以原来的数组为外循环,保证距离的顺序 | |
| 3144 | + for (var kk in o_plist) { | |
| 3145 | + for (var ii in plist) { | |
| 3146 | + //线下的门店小心 | |
| 3147 | + var n_item = plist[ii]; | |
| 3148 | + if (n_item.StorageNo == o_plist[kk].pickup_no) { | |
| 3149 | + | |
| 3150 | + //拿到锁库的数量 | |
| 3151 | + var lock_num = th.find_lock_num(o_plist[kk].pickup_id, lock); | |
| 3152 | + //可出库数大于预出库库存的数量,可以判断为有库存 | |
| 3153 | + if (n_item.CanOutQty > lock_num) { | |
| 3154 | + o_plist[kk].CanOutQty = n_item.CanOutQty - lock_num; | |
| 3155 | + new_list.push(o_plist[kk]); | |
| 3156 | + //--如果找到默认门店,同时也应该判断配送方式对不对-- | |
| 3157 | + if (th.data.fir_def_store && n_item.StorageNo == th.data.fir_def_store.pickup_no && (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) { | |
| 3158 | + th.data.fir_def_store.CanOutQty = n_item.CanOutQty - lock_num; | |
| 3159 | + if (def_pick_store.pickup_id == th.data.fir_def_store.pickup_id) | |
| 3160 | + th.setData({def_pick_store: th.data.fir_def_store}) | |
| 3161 | + is_find_def_store = 1; | |
| 3162 | + } | |
| 3163 | + } | |
| 3164 | + break; | |
| 3165 | + } | |
| 3166 | + } | |
| 3167 | + } | |
| 3168 | + | |
| 3169 | + //数据组装下 | |
| 3170 | + var em = {}; | |
| 3171 | + em.data = {}; | |
| 3172 | + em.data.data = {}; | |
| 3173 | + em.data.data.total = new_list.length; | |
| 3174 | + em.data.data.pageData = new_list; | |
| 3175 | + em.data.data.pageData = new_list; | |
| 3176 | + | |
| 3177 | + //--如果找到默认门店,同时也应该判断配送方式对不对-- | |
| 3178 | + if (th.data.fir_def_store && !is_find_def_store && th.data.fir_def_store.pickup_id && (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) { | |
| 3179 | + th.data.fir_def_store.CanOutQty = 0; | |
| 3180 | + //--当选择的门店是客户默认的门店的时候-- | |
| 3181 | + if (th.data.def_pick_store && th.data.fir_def_store.pickup_id == th.data.def_pick_store.pickup_id) { | |
| 3182 | + th.setData({def_pick_store: th.data.fir_def_store}); | |
| 3183 | + em.data.data.pageData.unshift(th.data.def_pick_store); | |
| 3184 | + } else { | |
| 3185 | + em.data.data.pageData.splice(1, 0, th.data.fir_def_store); | |
| 3186 | + } | |
| 3187 | + } | |
| 3188 | + | |
| 3189 | + //---把数组组装进去--- | |
| 3190 | + th.deal_pickup(em); | |
| 3191 | + } else { | |
| 3192 | + th.setData({def_pick_store: null, all_sto: null, only_pk: null, def_pickpu_list: null}) | |
| 3193 | + } | |
| 3194 | + } else { | |
| 3195 | + th.setData({def_pick_store: null, all_sto: null, only_pk: null, def_pickpu_list: null}) | |
| 3196 | + } | |
| 3197 | + }) | |
| 3198 | + }, | |
| 3199 | + | |
| 3200 | + find_lock_num(pick_id, lock) { | |
| 3201 | + var lock_num = 0; | |
| 3202 | + if (!lock) return 0; | |
| 3203 | + if (lock.length < 0) return 0; | |
| 3204 | + for (var i in lock) { | |
| 3205 | + if (pick_id == lock[i].pickupId) { | |
| 3206 | + lock_num += lock[i].outQty; | |
| 3207 | + } | |
| 3208 | + } | |
| 3209 | + return lock_num; | |
| 3210 | + }, | |
| 3211 | + | |
| 3212 | + //----------取货门店被点击的效果------ | |
| 3213 | + getmendian: function (t) { | |
| 3214 | + this.setData({ | |
| 3215 | + ismend: 1, | |
| 3216 | + }); | |
| 3217 | + }, | |
| 3218 | + | |
| 3219 | + //----------隐藏取货门店,选取门店---------- | |
| 3220 | + hidemend: function (e) { | |
| 3221 | + var pid = e.target.dataset.p_id; | |
| 3222 | + var pname = e.target.dataset.p_name; | |
| 3223 | + var p_distr_t = e.target.dataset.p_dis; | |
| 3224 | + this.setData({ | |
| 3225 | + ismend: 0, | |
| 3226 | + is_sec_mend: 0, | |
| 3227 | + sto_sele_id: pid, | |
| 3228 | + sto_sele_name: pname, | |
| 3229 | + sto_sele_distr: p_distr_t | |
| 3230 | + }); | |
| 3231 | + }, | |
| 3232 | + | |
| 3233 | + //------显示取货2级---------- | |
| 3234 | + show_sec: function (t) { | |
| 3235 | + var index = t.target.dataset.index; | |
| 3236 | + var item = this.data.all_sto[index]; | |
| 3237 | + this.setData({ | |
| 3238 | + is_sec_mend: 1, | |
| 3239 | + sec_sto: item | |
| 3240 | + }); | |
| 3241 | + }, | |
| 3242 | + | |
| 3243 | + //------隐藏取货门店2级---- | |
| 3244 | + hide_sec_mend: function () { | |
| 3245 | + this.setData({is_sec_mend: 0,}); | |
| 3246 | + }, | |
| 3247 | + | |
| 3248 | + //评论的调用 | |
| 3249 | + requestComments_new: async function () { | |
| 3250 | + var e = this, th = e, ee = e; | |
| 3251 | + var tp = e.data.activeCategoryId3; | |
| 3252 | + var t = '/api/weshop/comment/pageComment?page=' + e.data.c_curr_p; | |
| 3253 | + | |
| 3254 | + wx.showLoading(); | |
| 3255 | + var req_where = { | |
| 3256 | + store_id: o.stoid, pageSize: 5, is_show: 1, | |
| 3257 | + parent_id: 0, goods_id: th.data.gid, commenttype: tp, | |
| 3258 | + } | |
| 3259 | + if (getApp().globalData.userInfo) { | |
| 3260 | + req_where.userId = getApp().globalData.user_id; | |
| 3261 | + } | |
| 3262 | + | |
| 3263 | + var rs_data = null; | |
| 3264 | + await getApp().request.promiseGet(t, {data: req_where}).then(res => { | |
| 3265 | + var tot = res.data.data.total; | |
| 3266 | + e.data.c_curr_p++; | |
| 3267 | + e.setData({ | |
| 3268 | + com_num: tot, //已经有加载 | |
| 3269 | + }); | |
| 3270 | + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 3271 | + rs_data = res.data.data.pageData; | |
| 3272 | + } else { | |
| 3273 | + th.setData({comments_no_more: 1, auto: 1}); | |
| 3274 | + } | |
| 3275 | + }) | |
| 3276 | + | |
| 3277 | + if (rs_data) { | |
| 3278 | + //var cda = th.data.comments; | |
| 3279 | + var cda = rs_data, com_data = th.data.comments; | |
| 3280 | + for (var ind in cda) { | |
| 3281 | + var ep = cda[ind]; | |
| 3282 | + if (cda[ind].head_pic == '') { | |
| 3283 | + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png"; | |
| 3284 | + } | |
| 3285 | + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) { | |
| 3286 | + cda[ind].weapp_img = JSON.parse(ep.weapp_img); | |
| 3287 | + } | |
| 3288 | + if (ep.img != "" && ut.isString(ep.img)) { | |
| 3289 | + cda[ind].img = ut.unserialize(ep.img); | |
| 3290 | + } | |
| 3291 | + | |
| 3292 | + //--测量多有字的宽带,计算有多少行-- | |
| 3293 | + var widh = ut.measureText(ep.content, 30); | |
| 3294 | + var lines = widh / 712; | |
| 3295 | + cda[ind].seeMore = false; | |
| 3296 | + if (lines > 3) cda[ind].seeMore = true; | |
| 3297 | + | |
| 3298 | + await getApp().request.promiseGet("/api/weshop/comment/pageComment", { | |
| 3299 | + data: {store_id: o.stoid, parent_id: ep.comment_id} | |
| 3300 | + }).then(res => { | |
| 3301 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 3302 | + cda[ind].replay_list = res.data.data.pageData; | |
| 3303 | + } | |
| 3304 | + }) | |
| 3305 | + } | |
| 3306 | + | |
| 3307 | + if (!com_data) com_data = cda; | |
| 3308 | + else com_data = com_data.concat(cda); | |
| 3309 | + | |
| 3310 | + th.setData({comments: com_data}); | |
| 3311 | + } | |
| 3312 | + th.setData({get_c: 1}); | |
| 3313 | + wx.hideLoading(); | |
| 3314 | + }, | |
| 3315 | + | |
| 3316 | + //加载更多是靠这个函数 | |
| 3317 | + onReachBottom: function () { | |
| 3318 | + if (this.data.activeCategoryId == 2) { | |
| 3319 | + if (!this.data.comments_no_more) this.requestComments_new(); | |
| 3320 | + } | |
| 3321 | + | |
| 3322 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | |
| 3323 | + if (goods_list) goods_list.get_list(); | |
| 3324 | + }, | |
| 3325 | + | |
| 3326 | + //--------检查是否活动,活动是否开始,或者是否结束------- | |
| 3327 | + async check_prom(gid, prom_type, prom_id) { | |
| 3328 | + console.log('check_prom'); | |
| 3329 | + var ee = this, th = ee; | |
| 3330 | + var user_id = getApp().globalData.user_id; | |
| 3331 | + if (!user_id) user_id = 0; | |
| 3332 | + | |
| 3333 | + if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) { | |
| 3334 | + this.setData({ | |
| 3335 | + prom_type: 0, isshow: 1, | |
| 3336 | + }); | |
| 3337 | + return false; | |
| 3338 | + } | |
| 3339 | + | |
| 3340 | + if (prom_type == 2) { | |
| 3341 | + //-------判断团购活动是否抢光--------- | |
| 3342 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 3343 | + 1: 1 | |
| 3344 | + }).then(res => { | |
| 3345 | + var em = res; | |
| 3346 | + if (em.data.code == 0) { | |
| 3347 | + if (em.data.data <= 0) ee.setData({ | |
| 3348 | + prom_r_null: 1 | |
| 3349 | + }); | |
| 3350 | + //拿取价格并且判断时间-- | |
| 3351 | + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, { | |
| 3352 | + success: function (t) { | |
| 3353 | + if (t.data.code != 0) { | |
| 3354 | + ee.get_normal(gid); | |
| 3355 | + return false; | |
| 3356 | + } | |
| 3357 | + //----已经结束----- | |
| 3358 | + if (t.data.data.is_end == 1) { | |
| 3359 | + ee.get_normal(gid); | |
| 3360 | + return false; | |
| 3361 | + } | |
| 3362 | + //----已经过期----- | |
| 3363 | + var now = ut.gettimestamp(); | |
| 3364 | + if (t.data.data.end_time < now || t.data.data.start_time > now) { | |
| 3365 | + ee.get_normal(gid); | |
| 3366 | + return false; | |
| 3367 | + } | |
| 3368 | + | |
| 3369 | + /*-- 还没有开始预热的也不显示 --*/ | |
| 3370 | + if (t.data.data.show_time > now) { | |
| 3371 | + ee.get_normal(gid); | |
| 3372 | + return false; | |
| 3373 | + } | |
| 3374 | + | |
| 3375 | + var t_gd = ee.data.data; | |
| 3376 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | |
| 3377 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | |
| 3378 | + | |
| 3379 | + ee.setData({ | |
| 3380 | + prom_price: t.data.data.price, | |
| 3381 | + prom_type: 2, | |
| 3382 | + prom_id: prom_id, | |
| 3383 | + prom_buy_limit: t.data.data.buy_limit, | |
| 3384 | + prom_act: t.data.data, | |
| 3385 | + prom_end_time: prom_end_time, | |
| 3386 | + prom_start_time: prom_start_time, | |
| 3387 | + isshow: 1, | |
| 3388 | + prom_act: t.data.data | |
| 3389 | + }); | |
| 3390 | + | |
| 3391 | + ee.get_sto(); | |
| 3392 | + var newTime = ut.gettimestamp(); | |
| 3393 | + var endTime2 = t.data.data.end_time; | |
| 3394 | + var endTime1 = t.data.data.start_time; | |
| 3395 | + if (endTime1 > newTime) { | |
| 3396 | + ee.setData({ | |
| 3397 | + prom_time_text: '距团购开始还有' | |
| 3398 | + }) | |
| 3399 | + ee.countDown(endTime1, 0); | |
| 3400 | + } else { | |
| 3401 | + if (endTime2 > newTime) { | |
| 3402 | + ee.setData({ | |
| 3403 | + prom_time_text: '距团购结束还有', | |
| 3404 | + prom_st: 1 | |
| 3405 | + }) | |
| 3406 | + ee.countDown(endTime2); | |
| 3407 | + } | |
| 3408 | + } | |
| 3409 | + | |
| 3410 | + } | |
| 3411 | + }); | |
| 3412 | + } | |
| 3413 | + }) | |
| 3414 | + } | |
| 3415 | + | |
| 3416 | + if (prom_type == 1 && prom_id == 0) { | |
| 3417 | + this.setData({ | |
| 3418 | + prom_type: 0, isshow: 1, | |
| 3419 | + }); | |
| 3420 | + | |
| 3421 | + //获取门店 | |
| 3422 | + this.get_sto(); | |
| 3423 | + this.get_sku(o.stoid, this.data.data, gid); | |
| 3424 | + this.check_has_flash(); | |
| 3425 | + this.data.is_normal = 1; | |
| 3426 | + this.check_is_youhui(gid, 1); | |
| 3427 | + return false; | |
| 3428 | + } | |
| 3429 | + | |
| 3430 | + //if (prom_type != 3 && prom_type!=0){ | |
| 3431 | + //---判断秒杀---- | |
| 3432 | + if (prom_type == 1 && prom_id > 0) { | |
| 3433 | + //-------判断活动是否抢光--------- | |
| 3434 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 3435 | + 1: 1 | |
| 3436 | + }).then(res => { | |
| 3437 | + var em = res; | |
| 3438 | + if (em.data.code == 0) { | |
| 3439 | + | |
| 3440 | + if (em.data.data <= 0) ee.setData({ | |
| 3441 | + prom_r_null: 1 | |
| 3442 | + }); | |
| 3443 | + //拿取价格并且判断时间-- | |
| 3444 | + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { | |
| 3445 | + success: function (t) { | |
| 3446 | + if (t.data.code != 0) { | |
| 3447 | + ee.get_normal(gid); | |
| 3448 | + return false; | |
| 3449 | + } | |
| 3450 | + //----已经结束----- | |
| 3451 | + if (t.data.data.is_end == 1) { | |
| 3452 | + ee.get_normal(gid); | |
| 3453 | + return false; | |
| 3454 | + } | |
| 3455 | + //----已经过期----- | |
| 3456 | + var now = ut.gettimestamp(); | |
| 3457 | + if (t.data.data.end_time < now) { | |
| 3458 | + ee.get_normal(gid); | |
| 3459 | + return false; | |
| 3460 | + } | |
| 3461 | + /*-- 还没有开始预热的也不显示 --*/ | |
| 3462 | + if (t.data.data.show_time > now) { | |
| 3463 | + ee.get_normal(gid); | |
| 3464 | + return false; | |
| 3465 | + } | |
| 3466 | + | |
| 3467 | + var t_gd = ee.data.data; | |
| 3468 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | |
| 3469 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | |
| 3470 | + | |
| 3471 | + ee.setData({ | |
| 3472 | + prom_price: t.data.data.user_price, | |
| 3473 | + prom_type: 1, | |
| 3474 | + prom_id: prom_id, | |
| 3475 | + prom_buy_limit: t.data.data.buy_limit, | |
| 3476 | + prom_act: t.data.data, | |
| 3477 | + prom_end_time: prom_end_time, | |
| 3478 | + prom_start_time: prom_start_time, | |
| 3479 | + isshow: 1, | |
| 3480 | + }); | |
| 3481 | + | |
| 3482 | + ee.get_sto(); | |
| 3483 | + var newTime = ut.gettimestamp(); | |
| 3484 | + var endTime2 = t.data.data.end_time; | |
| 3485 | + var endTime1 = t.data.data.start_time; | |
| 3486 | + if (endTime1 > newTime) { | |
| 3487 | + ee.setData({ | |
| 3488 | + prom_time_text: '距秒杀开始还有' | |
| 3489 | + }) | |
| 3490 | + ee.countDown(endTime1, 0); | |
| 3491 | + } else { | |
| 3492 | + if (endTime2 > newTime) { | |
| 3493 | + ee.setData({ | |
| 3494 | + prom_time_text: '距秒杀结束还有', | |
| 3495 | + prom_st: 1 | |
| 3496 | + }) | |
| 3497 | + ee.countDown(endTime2); | |
| 3498 | + } | |
| 3499 | + } | |
| 3500 | + | |
| 3501 | + //如果是进行中的话 | |
| 3502 | + if (endTime1 < newTime) { | |
| 3503 | + //-- 获取秒杀活动的多少规格 -- | |
| 3504 | + ee.get_more_flahs(function (list) { | |
| 3505 | + if (list && list.length > 1) { | |
| 3506 | + | |
| 3507 | + var n_item = list[0]; | |
| 3508 | + var ind = list.findIndex(function (ele) { | |
| 3509 | + return ele.goods_id == ee.data.data.goods_id; | |
| 3510 | + }) | |
| 3511 | + if (ind < 0) return false; | |
| 3512 | + if (ind > 0) { | |
| 3513 | + n_item = JSON.parse(JSON.stringify(list[ind])); | |
| 3514 | + list.splice(ind, 1); | |
| 3515 | + list.unshift(n_item); | |
| 3516 | + } | |
| 3517 | + | |
| 3518 | + ee.data.sele_g.viplimited = n_item.viplimited; | |
| 3519 | + ee.data.data.viplimited = n_item.viplimited; | |
| 3520 | + | |
| 3521 | + var gb = 1; | |
| 3522 | + //-- 显示多规格 -- | |
| 3523 | + for (let i in list) { | |
| 3524 | + let item = list[i]; | |
| 3525 | + var gg = ""; | |
| 3526 | + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = ""; | |
| 3527 | + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = ""; | |
| 3528 | + | |
| 3529 | + if (item.goods_spec != "" && item.goods_color != "") { | |
| 3530 | + gg = item.goods_spec + "/" + item.goods_color; | |
| 3531 | + } else if (item.goods_spec != "" || item.goods_color != "") { | |
| 3532 | + gg = item.goods_spec + item.goods_color; | |
| 3533 | + } else { | |
| 3534 | + gg = "规格" + gb; | |
| 3535 | + gb++; | |
| 3536 | + } | |
| 3537 | + item.gg = gg; | |
| 3538 | + item.prom_id = item.prom_id; | |
| 3539 | + item.prom_type = 1; | |
| 3540 | + } | |
| 3541 | + | |
| 3542 | + ee.setData({ | |
| 3543 | + sku_g: list, | |
| 3544 | + }); | |
| 3545 | + | |
| 3546 | + } | |
| 3547 | + }) | |
| 3548 | + } | |
| 3549 | + | |
| 3550 | + } | |
| 3551 | + }); | |
| 3552 | + } | |
| 3553 | + }) | |
| 3554 | + } | |
| 3555 | + | |
| 3556 | + if (prom_type == 4) { | |
| 3557 | + //th.setData({is_integral_normal:1}); | |
| 3558 | + var rdata = { | |
| 3559 | + store_id: o.stoid, stype: 1, stypeup: 1, goods_id: gid | |
| 3560 | + } | |
| 3561 | + | |
| 3562 | + var integrals = 0; | |
| 3563 | + var get_datas = { | |
| 3564 | + user_id: getApp().globalData.user_id, store_id: o.stoid, | |
| 3565 | + }; | |
| 3566 | + await getApp().request.promiseGet("/api/weshop/users/getAllPoints", { | |
| 3567 | + data: get_datas | |
| 3568 | + }).then(res => { | |
| 3569 | + if (res.data.code == 0) { | |
| 3570 | + integrals = res.data.data.Integral; | |
| 3571 | + } | |
| 3572 | + }) | |
| 3573 | + | |
| 3574 | + //获取一下积分活动 | |
| 3575 | + await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList", { | |
| 3576 | + data: rdata | |
| 3577 | + }).then(res => { | |
| 3578 | + //调用接口有数据的时候 | |
| 3579 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 3580 | + var inte_data = res.data.data.pageData[0]; | |
| 3581 | + var can_integral = (parseFloat(integrals) >= parseFloat(inte_data.integral)); | |
| 3582 | + ee.setData({ | |
| 3583 | + prom_price: parseFloat(inte_data.addmoney), | |
| 3584 | + prom_integral: parseFloat(inte_data.integral), | |
| 3585 | + prom_type: 4, | |
| 3586 | + prom_id: inte_data.id, | |
| 3587 | + prom_buy_limit: inte_data.limitvipqty, | |
| 3588 | + prom_act: inte_data, | |
| 3589 | + isshow: 1, | |
| 3590 | + can_integral: can_integral, | |
| 3591 | + is_shopbuy: parseInt(inte_data.is_shopbuy ? inte_data.is_shopbuy : 0) | |
| 3592 | + }); | |
| 3593 | + ee.get_sto(); | |
| 3594 | + | |
| 3595 | + } else { | |
| 3596 | + ee.get_normal(gid); | |
| 3597 | + return false; | |
| 3598 | + } | |
| 3599 | + }) | |
| 3600 | + | |
| 3601 | + } | |
| 3602 | + | |
| 3603 | + //---判断拼单---- | |
| 3604 | + if (prom_type == 6) { | |
| 3605 | + //-------判断活动是否抢光--------- | |
| 3606 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 3607 | + 1: 1 | |
| 3608 | + }).then(res => { | |
| 3609 | + var em = res; | |
| 3610 | + var flag = null; | |
| 3611 | + if (em.data.code == 0) { | |
| 3612 | + if (em.data.data <= 0) ee.setData({ | |
| 3613 | + prom_r_null: 1 | |
| 3614 | + }); | |
| 3615 | + //拿取价格并且判断时间-- | |
| 3616 | + getApp().request.get("/api/weshop/teamlist/get/" + | |
| 3617 | + os.stoid + "/" + prom_id, { | |
| 3618 | + success: async function (t) { | |
| 3619 | + if (t.data.code != 0) { | |
| 3620 | + ee.get_normal(gid); | |
| 3621 | + return false; | |
| 3622 | + } | |
| 3623 | + //----已经结束----- | |
| 3624 | + if (t.data.data.is_end == 1) { | |
| 3625 | + ee.get_normal(gid); | |
| 3626 | + return false; | |
| 3627 | + } | |
| 3628 | + //----已经过期----- | |
| 3629 | + var now = ut.gettimestamp(); | |
| 3630 | + if (t.data.data.end_time < now) { | |
| 3631 | + ee.get_normal(gid); | |
| 3632 | + return false; | |
| 3633 | + } | |
| 3634 | + | |
| 3635 | + /*-- 还没有开始预热的也不显示 --*/ | |
| 3636 | + if (t.data.data.show_time > now) { | |
| 3637 | + ee.get_normal(gid); | |
| 3638 | + return false; | |
| 3639 | + } | |
| 3640 | + | |
| 3641 | + /*-- 判断拼单是否启用 --*/ | |
| 3642 | + if (!t.data.data.is_show) { | |
| 3643 | + console.log('没启用'); | |
| 3644 | + wx.setNavigationBarTitle({ | |
| 3645 | + title: '系统提示', | |
| 3646 | + }); | |
| 3647 | + wx.showToast({ | |
| 3648 | + title: '此商品暂时没有拼单活动', | |
| 3649 | + icon: 'none', | |
| 3650 | + success(){ | |
| 3651 | + setTimeout(() => { | |
| 3652 | + wx.navigateBack() | |
| 3653 | + }, 2000) | |
| 3654 | + } | |
| 3655 | + }); | |
| 3656 | + return false | |
| 3657 | + } | |
| 3658 | + | |
| 3659 | + //判断拼团的---会员身份-- | |
| 3660 | + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2", { | |
| 3661 | + data: { | |
| 3662 | + store_id: os.stoid, | |
| 3663 | + is_end: 0, | |
| 3664 | + is_show: 1, | |
| 3665 | + user_id: getApp().globalData.user_id, | |
| 3666 | + pageSize: 1000 | |
| 3667 | + } | |
| 3668 | + }).then(res => { | |
| 3669 | + let pd_list = res.data.data.pageData; | |
| 3670 | + if (res.data.code == 0 && pd_list.length > 0) { | |
| 3671 | + flag = pd_list.some(pd => { | |
| 3672 | + return pd.goods_id == gid | |
| 3673 | + }) | |
| 3674 | + } | |
| 3675 | + }) | |
| 3676 | + if (!flag) { | |
| 3677 | + ee.get_normal(gid); | |
| 3678 | + return false; | |
| 3679 | + | |
| 3680 | + } | |
| 3681 | + //-------查看自己是不是有买过该团的商品,并还为支付,或者在进行中------- | |
| 3682 | + await getApp().request.promiseGet("/api/weshop/order/page", { | |
| 3683 | + data: { | |
| 3684 | + pt_prom_id: prom_id, | |
| 3685 | + user_id: oo.user_id, | |
| 3686 | + store_id: os.stoid, | |
| 3687 | + pageSize: 1, | |
| 3688 | + page: 1 | |
| 3689 | + } | |
| 3690 | + }).then(e => { | |
| 3691 | + if (e.data.code == 0 && e.data.data.pageData.length > 0) { | |
| 3692 | + var odr = e.data.data.pageData[0]; | |
| 3693 | + th.data.buy_order = odr; | |
| 3694 | + if (odr.pt_status == 0 && odr.order_status == 1) { | |
| 3695 | + th.setData({ | |
| 3696 | + user_order_pt_state: 1 | |
| 3697 | + }); | |
| 3698 | + } | |
| 3699 | + if (odr.pt_status == 1 && odr.order_status == 1) { | |
| 3700 | + if (odr.is_zsorder == 4) { | |
| 3701 | + getApp().request.promiseGet("/api/weshop/teamgroup/page/", { | |
| 3702 | + data: { | |
| 3703 | + store_id: os.stoid, | |
| 3704 | + team_id: odr.pt_prom_id, | |
| 3705 | + listno: odr.pt_listno | |
| 3706 | + } | |
| 3707 | + }).then(res => { | |
| 3708 | + var now = ut.gettimestamp(); | |
| 3709 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 3710 | + var tgr = res.data.data.pageData[0]; | |
| 3711 | + //如果团的时间已经到了 | |
| 3712 | + if (now >= tgr.kt_end_time) { | |
| 3713 | + th.update_jiti(tgr.id); | |
| 3714 | + } else { | |
| 3715 | + th.setData({ | |
| 3716 | + user_order_pt_state: 2 | |
| 3717 | + }); | |
| 3718 | + } | |
| 3719 | + } | |
| 3720 | + }) | |
| 3721 | + | |
| 3722 | + } else { | |
| 3723 | + th.setData({ | |
| 3724 | + user_order_pt_state: 2 | |
| 3725 | + }); | |
| 3726 | + } | |
| 3727 | + } | |
| 3728 | + | |
| 3729 | + if (odr.pt_status == 2 && odr.is_zsorder == 4) { | |
| 3730 | + th.setData({ | |
| 3731 | + user_order_pt_state: 3, | |
| 3732 | + }); | |
| 3733 | + th.data.wk_order_id = odr.order_id; | |
| 3734 | + } | |
| 3735 | + } | |
| 3736 | + }) | |
| 3737 | + | |
| 3738 | + //----------查看阶梯团------------ | |
| 3739 | + if (t.data.data.ct_rylist != "null" && t.data.data.ct_rylist != "" && t.data.data.ct_rylist != null && t.data.data.ct_rylist != undefined) { | |
| 3740 | + t.data.data.ct_rylist = JSON.parse(t.data.data.ct_rylist); | |
| 3741 | + var max_num = 0; | |
| 3742 | + t.data.data.ct_rylist.forEach(function (val, ind) { | |
| 3743 | + if (parseInt(val.rynum) > max_num) max_num = parseInt(val.rynum); | |
| 3744 | + }) | |
| 3745 | + t.data.data.max_ct_num = max_num; | |
| 3746 | + } | |
| 3747 | + | |
| 3748 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | |
| 3749 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | |
| 3750 | + ee.setData({ | |
| 3751 | + prom_price: t.data.data.price, | |
| 3752 | + prom_type: 6, | |
| 3753 | + prom_id: prom_id, | |
| 3754 | + prom_buy_limit: t.data.data.buy_limit, | |
| 3755 | + prom_act: t.data.data, | |
| 3756 | + prom_end_time: prom_end_time, | |
| 3757 | + prom_start_time: prom_start_time, | |
| 3758 | + isshow: 1, | |
| 3759 | + }); | |
| 3760 | + | |
| 3761 | + ee.get_sto(); | |
| 3762 | + | |
| 3763 | + var newTime = now; | |
| 3764 | + var endTime2 = t.data.data.end_time; | |
| 3765 | + var endTime1 = t.data.data.start_time; | |
| 3766 | + | |
| 3767 | + if (endTime1 > newTime) { | |
| 3768 | + ee.setData({ | |
| 3769 | + prom_time_text: '距拼单开始还剩:' | |
| 3770 | + }) | |
| 3771 | + ee.countDown(endTime1, 0); | |
| 3772 | + } else { | |
| 3773 | + if (endTime2 > newTime) { | |
| 3774 | + ee.setData({ | |
| 3775 | + prom_time_text: '距拼单结束还剩:', | |
| 3776 | + prom_st: 1 | |
| 3777 | + }) | |
| 3778 | + ee.countDown(endTime2); | |
| 3779 | + } | |
| 3780 | + } | |
| 3781 | + //-------查看有多少人在开这个团------- | |
| 3782 | + th.get_team_group(prom_id); | |
| 3783 | + } | |
| 3784 | + }); | |
| 3785 | + } | |
| 3786 | + }) | |
| 3787 | + } | |
| 3788 | + }, | |
| 3789 | + | |
| 3790 | + //--获取有多少人在开团-- | |
| 3791 | + async get_team_group(prom_id) { | |
| 3792 | + var teamgroup = [], | |
| 3793 | + th = this, | |
| 3794 | + grounp_tatal = 0; | |
| 3795 | + //如果活动是开团不是商家团 | |
| 3796 | + if (this.data.prom_act.kttype > 1) { | |
| 3797 | + | |
| 3798 | + var req_data = { | |
| 3799 | + store_id: os.stoid, | |
| 3800 | + pageSize: 3, | |
| 3801 | + page: 1, | |
| 3802 | + state: 2, | |
| 3803 | + team_id: prom_id, | |
| 3804 | + ordernum: 1 | |
| 3805 | + }; | |
| 3806 | + | |
| 3807 | + if (this.data.prom_act.kttype == 3 && this.data.prom_act.max_ct_num) { | |
| 3808 | + req_data.max_num = this.data.prom_act.max_ct_num; | |
| 3809 | + } | |
| 3810 | + | |
| 3811 | + //获取活动从表信息team_id | |
| 3812 | + await getApp().request.promiseGet("/api/weshop/teamgroup/page", { | |
| 3813 | + data: req_data | |
| 3814 | + }).then(res => { | |
| 3815 | + teamgroup = res.data.data.pageData; | |
| 3816 | + grounp_tatal = res.data.data.total; | |
| 3817 | + }) | |
| 3818 | + //获取订单的总数这个接口不能用 | |
| 3819 | + for (i = 0; i < teamgroup.length; i++) { | |
| 3820 | + await getApp().request.promiseGet("/api/weshop/order/page", { | |
| 3821 | + data: { | |
| 3822 | + store_id: os.stoid, | |
| 3823 | + pt_status: 1, | |
| 3824 | + pt_listno: teamgroup[i].listno | |
| 3825 | + } | |
| 3826 | + }).then(res => { | |
| 3827 | + var order = res.data.data.pageData; | |
| 3828 | + teamgroup[i].open_num = order.length; | |
| 3829 | + }) | |
| 3830 | + await getApp().request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + teamgroup[i].openvipid, {}).then(res => { | |
| 3831 | + var user = res.data.data; | |
| 3832 | + teamgroup[i].user = user; | |
| 3833 | + }) | |
| 3834 | + } | |
| 3835 | + | |
| 3836 | + if (teamgroup.length > 0) { | |
| 3837 | + th.setData({ | |
| 3838 | + teamgroup: teamgroup, | |
| 3839 | + grounp_tatal: grounp_tatal | |
| 3840 | + }); | |
| 3841 | + th.countDown2(); | |
| 3842 | + } | |
| 3843 | + } | |
| 3844 | + }, | |
| 3845 | + | |
| 3846 | + //---小于10的格式化函数---- | |
| 3847 | + timeFormat(param) { | |
| 3848 | + return param < 10 ? '0' + param : param; | |
| 3849 | + }, | |
| 3850 | + | |
| 3851 | + // 显示拼单规则 | |
| 3852 | + showRules: function() { | |
| 3853 | + this.setData({ | |
| 3854 | + showRules: true, | |
| 3855 | + }); | |
| 3856 | + }, | |
| 3857 | + | |
| 3858 | + // 关闭拼单规则 | |
| 3859 | + closeRules: function() { | |
| 3860 | + this.setData({ | |
| 3861 | + showRules: false, | |
| 3862 | + }); | |
| 3863 | + }, | |
| 3864 | + | |
| 3865 | + //----倒计时函数----- | |
| 3866 | + countDown(time, prom_st) { | |
| 3867 | + if (!this.data.is_timer) return false; | |
| 3868 | + var th = this; | |
| 3869 | + // 获取当前时间,同时得到活动结束时间数组 | |
| 3870 | + var endTime = time; | |
| 3871 | + var newTime = ut.gettimestamp(); | |
| 3872 | + // 对结束时间进行处理渲染到页面 | |
| 3873 | + var obj = null; | |
| 3874 | + // 如果活动未结束,对时间进行处理 | |
| 3875 | + if (endTime - newTime > 0) { | |
| 3876 | + var time = (endTime - newTime); | |
| 3877 | + // 获取天、时、分、秒 | |
| 3878 | + var day = parseInt(time / (60 * 60 * 24)); | |
| 3879 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 3880 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 3881 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 3882 | + obj = { | |
| 3883 | + day: this.timeFormat(day), | |
| 3884 | + hou: this.timeFormat(hou), | |
| 3885 | + min: this.timeFormat(min), | |
| 3886 | + sec: this.timeFormat(sec) | |
| 3887 | + } | |
| 3888 | + } else { | |
| 3889 | + if (th.data.prom_st == 0) { | |
| 3890 | + //var endTime2 = new Date(th.data.prom_end_time).getTime(); | |
| 3891 | + var endTime2 = th.data.prom_act.end_time; | |
| 3892 | + th.setData({ | |
| 3893 | + prom_time_text: '距结束还剩:', | |
| 3894 | + prom_st: 1 | |
| 3895 | + }) | |
| 3896 | + setTimeout(function () { | |
| 3897 | + th.countDown(endTime2) | |
| 3898 | + }, 1000); | |
| 3899 | + return false; | |
| 3900 | + | |
| 3901 | + } else { | |
| 3902 | + //活动已结束,全部设置为'00' | |
| 3903 | + obj = { | |
| 3904 | + day: '00', | |
| 3905 | + hou: '00', | |
| 3906 | + min: '00', | |
| 3907 | + sec: '00' | |
| 3908 | + } | |
| 3909 | + th.setData({ | |
| 3910 | + prom_time_text: '活动已经结束:', | |
| 3911 | + prom_st: 3 | |
| 3912 | + }) | |
| 3913 | + th.setData({ | |
| 3914 | + djs: obj | |
| 3915 | + }); | |
| 3916 | + return false; | |
| 3917 | + } | |
| 3918 | + } | |
| 3919 | + | |
| 3920 | + th.setData({ | |
| 3921 | + djs: obj | |
| 3922 | + }); | |
| 3923 | + setTimeout(function () { | |
| 3924 | + th.countDown(endTime) | |
| 3925 | + }, 1000); | |
| 3926 | + }, | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + //-------------获取购买数量的总函数---------------- | |
| 3930 | + get_buy_num: function (gd, func) { | |
| 3931 | + var map = this.data.g_buy_num, | |
| 3932 | + th = this, | |
| 3933 | + user_id = getApp().globalData.user_id; | |
| 3934 | + if (user_id == null) { | |
| 3935 | + map.set(gd.goods_id, 0); | |
| 3936 | + th.setData({ | |
| 3937 | + g_buy_num: map, | |
| 3938 | + prom_buy_num: 0, | |
| 3939 | + }); | |
| 3940 | + "function" == typeof func && func(); | |
| 3941 | + return false; | |
| 3942 | + } | |
| 3943 | + | |
| 3944 | + if (map.has(gd.goods_id)) { | |
| 3945 | + "function" == typeof func && func(); | |
| 3946 | + } else { | |
| 3947 | + //----获取商品购买数---- | |
| 3948 | + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 3949 | + data: { | |
| 3950 | + store_id: os.stoid, | |
| 3951 | + user_id: user_id, | |
| 3952 | + goods_id: gd.goods_id | |
| 3953 | + }, | |
| 3954 | + success: function (t) { | |
| 3955 | + if (t.data.code == 0) { | |
| 3956 | + var g_buy_num = t.data.data.goodsbuynum; | |
| 3957 | + | |
| 3958 | + //如果是秒杀的时候 | |
| 3959 | + if (th.data.prom_type == 0 && gd.prom_type == 1) { | |
| 3960 | + gd.prom_type = 0; | |
| 3961 | + } | |
| 3962 | + //如果全场优惠,商品做了秒杀 | |
| 3963 | + if (th.data.prom_type == 3 && gd.prom_type == 1) { | |
| 3964 | + gd.prom_type = 0; | |
| 3965 | + } | |
| 3966 | + //如果全场阶梯优惠,商品做了秒杀 | |
| 3967 | + if (th.data.prom_type == 10 && gd.prom_type == 1) { | |
| 3968 | + gd.prom_type = 0; | |
| 3969 | + } | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + if (!th.data.is_normal && ( gd.prom_type == 1 || gd.prom_type == 2 || gd.prom_type == 4 || gd.prom_type == 6)) { | |
| 3973 | + //----获取活动购买数---- | |
| 3974 | + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 3975 | + data: { | |
| 3976 | + store_id: os.stoid, | |
| 3977 | + user_id: user_id, | |
| 3978 | + goods_id: gd.goods_id, | |
| 3979 | + prom_type: gd.prom_type, | |
| 3980 | + prom_id: gd.prom_id | |
| 3981 | + }, | |
| 3982 | + //-----获取----- | |
| 3983 | + success: function (tt) { | |
| 3984 | + if (tt.data.code == 0) { | |
| 3985 | + map.set(gd.goods_id, g_buy_num); | |
| 3986 | + th.setData({ | |
| 3987 | + g_buy_num: map, | |
| 3988 | + prom_buy_num: tt.data.data.promgoodsbuynum, | |
| 3989 | + }); | |
| 3990 | + "function" == typeof func && func(); | |
| 3991 | + } | |
| 3992 | + } | |
| 3993 | + }); | |
| 3994 | + } else { | |
| 3995 | + map.set(gd.goods_id, g_buy_num); | |
| 3996 | + th.setData({ | |
| 3997 | + g_buy_num: map | |
| 3998 | + }); | |
| 3999 | + "function" == typeof func && func(); | |
| 4000 | + } | |
| 4001 | + } | |
| 4002 | + } | |
| 4003 | + }); | |
| 4004 | + } | |
| 4005 | + }, | |
| 4006 | + | |
| 4007 | + //--拼单推荐的显示--- | |
| 4008 | + tj_Click: function (e) { | |
| 4009 | + var ind = parseInt(e.target.dataset.ind); | |
| 4010 | + this.setData({ | |
| 4011 | + is_show_gz: ind | |
| 4012 | + }); | |
| 4013 | + }, | |
| 4014 | + | |
| 4015 | + //--------拼团玩法显示详情-------- | |
| 4016 | + show_pt_xx: function (e) { | |
| 4017 | + this.setData({ | |
| 4018 | + pd_xx: 1, | |
| 4019 | + }) | |
| 4020 | + }, | |
| 4021 | + close_pt_xx: function () { | |
| 4022 | + this.setData({ | |
| 4023 | + pd_xx: 0, | |
| 4024 | + }) | |
| 4025 | + }, | |
| 4026 | + | |
| 4027 | + //--点击弹起拼单-- | |
| 4028 | + openSpecModel_pt: function (e) { | |
| 4029 | + | |
| 4030 | + | |
| 4031 | + this.setData({open_ind_store: 4, goodsInputNum: 1});//拼团直接给4 | |
| 4032 | + | |
| 4033 | + | |
| 4034 | + //--先判断会员状态-- | |
| 4035 | + var user_info = getApp().globalData.userInfo; | |
| 4036 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 4037 | + wx.navigateTo({ | |
| 4038 | + url: '/pages/togoin/togoin', | |
| 4039 | + }) | |
| 4040 | + return false; | |
| 4041 | + } | |
| 4042 | + | |
| 4043 | + var th = this; | |
| 4044 | + var ind = parseInt(e.currentTarget.dataset.it); | |
| 4045 | + | |
| 4046 | + //如果是拼单活动的普通购买 | |
| 4047 | + if (ind == 1) { | |
| 4048 | + | |
| 4049 | + if (!th.data.is_normal) { | |
| 4050 | + th.data.g_buy_num = new Map(); | |
| 4051 | + } | |
| 4052 | + | |
| 4053 | + //如果拼单的sku data是空的,就要先获取一下 | |
| 4054 | + if (th.data.sku_g_pt) { | |
| 4055 | + th.get_sto(1); | |
| 4056 | + th.setData({ | |
| 4057 | + is_normal: ind, | |
| 4058 | + openSpecModal_pt: 1 | |
| 4059 | + }); | |
| 4060 | + } else { | |
| 4061 | + th.get_sto(1); | |
| 4062 | + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | |
| 4063 | + th.setData({ | |
| 4064 | + is_normal: ind, | |
| 4065 | + openSpecModal_pt: 1 | |
| 4066 | + }); | |
| 4067 | + }); | |
| 4068 | + } | |
| 4069 | + th.check_is_youhui(th.data.gid, 1); | |
| 4070 | + } else { | |
| 4071 | + | |
| 4072 | + if (th.data.is_normal) { | |
| 4073 | + th.data.g_buy_num = new Map(); | |
| 4074 | + } | |
| 4075 | + | |
| 4076 | + //拼单商品从这里进,先判断有没有买过商品, | |
| 4077 | + getApp().request.get("/api/weshop/order/page", { | |
| 4078 | + data: { | |
| 4079 | + pt_prom_id: th.data.prom_act.id, | |
| 4080 | + user_id: oo.user_id, | |
| 4081 | + store_id: os.stoid, | |
| 4082 | + pageSize: 1, | |
| 4083 | + page: 1 | |
| 4084 | + }, | |
| 4085 | + success: function (e) { | |
| 4086 | + //--跳转到已经购买的情况-- | |
| 4087 | + if (e.data.data.pageData.length > 0) { | |
| 4088 | + var odr = e.data.data.pageData[0]; | |
| 4089 | + //还未支付 | |
| 4090 | + if (odr.pt_status == 0 && (odr.order_status == 1 || odr.order_status == 0)) { | |
| 4091 | + wx.showModal({ | |
| 4092 | + title: "您已经购买了该商品待支付中", | |
| 4093 | + success: function (a) { | |
| 4094 | + if (a.confirm) { | |
| 4095 | + wx.navigateTo({ | |
| 4096 | + url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, | |
| 4097 | + }); | |
| 4098 | + } | |
| 4099 | + } | |
| 4100 | + }); | |
| 4101 | + } else if (odr.pt_status == 1 && odr.order_status == 1) { | |
| 4102 | + | |
| 4103 | + if (this.data.is_go_to_team_show) return false; | |
| 4104 | + this.data.is_go_to_team_show = 1; | |
| 4105 | + wx.showLoading(); | |
| 4106 | + | |
| 4107 | + /*--- | |
| 4108 | + wx.redirectTo({ | |
| 4109 | + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, | |
| 4110 | + });--*/ | |
| 4111 | + getApp().goto("/pages/team/team_success/team_success?ordersn=" + odr.order_sn); | |
| 4112 | + | |
| 4113 | + } else { | |
| 4114 | + th.setData({ | |
| 4115 | + is_normal: ind, | |
| 4116 | + openSpecModal_pt: 1 | |
| 4117 | + }); | |
| 4118 | + } | |
| 4119 | + } | |
| 4120 | + else { | |
| 4121 | + th.setData({ | |
| 4122 | + is_normal: ind, | |
| 4123 | + openSpecModal_pt: 1 | |
| 4124 | + }); | |
| 4125 | + } | |
| 4126 | + } | |
| 4127 | + }) | |
| 4128 | + } | |
| 4129 | + }, | |
| 4130 | + | |
| 4131 | + //-----------------拼单生成方法--------------------- | |
| 4132 | + addCart_pt: function () { | |
| 4133 | + var th = this; | |
| 4134 | + if (this.data.is_normal == 0) { | |
| 4135 | + //看一下有没有起购数,如果有起购数,要计算起购数 | |
| 4136 | + var qnum = parseFloat(th.data.prom_act.minbuynum); | |
| 4137 | + if (qnum > 0 && th.data.goodsInputNum < qnum) { | |
| 4138 | + getApp().confirmBox("拼团商品至少要买" + qnum + "件!"); | |
| 4139 | + return false; | |
| 4140 | + } | |
| 4141 | + th.addcart_pt_func(); | |
| 4142 | + } else { | |
| 4143 | + th.addcart_pt_func(); | |
| 4144 | + } | |
| 4145 | + }, | |
| 4146 | + | |
| 4147 | + addcart_pt_func: function () { | |
| 4148 | + if (oo.user_id == null) { | |
| 4149 | + s.my_warnning("还未登录!", 0, this); | |
| 4150 | + return; | |
| 4151 | + } | |
| 4152 | + var e = this, | |
| 4153 | + th = e, | |
| 4154 | + o = this.data.sele_g; | |
| 4155 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | |
| 4156 | + | |
| 4157 | + //----------添加到购物车时,要判断限购数量,-------- | |
| 4158 | + e.get_buy_num(o, async function (ee) { | |
| 4159 | + | |
| 4160 | + //---判断商品是否超出限购--- | |
| 4161 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | |
| 4162 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | |
| 4163 | + // wx.showModal({ | |
| 4164 | + // title: '提示', | |
| 4165 | + // content: '超出商品限购' | |
| 4166 | + // }); | |
| 4167 | + s.my_warnning('超出商品限购', 0, th); | |
| 4168 | + var num = th.data.prom_buy_limit - th.data.prom_buy_num; | |
| 4169 | + if (num < 0) num = 0; | |
| 4170 | + th.setData({goodsInputNum: num}) | |
| 4171 | + return false; | |
| 4172 | + } | |
| 4173 | + } | |
| 4174 | + //---判断商品是否超出活动限购,拼团的普通购买不计算活动的限购--- | |
| 4175 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && th.data.is_normal != 1) { | |
| 4176 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | |
| 4177 | + // wx.showModal({ | |
| 4178 | + // title: '提示', | |
| 4179 | + // content: '超出商品活动限购' | |
| 4180 | + // }); | |
| 4181 | + s.my_warnning('超出商品活动限购', 0, th); | |
| 4182 | + var num = th.data.prom_buy_limit - th.data.prom_buy_num; | |
| 4183 | + if (num < 0) num = 0; | |
| 4184 | + th.setData({goodsInputNum: num}) | |
| 4185 | + return false; | |
| 4186 | + } | |
| 4187 | + } | |
| 4188 | + | |
| 4189 | + var redis_num = 0 | |
| 4190 | + //不是普通购买的时候 | |
| 4191 | + if (th.data.is_normal != 1) { | |
| 4192 | + //-------判断活动是否抢光--------- | |
| 4193 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.sele_g.prom_id, { | |
| 4194 | + 1: 1 | |
| 4195 | + }).then(res => { | |
| 4196 | + redis_num = res.data.data; | |
| 4197 | + }) | |
| 4198 | + | |
| 4199 | + if (th.data.goodsInputNum > redis_num) { | |
| 4200 | + // wx.showModal({ | |
| 4201 | + // title: '提示', | |
| 4202 | + // content: '超出商品活动库存' | |
| 4203 | + // }); | |
| 4204 | + s.my_warnning('超出商品活动库存', 0, th); | |
| 4205 | + th.setData({goodsInputNum: redis_num}) | |
| 4206 | + | |
| 4207 | + return false; | |
| 4208 | + } | |
| 4209 | + } | |
| 4210 | + | |
| 4211 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | |
| 4212 | + if (th.data.goodsInputNum > o.store_count) { | |
| 4213 | + th.setData({goodsInputNum: o.store_count}) | |
| 4214 | + return s.my_warnning("超出商品库存", 0, th); | |
| 4215 | + } | |
| 4216 | + | |
| 4217 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | |
| 4218 | + this.setData({ | |
| 4219 | + sto_sele_name: "" | |
| 4220 | + }); | |
| 4221 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | |
| 4222 | + //--------------此时操作的数据------------ | |
| 4223 | + var newd = { | |
| 4224 | + goods_id: o.goods_id, | |
| 4225 | + goods_num: th.data.goodsInputNum, | |
| 4226 | + pick_id: th.data.sto_sele_id, | |
| 4227 | + user_id: oo.user_id, | |
| 4228 | + store_id: th.data.stoid, | |
| 4229 | + goods_price: o.shop_price, | |
| 4230 | + goods_name: o.goods_name, | |
| 4231 | + goods_sn: o.goods_sn, | |
| 4232 | + sku: o.sku, | |
| 4233 | + }; | |
| 4234 | + | |
| 4235 | + //---是不是从收藏夹出来的--- | |
| 4236 | + if (th.data.c_guide_id) { | |
| 4237 | + newd['guide_id'] = th.data.c_guide_id; | |
| 4238 | + newd['guide_type'] = 2; | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + } else { | |
| 4244 | + if (getApp().globalData.guide_id) { | |
| 4245 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 4246 | + newd['guide_type'] = 0; | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + } | |
| 4250 | + } | |
| 4251 | + | |
| 4252 | + //让商品带上房间号 | |
| 4253 | + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) { | |
| 4254 | + if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | |
| 4255 | + newd.room_id = getApp().globalData.room_id; | |
| 4256 | + } | |
| 4257 | + } else { | |
| 4258 | + if (newd.goods_id == getApp().globalData.room_goods_id) { | |
| 4259 | + newd.room_id = getApp().globalData.room_id; | |
| 4260 | + } | |
| 4261 | + } | |
| 4262 | + | |
| 4263 | + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | |
| 4264 | + | |
| 4265 | + if (th.data.is_normal == 1) { | |
| 4266 | + var conf = th.data.bconfig; | |
| 4267 | + if (conf.switch_list) { | |
| 4268 | + var s_list = JSON.parse(conf.switch_list); | |
| 4269 | + //如果后台有开启等级价的功能 | |
| 4270 | + if (parseInt(s_list.rank_switch) == 2) { | |
| 4271 | + var card_price = o[getApp().globalData.userInfo['card_field']]; | |
| 4272 | + //如果会员有等级价 | |
| 4273 | + if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null | |
| 4274 | + && getApp().globalData.userInfo['card_field'] != "" && card_price > 0) { | |
| 4275 | + newd.goods_price = card_price; | |
| 4276 | + } | |
| 4277 | + } | |
| 4278 | + } | |
| 4279 | + } | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + //-----如果是秒杀,团购,积分购,拼团,且不是普通购买----- | |
| 4283 | + if (th.data.prom_type == 6 && th.data.is_normal != 1) { | |
| 4284 | + newd.goods_price = th.data.prom_price; | |
| 4285 | + newd.prom_type = th.data.prom_type; | |
| 4286 | + newd.prom_id = th.data.prom_id; | |
| 4287 | + newd.kt_type = th.data.prom_act.kttype; //开团类型 | |
| 4288 | + newd.is_pt_tz = 0; | |
| 4289 | + //th.data.sto_sele_distr=1; //直接用自提的方式提交 | |
| 4290 | + if (newd.kt_type > 1) { | |
| 4291 | + newd.is_pt_tz = 1; //开团类型 | |
| 4292 | + } | |
| 4293 | + if (newd.kt_type == 3) { | |
| 4294 | + th.data.sto_sele_distr = 1; | |
| 4295 | + } | |
| 4296 | + | |
| 4297 | + } else if (th.data.prom_type == 3) { | |
| 4298 | + newd.prom_type = 0; | |
| 4299 | + newd.prom_id = 0; | |
| 4300 | + } | |
| 4301 | + | |
| 4302 | + newd['pick_name'] = th.data.sto_sele_name; | |
| 4303 | + newd['pick_dis'] = th.data.sto_sele_distr; | |
| 4304 | + newd['is_normal'] = th.data.is_normal; | |
| 4305 | + | |
| 4306 | + if (newd['is_normal']) { | |
| 4307 | + newd['is_pd_normal'] = 1; | |
| 4308 | + //判断一下有没有全局优惠活动 | |
| 4309 | + th.check_nor_promgood(newd.goods_id, function (e) { | |
| 4310 | + if (e && e.act_id) { | |
| 4311 | + newd['prom_type'] = 3; | |
| 4312 | + newd['prom_id'] = e.act_id; | |
| 4313 | + } | |
| 4314 | + th.buyNow(newd) | |
| 4315 | + }) | |
| 4316 | + } | |
| 4317 | + else th.buyNow_pt(newd); | |
| 4318 | + }) | |
| 4319 | + }, | |
| 4320 | + | |
| 4321 | + //----------立即购买_pt----------- | |
| 4322 | + buyNow_pt: function (e) { | |
| 4323 | + s.set_b_now(e); | |
| 4324 | + wx.navigateTo({ | |
| 4325 | + url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + e.goods_id, | |
| 4326 | + }); | |
| 4327 | + }, | |
| 4328 | + | |
| 4329 | + //-------跳转pt商品------- | |
| 4330 | + go_to_nopay: function () { | |
| 4331 | + var th = this; | |
| 4332 | + url = "/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id; | |
| 4333 | + getApp().goto(url); | |
| 4334 | + | |
| 4335 | + }, | |
| 4336 | + //-------跳转pt teamshow------- | |
| 4337 | + go_to_team_show: function () { | |
| 4338 | + | |
| 4339 | + if (this.data.is_go_to_team_show) return false; | |
| 4340 | + this.data.is_go_to_team_show = 1; | |
| 4341 | + wx.showLoading(); | |
| 4342 | + | |
| 4343 | + var th = this; | |
| 4344 | + var url = "/pages/team/team_success/team_success?ordersn=" + th.data.buy_order.order_sn; | |
| 4345 | + /*-- | |
| 4346 | + wx.redirectTo({ | |
| 4347 | + url:url, | |
| 4348 | + })--*/ | |
| 4349 | + getApp().goto(url); | |
| 4350 | + | |
| 4351 | + }, | |
| 4352 | + | |
| 4353 | + //---拼团倒计时--- | |
| 4354 | + countDown2() { | |
| 4355 | + if (!this.data.is_timer) return false; | |
| 4356 | + var th = this; | |
| 4357 | + // 获取当前时间,同时得到活动结束时间数组 | |
| 4358 | + var newTime = ut.gettimestamp(); | |
| 4359 | + var List = th.data.teamgroup; | |
| 4360 | + for (var j = 0; j < List.length; j++) { | |
| 4361 | + // 对结束时间进行处理渲染到页面 | |
| 4362 | + var endTime = List[j].kt_end_time; | |
| 4363 | + let obj = null; | |
| 4364 | + // 如果活动未结束,对时间进行处理 | |
| 4365 | + if (endTime - newTime > 0) { | |
| 4366 | + let time = (endTime - newTime); | |
| 4367 | + // 获取天、时、分、秒 | |
| 4368 | + let day = parseInt(time / (60 * 60 * 24)); | |
| 4369 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 4370 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 4371 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 4372 | + obj = { | |
| 4373 | + day: this.timeFormat(day), | |
| 4374 | + hou: this.timeFormat(hou), | |
| 4375 | + min: this.timeFormat(min), | |
| 4376 | + sec: this.timeFormat(sec) | |
| 4377 | + } | |
| 4378 | + } else { | |
| 4379 | + //活动已结束,全部设置为'00' | |
| 4380 | + obj = { | |
| 4381 | + day: '00', | |
| 4382 | + hou: '00', | |
| 4383 | + min: '00', | |
| 4384 | + sec: '00' | |
| 4385 | + } | |
| 4386 | + } | |
| 4387 | + var txt = "timer[" + j + "]"; | |
| 4388 | + th.setData({ | |
| 4389 | + [txt]: obj | |
| 4390 | + }); | |
| 4391 | + } | |
| 4392 | + setTimeout(th.countDown2, 1000); | |
| 4393 | + }, | |
| 4394 | + //跳转参加团 | |
| 4395 | + go_cj_team: function (e) { | |
| 4396 | + var ind = e.currentTarget.dataset.ind; | |
| 4397 | + var item = this.data.teamgroup[ind]; | |
| 4398 | + var goods_id = e.currentTarget.dataset.goodsid; | |
| 4399 | + var id = item.id; | |
| 4400 | + var th = this; | |
| 4401 | + | |
| 4402 | + getApp().request.get("/api/weshop/order/page", { | |
| 4403 | + data: { | |
| 4404 | + pt_prom_id: item.team_id, | |
| 4405 | + user_id: oo.user_id, | |
| 4406 | + store_id: os.stoid, | |
| 4407 | + pageSize: 1, | |
| 4408 | + page: 1 | |
| 4409 | + }, | |
| 4410 | + success: function (e) { | |
| 4411 | + if (e.data.code != 0) { | |
| 4412 | + getApp().my_warnning("读取订单失败", 0, th); | |
| 4413 | + return fasle; | |
| 4414 | + } | |
| 4415 | + //--跳转到已经购买的情况-- | |
| 4416 | + if (e.data.data.pageData.length > 0) { | |
| 4417 | + var odr = e.data.data.pageData[0]; | |
| 4418 | + //还未支付 | |
| 4419 | + if (odr.pt_status == 0 && (odr.order_status == 1 || odr.order_status == 0)) { | |
| 4420 | + wx.showModal({ | |
| 4421 | + title: "您已经购买了该商品待支付中", | |
| 4422 | + success: function (a) { | |
| 4423 | + if (a.confirm) { | |
| 4424 | + wx.navigateTo({ | |
| 4425 | + url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, | |
| 4426 | + }); | |
| 4427 | + } | |
| 4428 | + } | |
| 4429 | + }); | |
| 4430 | + } else if (odr.pt_status == 1 && odr.order_status == 1) { | |
| 4431 | + | |
| 4432 | + if (this.data.is_go_to_team_show) return false; | |
| 4433 | + this.data.is_go_to_team_show = 1; | |
| 4434 | + wx.showLoading(); | |
| 4435 | + /*-- | |
| 4436 | + wx.redirectTo({ | |
| 4437 | + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, | |
| 4438 | + });--*/ | |
| 4439 | + | |
| 4440 | + getApp().goto("/pages/team/team_success/team_success?ordersn=" + odr.order_sn); | |
| 4441 | + | |
| 4442 | + } else { | |
| 4443 | + console.log(222,goods_id) | |
| 4444 | + wx.navigateTo({ | |
| 4445 | + url: "/pages/team/team_show/team_show?tg_id=" + id +"&goods_id="+goods_id, | |
| 4446 | + }); | |
| 4447 | + } | |
| 4448 | + } | |
| 4449 | + //--跳转到参团-- | |
| 4450 | + else { | |
| 4451 | + console.log(1111,th.data.goods_id) | |
| 4452 | + wx.navigateTo({ | |
| 4453 | + url: "/pages/team/team_show/team_show?tg_id=" + id+"&goods_id="+goods_id, | |
| 4454 | + }); | |
| 4455 | + } | |
| 4456 | + } | |
| 4457 | + }) | |
| 4458 | + | |
| 4459 | + }, | |
| 4460 | + | |
| 4461 | + //跳到团更多 | |
| 4462 | + go_t_more: function () { | |
| 4463 | + var team_id = this.data.prom_id; | |
| 4464 | + wx.navigateTo({ | |
| 4465 | + url: "/pages/team/team_more/team_more?team_id=" + team_id, | |
| 4466 | + }); | |
| 4467 | + }, | |
| 4468 | + | |
| 4469 | + //--点赞功能-- | |
| 4470 | + click_zan: function (e) { | |
| 4471 | + var com_id = e.currentTarget.dataset.com_id; | |
| 4472 | + var item_id = e.currentTarget.dataset.item_id; | |
| 4473 | + var app = getApp(), | |
| 4474 | + th = this; | |
| 4475 | + | |
| 4476 | + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) { | |
| 4477 | + app.confirmBox("您还未登录"); | |
| 4478 | + return false; | |
| 4479 | + } | |
| 4480 | + | |
| 4481 | + var iszan = th.data.comments[item_id].userZanNum; | |
| 4482 | + if (this.data.iszaning) return false; | |
| 4483 | + this.data.iszaning = 1; | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + app.request.post("/api/weshop/commentZan/save", { | |
| 4487 | + data: { | |
| 4488 | + store_id: o.stoid, | |
| 4489 | + user_id: app.globalData.user_id, | |
| 4490 | + goods_id: th.data.gid, | |
| 4491 | + comment_id: com_id | |
| 4492 | + }, | |
| 4493 | + success: function (ee) { | |
| 4494 | + | |
| 4495 | + if (ee.data.code == "-1") { | |
| 4496 | + app.my_warnning("不能给自己点赞", 0, th); | |
| 4497 | + th.data.iszaning = 0; | |
| 4498 | + return; | |
| 4499 | + } | |
| 4500 | + | |
| 4501 | + if (ee.data.code == 0 && iszan != 1) { | |
| 4502 | + var num = th.data.comments[item_id].zan_num; | |
| 4503 | + num++; | |
| 4504 | + var text = "comments[" + item_id + "].zan_num"; | |
| 4505 | + var text1 = "comments[" + item_id + "].userZanNum"; | |
| 4506 | + var _errObj = {}; | |
| 4507 | + _errObj[text] = num; | |
| 4508 | + _errObj[text1] = 1; | |
| 4509 | + th.setData(_errObj); | |
| 4510 | + | |
| 4511 | + } else { | |
| 4512 | + var num = th.data.comments[item_id].zan_num; | |
| 4513 | + num--; | |
| 4514 | + var text = "comments[" + item_id + "].zan_num"; | |
| 4515 | + var text1 = "comments[" + item_id + "].userZanNum"; | |
| 4516 | + var _errObj = {}; | |
| 4517 | + _errObj[text] = num; | |
| 4518 | + _errObj[text1] = 0; | |
| 4519 | + th.setData(_errObj); | |
| 4520 | + } | |
| 4521 | + | |
| 4522 | + setTimeout(function () { | |
| 4523 | + th.data.iszaning = 0; | |
| 4524 | + }, 500) | |
| 4525 | + | |
| 4526 | + } | |
| 4527 | + }) | |
| 4528 | + }, | |
| 4529 | + | |
| 4530 | + /*----券的开关---*/ | |
| 4531 | + switchCoupon: async function (event) { | |
| 4532 | + var coupon = event.currentTarget.dataset.coupon; | |
| 4533 | + var app = getApp(); | |
| 4534 | + var url = "/api/weshop/prom/coupon/pageCouponList"; | |
| 4535 | + var quan_list = this.data.quan_list; | |
| 4536 | + var th = this; | |
| 4537 | + | |
| 4538 | + //当开启,且列表为空的情况下要 | |
| 4539 | + if (!quan_list && coupon == "1") { | |
| 4540 | + wx.showLoading(); | |
| 4541 | + await app.request.promiseGet(url, { | |
| 4542 | + data: { | |
| 4543 | + store_id: os.stoid, | |
| 4544 | + type: 1, | |
| 4545 | + pageSize: 100, | |
| 4546 | + page: 1, | |
| 4547 | + user_id: app.globalData.user_id, | |
| 4548 | + is_share: 0 | |
| 4549 | + } | |
| 4550 | + }).then(res => { | |
| 4551 | + wx.hideLoading(); | |
| 4552 | + quan_list = res.data.data.pageData; | |
| 4553 | + }) | |
| 4554 | + | |
| 4555 | + if (quan_list) { | |
| 4556 | + for (var ind in quan_list) { | |
| 4557 | + var ep = quan_list[ind]; | |
| 4558 | + var start = ""; | |
| 4559 | + var end = ""; | |
| 4560 | + if(ep.endtype == 1){ | |
| 4561 | + if(ep.starttype == 1) { | |
| 4562 | + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd"); | |
| 4563 | + }else{ | |
| 4564 | + start = ut.formatTime(ut.gettimestamp(),"yyyy-MM-dd"); | |
| 4565 | + } | |
| 4566 | + if(ep.days > 0) { | |
| 4567 | + end = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays+3600*24*ep.days,"yyyy-MM-dd"); | |
| 4568 | + }else{ | |
| 4569 | + end = "不限"; | |
| 4570 | + } | |
| 4571 | + }else { | |
| 4572 | + if(ep.starttype == 1 ){ | |
| 4573 | + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd"); | |
| 4574 | + }else{ | |
| 4575 | + if(ep.starttype == 0 && ep.use_start_time >0) { | |
| 4576 | + start = ut.formatTime(ep.use_start_time ,"yyyy-MM-dd"); | |
| 4577 | + }else{ | |
| 4578 | + start = "不限" | |
| 4579 | + } | |
| 4580 | + } | |
| 4581 | + | |
| 4582 | + if(ep.use_end_time > 0 ) { | |
| 4583 | + end = ut.formatTime(ep.use_end_time ,"yyyy-MM-dd"); | |
| 4584 | + }else{ | |
| 4585 | + end = "不限" | |
| 4586 | + } | |
| 4587 | + } | |
| 4588 | + quan_list[ind].start = start; | |
| 4589 | + quan_list[ind].end = end; | |
| 4590 | + // var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | |
| 4591 | + // var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | |
| 4592 | + // start = start.replace("00:00:00", ""); | |
| 4593 | + // end = end.replace("00:00:00", ""); | |
| 4594 | + // quan_list[ind].start = start; | |
| 4595 | + // quan_list[ind].end = end; | |
| 4596 | + } | |
| 4597 | + } | |
| 4598 | + | |
| 4599 | + th.setData({ | |
| 4600 | + coupon: coupon, | |
| 4601 | + quan_list: quan_list | |
| 4602 | + }); | |
| 4603 | + } else { | |
| 4604 | + th.setData({ | |
| 4605 | + coupon: coupon | |
| 4606 | + }); | |
| 4607 | + } | |
| 4608 | + }, | |
| 4609 | + | |
| 4610 | + //--查看评价-- | |
| 4611 | + look_pj: function () { | |
| 4612 | + this.tabComment(); | |
| 4613 | + this.doScrollTop(); | |
| 4614 | + }, | |
| 4615 | + | |
| 4616 | + //-----领取券----- | |
| 4617 | + get_quan: function (e) { | |
| 4618 | + var cid = e.currentTarget.dataset.cid; | |
| 4619 | + var index = e.currentTarget.dataset.ind; | |
| 4620 | + var item = this.data.quan_list[index]; | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + //--先判断会员状态-- | |
| 4624 | + var user_info = getApp().globalData.userInfo; | |
| 4625 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 4626 | + wx.navigateTo({ | |
| 4627 | + url: '/pages/togoin/togoin', | |
| 4628 | + }) | |
| 4629 | + return false; | |
| 4630 | + } | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + //如果券还在领取中,不能再点 | |
| 4634 | + if (item.linging == 1) { | |
| 4635 | + getApp().my_warnning('领取中..', 0, this); | |
| 4636 | + return false; | |
| 4637 | + } | |
| 4638 | + | |
| 4639 | + //如果领取的次数到了 | |
| 4640 | + if (item.everyone_num > 0 && item.lqnum >= item.everyone_num) { | |
| 4641 | + getApp().my_warnning('领取失败,您已领完该券', 0, this); | |
| 4642 | + return false; | |
| 4643 | + } | |
| 4644 | + | |
| 4645 | + var lq_num = item.lqnum; | |
| 4646 | + | |
| 4647 | + var pdata = { | |
| 4648 | + 'uid': oo.user_id, | |
| 4649 | + 'cid': cid, | |
| 4650 | + 'store_id': os.stoid, | |
| 4651 | + 'type': 5 | |
| 4652 | + }; | |
| 4653 | + | |
| 4654 | + //-- 导购ID -- | |
| 4655 | + if (getApp().globalData.guide_id) { | |
| 4656 | + pdata.guide_id = getApp().globalData.guide_id; | |
| 4657 | + } | |
| 4658 | + | |
| 4659 | + var app = getApp(), | |
| 4660 | + th = this; | |
| 4661 | + app.request.post("/api/weshop/couponList/saveCouponList", { | |
| 4662 | + data: pdata, | |
| 4663 | + success: function (res) { | |
| 4664 | + if (res.data.code == 0) { | |
| 4665 | + app.my_warnning("领取成功", 1, th); | |
| 4666 | + lq_num++; | |
| 4667 | + var text = "quan_list[" + index + "].lqnum"; | |
| 4668 | + var text2 = "quan_list[" + index + "].linging"; | |
| 4669 | + var obj = {}; | |
| 4670 | + obj[text] = lq_num; | |
| 4671 | + obj[text2] = 0; | |
| 4672 | + th.setData(obj); | |
| 4673 | + } else { | |
| 4674 | + app.confirmBox(res.data.msg); | |
| 4675 | + var text2 = "quan_list[" + index + "].linging"; | |
| 4676 | + var obj = {}; | |
| 4677 | + obj[text2] = 0; | |
| 4678 | + th.setData(obj); | |
| 4679 | + } | |
| 4680 | + } | |
| 4681 | + }) | |
| 4682 | + }, | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + drawPoster(context, unit, img, vpath) { | |
| 4686 | + // 1.灰色背景 | |
| 4687 | + context.setFillStyle('#f2f1f6'); | |
| 4688 | + context.rect(0, 0, 554 * unit, 899 * unit); | |
| 4689 | + context.fill(); | |
| 4690 | + // 2.商城名称 | |
| 4691 | + let shopName = this.data.sto_sele_name_1; | |
| 4692 | + // let shopNameLen = context.measureText(shopName); | |
| 4693 | + // let x_shopNameLen = (554 - shopNameLen.width)/2*unit; | |
| 4694 | + // console.log('11111111111111',shopNameLen,x_shopNameLen); | |
| 4695 | + context.setTextAlign('center'); | |
| 4696 | + context.setFontSize(26 * unit); | |
| 4697 | + context.setFillStyle('black'); | |
| 4698 | + context.fillText(shopName, 277 * unit, 60 * unit); | |
| 4699 | + // // 3.推荐来源 | |
| 4700 | + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
| 4701 | + // let fromTextLen = context.measureText(fromText); | |
| 4702 | + // let x_fromText = (375 - fromTextLen.width)/2; | |
| 4703 | + // console.log('222222',fromTextLen,x_fromText); | |
| 4704 | + context.setTextAlign('center'); | |
| 4705 | + context.setFontSize(22 * unit); | |
| 4706 | + context.setFillStyle('#96959a'); | |
| 4707 | + context.fillText(fromText, 277 * unit, 105 * unit); | |
| 4708 | + // 4.海报背景 | |
| 4709 | + // context.beginPath(); | |
| 4710 | + // context.setStrokeStyle('#f2f1f6'); | |
| 4711 | + context.setFillStyle('white'); | |
| 4712 | + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); | |
| 4713 | + // context.stroke(); | |
| 4714 | + // context.fill(); | |
| 4715 | + // 5.商品图片 | |
| 4716 | + // 图片的x坐标 | |
| 4717 | + let bg_x = 37 * unit | |
| 4718 | + // 图片的y坐标 | |
| 4719 | + let bg_y = 157 * unit | |
| 4720 | + // 图片宽度 | |
| 4721 | + let bg_w = 480 * unit | |
| 4722 | + // 图片高度 | |
| 4723 | + let bg_h = 474 * unit | |
| 4724 | + // 图片圆角 | |
| 4725 | + let bg_r = 4 | |
| 4726 | + // 绘制海报背景图片圆角 | |
| 4727 | + context.save() | |
| 4728 | + context.beginPath() | |
| 4729 | + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) | |
| 4730 | + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) | |
| 4731 | + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) | |
| 4732 | + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) | |
| 4733 | + context.clip() | |
| 4734 | + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); | |
| 4735 | + context.restore() | |
| 4736 | + // 6.强烈推荐 | |
| 4737 | + // context.beginPath(); | |
| 4738 | + let tj_path = "../../../images/share/q_tj.png"; | |
| 4739 | + context.beginPath() | |
| 4740 | + context.drawImage(tj_path, 54 * unit, 648 * unit, 85 * unit, 30 * unit); | |
| 4741 | + context.setFontSize(16 * unit) | |
| 4742 | + context.setLineJoin('round'); //交点设置成圆角 | |
| 4743 | + context.setFillStyle("white") | |
| 4744 | + context.setTextAlign('left'); | |
| 4745 | + context.fillText('强烈推荐', 64 * unit, 668 * unit); | |
| 4746 | + // 7.商品价格 | |
| 4747 | + let price = '¥' + this.data.data.shop_price; | |
| 4748 | + | |
| 4749 | + if (this.data.card_field && this.data.data[this.data.card_field]) { | |
| 4750 | + price = '¥' + this.data.data[this.data.card_field]; | |
| 4751 | + } | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + // if (th.data.prom_act) | |
| 4755 | + // pri0 = th.data.prom_act.price; | |
| 4756 | + context.setFontSize(32 * unit); | |
| 4757 | + context.setFillStyle('#DE1117'); | |
| 4758 | + context.fillText(price, 54 * unit, 730 * unit); | |
| 4759 | + // 8.商品标题 | |
| 4760 | + context.setFontSize(20 * unit); | |
| 4761 | + context.setFillStyle('#898989'); | |
| 4762 | + this.draw_Text(context, this.data.data.goods_name, | |
| 4763 | + 54 * unit, 770 * unit, 240 * unit, 240 * unit, unit); | |
| 4764 | + // 9.小程序码 | |
| 4765 | + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); | |
| 4766 | + context.setFontSize(16 * unit); | |
| 4767 | + context.setFillStyle('#777'); | |
| 4768 | + context.fillText('长按识别二维码', 378 * unit, 810 * unit); | |
| 4769 | + // 10.竖线 | |
| 4770 | + context.beginPath(); | |
| 4771 | + context.setFillStyle('#eee'); | |
| 4772 | + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); | |
| 4773 | + context.fill(); | |
| 4774 | + | |
| 4775 | + }, | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + //--定义的保存图片方法,分享团--- | |
| 4779 | + saveImageToPhotosAlbum: function () { | |
| 4780 | + //--先判断会员状态-- | |
| 4781 | + var user_info = getApp().globalData.userInfo; | |
| 4782 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 4783 | + //getApp().my_warnning("请先登录",0,this); | |
| 4784 | + wx.navigateTo({url: '/pages/togoin/togoin',}) | |
| 4785 | + return false; | |
| 4786 | + } | |
| 4787 | + | |
| 4788 | + if (this.data.share_hidden) { | |
| 4789 | + this.setData({share_hidden: false,}); | |
| 4790 | + } | |
| 4791 | + ; | |
| 4792 | + | |
| 4793 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | |
| 4794 | + var type = this.data.prom_type; | |
| 4795 | + if (type == 2) type = -1; | |
| 4796 | + if (type == 6) type = 2; | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | |
| 4800 | + | |
| 4801 | + wx.showLoading({title: '生成中...',}) | |
| 4802 | + var that = this, th = that; | |
| 4803 | + //设置画板显示,才能开始绘图 | |
| 4804 | + that.setData({ | |
| 4805 | + canvasHidden: false | |
| 4806 | + }) | |
| 4807 | + | |
| 4808 | + var app = getApp(); | |
| 4809 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
| 4810 | + var path2 = that.data.data.original_img; | |
| 4811 | + var scene = th.data.gid + ""; | |
| 4812 | + scene += "." + th.data.sele_g.prom_type + "." + th.data.sele_g.prom_id; | |
| 4813 | + | |
| 4814 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
| 4815 | + if (user_id > 0) { | |
| 4816 | + scene += "_" + user_id; | |
| 4817 | + } | |
| 4818 | + //-- 如果不是会员分享过来的要分享给别人 -- | |
| 4819 | + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 4820 | + //固定房间是第3个字符 | |
| 4821 | + if (!user_id) scene += "_0"; | |
| 4822 | + scene += "_" + getApp().globalData.room_id; | |
| 4823 | + } | |
| 4824 | + ///二微码 | |
| 4825 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 4826 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | |
| 4827 | + | |
| 4828 | + console.log(path3); | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + // 读取文件成功则OK-- | |
| 4832 | + wx.getImageInfo({ | |
| 4833 | + src: path3, | |
| 4834 | + success: function (res) { | |
| 4835 | + // 回调写法 | |
| 4836 | + th.get_head_temp(th.get_goods_temp, function () { | |
| 4837 | + var vpath = res.path; | |
| 4838 | + var context = wx.createCanvasContext('share'); | |
| 4839 | + // 先画背景 | |
| 4840 | + var pg_path = "../../../images/share/share_bg.png"; | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | |
| 4844 | + if (th.data.share_b_img) { | |
| 4845 | + pg_path = th.data.share_b_img; | |
| 4846 | + } | |
| 4847 | + // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + if (type == 0) { // 如果是普通商品,绘制新海报 | |
| 4851 | + th.drawPoster(context, unit, th.data.share_goods_img, vpath); | |
| 4852 | + } else { | |
| 4853 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | |
| 4854 | + } | |
| 4855 | + ; | |
| 4856 | + | |
| 4857 | + // th.drawPoster(context, unit, th.data.share_goods_img, vpath); | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + //-- 是自定义海报的情况下 -- | |
| 4861 | + if (type != 0) { | |
| 4862 | + | |
| 4863 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 4864 | + //在线上分享人的情况下 | |
| 4865 | + if (parseInt(th.data.poster.show_headpic)) { | |
| 4866 | + //获取坐标 | |
| 4867 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
| 4868 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
| 4869 | + var x1 = (x + 90) * unit; | |
| 4870 | + var y1 = (y + 50) * unit; | |
| 4871 | + //--昵称--- | |
| 4872 | + context.setFontSize(24 * unit) | |
| 4873 | + context.setFillStyle("black") | |
| 4874 | + context.fillText(app.globalData.userInfo.nickname, x1, y1); | |
| 4875 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | |
| 4876 | + //强烈推荐 改许程 | |
| 4877 | + var tj_path = "../../../images/share/q_tj.png"; | |
| 4878 | + context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); | |
| 4879 | + context.setFontSize(16 * unit); | |
| 4880 | + context.setLineJoin('round'); //交点设置成圆角 | |
| 4881 | + context.setFillStyle("white"); | |
| 4882 | + context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit); | |
| 4883 | + | |
| 4884 | + //context.setFillStyle("black") | |
| 4885 | + //context.setFontSize(24 * unit) | |
| 4886 | + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | |
| 4887 | + } | |
| 4888 | + } else { | |
| 4889 | + //--昵称--- | |
| 4890 | + context.setFontSize(24 * unit); | |
| 4891 | + context.setFillStyle("black"); | |
| 4892 | + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); | |
| 4893 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | |
| 4894 | + //强烈推荐 改许程 | |
| 4895 | + var tj_path = "../../../images/share/q_tj.png"; | |
| 4896 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | |
| 4897 | + context.setFontSize(16 * unit); | |
| 4898 | + context.setLineJoin('round'); //交点设置成圆角 | |
| 4899 | + context.setFillStyle("white"); | |
| 4900 | + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); | |
| 4901 | + } | |
| 4902 | + | |
| 4903 | + } | |
| 4904 | + ; | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + var share_title = th.data.data.goods_name; | |
| 4908 | + if (th.data.prom_type == 1 || th.data.prom_type == 2 || th.data.prom_type == 6 || th.data.prom_type == 4) { | |
| 4909 | + share_title = th.data.prom_act.share_title; | |
| 4910 | + if (!share_title) share_title = th.data.prom_act.title; | |
| 4911 | + if (th.data.prom_type == 4) share_title = th.data.prom_act.name; | |
| 4912 | + } | |
| 4913 | + | |
| 4914 | + //---产品名称--- | |
| 4915 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
| 4916 | + if (type != 4 && type != 0) { | |
| 4917 | + context.setFillStyle("black"); | |
| 4918 | + context.setFontSize(21.3 * unit) | |
| 4919 | + th.draw_Text(context, share_title, | |
| 4920 | + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); | |
| 4921 | + | |
| 4922 | + //------产品的价格------- | |
| 4923 | + context.setFontSize(23 * unit) | |
| 4924 | + context.setFillStyle("red") | |
| 4925 | + | |
| 4926 | + var pri0 = th.data.data.shop_price; | |
| 4927 | + if (th.data.card_field && th.data.data[th.data.card_field]) { | |
| 4928 | + pri0 = th.data.data[th.data.card_field]; | |
| 4929 | + } | |
| 4930 | + | |
| 4931 | + if (th.data.prom_act) | |
| 4932 | + pri0 = th.data.prom_price; | |
| 4933 | + pri0 = parseFloat(pri0).toFixed(2); | |
| 4934 | + var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25; | |
| 4935 | + context.fillText("¥", wd1 - 15, 185 * unit); | |
| 4936 | + context.setFontSize(31 * unit) | |
| 4937 | + context.fillText(pri0, wd1, 185 * unit); | |
| 4938 | + | |
| 4939 | + //---市场价划掉--- | |
| 4940 | + context.setFillStyle("gray") | |
| 4941 | + context.setFontSize(22 * unit) | |
| 4942 | + pri0 = "¥" + th.data.data.market_price.toFixed(2); | |
| 4943 | + var wd2 = th.data.screenWidth - ut.measureText(pri0, 22 * unit) - 25; | |
| 4944 | + context.fillText(pri0, wd2, 213 * unit); | |
| 4945 | + | |
| 4946 | + context.setStrokeStyle('gray'); | |
| 4947 | + context.setLineWidth(1 * unit); | |
| 4948 | + context.moveTo(wd2 - 5, 206 * unit); | |
| 4949 | + context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); | |
| 4950 | + context.stroke(); | |
| 4951 | + | |
| 4952 | + } else if (type == 4 && type != 0) { | |
| 4953 | + context.setFillStyle("black"); | |
| 4954 | + context.setFontSize(21.3 * unit) | |
| 4955 | + th.draw_Text(context, share_title, | |
| 4956 | + 38 * unit, 170 * unit, 20 * unit, 300 * unit, unit); | |
| 4957 | + //------ 产品的价格 ----- | |
| 4958 | + var pri0 = th.data.prom_act.addmoney; | |
| 4959 | + var integral = th.data.prom_act.integral; | |
| 4960 | + var text = ""; | |
| 4961 | + if (integral) { | |
| 4962 | + text = integral + "积分"; | |
| 4963 | + } | |
| 4964 | + if (pri0 && integral) { | |
| 4965 | + text += "+"; | |
| 4966 | + } | |
| 4967 | + if (pri0) { | |
| 4968 | + text += "¥" + pri0; | |
| 4969 | + } | |
| 4970 | + | |
| 4971 | + if (!pri0 && !integral) { | |
| 4972 | + text = "0积分"; | |
| 4973 | + } | |
| 4974 | + context.setFillStyle("red"); | |
| 4975 | + context.fillText(text, 38 * unit, 235 * unit); | |
| 4976 | + | |
| 4977 | + } | |
| 4978 | + | |
| 4979 | + //---中间大图--- | |
| 4980 | + if (type != 0) { | |
| 4981 | + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | |
| 4982 | + } | |
| 4983 | + ; | |
| 4984 | + | |
| 4985 | + | |
| 4986 | + //-------大图后面就不一样了----------- | |
| 4987 | + switch (type) { | |
| 4988 | + case 0: | |
| 4989 | + break;//普通商品的展示 | |
| 4990 | + case 4: | |
| 4991 | + //中间的几个字 | |
| 4992 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 4993 | + if (parseInt(th.data.poster.show_quality)) { | |
| 4994 | + var g_path = "../../../images/share/s_gou.png"; | |
| 4995 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 4996 | + context.setFillStyle("red") | |
| 4997 | + context.setFontSize(18 * unit) | |
| 4998 | + context.fillText("正品保证", 84 * unit, 690 * unit); | |
| 4999 | + | |
| 5000 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 5001 | + context.setFillStyle("red") | |
| 5002 | + context.setFontSize(18 * unit) | |
| 5003 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | |
| 5004 | + | |
| 5005 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 5006 | + context.setFillStyle("red") | |
| 5007 | + context.setFontSize(18 * unit) | |
| 5008 | + context.fillText("官方验证", 420 * unit, 690 * unit); | |
| 5009 | + } | |
| 5010 | + | |
| 5011 | + } else { | |
| 5012 | + var g_path = "../../../images/share/s_gou.png"; | |
| 5013 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 5014 | + context.setFillStyle("red") | |
| 5015 | + context.setFontSize(18 * unit) | |
| 5016 | + context.fillText("正品保证", 84 * unit, 690 * unit); | |
| 5017 | + | |
| 5018 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 5019 | + context.setFillStyle("red") | |
| 5020 | + context.setFontSize(18 * unit) | |
| 5021 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | |
| 5022 | + | |
| 5023 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | |
| 5024 | + context.setFillStyle("red") | |
| 5025 | + context.setFontSize(18 * unit) | |
| 5026 | + context.fillText("官方验证", 420 * unit, 690 * unit); | |
| 5027 | + } | |
| 5028 | + | |
| 5029 | + | |
| 5030 | + //---画线--- | |
| 5031 | + context.setLineWidth(1 * unit) | |
| 5032 | + context.moveTo(32 * unit, 710 * unit) | |
| 5033 | + context.lineTo(520 * unit, 710 * unit) | |
| 5034 | + context.stroke(); | |
| 5035 | + | |
| 5036 | + //---文字--- | |
| 5037 | + context.setFillStyle("black") | |
| 5038 | + context.setFontSize(22 * unit) | |
| 5039 | + | |
| 5040 | + if (type == 0 || type == -1) { | |
| 5041 | + // 原来start ---> | |
| 5042 | + context.setFontSize(24 * unit) | |
| 5043 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | |
| 5044 | + | |
| 5045 | + context.setFontSize(22 * unit) | |
| 5046 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 806 * unit); | |
| 5047 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); | |
| 5048 | + | |
| 5049 | + } else { | |
| 5050 | + context.setFontSize(24 * unit) | |
| 5051 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | |
| 5052 | + context.setFontSize(22 * unit) | |
| 5053 | + context.fillText("长按识别二维码", 40 * unit, 806 * unit); | |
| 5054 | + context.fillText("立即开始兑换", 40 * unit, 846 * unit); | |
| 5055 | + | |
| 5056 | + } | |
| 5057 | + | |
| 5058 | + //---二维吗图--- | |
| 5059 | + //-- 自定义海报 -- | |
| 5060 | + if (th.data.poster) { | |
| 5061 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 5062 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 5063 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 5064 | + } else { | |
| 5065 | + //---二维吗图--- | |
| 5066 | + context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 5067 | + } | |
| 5068 | + ; | |
| 5069 | + | |
| 5070 | + break; | |
| 5071 | + case 1: //秒杀商品的展示 | |
| 5072 | + //---画线--- | |
| 5073 | + context.setLineWidth(1 * unit) | |
| 5074 | + context.moveTo(32 * unit, 670 * unit) | |
| 5075 | + context.lineTo(520 * unit, 670 * unit) | |
| 5076 | + context.stroke(); | |
| 5077 | + | |
| 5078 | + //画秒杀的图片 | |
| 5079 | + var miaos_path = '../../../images/share/miao_share.png'; | |
| 5080 | + context.drawImage(miaos_path, 43 * unit, 700 * unit, 222 * unit, 40 * unit); | |
| 5081 | + | |
| 5082 | + context.setFillStyle("black") | |
| 5083 | + context.setFontSize(24 * unit) | |
| 5084 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 786 * unit); | |
| 5085 | + //---文字--- | |
| 5086 | + context.setFontSize(22 * unit) | |
| 5087 | + context.setFillStyle("black") | |
| 5088 | + context.fillText("特惠好物,限时秒杀", 40 * unit, 826 * unit); | |
| 5089 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit); | |
| 5090 | + | |
| 5091 | + | |
| 5092 | + //---二维吗图--- | |
| 5093 | + //-- 自定义海报 -- | |
| 5094 | + if (th.data.poster) { | |
| 5095 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 5096 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 5097 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit); | |
| 5098 | + } else { | |
| 5099 | + //---二维吗图--- | |
| 5100 | + context.drawImage(vpath, 390 * unit, 726 * unit, 135 * unit, 135 * unit); | |
| 5101 | + } | |
| 5102 | + break; | |
| 5103 | + | |
| 5104 | + case 2: //会员团和商家团的展示 | |
| 5105 | + //---画线--- | |
| 5106 | + context.setLineWidth(1 * unit) | |
| 5107 | + context.moveTo(32 * unit, 670 * unit) | |
| 5108 | + context.lineTo(520 * unit, 670 * unit) | |
| 5109 | + context.stroke(); | |
| 5110 | + //---文字--- | |
| 5111 | + context.setFillStyle("black") | |
| 5112 | + context.setFontSize(24 * unit) | |
| 5113 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | |
| 5114 | + | |
| 5115 | + //绘制成团图片 | |
| 5116 | + var ct_img = "../../../images/share/ct_num.png"; | |
| 5117 | + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); | |
| 5118 | + var ct_num = th.data.prom_act.ct_num; | |
| 5119 | + context.setFontSize(14 * unit) | |
| 5120 | + context.font = 'normal'; | |
| 5121 | + context.setFillStyle("red") | |
| 5122 | + if (ct_num < 10) { | |
| 5123 | + context.fillText(ct_num + "人拼团", 92 * unit, 760 * unit); | |
| 5124 | + } else { | |
| 5125 | + context.fillText(ct_num + "人拼团", 86 * unit, 760 * unit); | |
| 5126 | + } | |
| 5127 | + context.setFontSize(22 * unit) | |
| 5128 | + context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit); | |
| 5129 | + | |
| 5130 | + context.setFillStyle("gray") | |
| 5131 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 806 * unit); | |
| 5132 | + context.setFillStyle("black") | |
| 5133 | + context.font = 'normal bold 18px sans-serif'; | |
| 5134 | + context.setFontSize(21.3 * unit) | |
| 5135 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 836 * unit); | |
| 5136 | + | |
| 5137 | + | |
| 5138 | + //---二维吗图--- | |
| 5139 | + //-- 自定义海报 -- | |
| 5140 | + if (th.data.poster) { | |
| 5141 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 5142 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 5143 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 5144 | + } else { | |
| 5145 | + //---二维吗图--- | |
| 5146 | + context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 5147 | + } | |
| 5148 | + break | |
| 5149 | + case 3: //阶梯团的展示 | |
| 5150 | + //---画线--- | |
| 5151 | + context.setLineWidth(1 * unit) | |
| 5152 | + context.moveTo(32 * unit, 670 * unit) | |
| 5153 | + context.lineTo(520 * unit, 670 * unit) | |
| 5154 | + context.stroke(); | |
| 5155 | + //---文字--- | |
| 5156 | + context.setFillStyle("black") | |
| 5157 | + context.setFontSize(24 * unit) | |
| 5158 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | |
| 5159 | + | |
| 5160 | + //---绘制中间阶梯的价格--- | |
| 5161 | + var list = th.data.prom_act.ct_rylist; | |
| 5162 | + for (var i = 0; i < list.length; i++) { | |
| 5163 | + var item = list[i]; | |
| 5164 | + var wi = i * 90 * unit; | |
| 5165 | + context.font = 'normal'; | |
| 5166 | + context.setFontSize(16 * unit) | |
| 5167 | + context.setFillStyle("red") | |
| 5168 | + context.fillText("¥", 40 * unit + wi, 756 * unit); | |
| 5169 | + context.setFontSize(22 * unit) | |
| 5170 | + var pri = parseFloat(item.price).toFixed(2); | |
| 5171 | + context.fillText(pri, 56 * unit + wi, 756 * unit); | |
| 5172 | + context.setFillStyle("gray") | |
| 5173 | + context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit); | |
| 5174 | + } | |
| 5175 | + //----------------下面部分---------------- | |
| 5176 | + // context.setFillStyle("gray") | |
| 5177 | + // context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit); | |
| 5178 | + // context.setFillStyle("black") | |
| 5179 | + // context.font = 'normal bold 18px sans-serif'; | |
| 5180 | + // context.setFontSize(22 * unit) | |
| 5181 | + // context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); | |
| 5182 | + //context.setFillStyle("gray") | |
| 5183 | + context.setFillStyle("black") | |
| 5184 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 820 * unit); | |
| 5185 | + //context.font = 'normal bold 18px sans-serif'; | |
| 5186 | + context.setFontSize(21 * unit) | |
| 5187 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 850 * unit); | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + //-- 自定义海报 -- | |
| 5191 | + if (th.data.poster) { | |
| 5192 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 5193 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 5194 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 5195 | + } else { | |
| 5196 | + //---二维吗图--- | |
| 5197 | + context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); | |
| 5198 | + } | |
| 5199 | + break | |
| 5200 | + | |
| 5201 | + | |
| 5202 | + case -1: //秒杀商品的展示 | |
| 5203 | + //---画线--- | |
| 5204 | + context.setLineWidth(1 * unit) | |
| 5205 | + context.moveTo(32 * unit, 670 * unit) | |
| 5206 | + context.lineTo(520 * unit, 670 * unit) | |
| 5207 | + context.stroke(); | |
| 5208 | + | |
| 5209 | + | |
| 5210 | + context.setFillStyle("black") | |
| 5211 | + context.setFontSize(24 * unit) | |
| 5212 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 744 * unit); | |
| 5213 | + //---文字--- | |
| 5214 | + context.setFontSize(22 * unit) | |
| 5215 | + context.setFillStyle("black") | |
| 5216 | + context.fillText("长按识别二维码", 40 * unit, 800 * unit); | |
| 5217 | + context.fillText("立即开始抢购", 40 * unit, 846 * unit); | |
| 5218 | + | |
| 5219 | + | |
| 5220 | + //---二维吗图--- | |
| 5221 | + //-- 自定义海报 -- | |
| 5222 | + if (th.data.poster) { | |
| 5223 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 5224 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 5225 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 135 * unit, 135 * unit); | |
| 5226 | + } else { | |
| 5227 | + //---二维吗图--- | |
| 5228 | + context.drawImage(vpath, 390 * unit, 726 * unit, 135 * unit, 135 * unit); | |
| 5229 | + } | |
| 5230 | + break; | |
| 5231 | + | |
| 5232 | + | |
| 5233 | + } | |
| 5234 | + | |
| 5235 | + | |
| 5236 | + //--- 如果是自定义海报的时候 --- | |
| 5237 | + if (type != 0) { | |
| 5238 | + | |
| 5239 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 5240 | + | |
| 5241 | + //如果显示会员信息的话 | |
| 5242 | + if (parseInt(th.data.poster.show_headpic)) { | |
| 5243 | + //获取坐标 | |
| 5244 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
| 5245 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
| 5246 | + //---绘制圆形要放在最后---- | |
| 5247 | + context.save(); | |
| 5248 | + context.beginPath(); | |
| 5249 | + var h_x = x * unit; | |
| 5250 | + var h_y = y * unit; | |
| 5251 | + var h_r = 40 * unit; | |
| 5252 | + var cx = h_x + h_r; | |
| 5253 | + var cy = h_y + h_r; | |
| 5254 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 5255 | + context.closePath(); | |
| 5256 | + context.fill(); | |
| 5257 | + context.clip(); | |
| 5258 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 5259 | + context.restore(); | |
| 5260 | + } | |
| 5261 | + | |
| 5262 | + } else { | |
| 5263 | + //---绘制圆形要放在最后---- | |
| 5264 | + context.save(); | |
| 5265 | + context.beginPath(); | |
| 5266 | + var h_x = 60 * unit; | |
| 5267 | + var h_y = 24 * unit; | |
| 5268 | + var h_r = 40 * unit; | |
| 5269 | + var cx = h_x + h_r; | |
| 5270 | + var cy = h_y + h_r; | |
| 5271 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 5272 | + context.closePath(); | |
| 5273 | + context.fill(); | |
| 5274 | + context.clip(); | |
| 5275 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 5276 | + context.restore(); | |
| 5277 | + } | |
| 5278 | + | |
| 5279 | + } | |
| 5280 | + ; | |
| 5281 | + | |
| 5282 | + | |
| 5283 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
| 5284 | + context.draw(false, function () { | |
| 5285 | + setTimeout(function () { | |
| 5286 | + wx.canvasToTempFilePath({ | |
| 5287 | + x: 0, | |
| 5288 | + y: 0, | |
| 5289 | + width: 750, | |
| 5290 | + height: 1217, | |
| 5291 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
| 5292 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
| 5293 | + canvasId: 'share', | |
| 5294 | + success: function (res) { | |
| 5295 | + | |
| 5296 | + that.setData({ | |
| 5297 | + shareImgPath: res.tempFilePath, | |
| 5298 | + canvasHidden: true | |
| 5299 | + }) | |
| 5300 | + | |
| 5301 | + if (!res.tempFilePath) { | |
| 5302 | + wx.showModal({ | |
| 5303 | + title: '提示', | |
| 5304 | + content: '图片绘制中,请稍后重试', | |
| 5305 | + showCancel: false | |
| 5306 | + }) | |
| 5307 | + return false; | |
| 5308 | + } | |
| 5309 | + | |
| 5310 | + // wx.previewImage({ | |
| 5311 | + // //将图片预览出来 | |
| 5312 | + // urls: [that.data.shareImgPath] | |
| 5313 | + // }); | |
| 5314 | + that.setData({ | |
| 5315 | + showPoster: true, | |
| 5316 | + }); | |
| 5317 | + wx.hideLoading(); | |
| 5318 | + } | |
| 5319 | + }) | |
| 5320 | + }, 500) | |
| 5321 | + | |
| 5322 | + }); | |
| 5323 | + }); | |
| 5324 | + }, | |
| 5325 | + fail: function (res) { | |
| 5326 | + console.log(res); | |
| 5327 | + wx.hideLoading(); | |
| 5328 | + | |
| 5329 | + } | |
| 5330 | + }); | |
| 5331 | + }, | |
| 5332 | + | |
| 5333 | + | |
| 5334 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
| 5335 | + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | |
| 5336 | + var lineWidth = 0; | |
| 5337 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | |
| 5338 | + var han = 0; | |
| 5339 | + for (let i = 0; i < str.length; i++) { | |
| 5340 | + if (han == 2) return; | |
| 5341 | + //lineWidth += ctx.measureText(str[i]).width; | |
| 5342 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | |
| 5343 | + if (lineWidth > canvasWidth) { | |
| 5344 | + han++; | |
| 5345 | + | |
| 5346 | + if (han == 2) | |
| 5347 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | |
| 5348 | + else | |
| 5349 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | |
| 5350 | + | |
| 5351 | + initHeight += 22; //22为字体的高度 | |
| 5352 | + lineWidth = 0; | |
| 5353 | + lastSubStrIndex = i; | |
| 5354 | + titleHeight += 20; | |
| 5355 | + } | |
| 5356 | + if (i == str.length - 1) { //绘制剩余部分 | |
| 5357 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | |
| 5358 | + } | |
| 5359 | + } | |
| 5360 | + }, | |
| 5361 | + | |
| 5362 | + // ----视频图片---- | |
| 5363 | + // 图片计数器 | |
| 5364 | + swiperChange: function (e) { | |
| 5365 | + var that = this; | |
| 5366 | + if (e.detail.current > 0) { | |
| 5367 | + that.setData({ | |
| 5368 | + hiddenn: 1, | |
| 5369 | + videopicture: 1, | |
| 5370 | + }) | |
| 5371 | + } else { | |
| 5372 | + that.setData({ | |
| 5373 | + hiddenn: 0, | |
| 5374 | + videopicture: 0, | |
| 5375 | + }) | |
| 5376 | + } | |
| 5377 | + if (e.detail.source == 'touch') { | |
| 5378 | + that.setData({ | |
| 5379 | + current: e.detail.current | |
| 5380 | + }) | |
| 5381 | + } | |
| 5382 | + }, | |
| 5383 | + | |
| 5384 | + /*---视频相关--*/ | |
| 5385 | + videopicture: function (e) { | |
| 5386 | + var vipi = e.currentTarget.dataset.vipi; | |
| 5387 | + this.setData({ | |
| 5388 | + videopicture: vipi, | |
| 5389 | + swiperCurrent: vipi, | |
| 5390 | + noon: 0, | |
| 5391 | + current: 1 | |
| 5392 | + }); | |
| 5393 | + }, | |
| 5394 | + | |
| 5395 | + videoPlay: function (e) { | |
| 5396 | + var _index = e.currentTarget.id | |
| 5397 | + this.setData({ | |
| 5398 | + _index: _index, | |
| 5399 | + noon: 1 | |
| 5400 | + }) | |
| 5401 | + | |
| 5402 | + setTimeout(function () { | |
| 5403 | + //将点击视频进行播放 | |
| 5404 | + var videoContext = wx.createVideoContext(_index) | |
| 5405 | + videoContext.play(); | |
| 5406 | + }, 500) | |
| 5407 | + | |
| 5408 | + }, | |
| 5409 | + | |
| 5410 | + //加载更多是靠这个函数 | |
| 5411 | + onReachBottom: function () { | |
| 5412 | + if (this.data.activeCategoryId == 2) { | |
| 5413 | + if (!this.data.comments_no_more) this.requestComments_new(); | |
| 5414 | + } | |
| 5415 | + | |
| 5416 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | |
| 5417 | + if (goods_list) goods_list.get_list(); | |
| 5418 | + }, | |
| 5419 | + | |
| 5420 | + //--获取头像的本地缓存,回调写法-- | |
| 5421 | + get_head_temp: function (tt, func) { | |
| 5422 | + var ee = this; | |
| 5423 | + if (ee.data.share_head) { | |
| 5424 | + tt(func); | |
| 5425 | + return false; | |
| 5426 | + } | |
| 5427 | + //---获取分享图片的本地地址,头像和商品图片---- | |
| 5428 | + var path2 = getApp().globalData.userInfo.head_pic; | |
| 5429 | + if (path2 == "") { | |
| 5430 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; | |
| 5431 | + tt(func); | |
| 5432 | + } else { | |
| 5433 | + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | |
| 5434 | + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | |
| 5435 | + wx.getImageInfo({ | |
| 5436 | + src: path2, | |
| 5437 | + success: function (res) { | |
| 5438 | + //res.path是网络图片的本地地址 | |
| 5439 | + ee.data.share_head = res.path; | |
| 5440 | + tt(func); | |
| 5441 | + }, | |
| 5442 | + fail: function (res) { | |
| 5443 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | |
| 5444 | + tt(func); | |
| 5445 | + } | |
| 5446 | + }); | |
| 5447 | + } | |
| 5448 | + }, | |
| 5449 | + //--获取商品图片的本地缓存,回调写法-- | |
| 5450 | + get_goods_temp: function (tt) { | |
| 5451 | + var ee = this; | |
| 5452 | + if (ee.data.share_goods_img) { | |
| 5453 | + tt(); | |
| 5454 | + return false; | |
| 5455 | + } | |
| 5456 | + | |
| 5457 | + var img_url = ee.data.data.original_img; | |
| 5458 | + if ((this.data.prom_type == 1 || this.data.prom_type == 6) && this.data.prom_act.share_imgurl) { | |
| 5459 | + img_url = this.data.iurl + this.data.prom_act.share_imgurl; | |
| 5460 | + } | |
| 5461 | + | |
| 5462 | + //获取商品是分享图信息 | |
| 5463 | + wx.getImageInfo({ | |
| 5464 | + src: img_url, | |
| 5465 | + success: function (res) { | |
| 5466 | + //res.path是网络图片的本地地址 | |
| 5467 | + ee.data.share_goods_img = res.path; | |
| 5468 | + tt(); | |
| 5469 | + }, | |
| 5470 | + fail: function (res) { | |
| 5471 | + ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | |
| 5472 | + tt(); | |
| 5473 | + } | |
| 5474 | + }); | |
| 5475 | + }, | |
| 5476 | + | |
| 5477 | + //--外侧评价的点击效果--- | |
| 5478 | + clik_evaluate: function (e) { | |
| 5479 | + var val = e.currentTarget.dataset.val; | |
| 5480 | + this.setData({ | |
| 5481 | + activeCategoryId: 2, | |
| 5482 | + activeCategoryId3: val, | |
| 5483 | + comments: null | |
| 5484 | + }); | |
| 5485 | + this.requestComments_new(); | |
| 5486 | + }, | |
| 5487 | + | |
| 5488 | + //--跳转到商品详情页面-- | |
| 5489 | + go_goods: function (e) { | |
| 5490 | + var gid = e.currentTarget.dataset.gid; | |
| 5491 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | |
| 5492 | + getApp().goto(url); | |
| 5493 | + }, | |
| 5494 | + | |
| 5495 | + //--跳转到支付尾款界面-- | |
| 5496 | + go_pay_wk: function () { | |
| 5497 | + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.wk_order_id; | |
| 5498 | + getApp().goto(url); | |
| 5499 | + }, | |
| 5500 | + | |
| 5501 | + pop_err_img: function (e) { | |
| 5502 | + var txt = e.currentTarget.dataset.errorimg; | |
| 5503 | + var ob = {}; | |
| 5504 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
| 5505 | + this.setData(ob); | |
| 5506 | + }, | |
| 5507 | + | |
| 5508 | + //--调用更新阶梯团的接口-- | |
| 5509 | + update_jiti: function (id) { | |
| 5510 | + var th = this; | |
| 5511 | + //--更新阶梯团-- | |
| 5512 | + getApp().request.put("/api/weshop/teamgroup/updateTeamOrder/" + os.stoid + "/" + id, { | |
| 5513 | + success: function (ee) { | |
| 5514 | + //--等于0是要去支付尾款,接口调用失败,就要去查看参团详情-- | |
| 5515 | + if (ee.data.code == 0) { | |
| 5516 | + th.setData({ | |
| 5517 | + user_order_pt_state: 3, | |
| 5518 | + }); | |
| 5519 | + } else if (ee.data.code == -1) { | |
| 5520 | + th.setData({ | |
| 5521 | + user_order_pt_state: 2, | |
| 5522 | + }); | |
| 5523 | + } | |
| 5524 | + } | |
| 5525 | + }) | |
| 5526 | + }, | |
| 5527 | + // 选择门店 | |
| 5528 | + choice_store: function (ee) { | |
| 5529 | + var th = this; | |
| 5530 | + var ind = ee.currentTarget.dataset.ind; | |
| 5531 | + var bconfig = th.data.bconfig; | |
| 5532 | + | |
| 5533 | + if (!th.data.only_pk && !th.data.def_pickpu_list) { | |
| 5534 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
| 5535 | + return false; | |
| 5536 | + } | |
| 5537 | + | |
| 5538 | + if (th.data.only_pk && !th.data.only_pk.length) { | |
| 5539 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
| 5540 | + return false; | |
| 5541 | + } | |
| 5542 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | |
| 5543 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
| 5544 | + return false; | |
| 5545 | + } | |
| 5546 | + | |
| 5547 | + | |
| 5548 | + if (bconfig && bconfig.is_sort_storage) { | |
| 5549 | + wx.getLocation({ | |
| 5550 | + type: 'gcj02', | |
| 5551 | + success: function (res) { | |
| 5552 | + | |
| 5553 | + th.data.lat = res.latitude; | |
| 5554 | + th.data.lon = res.longitude; | |
| 5555 | + th.data.is_get_local_ok = 1; | |
| 5556 | + th.setData({ | |
| 5557 | + is_gps: 1 | |
| 5558 | + }); | |
| 5559 | + //th.onShow(); | |
| 5560 | + th.get_sto(th.data.is_normal); | |
| 5561 | + }, | |
| 5562 | + fail: function (res) { | |
| 5563 | + //th.onShow(); | |
| 5564 | + th.data.is_get_local_ok = 1; | |
| 5565 | + th.get_sto(th.data.is_normal); | |
| 5566 | + if (res.errCode == 2) { | |
| 5567 | + th.setData({ | |
| 5568 | + is_gps: 0 | |
| 5569 | + }); | |
| 5570 | + if (th.data.is_gps == 0) { | |
| 5571 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
| 5572 | + } | |
| 5573 | + } else { | |
| 5574 | + th.setData({ | |
| 5575 | + is_gps: "3" | |
| 5576 | + }); | |
| 5577 | + } | |
| 5578 | + | |
| 5579 | + } | |
| 5580 | + }) | |
| 5581 | + } else { | |
| 5582 | + th.data.is_get_local_ok = 1; | |
| 5583 | + th.get_sto(th.data.is_normal); | |
| 5584 | + } | |
| 5585 | + | |
| 5586 | + if (ind != undefined && ind != null) { | |
| 5587 | + this.setData({ | |
| 5588 | + open_ind_store: ind, | |
| 5589 | + store: 1, | |
| 5590 | + openSpecModal: !1, | |
| 5591 | + openSpecModal_pt: !1, | |
| 5592 | + openSpecModal_flash_normal: !1, | |
| 5593 | + }) | |
| 5594 | + } else { | |
| 5595 | + this.setData({ | |
| 5596 | + store: 1, | |
| 5597 | + openSpecModal: !1, | |
| 5598 | + openSpecModal_pt: !1, | |
| 5599 | + openSpecModal_flash_normal: !1 | |
| 5600 | + | |
| 5601 | + }) | |
| 5602 | + } | |
| 5603 | + }, | |
| 5604 | + //关闭选择门店 | |
| 5605 | + close_popup: function (e) { | |
| 5606 | + var th = this; | |
| 5607 | + this.setData({ | |
| 5608 | + store: 0, | |
| 5609 | + choice_sort_store: 0, | |
| 5610 | + sort_store: 0, | |
| 5611 | + fir_pick_index: 0, | |
| 5612 | + sec_pick_index: 0 | |
| 5613 | + }) | |
| 5614 | + | |
| 5615 | + var openindstore = this.data.open_ind_store; | |
| 5616 | + if (openindstore == 1) { | |
| 5617 | + th.setData({ | |
| 5618 | + openSpecModal: !0, | |
| 5619 | + openSpecModal_ind: openindstore, | |
| 5620 | + }); | |
| 5621 | + } else if (openindstore == 2) { | |
| 5622 | + th.setData({ | |
| 5623 | + openSpecModal: !0, | |
| 5624 | + openSpecModal_ind: openindstore, | |
| 5625 | + }); | |
| 5626 | + } | |
| 5627 | + else if (openindstore == 4) { //4就是拼团 | |
| 5628 | + th.setData({ | |
| 5629 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 5630 | + store: 0, //关闭门店 | |
| 5631 | + choice_sort_store: 0, //关闭门店2级 | |
| 5632 | + sort_store: 0, //关闭门店2级 | |
| 5633 | + }); | |
| 5634 | + } | |
| 5635 | + else { | |
| 5636 | + th.setData({ | |
| 5637 | + store: 0, | |
| 5638 | + choice_sort_store: 0, | |
| 5639 | + sort_store: 0 | |
| 5640 | + }) | |
| 5641 | + } | |
| 5642 | + | |
| 5643 | + | |
| 5644 | + }, | |
| 5645 | + | |
| 5646 | + //选择更多门店 | |
| 5647 | + more_store: function () { | |
| 5648 | + this.setData({ | |
| 5649 | + sort_store: 1 | |
| 5650 | + }); | |
| 5651 | + }, | |
| 5652 | + sort_store: function () { | |
| 5653 | + | |
| 5654 | + }, | |
| 5655 | + // 返回按钮 | |
| 5656 | + returns: function () { | |
| 5657 | + this.setData({ | |
| 5658 | + sort_store: 0, | |
| 5659 | + choice_sort_store: 0 | |
| 5660 | + }); | |
| 5661 | + }, | |
| 5662 | + //---选择分类门店--- | |
| 5663 | + choice_sort_store: function (e) { | |
| 5664 | + var index = e.currentTarget.dataset.index; | |
| 5665 | + var region_name = e.currentTarget.dataset.region; | |
| 5666 | + var item = this.data.all_sto[index]; | |
| 5667 | + this.setData({ | |
| 5668 | + region_name: region_name, | |
| 5669 | + sort_store: 0, | |
| 5670 | + choice_sort_store: 1, | |
| 5671 | + sec_sto: item, | |
| 5672 | + sec_pick_index: 0 | |
| 5673 | + }); | |
| 5674 | + }, | |
| 5675 | + | |
| 5676 | + choose_for_store_fir: function (e) { | |
| 5677 | + var index_c = e.currentTarget.dataset.ind; | |
| 5678 | + var th = this; | |
| 5679 | + th.setData({ | |
| 5680 | + fir_pick_index: index_c | |
| 5681 | + }) | |
| 5682 | + | |
| 5683 | + }, | |
| 5684 | + | |
| 5685 | + //如果开启线下库存,已经急速库存才会使用 | |
| 5686 | + async check_the_pick(item, func) { | |
| 5687 | + var th = this; | |
| 5688 | + var goodsinfo = th.data.sele_g; | |
| 5689 | + var erpwareid = goodsinfo.erpwareid; | |
| 5690 | + var plist = null; | |
| 5691 | + var lock = 0; | |
| 5692 | + | |
| 5693 | + //---如果是活动的时候,同时不是普通购买--- | |
| 5694 | + if ((th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) && !th.data.is_normal) { | |
| 5695 | + func(); | |
| 5696 | + return false; | |
| 5697 | + } | |
| 5698 | + | |
| 5699 | + if (this.data.sales_rules != 2) { | |
| 5700 | + func(); | |
| 5701 | + } else { | |
| 5702 | + | |
| 5703 | + //先读取门店的lock | |
| 5704 | + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page", { | |
| 5705 | + data: {store_id: os.stoid, wareId: goodsinfo.goods_id, storageId: item.pickup_id, pageSize: 1000} | |
| 5706 | + }).then(res => { | |
| 5707 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 5708 | + for (var i in res.data.data.pageData) | |
| 5709 | + lock += res.data.data.pageData[i].outQty; | |
| 5710 | + } | |
| 5711 | + }) | |
| 5712 | + //读取线下的门店库存 | |
| 5713 | + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages", { | |
| 5714 | + data: {storageNos: item.pickup_no, wareIds: encodeURIComponent(erpwareid), storeId: os.stoid} | |
| 5715 | + }).then(res => { | |
| 5716 | + if (res.data.code == 0 && res.data.data.total > 0) { | |
| 5717 | + plist = res.data.data.pageData[0]; | |
| 5718 | + } | |
| 5719 | + }) | |
| 5720 | + | |
| 5721 | + if (plist && plist.CanOutQty - lock > 0) { | |
| 5722 | + item.CanOutQty = plist.CanOutQty - lock; | |
| 5723 | + func(); | |
| 5724 | + return false; | |
| 5725 | + } | |
| 5726 | + getApp().my_warnning(item.pickup_name + "库存不足!", 0, th); | |
| 5727 | + | |
| 5728 | + } | |
| 5729 | + }, | |
| 5730 | + | |
| 5731 | + | |
| 5732 | + //确定def_pick为选择的门店 | |
| 5733 | + sure_pick: function (e) { | |
| 5734 | + var th = this; | |
| 5735 | + var item = null; | |
| 5736 | + var openindstore = th.data.open_ind_store; | |
| 5737 | + | |
| 5738 | + if (th.data.choice_sort_store == 0) { | |
| 5739 | + var index = th.data.fir_pick_index; | |
| 5740 | + if (th.data.is_show_sto_cat == 1) { | |
| 5741 | + item = th.data.def_pickpu_list[index]; | |
| 5742 | + } else { | |
| 5743 | + item = th.data.only_pk[index]; //当没有门店分类的时候 | |
| 5744 | + } | |
| 5745 | + | |
| 5746 | + } else { | |
| 5747 | + var index = th.data.sec_pick_index; | |
| 5748 | + item = th.data.sec_sto.s_arr[index]; | |
| 5749 | + } | |
| 5750 | + | |
| 5751 | + if (!th.data.sele_g) return false; | |
| 5752 | + //判断门店的配送方式是不是匹配 | |
| 5753 | + var g_distr_type = th.data.sele_g.distr_type; | |
| 5754 | + if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { | |
| 5755 | + wx.showToast({ | |
| 5756 | + title: "门店配送方式不匹配", | |
| 5757 | + icon: 'none', | |
| 5758 | + duration: 2000 | |
| 5759 | + }); | |
| 5760 | + return false; | |
| 5761 | + } | |
| 5762 | + | |
| 5763 | + //--回调函数的用法-- | |
| 5764 | + th.check_the_pick(item, function () { | |
| 5765 | + th.setData({ | |
| 5766 | + def_pick_store: item, | |
| 5767 | + sto_sele_name: item.pickup_name, | |
| 5768 | + sto_sele_id: item.pickup_id, | |
| 5769 | + sto_sele_distr: item.distr_type, | |
| 5770 | + store: 0, | |
| 5771 | + choice_sort_store: 0, | |
| 5772 | + fir_pick_index: 0 | |
| 5773 | + }); | |
| 5774 | + | |
| 5775 | + switch (openindstore){ | |
| 5776 | + case 1: | |
| 5777 | + th.setData({ openSpecModal: !0,openSpecModal_ind: openindstore, }); | |
| 5778 | + break; | |
| 5779 | + case 2: | |
| 5780 | + th.setData({openSpecModal: !0, openSpecModal_ind: openindstore, }); | |
| 5781 | + break; | |
| 5782 | + case 4: | |
| 5783 | + th.setData({ | |
| 5784 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 5785 | + store: 0, //关闭门店 | |
| 5786 | + choice_sort_store: 0, //关闭门店2级 | |
| 5787 | + sort_store: 0, //关闭门店2级 | |
| 5788 | + }); | |
| 5789 | + break; | |
| 5790 | + case 5: | |
| 5791 | + th.setData({ | |
| 5792 | + openSpecModal_flash_normal: 1, //打开拼团购买界面 | |
| 5793 | + store: 0, //关闭门店 | |
| 5794 | + choice_sort_store: 0, //关闭门店2级 | |
| 5795 | + sort_store: 0, //关闭门店2级 | |
| 5796 | + }); | |
| 5797 | + break; | |
| 5798 | + default: | |
| 5799 | + th.setData({ store: 0,choice_sort_store: 0, sort_store: 0}) | |
| 5800 | + break | |
| 5801 | + } | |
| 5802 | + | |
| 5803 | + /*-- | |
| 5804 | + if (openindstore == 1) { | |
| 5805 | + th.setData({ | |
| 5806 | + openSpecModal: !0, | |
| 5807 | + openSpecModal_ind: openindstore, | |
| 5808 | + }); | |
| 5809 | + } else if (openindstore == 2) { | |
| 5810 | + th.setData({ | |
| 5811 | + openSpecModal: !0, | |
| 5812 | + openSpecModal_ind: openindstore, | |
| 5813 | + }); | |
| 5814 | + } | |
| 5815 | + else if (openindstore == 4) { //4就是拼团 | |
| 5816 | + th.setData({ | |
| 5817 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 5818 | + store: 0, //关闭门店 | |
| 5819 | + choice_sort_store: 0, //关闭门店2级 | |
| 5820 | + sort_store: 0, //关闭门店2级 | |
| 5821 | + }); | |
| 5822 | + } | |
| 5823 | + else { | |
| 5824 | + th.setData({ | |
| 5825 | + store: 0, | |
| 5826 | + choice_sort_store: 0, | |
| 5827 | + sort_store: 0 | |
| 5828 | + }) | |
| 5829 | + }--*/ | |
| 5830 | + //如果商品没有其他活动,要取一下线下价格 | |
| 5831 | + th.get_off_price(); | |
| 5832 | + }) | |
| 5833 | + }, | |
| 5834 | + //---点击二级之后的选择--- | |
| 5835 | + choose_for_store: function (e) { | |
| 5836 | + var index_c = e.currentTarget.dataset.ind; | |
| 5837 | + var th = this; | |
| 5838 | + th.setData({ | |
| 5839 | + sec_pick_index: index_c, | |
| 5840 | + fir_pick_index: index_c | |
| 5841 | + }) | |
| 5842 | + | |
| 5843 | + }, | |
| 5844 | + //把选择的门店设置成默认的门店def_pick | |
| 5845 | + set_def_pick: function (e) { | |
| 5846 | + var th = this; | |
| 5847 | + var item = null; | |
| 5848 | + if (th.data.choice_sort_store == 0) { | |
| 5849 | + var index = th.data.fir_pick_index; | |
| 5850 | + if (th.data.is_show_sto_cat == 1) { | |
| 5851 | + item = th.data.def_pickpu_list[index]; | |
| 5852 | + } else { | |
| 5853 | + item = th.data.only_pk[index]; //当没有门店分类的时候 | |
| 5854 | + } | |
| 5855 | + } else { | |
| 5856 | + var index = th.data.sec_pick_index; | |
| 5857 | + item = th.data.sec_sto.s_arr[index]; | |
| 5858 | + } | |
| 5859 | + | |
| 5860 | + //判断门店的配送方式是不是匹配 | |
| 5861 | + var g_distr_type = th.data.sele_g.distr_type; | |
| 5862 | + if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { | |
| 5863 | + wx.showToast({ | |
| 5864 | + title: "门店配送方式不匹配", | |
| 5865 | + icon: 'none', | |
| 5866 | + duration: 2000 | |
| 5867 | + }); | |
| 5868 | + return false; | |
| 5869 | + } | |
| 5870 | + | |
| 5871 | + //先设置之前,要判断是不是有库存 | |
| 5872 | + th.check_the_pick(item, function () { | |
| 5873 | + var store_id = o.stoid; | |
| 5874 | + var user_id = getApp().globalData.user_id; | |
| 5875 | + var def_pickup_id = item.pickup_id; | |
| 5876 | + | |
| 5877 | + getApp().request.put('/api/weshop/users/update', { | |
| 5878 | + data: { | |
| 5879 | + user_id: user_id, | |
| 5880 | + def_pickup_id: def_pickup_id | |
| 5881 | + }, | |
| 5882 | + success: function (res) { | |
| 5883 | + if (res.data.code == 0) { | |
| 5884 | + if (th.data.choice_sort_store == 0) th.setData({ | |
| 5885 | + fir_pick_index: 0 | |
| 5886 | + }); | |
| 5887 | + getApp().globalData.pk_store = item; | |
| 5888 | + } else { | |
| 5889 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | |
| 5890 | + getApp().my_warnning("设置默认门店地址失败", 0, th) | |
| 5891 | + } | |
| 5892 | + | |
| 5893 | + } | |
| 5894 | + }); | |
| 5895 | + | |
| 5896 | + th.setData({ | |
| 5897 | + def_pick_store: item, | |
| 5898 | + sto_sele_name: item.pickup_name, | |
| 5899 | + sto_sele_id: item.pickup_id, | |
| 5900 | + sto_sele_distr: item.distr_type, | |
| 5901 | + store: 0, | |
| 5902 | + choice_sort_store: 0 | |
| 5903 | + }); | |
| 5904 | + | |
| 5905 | + var openindstore = th.data.open_ind_store; | |
| 5906 | + if (openindstore == 1) { | |
| 5907 | + th.setData({ | |
| 5908 | + openSpecModal: !0, | |
| 5909 | + openSpecModal_ind: openindstore, | |
| 5910 | + store: 0, | |
| 5911 | + choice_sort_store: 0, | |
| 5912 | + sort_store: 0, | |
| 5913 | + }); | |
| 5914 | + } else if (openindstore == 2) { | |
| 5915 | + th.setData({ | |
| 5916 | + openSpecModal: !0, | |
| 5917 | + openSpecModal_ind: openindstore, | |
| 5918 | + store: 0, | |
| 5919 | + choice_sort_store: 0, | |
| 5920 | + sort_store: 0, | |
| 5921 | + }); | |
| 5922 | + } | |
| 5923 | + else if (openindstore == 4) { //4就是拼团 | |
| 5924 | + th.setData({ | |
| 5925 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 5926 | + store: 0, //关闭门店 | |
| 5927 | + choice_sort_store: 0, //关闭门店2级 | |
| 5928 | + sort_store: 0, //关闭门店2级 | |
| 5929 | + }); | |
| 5930 | + } | |
| 5931 | + | |
| 5932 | + else { | |
| 5933 | + th.setData({ | |
| 5934 | + store: 0, | |
| 5935 | + choice_sort_store: 0, | |
| 5936 | + sort_store: 0, | |
| 5937 | + }) | |
| 5938 | + } | |
| 5939 | + | |
| 5940 | + //如果商品没有其他活动,要取一下线下价格 | |
| 5941 | + th.get_off_price(); | |
| 5942 | + | |
| 5943 | + }) | |
| 5944 | + }, | |
| 5945 | + | |
| 5946 | + wait_for_store_config: function () { | |
| 5947 | + var th = this; | |
| 5948 | + //----获取系统参数----- | |
| 5949 | + getApp().getConfig2(function (e) { | |
| 5950 | + th.setData({ | |
| 5951 | + bconfig: e, | |
| 5952 | + }); | |
| 5953 | + }) | |
| 5954 | + var t_time = setInterval(function () { | |
| 5955 | + if (th.data.bconfig == null) false; | |
| 5956 | + var e = th.data.bconfig; | |
| 5957 | + if (e && e.is_sort_storage) { | |
| 5958 | + wx.getLocation({ | |
| 5959 | + type: 'gcj02', | |
| 5960 | + success: function (res) { | |
| 5961 | + th.data.lat = res.latitude; | |
| 5962 | + th.data.lon = res.longitude; | |
| 5963 | + th.data.is_get_local_ok = 1; | |
| 5964 | + }, | |
| 5965 | + fail: function (res) { | |
| 5966 | + if (res.errCode == 2) { | |
| 5967 | + th.setData({ | |
| 5968 | + is_gps: 0 | |
| 5969 | + }); | |
| 5970 | + if (th.data.is_gps == 0) { | |
| 5971 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | |
| 5972 | + } | |
| 5973 | + | |
| 5974 | + } else { | |
| 5975 | + th.setData({ | |
| 5976 | + is_gps: "3" | |
| 5977 | + }); | |
| 5978 | + } | |
| 5979 | + | |
| 5980 | + th.data.is_get_local_ok = 1; | |
| 5981 | + } | |
| 5982 | + }) | |
| 5983 | + } else { | |
| 5984 | + th.data.is_get_local_ok = 1; | |
| 5985 | + } | |
| 5986 | + clearInterval(t_time); | |
| 5987 | + }, 500) | |
| 5988 | + }, | |
| 5989 | + //显示全部 | |
| 5990 | + toggleHandler: function (e) { | |
| 5991 | + var that = this, | |
| 5992 | + index = e.currentTarget.dataset.index; | |
| 5993 | + for (var i = 0; i < that.data.comments.length; i++) { | |
| 5994 | + if (index == i) { | |
| 5995 | + for (var i = 0; i < that.data.comments.length; i++) { | |
| 5996 | + that.data.comments[index].auto = true; | |
| 5997 | + that.data.comments[index].seeMore = false; | |
| 5998 | + } | |
| 5999 | + } | |
| 6000 | + } | |
| 6001 | + that.setData({ | |
| 6002 | + comments: that.data.comments | |
| 6003 | + }) | |
| 6004 | + }, | |
| 6005 | + | |
| 6006 | + //收起更多 | |
| 6007 | + toggleContent: function (e) { | |
| 6008 | + var that = this, | |
| 6009 | + index = e.currentTarget.dataset.index; | |
| 6010 | + for (var i = 0; i < that.data.comments.length; i++) { | |
| 6011 | + if (index == i) { | |
| 6012 | + that.data.comments[index].auto = true; | |
| 6013 | + that.data.comments[index].seeMore = true; | |
| 6014 | + } | |
| 6015 | + } | |
| 6016 | + that.setData({ | |
| 6017 | + comments: that.data.comments | |
| 6018 | + }) | |
| 6019 | + }, | |
| 6020 | + | |
| 6021 | + //--- 获取卡类列表 --- | |
| 6022 | + getPlusCardType: function (func) { | |
| 6023 | + var storid = os.stoid; | |
| 6024 | + var th = this; | |
| 6025 | + var user = getApp().globalData.userInfo; | |
| 6026 | + if (!user) return false; | |
| 6027 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | |
| 6028 | + var plusCard = res.data.data; | |
| 6029 | + var arr = [1219, 2089, 3031]; | |
| 6030 | + var new_arr = new Array(); | |
| 6031 | + var card_name_map = new Map(); | |
| 6032 | + | |
| 6033 | + var list = []; | |
| 6034 | + for (var i = 0; i < plusCard.length; i++) { | |
| 6035 | + if ((!user || user.card_field == null || user.card_field == "") && plusCard[i].IsStopBuy == true) continue; | |
| 6036 | + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | |
| 6037 | + card_name_map.set(name, plusCard[i].CardName); | |
| 6038 | + list.push(plusCard[i]); | |
| 6039 | + } | |
| 6040 | + | |
| 6041 | + var ob = {"card_list": list, "name_map": card_name_map}; | |
| 6042 | + func(ob); | |
| 6043 | + }) | |
| 6044 | + }, | |
| 6045 | + | |
| 6046 | + go_plus: function () { | |
| 6047 | + getApp().goto("/pages/user/plus/plus"); | |
| 6048 | + }, | |
| 6049 | + go_card_info: function () { | |
| 6050 | + getApp().goto("/pages/user/cardinfo/cardinfo"); | |
| 6051 | + }, | |
| 6052 | + //-- 根据ID拿出门店 -- | |
| 6053 | + get_pick_from_list(pid) { | |
| 6054 | + var all_pick_list = this.data.all_pick_list; | |
| 6055 | + for (var i in all_pick_list) { | |
| 6056 | + var item = all_pick_list[i]; | |
| 6057 | + if (item.pickup_id == pid) { | |
| 6058 | + return item; | |
| 6059 | + } | |
| 6060 | + } | |
| 6061 | + }, | |
| 6062 | + //-----显示优惠券的时候情况----- | |
| 6063 | + show_more_cx: function () { | |
| 6064 | + if (this.data.is_more_cx) { | |
| 6065 | + this.setData({is_more_cx: 0}); | |
| 6066 | + } else { | |
| 6067 | + this.setData({is_more_cx: 1}); | |
| 6068 | + } | |
| 6069 | + }, | |
| 6070 | + | |
| 6071 | + //----跳转到搭配购买---- | |
| 6072 | + go_prom_list: function () { | |
| 6073 | + | |
| 6074 | + var url = "../../../packageA/pages/prom_list/prom_list?goods_id=" + this.data.gid; | |
| 6075 | + var room_id = getApp().globalData.room_id; | |
| 6076 | + if (room_id && this.data.gid == getApp().globalData.room_goods_id) { | |
| 6077 | + url += "&room_id=" + room_id; | |
| 6078 | + } | |
| 6079 | + wx.navigateTo({url: url,}) | |
| 6080 | + }, | |
| 6081 | + | |
| 6082 | + //---检查有没有优惠活动--- | |
| 6083 | + check_is_youhui: function (gid, is_nor) { | |
| 6084 | + var th = this; | |
| 6085 | + var user_id = getApp().globalData.user_id; | |
| 6086 | + if (!user_id) user_id = 0; | |
| 6087 | + //如果是普通购买的时候,要进行调用 | |
| 6088 | + if (is_nor) { | |
| 6089 | + getApp().request.get("/api/weshop/goods/getGoodsPromNormal/" + os.stoid + "/" + gid, { | |
| 6090 | + success: function (res) { | |
| 6091 | + if (res.data.code == 0) { | |
| 6092 | + var r_data = res.data.data; | |
| 6093 | + | |
| 6094 | + if (r_data.ladderLists) { | |
| 6095 | + var act_id = r_data.ladderLists[0].form_id; | |
| 6096 | + //-- 判断会员能不能参与阶梯促销 -- | |
| 6097 | + getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => { | |
| 6098 | + if (res.data.code == 0 && res.data.data) { | |
| 6099 | + var prom_content = ""; | |
| 6100 | + for (let jj in r_data.ladderLists) { | |
| 6101 | + if (r_data.ladderLists[jj].discount == 10) { | |
| 6102 | + prom_content += "第" + (parseInt(jj) + 1) + "件原价,"; | |
| 6103 | + } else { | |
| 6104 | + prom_content += "第" + (parseInt(jj) + 1) + "件" + r_data.ladderLists[jj].discount + "折,"; | |
| 6105 | + } | |
| 6106 | + } | |
| 6107 | + prom_content = ut.sub_last(prom_content); | |
| 6108 | + th.data.prom_type = 10; | |
| 6109 | + th.data.prom_id = act_id; | |
| 6110 | + th.setData({ | |
| 6111 | + jieti_prom: prom_content, | |
| 6112 | + ladder_act_id: act_id | |
| 6113 | + }) | |
| 6114 | + } | |
| 6115 | + }) | |
| 6116 | + } | |
| 6117 | + | |
| 6118 | + th.setData({ | |
| 6119 | + prom_goods: r_data.promGoodsLists, | |
| 6120 | + }) | |
| 6121 | + th.is_show_more_buy(); | |
| 6122 | + } | |
| 6123 | + }, | |
| 6124 | + }) | |
| 6125 | + | |
| 6126 | + } else { | |
| 6127 | + //调用接口判断订单优惠, | |
| 6128 | + getApp().request.get("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + gid + "/0"+"/"+user_id, { | |
| 6129 | + success: function (res) { | |
| 6130 | + if (res.data.code == 0 && res.data.data) { | |
| 6131 | + var r_data = res.data.data; | |
| 6132 | + var max = 0, min = 0; | |
| 6133 | + if (r_data.collocationList) { | |
| 6134 | + for (var i in r_data.collocationList) { | |
| 6135 | + if (max == 0) max = r_data.collocationList[i].price; | |
| 6136 | + if (min == 0) min = r_data.collocationList[i].price; | |
| 6137 | + | |
| 6138 | + if (max < parseFloat(r_data.collocationList[i].price)) max = r_data.collocationList[i].price; | |
| 6139 | + if (min > parseFloat(r_data.collocationList[i].price)) min = r_data.collocationList[i].price; | |
| 6140 | + } | |
| 6141 | + r_data.collocationPromList.max = (max + th.data.data.shop_price).toFixed(2); | |
| 6142 | + r_data.collocationPromList.min = (min + th.data.data.shop_price).toFixed(2); | |
| 6143 | + } | |
| 6144 | + | |
| 6145 | + if (r_data.ladderLists) { | |
| 6146 | + var act_id = r_data.ladderLists[0].form_id; | |
| 6147 | + //-- 判断会员能不能参与阶梯促销 -- | |
| 6148 | + getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => { | |
| 6149 | + if (res.data.code == 0 && res.data.data) { | |
| 6150 | + var prom_content = ""; | |
| 6151 | + for (let jj in r_data.ladderLists) { | |
| 6152 | + if (r_data.ladderLists[jj].discount == 10) { | |
| 6153 | + prom_content += "第" + (parseInt(jj) + 1) + "件原价,"; | |
| 6154 | + } else { | |
| 6155 | + prom_content += "第" + (parseInt(jj) + 1) + "件" + r_data.ladderLists[jj].discount + "折,"; | |
| 6156 | + } | |
| 6157 | + } | |
| 6158 | + prom_content = ut.sub_last(prom_content); | |
| 6159 | + th.data.prom_type = 10; | |
| 6160 | + th.data.prom_id = act_id; | |
| 6161 | + th.setData({ | |
| 6162 | + jieti_prom: prom_content, | |
| 6163 | + ladder_act_id: act_id | |
| 6164 | + }) | |
| 6165 | + } | |
| 6166 | + }) | |
| 6167 | + } | |
| 6168 | + | |
| 6169 | + th.setData({ | |
| 6170 | + order_prom: r_data.promOrder, | |
| 6171 | + collocationGoods: r_data.collocationPromList, | |
| 6172 | + prom_goods: r_data.promGoodsLists, | |
| 6173 | + }) | |
| 6174 | + th.is_show_more_buy(); | |
| 6175 | + } | |
| 6176 | + } | |
| 6177 | + }) | |
| 6178 | + } | |
| 6179 | + }, | |
| 6180 | + | |
| 6181 | + closePoster() { | |
| 6182 | + this.setData({ | |
| 6183 | + showPoster: false, | |
| 6184 | + }); | |
| 6185 | + }, | |
| 6186 | + | |
| 6187 | + // 保存图片到手机 | |
| 6188 | + savePic() { | |
| 6189 | + console.log('保存图片'); | |
| 6190 | + var self = this; | |
| 6191 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
| 6192 | + this.getSetting().then((res) => { | |
| 6193 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
| 6194 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
| 6195 | + this.authorize().then(() => { | |
| 6196 | + // 同意授权后保存下载文件 | |
| 6197 | + this.saveImage(self.data.shareImgPath) | |
| 6198 | + .then(() => { | |
| 6199 | + self.setData({ | |
| 6200 | + showPoster: false | |
| 6201 | + }); | |
| 6202 | + }); | |
| 6203 | + }) | |
| 6204 | + } else { | |
| 6205 | + // 如果已经授权,保存下载文件 | |
| 6206 | + this.saveImage(self.data.shareImgPath) | |
| 6207 | + .then(() => { | |
| 6208 | + self.setData({ | |
| 6209 | + showPoster: false | |
| 6210 | + }); | |
| 6211 | + }); | |
| 6212 | + } | |
| 6213 | + | |
| 6214 | + }) | |
| 6215 | + }, | |
| 6216 | + | |
| 6217 | + // 获取用户已经授予了哪些权限 | |
| 6218 | + getSetting() { | |
| 6219 | + return new Promise((resolve, reject) => { | |
| 6220 | + wx.getSetting({ | |
| 6221 | + success: res => { | |
| 6222 | + resolve(res) | |
| 6223 | + } | |
| 6224 | + }) | |
| 6225 | + }) | |
| 6226 | + }, | |
| 6227 | + | |
| 6228 | + // 发起首次授权请求 | |
| 6229 | + authorize() { | |
| 6230 | + // isFirst 用来记录是否为首次发起授权, | |
| 6231 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
| 6232 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
| 6233 | + return new Promise((resolve, reject) => { | |
| 6234 | + wx.authorize({ | |
| 6235 | + scope: 'scope.writePhotosAlbum', | |
| 6236 | + // 同意授权 | |
| 6237 | + success: () => { | |
| 6238 | + resolve(); | |
| 6239 | + }, | |
| 6240 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
| 6241 | + fail: res => { | |
| 6242 | + if (isFirst === 0) { | |
| 6243 | + wx.setStorageSync('isFirst', 1); | |
| 6244 | + wx.showToast({ | |
| 6245 | + title: '保存失败', | |
| 6246 | + icon: 'none', | |
| 6247 | + duration: 1000 | |
| 6248 | + }) | |
| 6249 | + } else { | |
| 6250 | + this.showModal(); | |
| 6251 | + } | |
| 6252 | + console.log('拒绝授权'); | |
| 6253 | + reject(); | |
| 6254 | + } | |
| 6255 | + }) | |
| 6256 | + }) | |
| 6257 | + }, | |
| 6258 | + | |
| 6259 | + | |
| 6260 | + // 保存图片到系统相册 | |
| 6261 | + saveImage(saveUrl) { | |
| 6262 | + var self = this; | |
| 6263 | + return new Promise((resolve, reject) => { | |
| 6264 | + wx.saveImageToPhotosAlbum({ | |
| 6265 | + filePath: saveUrl, | |
| 6266 | + success: (res) => { | |
| 6267 | + wx.showToast({ | |
| 6268 | + title: '保存成功', | |
| 6269 | + duration: 1000, | |
| 6270 | + }); | |
| 6271 | + self.setData({ | |
| 6272 | + showPlaybill: 'true' | |
| 6273 | + }); | |
| 6274 | + resolve(); | |
| 6275 | + }, | |
| 6276 | + fail: () => { | |
| 6277 | + wx.showToast({ | |
| 6278 | + title: '保存失败', | |
| 6279 | + duration: 1000, | |
| 6280 | + }); | |
| 6281 | + } | |
| 6282 | + }) | |
| 6283 | + }) | |
| 6284 | + }, | |
| 6285 | + | |
| 6286 | + previewImage(e) { | |
| 6287 | + this.data.show_prew_img = 1; | |
| 6288 | + getApp().pre_img(this.data.sele_g.original_img); | |
| 6289 | + }, | |
| 6290 | + | |
| 6291 | + is_show_more_buy: function () { | |
| 6292 | + var prom_goods = this.data.prom_goods; | |
| 6293 | + var per_price = this.data.sele_g.shop_price | |
| 6294 | + if (this.data.card_field && this.data.sele_g[this.data.card_field] > 0) { | |
| 6295 | + per_price = this.data.sele_g[this.data.card_field]; | |
| 6296 | + } | |
| 6297 | + var all_price = per_price * this.data.goodsInputNum; | |
| 6298 | + var con = null; | |
| 6299 | + for (var i in prom_goods) { | |
| 6300 | + var item = prom_goods[i]; | |
| 6301 | + if (item.prom_type == 1) { | |
| 6302 | + if (item.condition > this.data.goodsInputNum) { | |
| 6303 | + con = item; | |
| 6304 | + con.need = (item.condition - this.data.goodsInputNum).toFixed(2) + "件"; | |
| 6305 | + break; | |
| 6306 | + } | |
| 6307 | + } else { | |
| 6308 | + if (item.condition > all_price) { | |
| 6309 | + con = item; | |
| 6310 | + con.need = (item.condition - all_price).toFixed(2) + "元"; | |
| 6311 | + break; | |
| 6312 | + } | |
| 6313 | + } | |
| 6314 | + } | |
| 6315 | + | |
| 6316 | + this.setData({hui_condition: con}); | |
| 6317 | + | |
| 6318 | + }, | |
| 6319 | + | |
| 6320 | + //-- 积分购 -- | |
| 6321 | + go_pay_integral: function () { | |
| 6322 | + this.data.g_buy_num = new Map(); | |
| 6323 | + this.get_sto(0) | |
| 6324 | + this.setData({openSpecModal_inte: 1, goodsInputNum: 1}); | |
| 6325 | + | |
| 6326 | + | |
| 6327 | + }, | |
| 6328 | + //-- 积分购普通购买 -- | |
| 6329 | + go_pay_integral_normal: function () { | |
| 6330 | + | |
| 6331 | + this.data.g_buy_num = new Map(); | |
| 6332 | + var th = this; | |
| 6333 | + if (th.data.sku_g_pt) { | |
| 6334 | + this.get_sto(1) | |
| 6335 | + this.setData({openSpecModal_inte_normal: 1}); | |
| 6336 | + } else { | |
| 6337 | + th.get_sto(1); | |
| 6338 | + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | |
| 6339 | + th.setData({ | |
| 6340 | + is_normal: 1, | |
| 6341 | + openSpecModal_inte_normal: 1 | |
| 6342 | + }); | |
| 6343 | + }); | |
| 6344 | + } | |
| 6345 | + this.check_is_youhui(th.data.gid, 1); | |
| 6346 | + }, | |
| 6347 | + | |
| 6348 | + closeSpecModal_inte: function () { | |
| 6349 | + this.setData({openSpecModal_inte: 0}); | |
| 6350 | + }, | |
| 6351 | + closeSpecModal_inte_normal: function () { | |
| 6352 | + this.setData({openSpecModal_inte_normal: 0}); | |
| 6353 | + //要进行还原 | |
| 6354 | + this.get_sto(); | |
| 6355 | + this.setData({ | |
| 6356 | + sele_g: this.data.data, | |
| 6357 | + gid: this.data.data.goods_id | |
| 6358 | + }) | |
| 6359 | + | |
| 6360 | + this.sele_spec_chech_activity(); | |
| 6361 | + }, | |
| 6362 | + | |
| 6363 | + addCart_inte: function (t) { | |
| 6364 | + this.add_cart_func_inte(t); | |
| 6365 | + }, | |
| 6366 | + | |
| 6367 | + onShareTimeline() { | |
| 6368 | + getApp().globalData.no_clear=1; | |
| 6369 | + var store_name = getApp().globalData.config ? getApp().globalData.config.store_name : ''; | |
| 6370 | + if (!store_name) | |
| 6371 | + store_name = getApp().globalData.setting.appName; | |
| 6372 | + return { | |
| 6373 | + title: this.data.data.goods_name + '-' + store_name, | |
| 6374 | + imageUrl: this.data.gallery[0].image_url, | |
| 6375 | + } | |
| 6376 | + }, | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + clickCollapse() { | |
| 6380 | + this.setData({ | |
| 6381 | + flag: !this.data.flag, | |
| 6382 | + }) | |
| 6383 | + }, | |
| 6384 | + | |
| 6385 | + clickShare() { | |
| 6386 | + if(!getApp().globalData.user_id){ | |
| 6387 | + getApp().goto("/pages/togoin/togoin"); | |
| 6388 | + return false; | |
| 6389 | + } | |
| 6390 | + this.setData({ | |
| 6391 | + share_hidden: true, | |
| 6392 | + }); | |
| 6393 | + }, | |
| 6394 | + | |
| 6395 | + send() { | |
| 6396 | + this.setData({ | |
| 6397 | + share_hidden: false, | |
| 6398 | + }); | |
| 6399 | + }, | |
| 6400 | + | |
| 6401 | + cancel() { | |
| 6402 | + this.setData({ | |
| 6403 | + share_hidden: false, | |
| 6404 | + }); | |
| 6405 | + }, | |
| 6406 | + | |
| 6407 | + //积分购和拼团的普通购买的的时候,要判断有没有全场优惠活动 | |
| 6408 | + check_nor_promgood(goods_id, back) { | |
| 6409 | + getApp().request.get("/api/weshop/goods/getGoodsPromNormal/" + os.stoid + "/" + goods_id, { | |
| 6410 | + success: function (res) { | |
| 6411 | + if (res.data.code == 0 && res.data.data && res.data.data.promGoodsLists && res.data.data.promGoodsLists.length > 0) { | |
| 6412 | + var obj = { | |
| 6413 | + act_id: res.data.data.promGoodsLists[0].prom_id, | |
| 6414 | + } | |
| 6415 | + back(obj); | |
| 6416 | + } else { | |
| 6417 | + back(0) | |
| 6418 | + } | |
| 6419 | + } | |
| 6420 | + }) | |
| 6421 | + }, | |
| 6422 | + | |
| 6423 | + go_zh: function (e) { | |
| 6424 | + var id = e.currentTarget.dataset.id; | |
| 6425 | + getApp().goto("/packageB/pages/zuhegou/index/index?id=" + id); | |
| 6426 | + }, | |
| 6427 | + | |
| 6428 | + check_zh_acting: function (func) { | |
| 6429 | + var isok = 1, item = this.data.sele_g; | |
| 6430 | + //如果有组合购 | |
| 6431 | + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + item.prom_id + "/" + getApp().globalData.user_id; | |
| 6432 | + getApp().request.promiseGet(url, {}).then(res => { | |
| 6433 | + if (res.data.code == 0 && res.data.data) { | |
| 6434 | + if (res.data.data.is_show != 1) { | |
| 6435 | + isok = 0; | |
| 6436 | + } | |
| 6437 | + //如果活动已经结束 | |
| 6438 | + if (res.data.data.is_end == 1) { | |
| 6439 | + isok = 0; | |
| 6440 | + } | |
| 6441 | + //已经结束 | |
| 6442 | + if (ut.gettimestamp() > res.data.data.end_time) { | |
| 6443 | + isok = 0; | |
| 6444 | + } | |
| 6445 | + //还未开始 | |
| 6446 | + if (ut.gettimestamp() < res.data.data.start_time) { | |
| 6447 | + isok = 0; | |
| 6448 | + } | |
| 6449 | + | |
| 6450 | + } else { | |
| 6451 | + //未找到商品的活动 | |
| 6452 | + isok = 0; | |
| 6453 | + } | |
| 6454 | + item.act = res.data.data; | |
| 6455 | + func(isok); | |
| 6456 | + }) | |
| 6457 | + }, | |
| 6458 | + | |
| 6459 | + //获取更多秒杀 | |
| 6460 | + get_more_flahs: async function (func) { | |
| 6461 | + var f_more = false; | |
| 6462 | + var user_id = getApp().globalData.user_id; | |
| 6463 | + if (!user_id) user_id = 0; | |
| 6464 | + | |
| 6465 | + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.data.goods_id + "&user_id=" + user_id; | |
| 6466 | + //获取秒杀的多规格 | |
| 6467 | + await getApp().request.promiseGet(url, {}).then(res => { | |
| 6468 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
| 6469 | + f_more = res.data.data; | |
| 6470 | + } | |
| 6471 | + }) | |
| 6472 | + if (!f_more) { | |
| 6473 | + func(false); | |
| 6474 | + return false; | |
| 6475 | + } | |
| 6476 | + //-- 秒杀的价格要更新 -- | |
| 6477 | + for (let i in f_more) { | |
| 6478 | + | |
| 6479 | + let item = f_more[i]; | |
| 6480 | + f_more[i].prom_id = item.act_id; | |
| 6481 | + f_more[i].prom_type = 1; | |
| 6482 | + if (item.goods_id == this.data.data.goods_id) { | |
| 6483 | + continue; | |
| 6484 | + } | |
| 6485 | + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id; | |
| 6486 | + await getApp().request.promiseGet(url, {}).then(rs => { | |
| 6487 | + if (rs.data.code == 0) { | |
| 6488 | + f_more[i].price = rs.data.data.user_price; | |
| 6489 | + | |
| 6490 | + } | |
| 6491 | + }) | |
| 6492 | + } | |
| 6493 | + func(f_more); | |
| 6494 | + | |
| 6495 | + }, | |
| 6496 | + | |
| 6497 | + //-- 判断是否有秒杀 -- | |
| 6498 | + check_has_flash: function () { | |
| 6499 | + var th = this; | |
| 6500 | + var url = "/api/weshop/activitylist/getGoodActInfo"; | |
| 6501 | + var user_id = getApp().globalData.user_id; | |
| 6502 | + if (!user_id) user_id = 0; | |
| 6503 | + | |
| 6504 | + var req_data = { | |
| 6505 | + store_id: os.stoid, goodsidlist: this.data.data.goods_id, is_detail: 1, user_id: user_id | |
| 6506 | + }; | |
| 6507 | + //获取秒杀的多规格 | |
| 6508 | + getApp().request.promiseGet(url, {data: req_data}).then(async function (res) { | |
| 6509 | + if (res.data.code == 0 && res.data.data && res.data.data.length) { | |
| 6510 | + var arr_data = res.data.data; | |
| 6511 | + var new_arr = []; | |
| 6512 | + for (let i in arr_data) { | |
| 6513 | + let item = arr_data[i]; | |
| 6514 | + //找不到活动要剔除 | |
| 6515 | + if (!item.act_name) continue; | |
| 6516 | + if (item.prom_type != 1) continue; | |
| 6517 | + new_arr.push(item); | |
| 6518 | + } | |
| 6519 | + | |
| 6520 | + if (new_arr.length == 1) { | |
| 6521 | + th.data.prom_id = new_arr[0].act_id; | |
| 6522 | + th.data.prom_type = new_arr[0].prom_type; | |
| 6523 | + } | |
| 6524 | + | |
| 6525 | + th.setData({more_flash: new_arr}); | |
| 6526 | + } | |
| 6527 | + }) | |
| 6528 | + }, | |
| 6529 | + | |
| 6530 | + //-- 跳转到秒杀商品详情页 -- | |
| 6531 | + go_more_flash: function (e) { | |
| 6532 | + var prom_id = e.currentTarget.dataset.id; | |
| 6533 | + var goods_id = this.data.data.goods_id; | |
| 6534 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + goods_id + "&prom_id=" + prom_id + "&prom_type=1"; | |
| 6535 | + getApp().goto(url); | |
| 6536 | + }, | |
| 6537 | + | |
| 6538 | + close_pop_more: function () { | |
| 6539 | + this.setData({is_pop_more: 0}) | |
| 6540 | + }, | |
| 6541 | + | |
| 6542 | + con_weixin: function () { | |
| 6543 | + getApp().con_wx(this); | |
| 6544 | + }, | |
| 6545 | + | |
| 6546 | + get_normal(gid){ | |
| 6547 | + this.setData({ | |
| 6548 | + prom_type: 0, | |
| 6549 | + isshow: 1, | |
| 6550 | + }); | |
| 6551 | + this.get_sku(os.stoid, this.data.data, gid); | |
| 6552 | + this.get_sto(); | |
| 6553 | + this.check_is_youhui(gid, 1); | |
| 6554 | + this.data.is_normal = 1; | |
| 6555 | + }, | |
| 6556 | + | |
| 6557 | + | |
| 6558 | + // 促销 -> 送礼包 -> 查看详情 | |
| 6559 | + viewLbDetails(e) { | |
| 6560 | + let id = e.currentTarget.dataset.id; // 获取礼包id | |
| 6561 | + let flag = e.currentTarget.dataset.flag; | |
| 6562 | + let url = ''; | |
| 6563 | + if(flag == 1) { // flag =1 控制跳转到专享礼包 | |
| 6564 | + url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; | |
| 6565 | + } else { | |
| 6566 | + url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | |
| 6567 | + }; | |
| 6568 | + // console.log('myurl', url); | |
| 6569 | + getApp().goto(url); | |
| 6570 | + }, | |
| 6571 | + | |
| 6572 | + | |
| 6573 | + | |
| 6574 | + go_more_ladder: function (e) { | |
| 6575 | + var prom_id = e.currentTarget.dataset.id; | |
| 6576 | + getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id); | |
| 6577 | + }, | |
| 6578 | + | |
| 6579 | + getHistoryBuy() { | |
| 6580 | + let _this = this; | |
| 6581 | + let req_data = { | |
| 6582 | + store_id: os.stoid, | |
| 6583 | + goods_id: this.data.gid, | |
| 6584 | + pay_status: 1, | |
| 6585 | + rndid: 1 | |
| 6586 | + }; | |
| 6587 | + getApp().request.promiseGet('/api/weshop/ordergoods/list', { | |
| 6588 | + data: req_data, | |
| 6589 | + }) | |
| 6590 | + .then(res => { | |
| 6591 | + if (t.ajax_ok(res)) { | |
| 6592 | + _this.setData({ | |
| 6593 | + historyBuyInfo: res.data.data.pageData, | |
| 6594 | + }) | |
| 6595 | + } | |
| 6596 | + }) | |
| 6597 | + }, | |
| 6598 | + | |
| 6599 | + //-- 检验商品的活动情况 -- | |
| 6600 | + check_gd_prom_new: function (func) { | |
| 6601 | + var th = this; | |
| 6602 | + var user_id = getApp().globalData.user_id; | |
| 6603 | + if (!user_id) user_id = 0; | |
| 6604 | + | |
| 6605 | + var url = '/api/weshop/activitylist/listGoodActInfo2'; | |
| 6606 | + var req_d = { | |
| 6607 | + "store_id": os.stoid, | |
| 6608 | + "goods_id": this.data.gid, | |
| 6609 | + "user_id": user_id, | |
| 6610 | + } | |
| 6611 | + getApp().request.get(url, { | |
| 6612 | + data: req_d, | |
| 6613 | + success: function (e) { | |
| 6614 | + if (e.data.code == 0 && e.data.data && e.data.data.length > 0) { | |
| 6615 | + var arr = e.data.data; | |
| 6616 | + var arr2 = arr.filter(function (e) { | |
| 6617 | + return e.s_time < ut.gettimestamp(); | |
| 6618 | + }) | |
| 6619 | + //-- 如果只有一个活动的话 -- | |
| 6620 | + if (arr.length == 1) { | |
| 6621 | + th.data.prom_type = arr[0].prom_type; | |
| 6622 | + th.data.prom_id = arr[0].act_id; | |
| 6623 | + } | |
| 6624 | + //-- 如果只有一个进行中的活动的话 -- | |
| 6625 | + else if (arr2.length == 1) { | |
| 6626 | + th.data.prom_type = arr2[0].prom_type; | |
| 6627 | + th.data.prom_id = arr2[0].act_id; | |
| 6628 | + } | |
| 6629 | + } | |
| 6630 | + //-- 调用回调 -- | |
| 6631 | + func(); | |
| 6632 | + } | |
| 6633 | + }); | |
| 6634 | + }, | |
| 6635 | + | |
| 6636 | + //-- 秒杀的普通购买 -- | |
| 6637 | + openSpecModel_Nor: function () { | |
| 6638 | + this.data.g_buy_num = new Map(); | |
| 6639 | + var th = this; | |
| 6640 | + this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4 | |
| 6641 | + if (th.data.sku_g_pt) { | |
| 6642 | + this.get_sto(1) | |
| 6643 | + this.setData({openSpecModal_flash_normal: 1}); | |
| 6644 | + } else { | |
| 6645 | + th.get_sto(1); | |
| 6646 | + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | |
| 6647 | + th.setData({ | |
| 6648 | + openSpecModal_flash_normal: 1 | |
| 6649 | + }); | |
| 6650 | + }); | |
| 6651 | + } | |
| 6652 | + this.check_is_youhui(th.data.gid, 1); | |
| 6653 | + }, | |
| 6654 | + | |
| 6655 | + closeSpecModal_flash_normal: function () { | |
| 6656 | + this.setData({openSpecModal_flash_normal: 0}); | |
| 6657 | + }, | |
| 6658 | + | |
| 6659 | + | |
| 6660 | + // 预览海报 | |
| 6661 | + previewPoster() { | |
| 6662 | + getApp().globalData.no_clear=1; | |
| 6663 | + wx.previewImage({ | |
| 6664 | + current: this.data.shareImgPath, // 当前显示图片的http链接 | |
| 6665 | + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 | |
| 6666 | + }); | |
| 6667 | + }, | |
| 6668 | + | |
| 6669 | + screenChange:function (e) { | |
| 6670 | + let fullScreen = e.detail.fullScreen //值true为进入全屏,false为退出全屏 | |
| 6671 | + if (fullScreen ){ //退出全屏 | |
| 6672 | + getApp().globalData.no_clear=1; | |
| 6673 | + this.data.show_video=1; | |
| 6674 | + } | |
| 6675 | + }, | |
| 6676 | + | |
| 6677 | + click_contact:function () { | |
| 6678 | + getApp().globalData.no_clear=1; | |
| 6679 | + }, | |
| 6680 | + | |
| 6681 | + //打开客服操作菜单 | |
| 6682 | + openCS() { | |
| 6683 | + // 判断会员状态 | |
| 6684 | + let user_info = getApp().globalData.userInfo; | |
| 6685 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) { | |
| 6686 | + wx.navigateTo({ | |
| 6687 | + url: '/pages/togoin/togoin', | |
| 6688 | + }) | |
| 6689 | + return false; | |
| 6690 | + }; | |
| 6691 | + // csType/在线客服设置: | |
| 6692 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | |
| 6693 | + // 1小程序客服、 | |
| 6694 | + // 2企业微信客服 | |
| 6695 | + if(this.data.sys_switch) { | |
| 6696 | + let csType = this.data.sys_switch.weapp_customertype; | |
| 6697 | + if(csType == 0) { | |
| 6698 | + // 拨打电话号码 | |
| 6699 | + this.contactService(); | |
| 6700 | + } else { | |
| 6701 | + this.getTel() | |
| 6702 | + .then(() => { | |
| 6703 | + self.setData({ | |
| 6704 | + hiddenCS: false, | |
| 6705 | + }); | |
| 6706 | + }); | |
| 6707 | + }; | |
| 6708 | + }; | |
| 6709 | + | |
| 6710 | + }, | |
| 6711 | + | |
| 6712 | + //关闭客服操作菜单 | |
| 6713 | + closeCS() { | |
| 6714 | + this.setData({ | |
| 6715 | + hiddenCS: true, | |
| 6716 | + }); | |
| 6717 | + }, | |
| 6718 | + | |
| 6719 | + | |
| 6720 | + | |
| 6721 | + | |
| 6722 | + | |
| 6723 | + | |
| 6724 | + | |
| 6725 | + | |
| 6726 | +}) | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.json
0 → 100644
| 1 | +{ | |
| 2 | + "navigationBarTitleText": "商品详情", | |
| 3 | + "enablePullDownRefresh": false, | |
| 4 | + "usingComponents": { | |
| 5 | + "nav_box": "/components/nav_box/nav_box", | |
| 6 | + "warn": "/components/long_warn/long_warn", | |
| 7 | + "goods_recommend": "/components/goods_list/goods_list", | |
| 8 | + "share": "/components/share/share" | |
| 9 | + } | |
| 10 | +} | |
| 0 | 11 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
0 → 100644
| 1 | +<import src="../../../../utils/wxParse/wxParse.wxml"></import> | |
| 2 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
| 3 | +<wxs module="g_filters" src="g_filter.wxs"></wxs> | |
| 4 | +<wxs module="tool" src="filter.wxs"></wxs> | |
| 5 | + | |
| 6 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | |
| 7 | +<block wx:if="{{isshow}}"> | |
| 8 | + <view class="container"> | |
| 9 | + <!-- 拼单规则规则 --> | |
| 10 | + <view wx:if="{{prom_type== 6}}" class="rules" bindtap="showRules">规则</view> | |
| 11 | + <view class="type-navbar"> | |
| 12 | + <view class="type-box" wx:for="{{categories}}" wx:key="id"> | |
| 13 | + <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> | |
| 14 | + </view> | |
| 15 | + </view> | |
| 16 | + <view class="goods-detail"> | |
| 17 | + <view class="goods-info" style="position: relative;" hidden="{{activeCategoryId==0?false:true}}"> | |
| 18 | + | |
| 19 | + <!-- 左上角轮播 历史购买记录 --> | |
| 20 | + <view class="swiper-container" wx:if="{{historyBuyInfo.length}}"> | |
| 21 | + <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000"> | |
| 22 | + <swiper-item class="swiper-item" wx:for="{{historyBuyInfo}}" wx:key="order_id"> | |
| 23 | + <view class="item"> | |
| 24 | + <view class="avatar-container"> | |
| 25 | + <image src="{{item.head_pic}}"></image> | |
| 26 | + </view> | |
| 27 | + <view class="flex ai_c pd10"> | |
| 28 | + <view class="nickname ellipsis-1x">{{item.nickname}}下单成功</view> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + </swiper-item> | |
| 32 | + </swiper> | |
| 33 | + </view> | |
| 34 | + | |
| 35 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove"> | |
| 36 | + <view class="xc-videos-picture rel"> | |
| 37 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | |
| 38 | + <swiper-item wx:if="{{mapurl}}"> | |
| 39 | + <view wx:if="{{noon == 0}}"> | |
| 40 | + <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit"> | |
| 41 | + <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image> | |
| 42 | + </image> | |
| 43 | + </view> | |
| 44 | + <view wx:else> | |
| 45 | + <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> | |
| 46 | + </view> | |
| 47 | + </swiper-item> | |
| 48 | + <swiper-item wx:for="{{gallery}}" wx:key="gallery"> | |
| 49 | + <view class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view> | |
| 50 | + </swiper-item> | |
| 51 | + </swiper> | |
| 52 | + <block wx:if="{{mapurl}}"> | |
| 53 | + <view wx:if="{{hiddenn==1}}"> | |
| 54 | + <view class="xc-imageCount">{{current}}/{{gallery.length}}</view> | |
| 55 | + </view> | |
| 56 | + <view class="xc-video-picture abs"> | |
| 57 | + <view class="xc-video" data-vipi="0" bindtap="videopicture"> | |
| 58 | + <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | |
| 59 | + 视频 | |
| 60 | + </view> | |
| 61 | + </view> | |
| 62 | + <view class="xc-picture {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture"> | |
| 63 | + <view>图片</view> | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + </block> | |
| 67 | + </view> | |
| 68 | + </view> | |
| 69 | + | |
| 70 | + <!-- --显示秒杀价 --> | |
| 71 | + <view class="prom_show rel" wx:if="{{prom_type==1}}"> | |
| 72 | + <image class="secondkill-img" src='{{prom_st==1? iurl+"/miniapp/images/red_jx.png":iurl+"/miniapp/images/blue_ks.png"}}'></image> | |
| 73 | + <image class="abs spike-img" src="{{iurl}}/miniapp/images/xsmiaosha.png"></image> | |
| 74 | + <view class="stop fs26 abs" wx:if="{{prom_st==1}}">距活动结束还有</view> | |
| 75 | + <view class="start fs26 abs" wx:if="{{prom_st==2}}">距活动开始还有</view> | |
| 76 | + <view class="secview flex abs fs24 xc-miaosha-time"> | |
| 77 | + <block wx:if="djs.day"> | |
| 78 | + <view class='day-val' style="color:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 79 | + {{djs.day}} | |
| 80 | + </view> | |
| 81 | + <view class="day white" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">天</view> | |
| 82 | + </block> | |
| 83 | + <view class='time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 84 | + {{djs.hou}} | |
| 85 | + </view> | |
| 86 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">时</view> | |
| 87 | + <view class='time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 88 | + {{djs.min}} | |
| 89 | + </view> | |
| 90 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">分</view> | |
| 91 | + <view class='time-val white t-c' style=";background:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 92 | + {{djs.sec}} | |
| 93 | + </view> | |
| 94 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> | |
| 95 | + </view> | |
| 96 | + </view> | |
| 97 | + <!-- --显示团购价 --> | |
| 98 | + <view class="prom_show rel" wx:if="{{prom_type==2}}"> | |
| 99 | + | |
| 100 | + <view class="abs flex" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} | |
| 101 | + <view class="word-line fs24" style="position: relative;top: -6rpx">零售价¥{{filters.toFix(data.market_price,2)}}</view></view> | |
| 102 | + | |
| 103 | + <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> | |
| 104 | + | |
| 105 | + <image class="secondkill-img" src='{{iurl+"/miniapp/images/group_img.png"}}'></image> | |
| 106 | + <view class="stop fs26 abs" style="color: #fff;" style="color: #fff;top: 22rpx" > | |
| 107 | + | |
| 108 | + <block wx:if="{{prom_st==0 && !prom_r_null}}">开始时间</block> | |
| 109 | + <block wx:else>结束时间</block> | |
| 110 | + | |
| 111 | + </view> | |
| 112 | + <view class="secview flex abs fs24 xc-miaosha-time" style="color: #fff;top: 68rpx"> | |
| 113 | + <block wx:if="djs.day">{{djs.day}}天</block>{{djs.hou}}小时{{djs.min}}分{{djs.sec}}秒 | |
| 114 | + </view> | |
| 115 | + </view> | |
| 116 | + | |
| 117 | + <!-- --拼单-- --> | |
| 118 | + <view class="pt_show " wx:if="{{prom_type==6}}"> | |
| 119 | + <view class="pt_view rel"> | |
| 120 | + <!-- 许程 7. 24 --> | |
| 121 | + <image class="secondkill-img" src="{{prom_st==1? iurl+'/miniapp/images/red_jx.png':iurl+'/miniapp/images/blue_ks.png'}}"></image> | |
| 122 | + <view class="abs xc-qt-price"> | |
| 123 | + <view class="flex" style='height:40rpx; margin-top:5rpx'> | |
| 124 | + <view class="flex fs35 xc-qtsign">¥</view> | |
| 125 | + <view class="fs50 val">{{prom_price}}</view> | |
| 126 | + </view> | |
| 127 | + <view class="word-line fs20 xc-qtunit-price"> | |
| 128 | + 零售价¥{{filters.toFix(data.market_price,2)}} | |
| 129 | + </view> | |
| 130 | + </view> | |
| 131 | + | |
| 132 | + <view class="abs white xc-nanber"> | |
| 133 | + <text class="fs22">已拼{{prom_act.buy_num}}件</text> | |
| 134 | + <view class="flex" style='margin-top:-34rpx'> | |
| 135 | + <view class="xc-people-img"> | |
| 136 | + <image class="imgs" src="{{prom_st==1? iurl+'/miniapp/images/r_logo_red.png':iurl+'/miniapp/images/r_logo.png'}}"></image> | |
| 137 | + </view> | |
| 138 | + <view class="t-s fs20 xc-people-val">{{prom_act.ct_num}}人拼</view> | |
| 139 | + </view> | |
| 140 | + </view> | |
| 141 | + | |
| 142 | + <!-- 幸运购 --> | |
| 143 | + <view class="abs white xc-nanber" wx:if="{{false}}"> | |
| 144 | + <text class="fs22">已成团{{prom_act.buy_num}}期</text> | |
| 145 | + <view class="flex" style='margin-top:-34rpx'> | |
| 146 | + <view class="xc-people-img"> | |
| 147 | + <image class="imgs" src="{{prom_st==1? iurl+'/miniapp/images/r_logo_red.png':iurl+'/miniapp/images/r_logo.png'}}"></image> | |
| 148 | + </view> | |
| 149 | + <view class="t-s fs20 xc-people-val">{{prom_act.ct_num}}人团</view> | |
| 150 | + </view> | |
| 151 | + </view> | |
| 152 | + | |
| 153 | + <view class="hy-stop word-color fs26 abs" wx:if="{{prom_st==1}}">距活动结束还有</view> | |
| 154 | + <view class="hy-stop word-color-lan fs26 abs" wx:if="{{prom_st==0}}">距活动开始还有</view> | |
| 155 | + <view class="secview flex abs fs24 " style="color: black;right: 3px; top:46rpx;"> | |
| 156 | + <block wx:if="djs.day"> | |
| 157 | + <view class='day-val' style="color:{{prom_st==1?'#d40022':'#0097e0'}};margin-top:-34rpx;"> | |
| 158 | + {{djs.day}} | |
| 159 | + </view> | |
| 160 | + <view class="day white" style="margin-top:-34rpx;margin-right:10rpx;color: {{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 161 | + 天 | |
| 162 | + </view> | |
| 163 | + </block> | |
| 164 | + <view class='xc-time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 165 | + {{djs.hou}} | |
| 166 | + </view> | |
| 167 | + <view class="xc-time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">时</view> | |
| 168 | + <view class='xc-time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 169 | + {{djs.min}} | |
| 170 | + </view> | |
| 171 | + <view class="xc-time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">分</view> | |
| 172 | + <view class='xc-time-val white t-c' style=";background:{{prom_st==1?'#d40022':'#0097e0'}}"> | |
| 173 | + {{djs.sec}} | |
| 174 | + </view> | |
| 175 | + <view class="xc-time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> | |
| 176 | + </view> | |
| 177 | + </view> | |
| 178 | + <view class="pt_fir pd20"> | |
| 179 | + <!-- --显示团类型和团价格-- --> | |
| 180 | + <view class="pt_fir_title "> | |
| 181 | + <!-- 许程 商家团主页 --> | |
| 182 | + <view class="xc-goods-explain flex-vertical-between"> | |
| 183 | + <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> | |
| 184 | + {{data.goods_name}} | |
| 185 | + </view> | |
| 186 | + <!-- 这个是分享按钮 --> | |
| 187 | + <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 188 | + <view class="iconfont icon-share"></view> | |
| 189 | + <view class="fs22 c-7b">分享</view> | |
| 190 | + </view> | |
| 191 | + </view> | |
| 192 | + </view> | |
| 193 | + <!-- --显示价格,阶梯团-- --> | |
| 194 | + <block wx:if="{{prom_act.kttype==3}}"> | |
| 195 | + <view class="jie_price flex"> | |
| 196 | + <view style='margin-right:26rpx' wx:for="{{prom_act.ct_rylist}}"> | |
| 197 | + <view class="fs35 word-color"> | |
| 198 | + <text class="fs24">¥</text> | |
| 199 | + {{item.price}} | |
| 200 | + </view> | |
| 201 | + <view class="fs24 t-c xc-person-number ">满{{item.rynum}}人</view> | |
| 202 | + </view> | |
| 203 | + </view> | |
| 204 | + </block> | |
| 205 | + </view> | |
| 206 | + <view class="t_gz" wx:if="{{is_show_gz==1}}">{{prom_act.remark}}</view> | |
| 207 | + <!-- --------正有多少人在开团-------- --> | |
| 208 | + <view class="pt_fir se2 bdt16" wx:if="{{teamgroup}}"> | |
| 209 | + <view class="xc-partner-frame"> | |
| 210 | + <view class="zzk-1 flex jc_sb" bindtap="go_t_more"> | |
| 211 | + <view class="pdl10">以下小伙伴正在拼单,可直接参与</view> | |
| 212 | + <view class="ckgd flex ai_c"> | |
| 213 | + 查看详细 | |
| 214 | + <view class="bg_right arrow-one"></view> | |
| 215 | + </view> | |
| 216 | + </view> | |
| 217 | + </view> | |
| 218 | + <view class='group' wx:for="{{teamgroup}}" wx:for-index="t_ind" wx:key="teamgroup"> | |
| 219 | + <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}" data-goodsid="{{data.goods_id}}"> | |
| 220 | + <!-- <view class="flex ai_c"> --> | |
| 221 | + <!-- //选项框头像 --> | |
| 222 | + <view class='gtou'> | |
| 223 | + <image src='{{item.user.head_pic}}'></image> | |
| 224 | + </view> | |
| 225 | + <!-- //等你来拼 --> | |
| 226 | + <view class='gdn ellipsis-1'>{{item.user.nickname}}</view> | |
| 227 | + <!-- </view> --> | |
| 228 | + <!-- //还差几人,剩余时间 --> | |
| 229 | + <view class="rel"> | |
| 230 | + <view class='ghaicha ellipsis-2'> | |
| 231 | + <text class='gred' wx:if="{{prom_act.max_ct_num >0}}"> | |
| 232 | + <text class="flex" wx:if="{{prom_act.max_ct_num - item.open_num>0}}">还差<text class="word-color">{{prom_act.max_ct_num - item.open_num}}</text>人享最低优惠</text> | |
| 233 | + <text wx:else>您已经享最低优惠</text> | |
| 234 | + </text> | |
| 235 | + <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团</text> | |
| 236 | + <view class="t_show">剩余<text wx:if="{{timer[t_ind].day}}">{{timer[t_ind].day}}天:</text><text>{{timer[t_ind].hou}}</text>:<text>{{timer[t_ind].min}}</text>:<text>{{timer[t_ind].sec}}</text> | |
| 237 | + </view> | |
| 238 | + </view> | |
| 239 | + </view> | |
| 240 | + <!-- //参加团 --> | |
| 241 | + <view class='cjt t-c'>去参团</view> | |
| 242 | + <!-- <view class="clear"></view> --> | |
| 243 | + </view> | |
| 244 | + </view> | |
| 245 | + </view> | |
| 246 | + | |
| 247 | + | |
| 248 | + </view> | |
| 249 | + <!-- 积分购 --> | |
| 250 | + <view wx:if="{{prom_type==4}}"> | |
| 251 | + <view class="goods-price"> | |
| 252 | + <!-- 价格显示 --> | |
| 253 | + <view class="co-red flex jc_sb ai-center"> | |
| 254 | + <view class="market-price" style="overflow: hidden; height: 66rpx;display: flex; align-items: flex-end;"> | |
| 255 | + <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> | |
| 256 | + <block wx:if="{{prom_integral}}"> | |
| 257 | + <text style="position: relative;top:10rpx">{{prom_integral}}</text> | |
| 258 | + <text class="rel_txt">积分</text> | |
| 259 | + </block> | |
| 260 | + <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> | |
| 261 | + <text class="rel_txt" wx:if="{{prom_price}}">{{filters.toFix(prom_price,2)}}元</text> | |
| 262 | + <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> | |
| 263 | + <text class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | |
| 264 | + 零售价:¥{{filters.toFix(data.market_price,2)}} | |
| 265 | + </text> | |
| 266 | + </view> | |
| 267 | + <!-- 这个是分享按钮 --> | |
| 268 | + <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> | |
| 269 | + <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 270 | + <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> --> | |
| 271 | + <view class="iconfont icon-share"></view> | |
| 272 | + <!-- <view class="share-font">1分享</view> --> | |
| 273 | + <view class="fs22 c-7b">分享</view> | |
| 274 | + </view> | |
| 275 | + </view> | |
| 276 | + <view class="goods-title"> | |
| 277 | + <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | |
| 278 | + <view class="goods-name elli">{{data.goods_name}}</view> | |
| 279 | + </view> | |
| 280 | + <view class="goods-num"> | |
| 281 | + <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
| 282 | + <view class="stock"> | |
| 283 | + 折扣:{{g_filters.num((prom_price?prom_price:0)*10/data.shop_price)}}折 | |
| 284 | + </view> | |
| 285 | + <view class="stock">{{categories3[0].num}}人评价</view> | |
| 286 | + </view> | |
| 287 | + </view> | |
| 288 | + </view> | |
| 289 | + <!-- 不是拼团,不是积分购 --> | |
| 290 | + <block wx:if="{{prom_type!=6 && prom_type!=4}}"> | |
| 291 | + | |
| 292 | + <view class="goods-price"> | |
| 293 | + | |
| 294 | + <view class="flex jc_sb ai_c"> | |
| 295 | + <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> | |
| 296 | + | |
| 297 | + <view class="market-price flex" style="align-items: baseline;"> | |
| 298 | + <block wx:if="{{card_field && data[card_field]>0}}"> | |
| 299 | + <view class="flex ai-center grade-card-frame"> | |
| 300 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
| 301 | + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | |
| 302 | + </view> | |
| 303 | + <text class="rel yuan">¥</text> | |
| 304 | + {{filters.toFix(data[card_field],2)}} | |
| 305 | + <view class='yj' style="top:35rpx"> | |
| 306 | + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text> | |
| 307 | + </view> | |
| 308 | + </block> | |
| 309 | + <block wx:elif="{{prom_type!=2}}"> | |
| 310 | + | |
| 311 | + | |
| 312 | + <text class="yuan">¥</text> | |
| 313 | + {{filters.toFix(data.shop_price,2)}} | |
| 314 | + <view class='yj'> | |
| 315 | + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text> | |
| 316 | + </view> | |
| 317 | + </block> | |
| 318 | + </view> | |
| 319 | + </view> | |
| 320 | + <!-- 这个是分享按钮 --> | |
| 321 | + <view class="xc-share-frame t-c shrink0" bindtap="clickShare" wx:if="{{prom_type != 1 && prom_type != 2}}"> | |
| 322 | + <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> --> | |
| 323 | + <view class="iconfont icon-share"></view> | |
| 324 | + <view class="fs22 c-7b">分享</view> | |
| 325 | + </view> | |
| 326 | + </view> | |
| 327 | + <!-- 不是秒杀 --> | |
| 328 | + <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> | |
| 329 | + <view class="flex ai_and" wx:if="{{!card_field && is_no_plus && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | |
| 330 | + <view class="flex ai-center grade-card-frame card-frame"> | |
| 331 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
| 332 | + <view class="fs24 white view card-name ellipsis-1"> | |
| 333 | + {{g_filters.get_card_price(data,card_list,1)}} | |
| 334 | + </view> | |
| 335 | + </view> | |
| 336 | + <view class="fs32 xc-black3 ai_and carde_frame"> | |
| 337 | + <text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}} | |
| 338 | + </view> | |
| 339 | + </view> | |
| 340 | + <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> | |
| 341 | + <block wx:if="{{g_filters.is_has_rank(rank_switch,data) && is_no_plus}}"> | |
| 342 | + <!-- 不是秒杀,且会员不是等级会员 --> | |
| 343 | + <view wx:if="{{!card_field && prom_type!=1 && prom_type!=2 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | |
| 344 | + <view class="beauty-makeup-frame flex ai-center"> | |
| 345 | + <view class="left flex ai-center jc_sa"> | |
| 346 | + <view class="flex ai-center grade-card-frame card-frame advert-card"> | |
| 347 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
| 348 | + <view class="fs24 white view card-name ellipsis-1"> | |
| 349 | + {{g_filters.get_card_price(data,card_list,1)}} | |
| 350 | + </view> | |
| 351 | + </view> | |
| 352 | + <view class="card-effect"> | |
| 353 | + <view class="fs24 xc-black3"> | |
| 354 | + 成为{{g_filters.get_card_price(data,card_list,1)}}立 | |
| 355 | + <text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元 | |
| 356 | + </view> | |
| 357 | + <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> | |
| 358 | + </view> | |
| 359 | + </view> | |
| 360 | + <view class="right flex jc-center ai-center" bindtap="go_plus"> | |
| 361 | + <view class="at_once_carde xc-black3 fs28">立即开卡</view> | |
| 362 | + <view class="bg_right"></view> | |
| 363 | + </view> | |
| 364 | + </view> | |
| 365 | + </view> | |
| 366 | + <!-- 立即续费的显示 --> | |
| 367 | + <view wx:elif="{{is_near_date && data[card_field]>0 && prom_type!=1 && prom_type!=2 && card_name!=''}}"> | |
| 368 | + <view class="beauty-makeup-frame flex ai-center"> | |
| 369 | + <view class="left flex ai-center jc_sa"> | |
| 370 | + <view class="flex ai-center grade-card-frame card-frame advert-card"> | |
| 371 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
| 372 | + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | |
| 373 | + </view> | |
| 374 | + <view class="card-effect"> | |
| 375 | + <view class="fs24 xc-black3"> | |
| 376 | + 成为{{card_name}}立 | |
| 377 | + <text class="co-red"> | |
| 378 | + 省{{filters.toFix(data.shop_price[card_field],2)}} | |
| 379 | + </text> | |
| 380 | + 元 | |
| 381 | + </view> | |
| 382 | + <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> | |
| 383 | + </view> | |
| 384 | + </view> | |
| 385 | + <view class="right flex jc-center ai-center" bindtap="go_card_info"> | |
| 386 | + <view class="at_once_carde xc-black3 fs28">立即续费</view> | |
| 387 | + <view class="bg_right"></view> | |
| 388 | + </view> | |
| 389 | + </view> | |
| 390 | + </view> | |
| 391 | + </block> | |
| 392 | + | |
| 393 | + <!-- 许程商品名字 --> | |
| 394 | + <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> | |
| 395 | + <view class="goods-title"> | |
| 396 | + <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | |
| 397 | + <view class="goods-name elli">{{data.goods_name}}</view> | |
| 398 | + </view> | |
| 399 | + </view> | |
| 400 | + <view class="goods-num" wx:if="{{prom_type!=1 && prom_type!=2}}"> | |
| 401 | + <view class="sales">销量:{{data.sales_sum}}件</view> | |
| 402 | + <view class="stock">折扣:{{g_filters.num(data.disc)}}折</view> | |
| 403 | + <view class="stock">{{categories3[0].num}}人评价</view> | |
| 404 | + </view> | |
| 405 | + | |
| 406 | + <view wx:if="{{prom_type==1}}"> | |
| 407 | + <view class="flex jc_sb ai_c"> | |
| 408 | + <view class="flex" style="align-items: baseline;"> | |
| 409 | + <view class="flex xc-price-frame"> | |
| 410 | + <text class="fs30">¥</text> | |
| 411 | + {{prom_price}} | |
| 412 | + </view> | |
| 413 | + <view class="word-line fs24">零售价¥{{filters.toFix(data.market_price,2)}}</view> | |
| 414 | + </view> | |
| 415 | + <!-- 这个是分享按钮 --> | |
| 416 | + <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> | |
| 417 | + <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 418 | + <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> --> | |
| 419 | + <view class="iconfont icon-share"></view> | |
| 420 | + <!-- <view class="share-font">1分享</view> --> | |
| 421 | + <view class="fs22 c-7b">分享</view> | |
| 422 | + </view> | |
| 423 | + <!-- <view class="xc-val-price"> | |
| 424 | + <view class="fs30" style='padding-left:13rpx;' wx:if="{{prom_st==1}}" >已抢:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
| 425 | + <view class="fs30" style='padding-left:13rpx;' wx:else >已抢:0件</view> | |
| 426 | + <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view> | |
| 427 | + </view> --> | |
| 428 | + </view> | |
| 429 | + </view> | |
| 430 | + | |
| 431 | + <!-- 秒杀的活动名称 --> | |
| 432 | + <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 && prom_type!=4 && prom_type!=2}}"> | |
| 433 | + {{sele_g.goods_name}} | |
| 434 | + </view> | |
| 435 | + | |
| 436 | + <view class="xc-explain flex jc_sb" wx:if="{{prom_type==2}}"> | |
| 437 | + <view class="fs32 ellipsis-2" style="max-width:80%; max-height: 90rpx;">{{sele_g.goods_name}}</view> | |
| 438 | + <!-- 这个是分享按钮 --> | |
| 439 | + <view class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> | |
| 440 | + <view class="iconfont icon-share"></view> | |
| 441 | + <view class="fs22 c-7b">分享</view> | |
| 442 | + </view> | |
| 443 | + </view> | |
| 444 | + | |
| 445 | + <!-- 许程 7.24 暂时注释 --> | |
| 446 | + <view wx:if="{{prom_type==1}}"> | |
| 447 | + <view class="goods-num"> | |
| 448 | + <block wx:if="prom_st>0"> | |
| 449 | + <view class="stock">总数量:{{prom_act.goods_num+prom_act.virtual}}件</view> | |
| 450 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
| 451 | + <view class="stock" wx:else>限购:不限</view> | |
| 452 | + | |
| 453 | + <block wx:if="{{prom_st==0}}"> | |
| 454 | + <view class="sales">已购:0件</view> | |
| 455 | + </block> | |
| 456 | + <block wx:else> | |
| 457 | + <view class="sales">已购:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
| 458 | + </block> | |
| 459 | + </block> | |
| 460 | + <block wx:else> | |
| 461 | + <view class="stock">总数量:{{prom_act.goods_num}}件</view> | |
| 462 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
| 463 | + <view class="stock" wx:else>限购:不限</view> | |
| 464 | + <view class="sales">已购:{{prom_act.buy_num}}件</view> | |
| 465 | + </block> | |
| 466 | + </view> | |
| 467 | + </view> | |
| 468 | + <view wx:if="{{prom_type==2}}"> | |
| 469 | + | |
| 470 | + <view class="goods-num"> | |
| 471 | + <block wx:if="prom_st>0"> | |
| 472 | + <view class="stock">总数量:{{prom_act.goods_num+prom_act.virtualNum}}件</view> | |
| 473 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
| 474 | + <view class="stock" wx:else>限购:不限</view> | |
| 475 | + | |
| 476 | + <block wx:if="{{prom_st==0}}"> | |
| 477 | + <view class="sales">已购:0件</view> | |
| 478 | + </block> | |
| 479 | + <block wx:else> | |
| 480 | + <view class="sales">已购:{{prom_act.buy_num+prom_act.virtualNum}}件</view> | |
| 481 | + </block> | |
| 482 | + </block> | |
| 483 | + <block wx:else> | |
| 484 | + <view class="stock">总数量:{{prom_act.goods_num}}件</view> | |
| 485 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
| 486 | + <view class="stock" wx:else>限购:不限</view> | |
| 487 | + <view class="sales">已购:{{prom_act.buy_num}}件</view> | |
| 488 | + </block> | |
| 489 | + </view> | |
| 490 | + </view> | |
| 491 | + </view> | |
| 492 | + </block> | |
| 493 | + | |
| 494 | + | |
| 495 | + <!-- 要判断是不是有促销活动 --> | |
| 496 | + <block wx:if="{{prom_goods}}"> | |
| 497 | + <view class="cx-frame flex" style="position: relative; height: auto" hidden="{{prom_type==4 || prom_type==6}}"> | |
| 498 | + <!-- <view class="cx-sizs fs30">促销</view> --> | |
| 499 | + <!-- 中间显示层 --> | |
| 500 | + <block> | |
| 501 | + <view class="cx-sizs fs30 pdr20">促销</view> | |
| 502 | + <view class="f1"> | |
| 503 | + <view class="fs28 f1" wx:for="{{prom_goods}}"> | |
| 504 | + <view> | |
| 505 | + <text class="prom_condition"> | |
| 506 | + <text class="fill-box">消费满{{item.condition}}{{item.prom_type==1 ? '件':'元'}}</text>享优惠 | |
| 507 | + <!-- <text wx:if="{{item.prom_type==1}}">件,</text> | |
| 508 | + <text wx:else>元,</text> --> | |
| 509 | + </text> | |
| 510 | + <!-- <text>可享以下优惠:</text> --> | |
| 511 | + </view> | |
| 512 | + | |
| 513 | + <!-- <view class="word {{is_more_cx?'':'ellipsis-1'}}"> --> | |
| 514 | + <view class="word f1 fs26"> | |
| 515 | + <text class="tick lh2 pdr20" wx:if="{{item.money>0}}">减价{{item.money}}元</text> | |
| 516 | + <text class="tick lh2 pdr20" wx:if="{{item.sale>0}}">打{{item.sale}}折</text> | |
| 517 | + <text class="tick lh2 pdr20" wx:if="{{item.past==1}}">包邮</text> | |
| 518 | + <text class="tick lh2 pdr20" wx:if="{{item.intValue>0}}">送{{item.intValue}}积分</text> | |
| 519 | + <view class="tick lh2 pdr20" wx:if="{{item.couponId>0}}">送{{item.couponMoney}}元优惠券</view> | |
| 520 | + <view class="tick ellipsis-1x lh2" wx:if="{{item.gift_id>0}}">送商品{{item.goods_name}}</view> | |
| 521 | + <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.lb_id>0}}" data-id="{{item.lb_id}}" bindtap="viewLbDetails">送{{item.lbtitle}}</view> | |
| 522 | + <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.zxlb_id>0}}" data-id="{{item.zxlb_id}}" data-flag="1" bindtap="viewLbDetails">送{{item.zxlbtitle}}</view> | |
| 523 | + </view> | |
| 524 | + </view> | |
| 525 | + </view> | |
| 526 | + | |
| 527 | + </block> | |
| 528 | + <!-- <view data-coupon="1" bindtap="show_more_cx" class="cx-obtain-coupon wsize"> | |
| 529 | + <text class="bg_jj {{is_more_cx?'down1':''}}"></text> | |
| 530 | + </view> --> | |
| 531 | + </view> | |
| 532 | + </block> | |
| 533 | + | |
| 534 | + <block wx:if="{{jieti_prom}}"> | |
| 535 | + <view class="cx-frame flex jc_sb" bindtap="go_more_ladder" data-id="{{ladder_act_id}}" | |
| 536 | + style="position: relative; height: auto"> | |
| 537 | + <view class="flex" style="width: 92%"> | |
| 538 | + <view class="cx-sizs fs30" style="width: 90rpx;flex-shrink: 0">阶梯促</view> | |
| 539 | + <!-- 中间显示层 --> | |
| 540 | + <view class="ellipsis-1 fs24"> | |
| 541 | + <text class="jie_show fs22">阶</text> | |
| 542 | + {{jieti_prom}} | |
| 543 | + </view> | |
| 544 | + </view> | |
| 545 | + <view data-coupon="1" bindtap="show_more_cx" class="cx-obtain-coupon wsize"> | |
| 546 | + <text class="bg_jj" style="position: relative;right: 3rpx"></text> | |
| 547 | + </view> | |
| 548 | + </view> | |
| 549 | + </block> | |
| 550 | + | |
| 551 | + <!-- 要判断是不是有订单优惠 --> | |
| 552 | + <block wx:if="{{order_prom}}"> | |
| 553 | + <view class="cx-frame flex" style="position: relative; height: auto"> | |
| 554 | + <view class="cx-sizs fs30 pdr20">订单优惠</view> | |
| 555 | + <!-- 中间显示层 --> | |
| 556 | + <view class="flex ai-center"> | |
| 557 | + <image class="hui_img" src="{{iurl}}/miniapp//images/hui.png"></image> | |
| 558 | + <view class="order_hui"> | |
| 559 | + <view class="fs28 ellipsis-1">{{order_prom.name}}</view> | |
| 560 | + <view class="fs26"> | |
| 561 | + (活动时间:{{tool.format_tt(order_prom.start_time)}} - {{tool.format_tt(order_prom.end_time)}}) | |
| 562 | + </view> | |
| 563 | + </view> | |
| 564 | + </view> | |
| 565 | + </view> | |
| 566 | + </block> | |
| 567 | + <!-- 要判断是不是有组合优惠 --> | |
| 568 | + <block wx:if="{{zh_act}}"> | |
| 569 | + <view class="cx-frame flex" style="position: relative; height: auto"> | |
| 570 | + <view class="cx-sizs wsize" style="width: 144rpx">组合购</view> | |
| 571 | + <!-- 中间显示层 --> | |
| 572 | + <view class="flex ai-center jc_sb" style="width: 570rpx" bindtap="go_zh" data-id="{{zh_act.id}}"> | |
| 573 | + <view class="flex"> | |
| 574 | + <image class="hui_img" src="{{iurl}}/miniapp//images/hui.png"></image> | |
| 575 | + <view class="order_hui"> | |
| 576 | + <view class="fs28 ellipsis-1">{{zh_act.name}}</view> | |
| 577 | + <view class="fs26"> | |
| 578 | + (活动时间:{{tool.format_tt(zh_act.start_time)}} - {{tool.format_tt(zh_act.end_time)}}) | |
| 579 | + </view> | |
| 580 | + </view> | |
| 581 | + </view> | |
| 582 | + <view> | |
| 583 | + <text class="bg_jj is_more_cx" style="position: relative;top:-10rpx"></text> | |
| 584 | + </view> | |
| 585 | + </view> | |
| 586 | + </view> | |
| 587 | + </block> | |
| 588 | + <!-- 判断是不是有秒杀 --> | |
| 589 | + <block wx:if="{{more_flash}}"> | |
| 590 | + | |
| 591 | + <block wx:for="{{more_flash}}"> | |
| 592 | + <view class="cx-frame flex" style="position: relative; height: auto" wx:if="{{item.prom_type==1}}"> | |
| 593 | + <view class="cx-sizs wsize" style="width: 144rpx">秒杀</view> | |
| 594 | + <!-- 中间显示层 --> | |
| 595 | + <view class="flex ai-center jc_sb" style="width: 570rpx" bindtap="go_more_flash" | |
| 596 | + data-id="{{item.act_id}}"> | |
| 597 | + <view class="flex"> | |
| 598 | + <view class="miao_lab">秒</view> | |
| 599 | + <view class="order_hui"> | |
| 600 | + <view class="fs28 ellipsis-1">{{item.act_name}}</view> | |
| 601 | + <view class="fs26"> | |
| 602 | + (活动时间:{{tool.format_tt(item.s_time)}} - {{tool.format_tt(item.e_time)}}) | |
| 603 | + </view> | |
| 604 | + </view> | |
| 605 | + </view> | |
| 606 | + <view> | |
| 607 | + <text class="bg_jj is_more_cx" style="position: relative;top:-10rpx"></text> | |
| 608 | + </view> | |
| 609 | + </view> | |
| 610 | + </view> | |
| 611 | + </block> | |
| 612 | + </block> | |
| 613 | + <!-- 许程 7.24暂时注释 --> | |
| 614 | + <view class="bdt16" wx:if="{{prom_type!=1&& prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> | |
| 615 | + <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | |
| 616 | + <view class="cx-sizs fs30">领券</view> | |
| 617 | + <view class="flex ai_c f1 pdh20"> | |
| 618 | + <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="id"> | |
| 619 | + <view class="circle xc-circular xc-one"></view> | |
| 620 | + <view class="xc-coupon t-c four-level-word"> | |
| 621 | + 满{{item.condition}}减{{item.money}} | |
| 622 | + </view> | |
| 623 | + <view class="circle xc-circular xc-two"></view> | |
| 624 | + </view> | |
| 625 | + </view> | |
| 626 | + <view data-coupon="1" bindtap="switchCoupon" class="cx-obtain-coupon wsize"> | |
| 627 | + <text class="bg_jj"></text> | |
| 628 | + </view> | |
| 629 | + </view> | |
| 630 | + </view> | |
| 631 | + <!-- 门店收货地址 --> | |
| 632 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | |
| 633 | + <view class="address_frame" bindtap="choice_store" data-ind="0"> | |
| 634 | + <view class="flex-vertical-between "> | |
| 635 | + <view class="flex-vertical select_store_height"> | |
| 636 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 637 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 638 | + </view> | |
| 639 | + <view class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | |
| 640 | + </view> | |
| 641 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 642 | + <view class="flex-space-between address ai_end pdv10"> | |
| 643 | + <view> | |
| 644 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | |
| 645 | + </view> | |
| 646 | + <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | |
| 647 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 648 | + </view> | |
| 649 | + </view> | |
| 650 | + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 651 | + <block wx:else> | |
| 652 | + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 653 | + (库存不足) | |
| 654 | + </view> | |
| 655 | + <block wx:else> | |
| 656 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 657 | + (配送不匹配) | |
| 658 | + </view> | |
| 659 | + <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}"> | |
| 660 | + (库存不足) | |
| 661 | + </view> | |
| 662 | + </block> | |
| 663 | + </block> | |
| 664 | + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | |
| 665 | + </view> | |
| 666 | + </view> | |
| 667 | + </view> | |
| 668 | + <!-- 保障服务 --> | |
| 669 | + <view class="bz_view flex bdt16 ai_c" wx:if="{{bconfig.service_bz}}"> | |
| 670 | + <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image> | |
| 671 | + <view class="flex f1 ai_c rel" style="position: relative;" bindtap="{{showFold ? 'clickCollapse':''}}"> | |
| 672 | + <view class="bz-content showArea {{flag ? '':'ellipsis-1x'}}">{{bconfig.service_bz}}</view> | |
| 673 | + <view class="bz-content hideArea">{{bconfig.service_bz}}</view> | |
| 674 | + <view class="cx-obtain-coupon wsize arrow" wx:if="{{showFold}}"> | |
| 675 | + <text class="bg_jj down {{flag ? 'up':''}}"></text> | |
| 676 | + </view> | |
| 677 | + </view> | |
| 678 | + </view> | |
| 679 | + <!-- - 搭配促销 -- --> | |
| 680 | + <view class="dp_cx_view" wx:if="{{collocationGoods}}"> | |
| 681 | + <view class="bb_view"> | |
| 682 | + <view>优惠热配</view> | |
| 683 | + <view class="red_bb" bindtap="go_prom_list"> | |
| 684 | + 查看全部 | |
| 685 | + <text class="bg_jj"></text> | |
| 686 | + </view> | |
| 687 | + </view> | |
| 688 | + <!-- 搭配的显示 --> | |
| 689 | + <view class="flex" bindtap="go_prom_list"> | |
| 690 | + <image class="dp_img" src="{{iurl+collocationGoods.img_url}}"></image> | |
| 691 | + <view class="act_content"> | |
| 692 | + <view class="fs32">{{collocationGoods.title}}</view> | |
| 693 | + <view class="fs30 color_b" wx:if="{{collocationGoods.max!=collocationGoods.min}}"> | |
| 694 | + 搭配价¥{{collocationGoods.min}}-{{collocationGoods.max}} | |
| 695 | + </view> | |
| 696 | + <view class="fs30 color_b" wx:else>搭配价¥{{collocationGoods.min}}</view> | |
| 697 | + <view class="fs30 color-gray"> | |
| 698 | + 活动至{{filters.format_time(collocationGoods.end_time,1)}} | |
| 699 | + </view> | |
| 700 | + </view> | |
| 701 | + </view> | |
| 702 | + </view> | |
| 703 | + <!-- - 宝贝评价 -- --> | |
| 704 | + <view class="bdt16"> | |
| 705 | + <view class="bb_view"> | |
| 706 | + <view class="bold">宝贝评价({{categories3[0].num}})</view> | |
| 707 | + <view class="red_bb fs26" bindtap="look_pj"> | |
| 708 | + 查看全部 | |
| 709 | + <text class="bg_jj"></text> | |
| 710 | + </view> | |
| 711 | + </view> | |
| 712 | + <view class="xc_comment"> | |
| 713 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate"> | |
| 714 | + 有图({{categories3[1].num}}) | |
| 715 | + </view> | |
| 716 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate"> | |
| 717 | + 好评({{categories3[2].num}}) | |
| 718 | + </view> | |
| 719 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate"> | |
| 720 | + 中评({{categories3[3].num}}) | |
| 721 | + </view> | |
| 722 | + <view class="xc_comment-discuss" data-val="4" bindtap="clik_evaluate"> | |
| 723 | + 差评({{categories3[4].num}}) | |
| 724 | + </view> | |
| 725 | + </view> | |
| 726 | + <scroll-view scroll-x="true" class="pj_scroll"> | |
| 727 | + <view class="flex"> | |
| 728 | + <view class="xc_comment-detail" style="" wx:for="{{fir_comments}}" wx:key="fir_comments"> | |
| 729 | + <view class="xc_comment-left"> | |
| 730 | + <view class="xc_comment-user"> | |
| 731 | + <view class="xc_user-img"> | |
| 732 | + <image class="xc_imgs" src='{{item.is_anonymous!=1?item.head_pic:iurl+"/miniapp/images/hui_hear_pic.png"}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> | |
| 733 | + </view> | |
| 734 | + <view class="xc_user"> | |
| 735 | + <view class="xc_user-name five-level-word"> | |
| 736 | + {{item.is_anonymous!=1?item.username:'匿名'}} | |
| 737 | + </view> | |
| 738 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
| 739 | + </view> | |
| 740 | + </view> | |
| 741 | + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12"> | |
| 742 | + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}}</text> | |
| 743 | + </view> | |
| 744 | + <view class="xc_comment-val"> | |
| 745 | + <view class="xc_comment-time">{{item.add_time}}</view> | |
| 746 | + </view> | |
| 747 | + </view> | |
| 748 | + <view class="xc_goods-img-frame"> | |
| 749 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | |
| 750 | + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | |
| 751 | + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | |
| 752 | + </view> | |
| 753 | + </view> | |
| 754 | + </view> | |
| 755 | + </scroll-view> | |
| 756 | + </view> | |
| 757 | + <!-- 图文详情 --> | |
| 758 | + <view class="bdt16"> | |
| 759 | + <view class="t_g_info"> | |
| 760 | + <view class="red_shu"></view> | |
| 761 | + <view class="fs30 bold">商品详情</view> | |
| 762 | + </view> | |
| 763 | + <view class="pd20"> | |
| 764 | + <view class="table_s"> | |
| 765 | + <view class="tb_item tb-l"> | |
| 766 | + <view class="item_left"> | |
| 767 | + <text>商品名称</text> | |
| 768 | + </view> | |
| 769 | + <view class="item_right"> | |
| 770 | + <text>{{data.goods_name}}</text> | |
| 771 | + </view> | |
| 772 | + </view> | |
| 773 | + <view class="tb_item tb-l"> | |
| 774 | + <view class="item_left"> | |
| 775 | + <text>商品编号</text> | |
| 776 | + </view> | |
| 777 | + <view class="item_right"> | |
| 778 | + <text>{{data.goods_sn}}</text> | |
| 779 | + </view> | |
| 780 | + </view> | |
| 781 | + <view class="tb_item tb-l"> | |
| 782 | + <view class="item_left"> | |
| 783 | + <text>商品条码</text> | |
| 784 | + </view> | |
| 785 | + <view class="item_right"> | |
| 786 | + <text>{{data.sku}}</text> | |
| 787 | + </view> | |
| 788 | + </view> | |
| 789 | + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | |
| 790 | + <view class="item_left"> | |
| 791 | + <text>品类</text> | |
| 792 | + </view> | |
| 793 | + <view class="item_right"> | |
| 794 | + <text>{{cat_name}}</text> | |
| 795 | + </view> | |
| 796 | + </view> | |
| 797 | + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}"> | |
| 798 | + <view class="item_left"> | |
| 799 | + <text>品牌</text> | |
| 800 | + </view> | |
| 801 | + <view class="item_right"> | |
| 802 | + <text>{{brand_name}}</text> | |
| 803 | + </view> | |
| 804 | + </view> | |
| 805 | + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}"> | |
| 806 | + <view class="item_left"> | |
| 807 | + <text>国别</text> | |
| 808 | + </view> | |
| 809 | + <view class="item_right"> | |
| 810 | + <text>{{nation_name}}</text> | |
| 811 | + </view> | |
| 812 | + </view> | |
| 813 | + <view class="tb_item tb-l"> | |
| 814 | + <view class="item_left"> | |
| 815 | + <text>规格</text> | |
| 816 | + </view> | |
| 817 | + <view class="item_right"> | |
| 818 | + <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text> | |
| 819 | + </view> | |
| 820 | + </view> | |
| 821 | + <view class="tb_item tb-l"> | |
| 822 | + <view class="item_left"> | |
| 823 | + <text>上架时间</text> | |
| 824 | + </view> | |
| 825 | + <view class="item_right"> | |
| 826 | + <text>{{data.on_time}}</text> | |
| 827 | + </view> | |
| 828 | + </view> | |
| 829 | + </view> | |
| 830 | + </view> | |
| 831 | + <!-- 详情图片 --> | |
| 832 | + <view class="wxParse"> | |
| 833 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | |
| 834 | + </view> | |
| 835 | + </view> | |
| 836 | + <!-- 推荐商品 --> | |
| 837 | + <view class="flex-center rel xc-linellae-frame"> | |
| 838 | + <view class="xc-linellae"></view> | |
| 839 | + <view class="abs flex-center xc-recommend-frame "> | |
| 840 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image> | |
| 841 | + <view class="xc-recommend-word">推荐</view> | |
| 842 | + </view> | |
| 843 | + </view> | |
| 844 | + <goods_recommend id="goods_list"></goods_recommend> | |
| 845 | + </view> | |
| 846 | + <!-- ----------商品详情图片页面-------------- --> | |
| 847 | + <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | |
| 848 | + <view class="table_s"> | |
| 849 | + <view class="tb_item tb-l"> | |
| 850 | + <view class="item_left"> | |
| 851 | + <text>商品名称</text> | |
| 852 | + </view> | |
| 853 | + <view class="item_right"> | |
| 854 | + <text>{{data.goods_name}}</text> | |
| 855 | + </view> | |
| 856 | + </view> | |
| 857 | + <view class="tb_item tb-l"> | |
| 858 | + <view class="item_left"> | |
| 859 | + <text>商品编号</text> | |
| 860 | + </view> | |
| 861 | + <view class="item_right"> | |
| 862 | + <text>{{data.goods_sn}}</text> | |
| 863 | + </view> | |
| 864 | + </view> | |
| 865 | + <view class="tb_item tb-l"> | |
| 866 | + <view class="item_left"> | |
| 867 | + <text>商品条码</text> | |
| 868 | + </view> | |
| 869 | + <view class="item_right"> | |
| 870 | + <text>{{data.sku}}</text> | |
| 871 | + </view> | |
| 872 | + </view> | |
| 873 | + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | |
| 874 | + <view class="item_left"> | |
| 875 | + <text>品类</text> | |
| 876 | + </view> | |
| 877 | + <view class="item_right"> | |
| 878 | + <text>{{cat_name}}</text> | |
| 879 | + </view> | |
| 880 | + </view> | |
| 881 | + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}"> | |
| 882 | + <view class="item_left"> | |
| 883 | + <text>品牌</text> | |
| 884 | + </view> | |
| 885 | + <view class="item_right"> | |
| 886 | + <text>{{brand_name}}</text> | |
| 887 | + </view> | |
| 888 | + </view> | |
| 889 | + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}"> | |
| 890 | + <view class="item_left"> | |
| 891 | + <text>国别</text> | |
| 892 | + </view> | |
| 893 | + <view class="item_right"> | |
| 894 | + <text>{{nation_name}}</text> | |
| 895 | + </view> | |
| 896 | + </view> | |
| 897 | + <view class="tb_item tb-l"> | |
| 898 | + <view class="item_left"> | |
| 899 | + <text>规格</text> | |
| 900 | + </view> | |
| 901 | + <view class="item_right"> | |
| 902 | + <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text> | |
| 903 | + </view> | |
| 904 | + </view> | |
| 905 | + <view class="tb_item tb-l"> | |
| 906 | + <view class="item_left"> | |
| 907 | + <text>上架时间</text> | |
| 908 | + </view> | |
| 909 | + <view class="item_right"> | |
| 910 | + <text>{{data.on_time}}</text> | |
| 911 | + </view> | |
| 912 | + </view> | |
| 913 | + </view> | |
| 914 | + <view class="wxParse"> | |
| 915 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | |
| 916 | + </view> | |
| 917 | + </view> | |
| 918 | + <!-- -------------评价页面------------ --> | |
| 919 | + <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | |
| 920 | + <view class="topframe"> | |
| 921 | + <view class="topframe-top"> | |
| 922 | + <view class="topframe-top-content"> | |
| 923 | + <view>宝贝评价</view> | |
| 924 | + <view class="topframe-top-val">({{categories3[0].num}})</view> | |
| 925 | + </view> | |
| 926 | + <view class="topframe-praise" wx:if="{{categories3[0].num}}"> | |
| 927 | + 好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}% | |
| 928 | + </view> | |
| 929 | + <view wx:else>好评 0%</view> | |
| 930 | + </view> | |
| 931 | + <view class="buttem-list"> | |
| 932 | + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}"> | |
| 933 | + {{item.name}}({{item.num}}) | |
| 934 | + </view> | |
| 935 | + </view> | |
| 936 | + </view> | |
| 937 | + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}"> | |
| 938 | + <view style='border-bottom:4rpx solid #eee;'> | |
| 939 | + <view class="middle"> | |
| 940 | + <view class="middle-img-frame"> | |
| 941 | + <image class="middle-img" src="{{item.is_anonymous!=1?item.head_pic:iurl+'/miniapp/images/hui_hear_pic.png'}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> | |
| 942 | + <view class="middle-user-frame"> | |
| 943 | + <view class="middle-user"> | |
| 944 | + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} | |
| 945 | + </view> | |
| 946 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
| 947 | + </view> | |
| 948 | + </view> | |
| 949 | + <view class="xc-pirces"> | |
| 950 | + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}"> | |
| 951 | + {{item.content?item.content:'此用户没有填写评价。'}} | |
| 952 | + </view> | |
| 953 | + </view> | |
| 954 | + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'> | |
| 955 | + 全部显示 | |
| 956 | + </view> | |
| 957 | + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'> | |
| 958 | + 收起 | |
| 959 | + </view> | |
| 960 | + <view class="img-ul"> | |
| 961 | + <block wx:if="{{item.source_type==0}}"> | |
| 962 | + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | |
| 963 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> | |
| 964 | + </view> | |
| 965 | + </block> | |
| 966 | + <block wx:if="{{item.source_type==1}}"> | |
| 967 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | |
| 968 | + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image> | |
| 969 | + </view> | |
| 970 | + </block> | |
| 971 | + </view> | |
| 972 | + <view class="z_parameter"> | |
| 973 | + <view class="parameter-font">{{item.add_time}}</view> | |
| 974 | + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}"> | |
| 975 | + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image> | |
| 976 | + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image> | |
| 977 | + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}'> | |
| 978 | + {{item.zan_num}} | |
| 979 | + </view> | |
| 980 | + </view> | |
| 981 | + </view> | |
| 982 | + </view> | |
| 983 | + <view class="reply rel" wx:if="{{item.replay_list}}"> | |
| 984 | + <view class="line_bulge"></view> | |
| 985 | + <view class="shop-reply">店家回复:</view> | |
| 986 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}"> | |
| 987 | + {{r_item.content}} | |
| 988 | + </view> | |
| 989 | + </view> | |
| 990 | + </view> | |
| 991 | + </block> | |
| 992 | + <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | |
| 993 | + <text class="no_pj_list">暂无评价</text> | |
| 994 | + </block> | |
| 995 | + <block wx:if="{{comments.length>10 && comments_no_more}}"> | |
| 996 | + <text class="no_pj_list">已经加载到底部</text> | |
| 997 | + </block> | |
| 998 | + </view> | |
| 999 | + </view> | |
| 1000 | + <!-- 技术支持 --> | |
| 1001 | + <view class="logo-container t-c"> | |
| 1002 | + <view class="flex ai_c fs24 jc-center pdv30 white"> | |
| 1003 | + <image src="{{iurl + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image> | |
| 1004 | + 提供技术支持 | |
| 1005 | + </view> | |
| 1006 | + </view> | |
| 1007 | + </view> | |
| 1008 | + <!-- -滚动到顶部-- --> | |
| 1009 | + <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | |
| 1010 | + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | |
| 1011 | + </view> | |
| 1012 | + | |
| 1013 | + <!-- -----------------底部按钮------------------ --> | |
| 1014 | + <view class="join-cart"> | |
| 1015 | + <!-- bindtap="contactService" --> | |
| 1016 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | |
| 1017 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | |
| 1018 | + <view>客服</view> | |
| 1019 | + </button> | |
| 1020 | + | |
| 1021 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin"> | |
| 1022 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | |
| 1023 | + <view>客服</view> | |
| 1024 | + </view> | |
| 1025 | + | |
| 1026 | + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | |
| 1027 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | |
| 1028 | + <view>客服</view> | |
| 1029 | + </view> --> | |
| 1030 | + | |
| 1031 | + <view class="custom-service cart-ico new_split" bindtap="openCS"> | |
| 1032 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | |
| 1033 | + <view>客服</view> | |
| 1034 | + </view> | |
| 1035 | + | |
| 1036 | + <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | |
| 1037 | + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | |
| 1038 | + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | |
| 1039 | + <view>收藏</view> | |
| 1040 | + </view> | |
| 1041 | + <view class="shopping-cart cart-ico new_split"> | |
| 1042 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart"> | |
| 1043 | + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> | |
| 1044 | + <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> | |
| 1045 | + <view>购物车</view> | |
| 1046 | + </navigator> | |
| 1047 | + </view> | |
| 1048 | + <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}"> | |
| 1049 | + 立即购买 | |
| 1050 | + </view> | |
| 1051 | + <!-- 普通商品购买 --> | |
| 1052 | + <block wx:if="{{prom_type==0 || prom_type==3}}"> | |
| 1053 | + <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> | |
| 1054 | + <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}"> | |
| 1055 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | |
| 1056 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> | |
| 1057 | + </block> | |
| 1058 | + <block wx:else> | |
| 1059 | + <view class="is_stock cart-btn is_stock xc-ash-b " style="width:55.5%">库存不足</view> | |
| 1060 | + </block> | |
| 1061 | + </block> | |
| 1062 | + <!-- -----秒杀------ --> | |
| 1063 | + <block wx:if="{{prom_type==1 || prom_type==2}}"> | |
| 1064 | + <block wx:if="{{prom_st==1 && !prom_r_null}}"> | |
| 1065 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | |
| 1066 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> | |
| 1067 | + </block> | |
| 1068 | + | |
| 1069 | + <block wx:if="{{prom_st==0 && !prom_r_null}}"> | |
| 1070 | + <!-- 秒杀预热要单独购买 --> | |
| 1071 | + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | |
| 1072 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> | |
| 1073 | + <view class="buy-btn cart-btn lanse">即将开始</view> | |
| 1074 | + </block> | |
| 1075 | + <block wx:else> | |
| 1076 | + <view class="buy-btn cart-btn cart-btn-lg lanse set_width">即将开始</view> | |
| 1077 | + </block> | |
| 1078 | + </block> | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + <block wx:if="{{prom_r_null}}"> | |
| 1082 | + | |
| 1083 | + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | |
| 1084 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> | |
| 1085 | + <view class="buy-btn cart-btn huise">已抢光</view> | |
| 1086 | + </block> | |
| 1087 | + <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width">已抢光</view> | |
| 1088 | + </block> | |
| 1089 | + <block wx:if="{{prom_st==3 && !prom_r_null}}"> | |
| 1090 | + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | |
| 1091 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> | |
| 1092 | + <view class="buy-btn cart-btn huise">活动已经结束</view> | |
| 1093 | + </block> | |
| 1094 | + | |
| 1095 | + <view wx:else class="buy-btn cart-btn cart-btn-lg lanse set_width">活动已经结束</view> | |
| 1096 | + </block> | |
| 1097 | + </block> | |
| 1098 | + <!-- -----拼单------ --> | |
| 1099 | + <block wx:if="{{prom_type==6}}"> | |
| 1100 | + <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | |
| 1101 | + <view class="fir-v"> | |
| 1102 | + <!-- ¥{{data.shop_price,2)}} --> | |
| 1103 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | |
| 1104 | + {{filters.toFix(sele_g[card_field],2)}} | |
| 1105 | + </block> | |
| 1106 | + <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | |
| 1107 | + </view> | |
| 1108 | + <view>单独购买</view> | |
| 1109 | + </view> | |
| 1110 | + <block wx:if="{{user_order_pt_state==0}}"> | |
| 1111 | + <!-- --商家团-- --> | |
| 1112 | + <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h"> | |
| 1113 | + <view class="fir-v">¥{{prom_act.price}}</view> | |
| 1114 | + <view>去参团</view> | |
| 1115 | + </view> | |
| 1116 | + <!-- --会员团-- --> | |
| 1117 | + <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h"> | |
| 1118 | + <!-- <view class="fir-v">¥{{prom_act.price}}</view> --> | |
| 1119 | + <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> | |
| 1120 | + <view>一键开团</view> | |
| 1121 | + <view wx:if="{{prom_act.tz_yhjgtype==3}}"> | |
| 1122 | + 佣金 | |
| 1123 | + <text style="font-size: 23rpx">¥</text> | |
| 1124 | + {{filters.toFix(prom_act.tz_yyhjg,2)}} | |
| 1125 | + </view> | |
| 1126 | + <view wx:if="{{prom_act.tz_yhjgtype==2}}">团长免单</view> | |
| 1127 | + </view> | |
| 1128 | + <view wx:else> | |
| 1129 | + <view class="fir-v">¥{{ filters.toFix(prom_act.price,2)}}</view> | |
| 1130 | + <view>一键开团</view> | |
| 1131 | + </view> | |
| 1132 | + </view> | |
| 1133 | + <!-- -阶梯团-- --> | |
| 1134 | + <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> | |
| 1135 | + <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> | |
| 1136 | + <view>支付定金</view> | |
| 1137 | + </view> | |
| 1138 | + <view wx:if="{{prom_st==0}}" class="buy-btn cart-btn lanse">即将开始</view> | |
| 1139 | + <view wx:if="{{prom_r_null}}" class="buy-btn cart-btn huise">已抢光</view> | |
| 1140 | + <view wx:if="{{prom_st==3 && !prom_r_null}}" class="buy-btn cart-btn lanse">活动已经结束</view> | |
| 1141 | + </block> | |
| 1142 | + <block wx:else> | |
| 1143 | + <view bindtap="go_to_nopay" wx:if="{{user_order_pt_state==1}}" class="buy-btn cart-btn huise"> | |
| 1144 | + 您还未支付 | |
| 1145 | + </view> | |
| 1146 | + <view bindtap="go_to_team_show" wx:if="{{user_order_pt_state==2}}" class="buy-btn cart-btn"> | |
| 1147 | + 查看支付详情 | |
| 1148 | + </view> | |
| 1149 | + <view wx:if="{{user_order_pt_state==3}}" bindtap="go_pay_wk" class="buy-btn cart-btn"> | |
| 1150 | + 支付尾款 | |
| 1151 | + </view> | |
| 1152 | + </block> | |
| 1153 | + </block> | |
| 1154 | + <!-- -----积分购------ --> | |
| 1155 | + <block wx:if="{{prom_type==4}}"> | |
| 1156 | + <block wx:if="{{is_shopbuy}}"> | |
| 1157 | + <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> | |
| 1158 | + <view class="fir-v"> | |
| 1159 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | |
| 1160 | + {{filters.toFix(sele_g[card_field],2)}} | |
| 1161 | + </block> | |
| 1162 | + <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | |
| 1163 | + </view> | |
| 1164 | + <view>单独购买</view> | |
| 1165 | + </view> | |
| 1166 | + <view bindtap="go_pay_integral" class="buy-btn cart-btn" wx:if="{{can_integral}}"> | |
| 1167 | + 立即兑换 | |
| 1168 | + </view> | |
| 1169 | + <view class="buy-btn cart-btn" style="background-color: #aaa;" wx:else>积分不足</view> | |
| 1170 | + </block> | |
| 1171 | + <block wx:else> | |
| 1172 | + <view bindtap="go_pay_integral" class="buy-btn-all cart-btn" style="width: 58%; margin-left:1%;" wx:if="{{can_integral}}"> | |
| 1173 | + 立即兑换 | |
| 1174 | + </view> | |
| 1175 | + <view class="buy-btn-all cart-btn" style="background-color: #aaa; width: 58%;margin-left:1%" wx:else> | |
| 1176 | + 积分不足 | |
| 1177 | + </view> | |
| 1178 | + </block> | |
| 1179 | + </block> | |
| 1180 | + <!-- -<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:else>立即兑换</view> --> | |
| 1181 | + </view> | |
| 1182 | + <!-- 制作一个圆球导航 --> | |
| 1183 | + <nav_box></nav_box> | |
| 1184 | +</block> | |
| 1185 | +<!-- --弹起来,选择规格数量,普通商品购买和秒杀---- --> | |
| 1186 | +<view hidden="{{!openSpecModal}}"> | |
| 1187 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | |
| 1188 | + <view class="spec-model"> | |
| 1189 | + <view class="pding"> | |
| 1190 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 1191 | + <view class="spec-goods"> | |
| 1192 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="sele_g.original_img"></image> | |
| 1193 | + <view class="spec-goods-info"> | |
| 1194 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | |
| 1195 | + <view class="flex ai_end xc-val-money"> | |
| 1196 | + <view class="spec-goods-price" wx:if="{{prom_price==null}}"> | |
| 1197 | + <text class="fs20">¥</text> | |
| 1198 | + <!-- 如果是等级会员,且有等级价 --> | |
| 1199 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}}</block> | |
| 1200 | + <block wx:else>{{sele_g.shop_price}}</block> | |
| 1201 | + </view> | |
| 1202 | + <view class="spec-goods-price" wx:else><text class="fs20">¥</text>{{prom_price}}</view> | |
| 1203 | + <!-- <view class="spec-goods-price" wx:elif="{{prom_type!=2}}"><text class="fs20">¥</text>{{prom_price}}</view> --> | |
| 1204 | + <!-- 显示线下价格 --> | |
| 1205 | + <view wx:if="{{sele_g.offline_price}}" class="quan_price flex ai-center jc-center"> | |
| 1206 | + 券后¥ | |
| 1207 | + <text class="fs32">{{sele_g.offline_price}}</text> | |
| 1208 | + </view> | |
| 1209 | + | |
| 1210 | + </view> | |
| 1211 | + <block wx:if="{{prom_type==0}}"> | |
| 1212 | + <view class="flex"> | |
| 1213 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 1214 | + <block wx:if="{{sales_rules==2}}"> | |
| 1215 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}"> | |
| 1216 | + 可售:{{def_pick_store.CanOutQty}} | |
| 1217 | + </view> | |
| 1218 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 1219 | + </block> | |
| 1220 | + <block wx:else> | |
| 1221 | + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | |
| 1222 | + </block> | |
| 1223 | + </view> | |
| 1224 | + </block> | |
| 1225 | + <block wx:if="{{prom_type==1}}"> | |
| 1226 | + <view class="flex"> | |
| 1227 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}"> | |
| 1228 | + 已售:{{prom_act.buy_num+prom_act.virtual}} | |
| 1229 | + </view> | |
| 1230 | + <view class="spec-goods-stock" wx:else>已售:{{prom_act.buy_num}}</view> | |
| 1231 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | |
| 1232 | + </view> | |
| 1233 | + </block> | |
| 1234 | + <block wx:if="{{prom_type==2}}"> | |
| 1235 | + <view class="flex"> | |
| 1236 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}"> | |
| 1237 | + 已售:{{prom_act.buy_num+prom_act.virtualNum}} | |
| 1238 | + </view> | |
| 1239 | + <view class="spec-goods-stock" wx:else>已售:{{prom_act.buy_num}}</view> | |
| 1240 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | |
| 1241 | + </view> | |
| 1242 | + </block> | |
| 1243 | + </view> | |
| 1244 | + <!-- 选择门店模块 --> | |
| 1245 | + <view class="flex-space-between address ai_end xc-width "> | |
| 1246 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 1247 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | |
| 1248 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | |
| 1249 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 1250 | + </view> | |
| 1251 | + </view> | |
| 1252 | + <!-- 没有门店的时候 --> | |
| 1253 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 1254 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 1255 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 1256 | + </view> | |
| 1257 | + <view class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | |
| 1258 | + </view> | |
| 1259 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 1260 | + <block wx:else> | |
| 1261 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 1262 | + <block wx:else> | |
| 1263 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 1264 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}"> | |
| 1265 | + (库存不足) | |
| 1266 | + </view> | |
| 1267 | + </block> | |
| 1268 | + </block> | |
| 1269 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}"> | |
| 1270 | + 地址:{{def_pick_store.fulladdress}} | |
| 1271 | + </view> | |
| 1272 | + </view> | |
| 1273 | + <!-- 商品的属性项目 --> | |
| 1274 | + <view class="xc-goods-attribute"> | |
| 1275 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 1276 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 1277 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | |
| 1278 | + {{item.gg}} | |
| 1279 | + </view> | |
| 1280 | + </view> | |
| 1281 | + </view> | |
| 1282 | + <view class="b_num"> | |
| 1283 | + <view>购买数量</view> | |
| 1284 | + <view class="count"> | |
| 1285 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}"> | |
| 1286 | + - | |
| 1287 | + </view> | |
| 1288 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 1289 | + <view bindtap="addCartNum" class="add">+</view> | |
| 1290 | + </view> | |
| 1291 | + </view> | |
| 1292 | + <!-- 提示再买多少优惠 --> | |
| 1293 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && openSpecModal_ind==2}}"> | |
| 1294 | + 再买{{hui_condition.need}} | |
| 1295 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 1296 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 1297 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 1298 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 1299 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 1300 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 1301 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 1302 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 1303 | + </view> | |
| 1304 | + </view> | |
| 1305 | + <view class="spec-cart-btns"> | |
| 1306 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
| 1307 | + 配送不匹配 | |
| 1308 | + </view> | |
| 1309 | + <block wx:else> | |
| 1310 | + <!-- 根本就找不到门店 --> | |
| 1311 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 1312 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
| 1313 | + 库存不足 | |
| 1314 | + </view> | |
| 1315 | + </block> | |
| 1316 | + <block wx:else> | |
| 1317 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 1318 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
| 1319 | + 库存不足 | |
| 1320 | + </view> | |
| 1321 | + </block> | |
| 1322 | + <block wx:else> | |
| 1323 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 1324 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
| 1325 | + 库存不足 | |
| 1326 | + </view> | |
| 1327 | + </block> | |
| 1328 | + <block wx:else> | |
| 1329 | + <block wx:if="{{!def_pick_store}}"> | |
| 1330 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
| 1331 | + 请先选择门店 | |
| 1332 | + </view> | |
| 1333 | + </block> | |
| 1334 | + <block wx:else> | |
| 1335 | + <!-- 如果是线下库存购买的时候,且是普通商品购买的时候 --> | |
| 1336 | + <block wx:if="{{sales_rules==2 && prom_type==0}}"> | |
| 1337 | + <block wx:if="{{!def_pick_store.CanOutQty}}"> | |
| 1338 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
| 1339 | + 库存不足 | |
| 1340 | + </view> | |
| 1341 | + </block> | |
| 1342 | + <block wx:else> | |
| 1343 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32" data-action="add"> | |
| 1344 | + 加入购物车 | |
| 1345 | + </view> | |
| 1346 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy" data-action="buy"> | |
| 1347 | + {{sele_g.offline_price?"券后购买":"立即购买"}} | |
| 1348 | + </view> | |
| 1349 | + </block> | |
| 1350 | + </block> | |
| 1351 | + <!-- 线上销售 --> | |
| 1352 | + <block wx:else> | |
| 1353 | + <block wx:if="{{sele_g.store_count<=0}}"> | |
| 1354 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
| 1355 | + 库存不足 | |
| 1356 | + </view> | |
| 1357 | + </block> | |
| 1358 | + <block wx:else> | |
| 1359 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32" data-action="add"> | |
| 1360 | + 加入购物车 | |
| 1361 | + </view> | |
| 1362 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy" data-action="buy"> | |
| 1363 | + {{sele_g.offline_price?"券后购买":"立即购买"}} | |
| 1364 | + </view> | |
| 1365 | + </block> | |
| 1366 | + </block> | |
| 1367 | + </block> | |
| 1368 | + </block> | |
| 1369 | + </block> | |
| 1370 | + </block> | |
| 1371 | + </block> | |
| 1372 | + </view> | |
| 1373 | + <view class="clear"></view> | |
| 1374 | + <!-- 选择门店的列表 --> | |
| 1375 | + <view hidden="{{ismend==0}}" class="sto_v"> | |
| 1376 | + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | |
| 1377 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image> | |
| 1378 | + 选择门店 | |
| 1379 | + </view> | |
| 1380 | + <!-- ---第一级显示---- --> | |
| 1381 | + <view class="itemlists" hidden="{{is_sec_mend==1}}"> | |
| 1382 | + <block wx:if="{{is_show_sto_cat}}"> | |
| 1383 | + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}"> | |
| 1384 | + {{item.name}} | |
| 1385 | + </view> | |
| 1386 | + </block> | |
| 1387 | + <block wx:else> | |
| 1388 | + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | |
| 1389 | + {{item.pickup_name}} | |
| 1390 | + </view> | |
| 1391 | + </block> | |
| 1392 | + </view> | |
| 1393 | + <!-- ---第二级显示---- --> | |
| 1394 | + <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | |
| 1395 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image> | |
| 1396 | + {{sec_sto.name}} | |
| 1397 | + </view> | |
| 1398 | + <view class="itemlists" hidden="{{is_sec_mend==0}}"> | |
| 1399 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="index" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | |
| 1400 | + {{item.pickup_name}} | |
| 1401 | + </view> | |
| 1402 | + </view> | |
| 1403 | + </view> | |
| 1404 | + </view> | |
| 1405 | +</view> | |
| 1406 | +<!-- 弹起来,购买积分购 --> | |
| 1407 | +<view hidden="{{!openSpecModal_inte}}"> | |
| 1408 | + <include src="buy_integral.wxml" /> | |
| 1409 | +</view> | |
| 1410 | +<!-- 弹起来,购买积分购的普通购买 --> | |
| 1411 | +<view hidden="{{!openSpecModal_inte_normal}}"> | |
| 1412 | + <include src="buy_integral_normal.wxml" /> | |
| 1413 | +</view> | |
| 1414 | +<!-- --弹起来,选择规格数量,拼单商品购买---- --> | |
| 1415 | +<view hidden="{{!openSpecModal_pt}}"> | |
| 1416 | + <include src="buy_pt.wxml" /> | |
| 1417 | +</view> | |
| 1418 | +<!-- --弹起来优惠信息---- --> | |
| 1419 | +<view hidden="{{!openPromModal}}"> | |
| 1420 | + <view bindtap="closePromModal" class="cover-layer"></view> | |
| 1421 | + <view class="prom-model"> | |
| 1422 | + <icon bindtap="closePromModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 1423 | + <view class="prom-title">优惠信息</view> | |
| 1424 | + <view class="logistics-item" wx:for="{{select.activity.data}}" wx:key="index"> | |
| 1425 | + <view class="item-title"> | |
| 1426 | + <text class="prom-item">{{item.title}}</text> | |
| 1427 | + </view> | |
| 1428 | + <view class="item-mes ellipsis-1">{{item.content}}</view> | |
| 1429 | + </view> | |
| 1430 | + </view> | |
| 1431 | +</view> | |
| 1432 | +<!-- --弹起的-- --> | |
| 1433 | +<block wx:if="{{pd_xx==1}}"> | |
| 1434 | + <view class="bview"></view> | |
| 1435 | + <view class="juzhong"> | |
| 1436 | + <view class="xq"> | |
| 1437 | + <view class="title" bindtap="close_pt_xx"> | |
| 1438 | + 拼团玩法介绍 | |
| 1439 | + <image src="{{iurl}}/miniapp/images/gbi.png" class="close"></image> | |
| 1440 | + </view> | |
| 1441 | + <view> | |
| 1442 | + 1.开团: | |
| 1443 | + <text class="hs1">选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;</text> | |
| 1444 | + </view> | |
| 1445 | + <view> | |
| 1446 | + 2.参团: | |
| 1447 | + <text class="hs1">进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;</text> | |
| 1448 | + </view> | |
| 1449 | + <view> | |
| 1450 | + 3.成团: | |
| 1451 | + <text class="hs1">在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;</text> | |
| 1452 | + </view> | |
| 1453 | + <view> | |
| 1454 | + 4.组团失败: | |
| 1455 | + <text class="hs1">在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;</text> | |
| 1456 | + </view> | |
| 1457 | + <view> | |
| 1458 | + 5. | |
| 1459 | + <text class="hs1">组团有效期间内,拼购商品订单不允许取消。</text> | |
| 1460 | + </view> | |
| 1461 | + </view> | |
| 1462 | + </view> | |
| 1463 | +</block> | |
| 1464 | +<!-- --弹起领券-- --> | |
| 1465 | +<view wx:if='{{coupon==1}}'> | |
| 1466 | + <view class="cover-layer flex-center" data-coupon='0' bindtap="switchCoupon"></view> | |
| 1467 | + <view class="cx-popup {{coupon== true ? 'up' : 'down'}} "> | |
| 1468 | + <view class="top-frame"> | |
| 1469 | + <!-- <view class="top two-level-word t-c"> --> | |
| 1470 | + <view class="top t-c">优惠券领取</view> | |
| 1471 | + </view> | |
| 1472 | + <!-- <view class="top-frame"> | |
| 1473 | + <view class="xc-valid-coupon four-level-word">可以领优惠券</view> | |
| 1474 | + </view> --> | |
| 1475 | + <view class="xc-frame"> | |
| 1476 | + <view class="top-frame"> | |
| 1477 | + <view class="xc-coupon-frame "> | |
| 1478 | + <!-- -单张的券- --> | |
| 1479 | + <view class="rel" wx:for="{{quan_list}}" wx:key="id"> | |
| 1480 | + <view class="coupon flex"> | |
| 1481 | + <view class="circle xc-circular-one"></view> | |
| 1482 | + <view class="xc-coupon-left "> | |
| 1483 | + <view class="flex ai_c xc-money-frame"> | |
| 1484 | + <text class="xc-money two-level-word xc-rmb">¥</text> | |
| 1485 | + <text class="one-level-word xc-money">{{item.money}}</text> | |
| 1486 | + </view> | |
| 1487 | + <view class="xc-money four-level-word xc-spacing">满{{item.condition}}元可用</view> | |
| 1488 | + </view> | |
| 1489 | + <view class="xc-coupon-right flex"> | |
| 1490 | + <view class="xc-detail-coupon"> | |
| 1491 | + <view class="four-level-word">{{item.name}}</view> | |
| 1492 | + <view class="four-level-word xc-below"> | |
| 1493 | + {{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)?filters.replace_time2(item.end):'不限'}} | |
| 1494 | + </view> | |
| 1495 | + </view> | |
| 1496 | + <view class="flex-vertical"> | |
| 1497 | + <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}" data-ind="{{index}}" data-cid="{{item.id}}" bindtap="get_quan"> | |
| 1498 | + {{ item.linging==1?'领取中':'领取'}} | |
| 1499 | + </view> | |
| 1500 | + </view> | |
| 1501 | + </view> | |
| 1502 | + <view class="circle xc-circular-two"></view> | |
| 1503 | + </view> | |
| 1504 | + </view> | |
| 1505 | + </view> | |
| 1506 | + </view> | |
| 1507 | + </view> | |
| 1508 | + <view class="cx-confirm pd20" data-coupon='0' bindtap="switchCoupon"> | |
| 1509 | + <view class="confirm t-c">关闭</view> | |
| 1510 | + </view> | |
| 1511 | + </view> | |
| 1512 | +</view> | |
| 1513 | +<view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view> | |
| 1514 | +<!-- 选择门店的弹框,1.1版最新的 --> | |
| 1515 | +<block wx:if="{{store==1}}"> | |
| 1516 | + <view class="mongolia-layer" bindtap="close_popup"></view> | |
| 1517 | + <view class="popup-frame"> | |
| 1518 | + <block wx:if="{{sort_store==0}}"> | |
| 1519 | + <!-- 头部 标题 --> | |
| 1520 | + <view class="popup-top flex-space-between"> | |
| 1521 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | |
| 1522 | + <view> | |
| 1523 | + <view> | |
| 1524 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
| 1525 | + </view> | |
| 1526 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}"> | |
| 1527 | + <text class="fs26 red-co" >{{choice_sort_store==0?'更多门店':'返回'}}</text> <view class="bg_rights" ></view> | |
| 1528 | + </view> | |
| 1529 | + </view> | |
| 1530 | + </view> | |
| 1531 | + <!-- 门店列表,最外层的门店列表,一开始 --> | |
| 1532 | + <view class="store-list"> | |
| 1533 | + <!-- 如果还没有点击更多门店的时候 --> | |
| 1534 | + <block wx:if="{{choice_sort_store==0}}"> | |
| 1535 | + <!-- 需要for循环 --> | |
| 1536 | + <block wx:if="{{is_show_sto_cat==1}}"> | |
| 1537 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 1538 | + <view class="store flex-vertical"> | |
| 1539 | + <!-- 需要点击事件 --> | |
| 1540 | + <block wx:if="{{index==fir_pick_index}}"> | |
| 1541 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 1542 | + </block> | |
| 1543 | + <block wx:else> | |
| 1544 | + <view class="circle xc-hooks"></view> | |
| 1545 | + </block> | |
| 1546 | + <view class="address-frame xc-ash"> | |
| 1547 | + <view class="flex-vertical-between butttem5"> | |
| 1548 | + <view class="flex xc-ash"> | |
| 1549 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
| 1550 | + </view> | |
| 1551 | + <view> | |
| 1552 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
| 1553 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} | |
| 1554 | + </view> | |
| 1555 | + </view> | |
| 1556 | + </view> | |
| 1557 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 1558 | + </view> | |
| 1559 | + </view> | |
| 1560 | + </view> | |
| 1561 | + </block> | |
| 1562 | + <block wx:else> | |
| 1563 | + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 1564 | + <view class="store flex-vertical"> | |
| 1565 | + <!-- 需要点击事件 --> | |
| 1566 | + <block wx:if="{{index==fir_pick_index}}"> | |
| 1567 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 1568 | + </block> | |
| 1569 | + <block wx:else> | |
| 1570 | + <view class="circle xc-hooks"></view> | |
| 1571 | + </block> | |
| 1572 | + <view class="address-frame xc-ash"> | |
| 1573 | + <view class="flex-vertical-between "> | |
| 1574 | + <view class="flex xc-ash"> | |
| 1575 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
| 1576 | + </view> | |
| 1577 | + <view> | |
| 1578 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
| 1579 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
| 1580 | + </view> | |
| 1581 | + </view> | |
| 1582 | + </view> | |
| 1583 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 1584 | + </view> | |
| 1585 | + </view> | |
| 1586 | + </view> | |
| 1587 | + </block> | |
| 1588 | + </block> | |
| 1589 | + <block wx:else> | |
| 1590 | + <!-- 如果是点击选择门店分类后显示分类下的门店 --> | |
| 1591 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | |
| 1592 | + <view class="store flex-vertical"> | |
| 1593 | + <!-- 需要点击事件 --> | |
| 1594 | + <block wx:if="{{index==sec_pick_index}}"> | |
| 1595 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 1596 | + </block> | |
| 1597 | + <block wx:else> | |
| 1598 | + <view class="circle xc-hooks"></view> | |
| 1599 | + </block> | |
| 1600 | + <view class="address-frame xc-ash"> | |
| 1601 | + <view class="flex-vertical-between "> | |
| 1602 | + <view class="flex xc-ash"> | |
| 1603 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | |
| 1604 | + </view> | |
| 1605 | + <view> | |
| 1606 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
| 1607 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
| 1608 | + </view> | |
| 1609 | + </view> | |
| 1610 | + </view> | |
| 1611 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 1612 | + </view> | |
| 1613 | + </view> | |
| 1614 | + </view> | |
| 1615 | + </block> | |
| 1616 | + </view> | |
| 1617 | + <!-- 门店列表底部 --> | |
| 1618 | + <view class="store-bottom-frame"> | |
| 1619 | + <view class="store-bottom flex-vertical-between"> | |
| 1620 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}"> | |
| 1621 | + 确定 | |
| 1622 | + </view> | |
| 1623 | + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}"> | |
| 1624 | + 设为默认 | |
| 1625 | + </view> | |
| 1626 | + </view> | |
| 1627 | + </view> | |
| 1628 | + </block> | |
| 1629 | + <block wx:else> | |
| 1630 | + <view class="popup-top flex-space-between"> | |
| 1631 | + <text class="fs32 nearby_store">门店分类选择</text> | |
| 1632 | + <view> | |
| 1633 | + <view> | |
| 1634 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
| 1635 | + </view> | |
| 1636 | + <view class="felx choose_mores" bindtap="returns"> | |
| 1637 | + <text class="fs26 red-co">返回</text> | |
| 1638 | + </view> | |
| 1639 | + </view> | |
| 1640 | + </view> | |
| 1641 | + <view class="sort_store_list"> | |
| 1642 | + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
| 1643 | + <view class="sort-store flex-vertical-between"> | |
| 1644 | + <view class="fs30" di>{{item.name}}</view> | |
| 1645 | + <view class="black_rights-frame"> | |
| 1646 | + <view class="black_rights"></view> | |
| 1647 | + </view> | |
| 1648 | + </view> | |
| 1649 | + </view> | |
| 1650 | + </view> | |
| 1651 | + </block> | |
| 1652 | + </view> | |
| 1653 | +</block> | |
| 1654 | +<!-- ---------------分享弹窗--------------- --> | |
| 1655 | +<!-- 二维码显示页面 --> | |
| 1656 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | |
| 1657 | +<warn id="warn"></warn> | |
| 1658 | +<!-- 分享控件,底部弹出 --> | |
| 1659 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> | |
| 1660 | +<view wx:if="{{showPoster}}"> | |
| 1661 | + <view class="mask" catchtap="closePoster"></view> | |
| 1662 | + <view class="poster-container"> | |
| 1663 | + <view class="poster-wrapper"> | |
| 1664 | + <view class="poster" bindtap="previewPoster"> | |
| 1665 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
| 1666 | + <image src="{{shareImgPath}}" class="poster-img"></image> | |
| 1667 | + <view class="btn-close" catchtap="closePoster"> | |
| 1668 | + <text class="iconfont icon-close"></text> | |
| 1669 | + </view> | |
| 1670 | + </view> | |
| 1671 | + <view class="btn-container"> | |
| 1672 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | |
| 1673 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
| 1674 | + </view> | |
| 1675 | + </view> | |
| 1676 | + </view> | |
| 1677 | +</view> | |
| 1678 | + | |
| 1679 | +<!-- 商品要加入购物车 --> | |
| 1680 | +<view class="pop_more_act" wx:if="{{is_pop_more}}"> | |
| 1681 | + <view class="cover-layer" bindtap="close_pop_more"></view> | |
| 1682 | + <view class="content"> | |
| 1683 | + <view class="main pd20"> | |
| 1684 | + <view class="t-c fs36" style="color: #c3172d">提示</view> | |
| 1685 | + | |
| 1686 | + <block wx:for="{{more_flash}}"> | |
| 1687 | + <view bindtap="go_more_flash" data-id="{{item.act_id}}" class="flex jc_sb fs28 mt20" wx:if="{{item.prom_type==1}}"> | |
| 1688 | + <view class="ellipsis-2" style="max-width: 80%">该商品有参与{{item.act_name}} {{tool.act_type(item.prom_type)}} 活动</view> | |
| 1689 | + <view class="fs26 c-7b">去参与 | |
| 1690 | + <text class="bg_jj is_more_cx"></text> | |
| 1691 | + </view> | |
| 1692 | + </view> | |
| 1693 | + </block> | |
| 1694 | + | |
| 1695 | + <view style="margin-top: 30rpx" bindtap="open_next"> | |
| 1696 | + <button class="p_btn">继续加入购物车</button> | |
| 1697 | + </view> | |
| 1698 | + </view> | |
| 1699 | + </view> | |
| 1700 | +</view> | |
| 1701 | + | |
| 1702 | +<view class="rule-pop-container" wx:if="{{showRules}}"> | |
| 1703 | + <view class="pop-title">规则详情 | |
| 1704 | + <text class="iconfont icon-guan" bindtap="closeRules"></text> | |
| 1705 | + </view> | |
| 1706 | + <view class="pdt40"> | |
| 1707 | + <view class="pdb20">活动时间</view> | |
| 1708 | + <view class="">{{filters.format_time(prom_act.start_time,1)}} 至 {{filters.format_time(prom_act.end_time,1)}} | |
| 1709 | + </view> | |
| 1710 | + </view> | |
| 1711 | + <view class="pdt40"> | |
| 1712 | + <view class="pdb20">活动内容:</view> | |
| 1713 | + <view class="popup-content"> | |
| 1714 | + <text class="pdb10">{{prom_act.remark?prom_act.remark:'暂无'}}</text> | |
| 1715 | + </view> | |
| 1716 | + </view> | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + <view class="pdv20"> | |
| 1720 | + <view class="btn" bindtap="closeRules">我知道了</view> | |
| 1721 | + </view> | |
| 1722 | + </view> | |
| 1723 | + | |
| 1724 | +<!-- 弹起来,购买预热商品的普通购买 --> | |
| 1725 | +<view hidden="{{!openSpecModal_flash_normal}}"> | |
| 1726 | + <include src="buy_flash_normal.wxml" /> | |
| 1727 | +</view> | |
| 1728 | + | |
| 1729 | +<include src="../../../components/com_servicer/com_servicer.wxml"></include> | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss
0 → 100644
| 1 | +@import "../../../../utils/wxParse/wxParse.wxss"; | |
| 2 | + | |
| 3 | +.container { | |
| 4 | + margin-bottom: 100rpx; | |
| 5 | + overflow: hidden; | |
| 6 | + padding-top: 80rpx; | |
| 7 | +} | |
| 8 | + | |
| 9 | +image { | |
| 10 | + vertical-align: top; | |
| 11 | +} | |
| 12 | +.rules { | |
| 13 | + position: fixed; | |
| 14 | + background-color: rgba(0,0,0,.2); | |
| 15 | + color: white; | |
| 16 | + top: 22rpx; | |
| 17 | + right: 0; | |
| 18 | + z-index: 100; | |
| 19 | + font-size: 26rpx; | |
| 20 | + padding: 0 20rpx; | |
| 21 | + z-index: 99999; | |
| 22 | + border-radius: 20rpx 0 0 20rpx; | |
| 23 | +} | |
| 24 | + | |
| 25 | +.rule-pop-container { | |
| 26 | + position: fixed; | |
| 27 | + left: 0; | |
| 28 | + bottom: 0; | |
| 29 | + width: 100%; | |
| 30 | + background-color: white; | |
| 31 | + z-index: 99999; | |
| 32 | + border-radius: 16rpx 16rpx 0 0; | |
| 33 | + padding: 0 40rpx; | |
| 34 | + box-sizing: border-box; | |
| 35 | + font-size: 28rpx; | |
| 36 | + color: #444; | |
| 37 | +} | |
| 38 | + | |
| 39 | +.pop-title { | |
| 40 | + padding: 20rpx 0; | |
| 41 | + text-align: center; | |
| 42 | + font-size: 32rpx; | |
| 43 | + position: relative; | |
| 44 | +} | |
| 45 | +.icon-guan { | |
| 46 | + position: absolute; | |
| 47 | + right: 0; | |
| 48 | + font-size: 26rpx; | |
| 49 | + top: 50%; | |
| 50 | + transform: translateY(-50%); | |
| 51 | + color: #ccc; | |
| 52 | +} | |
| 53 | +.btn { | |
| 54 | + color: white; | |
| 55 | + padding: 20rpx 0; | |
| 56 | + text-align: center; | |
| 57 | + border-radius: 40rpx; | |
| 58 | + background: -webkit-linear-gradient(left,#ff5000,#ff2000) no-repeat; | |
| 59 | +} | |
| 60 | + | |
| 61 | +.goods-detail { | |
| 62 | + overflow: hidden | |
| 63 | +} | |
| 64 | +.popup-content { | |
| 65 | + max-height: 600rpx; | |
| 66 | + overflow-y: auto; | |
| 67 | +} | |
| 68 | + | |
| 69 | +.type-navbar { | |
| 70 | + display: flex; | |
| 71 | + justify-content: center; | |
| 72 | + width: 100%; | |
| 73 | + position: fixed; | |
| 74 | + top: 0; | |
| 75 | + z-index: 999; | |
| 76 | + /* height: 80rpx; */ | |
| 77 | + /* margin-bottom: 20rpx; */ | |
| 78 | + background-color: #fff; | |
| 79 | + border-top: 2rpx solid #ebedf0; | |
| 80 | + /* border-bottom: 1rpx #fafafa solid; */ | |
| 81 | +} | |
| 82 | + | |
| 83 | +.type-box { | |
| 84 | + width: 25%; | |
| 85 | + box-sizing: border-box; | |
| 86 | + font-size: 32rpx; | |
| 87 | + line-height: 76rpx; | |
| 88 | + padding: 0 20rpx; | |
| 89 | + text-align: center; | |
| 90 | + display: inline-block; | |
| 91 | + overflow: hidden; | |
| 92 | +} | |
| 93 | + | |
| 94 | +.type-navbar-item { | |
| 95 | + /* border-bottom: 4rpx solid #fff; */ | |
| 96 | + display: flex; | |
| 97 | + justify-content: center; | |
| 98 | + width: 100%; | |
| 99 | + font-size: 26rpx; | |
| 100 | +} | |
| 101 | + | |
| 102 | +.type-item-on { | |
| 103 | + color: #F95D74; | |
| 104 | + font-weight: bold; | |
| 105 | + /* border-bottom: 4rpx solid #F95D74; */ | |
| 106 | + position: relative; | |
| 107 | + font-size: 30rpx; | |
| 108 | +} | |
| 109 | + | |
| 110 | +.type-item-on:after { | |
| 111 | + content: ''; | |
| 112 | + position: absolute; | |
| 113 | + width: 50%; | |
| 114 | + height: 4rpx; | |
| 115 | + background-color: #F95D74; | |
| 116 | + left: 0; | |
| 117 | + right: 0; | |
| 118 | + bottom: 0; | |
| 119 | + margin: 0 auto; | |
| 120 | +} | |
| 121 | + | |
| 122 | +.swiper_box { | |
| 123 | + width: 100%; | |
| 124 | + height: 750rpx; | |
| 125 | +} | |
| 126 | + | |
| 127 | +.goods-title { | |
| 128 | + display: flex; | |
| 129 | + justify-content: space-between; | |
| 130 | + align-items: center; | |
| 131 | + vertical-align: middle; | |
| 132 | + /* overflow: hidden; */ | |
| 133 | + /* height: 108rpx; */ | |
| 134 | +} | |
| 135 | + | |
| 136 | +.goods-name { | |
| 137 | + /* width: 560rpx; */ | |
| 138 | + /* line-height: 46rpx; */ | |
| 139 | + font-size: 32rpx; | |
| 140 | + font-weight: bold; | |
| 141 | + color: #333; | |
| 142 | + /* margin-top: 30rpx; | |
| 143 | + margin-bottom:30rpx; */ | |
| 144 | + flex: 1; | |
| 145 | + text-align: justify; | |
| 146 | + margin: 10rpx 0 20rpx; | |
| 147 | +} | |
| 148 | + | |
| 149 | +.goods-collect { | |
| 150 | + width: 112rpx; | |
| 151 | + padding-top: 30rpx; | |
| 152 | +} | |
| 153 | + | |
| 154 | +.collect-img { | |
| 155 | + width: 50rpx; | |
| 156 | + height: 44rpx; | |
| 157 | + margin: 0 auto; | |
| 158 | + overflow: hidden; | |
| 159 | +} | |
| 160 | + | |
| 161 | +.collect-des { | |
| 162 | + text-align: center; | |
| 163 | + font-size: 24rpx; | |
| 164 | + color: #333; | |
| 165 | +} | |
| 166 | + | |
| 167 | +.goods-price { | |
| 168 | + font-size: 60rpx; | |
| 169 | + /* padding: 20rpx 34rpx; */ | |
| 170 | + /* padding:0rpx 34rpx; */ | |
| 171 | + /* line-height: 60rpx; */ | |
| 172 | + color: #999; | |
| 173 | + padding: 20rpx; | |
| 174 | + /* margin-top: 46rpx; */ | |
| 175 | + /* margin-top:26rpx; | |
| 176 | + padding-bottom:20rpx; */ | |
| 177 | +} | |
| 178 | + | |
| 179 | +.prom-info { | |
| 180 | + margin: 10rpx 0; | |
| 181 | + color: #f23030; | |
| 182 | +} | |
| 183 | + | |
| 184 | +.prom-info>.prom-type { | |
| 185 | + color: white; | |
| 186 | + background-color: #f23030; | |
| 187 | + margin-right: 14rpx; | |
| 188 | + padding: 2rpx 8rpx; | |
| 189 | + border-radius: 4rpx; | |
| 190 | +} | |
| 191 | + | |
| 192 | +.market-price { | |
| 193 | + /* display: flex; | |
| 194 | + margin-left: -5rpx; */ | |
| 195 | +} | |
| 196 | + | |
| 197 | +.market-price .yuan { | |
| 198 | + /* top:24rpx; */ | |
| 199 | + font-size: 30rpx | |
| 200 | +} | |
| 201 | + | |
| 202 | +.market-price>view>text { | |
| 203 | + text-decoration: line-through; | |
| 204 | +} | |
| 205 | + | |
| 206 | +.market-price>.yj { | |
| 207 | + color: #999999; | |
| 208 | + font-size: 24rpx; | |
| 209 | + /* margin-left: 16rpx;position: relative;top:30rpx; */ | |
| 210 | + display: inline-block; | |
| 211 | +} | |
| 212 | + | |
| 213 | +.goods-price>.tm { | |
| 214 | + color: #999999; | |
| 215 | + font-size: 26rpx; | |
| 216 | + margin-top: 10rpx; | |
| 217 | +} | |
| 218 | + | |
| 219 | +.goods-num { | |
| 220 | + display: flex; | |
| 221 | + font-size: 24rpx; | |
| 222 | + justify-content: space-between; | |
| 223 | +} | |
| 224 | + | |
| 225 | +.goods-detail .twen { | |
| 226 | + background: #fff; | |
| 227 | + height: 60rpx; | |
| 228 | + line-height: 60rpx; | |
| 229 | + font-size: 30rpx; | |
| 230 | + padding-left: 30rpx; | |
| 231 | + display: flex; | |
| 232 | +} | |
| 233 | + | |
| 234 | +.goods-detail .twen .img { | |
| 235 | + width: 32rpx; | |
| 236 | + height: 32rpx; | |
| 237 | + margin-left: 200rpx; | |
| 238 | + background: #fff | |
| 239 | +} | |
| 240 | + | |
| 241 | +.goods-detail .twen image.img { | |
| 242 | + vertical-align: auto; | |
| 243 | +} | |
| 244 | + | |
| 245 | + | |
| 246 | +.logistics-item { | |
| 247 | + display: flex; | |
| 248 | + justify-content: space-between; | |
| 249 | + align-items: center; | |
| 250 | + height: 90rpx; | |
| 251 | + /*border-bottom: 1px solid #f5f5f5;*/ | |
| 252 | + font-size: 32rpx; | |
| 253 | + color: #666; | |
| 254 | +} | |
| 255 | + | |
| 256 | +.logistics-item .small { | |
| 257 | + color: #999; | |
| 258 | + font-size: 24rpx; | |
| 259 | +} | |
| 260 | + | |
| 261 | +.item-title { | |
| 262 | + width: 180rpx; | |
| 263 | +} | |
| 264 | + | |
| 265 | +.item-mes { | |
| 266 | + color: #333; | |
| 267 | + width: 420rpx; | |
| 268 | + height: 90rpx; | |
| 269 | + line-height: 90rpx; | |
| 270 | +} | |
| 271 | + | |
| 272 | +.item-img { | |
| 273 | + width: 32rpx; | |
| 274 | + height: 32rpx; | |
| 275 | +} | |
| 276 | + | |
| 277 | +.prom-item { | |
| 278 | + color: #f23030; | |
| 279 | + border: 1px solid #f23030; | |
| 280 | + border-radius: 18rpx; | |
| 281 | + line-height: 40rpx; | |
| 282 | + height: 40rpx; | |
| 283 | + padding: 2rpx 8rpx; | |
| 284 | +} | |
| 285 | + | |
| 286 | +.guarantee { | |
| 287 | + justify-content: space-around; | |
| 288 | +} | |
| 289 | + | |
| 290 | +.ico-item { | |
| 291 | + width: 32rpx; | |
| 292 | + height: 32rpx; | |
| 293 | + margin-right: 10rpx; | |
| 294 | +} | |
| 295 | + | |
| 296 | +.guarantee>view { | |
| 297 | + display: flex; | |
| 298 | + align-items: center; | |
| 299 | + height: 32rpx; | |
| 300 | + color: #666; | |
| 301 | +} | |
| 302 | + | |
| 303 | +.user-comment { | |
| 304 | + margin: 10rpx 0; | |
| 305 | + font-size: 28rpx; | |
| 306 | +} | |
| 307 | + | |
| 308 | +.good-comment, | |
| 309 | +.comment-num { | |
| 310 | + display: flex; | |
| 311 | +} | |
| 312 | + | |
| 313 | +.recommend { | |
| 314 | + background-color: #fff; | |
| 315 | + border-bottom: 1px solid #ddd; | |
| 316 | + padding-bottom: 20rpx; | |
| 317 | +} | |
| 318 | + | |
| 319 | +.recommend-title { | |
| 320 | + height: 70rpx; | |
| 321 | + line-height: 70rpx; | |
| 322 | + font-size: 28rpx; | |
| 323 | + padding: 0 30rpx; | |
| 324 | +} | |
| 325 | + | |
| 326 | +.recommend-ul { | |
| 327 | + display: flex; | |
| 328 | + justify-content: flex-start; | |
| 329 | +} | |
| 330 | + | |
| 331 | +.recommend-ul .li { | |
| 332 | + width: 25%; | |
| 333 | + box-sizing: border-box; | |
| 334 | + text-align: center; | |
| 335 | + font-size: 28rpx; | |
| 336 | + color: #333; | |
| 337 | +} | |
| 338 | + | |
| 339 | +.li-img { | |
| 340 | + width: 120rpx; | |
| 341 | + height: 120rpx; | |
| 342 | + margin: 0 auto; | |
| 343 | +} | |
| 344 | + | |
| 345 | +.li-title { | |
| 346 | + height: 58rpx; | |
| 347 | + line-height: 30rpx; | |
| 348 | + margin: 10rpx 0; | |
| 349 | +} | |
| 350 | + | |
| 351 | +.comment-item { | |
| 352 | + background-color: #fff; | |
| 353 | + font-size: 28rpx; | |
| 354 | +} | |
| 355 | + | |
| 356 | +.comment-title { | |
| 357 | + display: flex; | |
| 358 | + justify-content: space-between; | |
| 359 | + align-items: center; | |
| 360 | + height: 102rpx; | |
| 361 | + margin: 0 30rpx; | |
| 362 | + color: #333; | |
| 363 | + border-bottom: 1px solid #eee; | |
| 364 | +} | |
| 365 | + | |
| 366 | +.user-name { | |
| 367 | + display: flex; | |
| 368 | + align-items: center; | |
| 369 | +} | |
| 370 | + | |
| 371 | +.user-pic { | |
| 372 | + width: 54rpx; | |
| 373 | + height: 54rpx; | |
| 374 | + margin-right: 10rpx; | |
| 375 | + border-radius: 50%; | |
| 376 | + overflow: hidden; | |
| 377 | +} | |
| 378 | + | |
| 379 | +.stars { | |
| 380 | + float: left; | |
| 381 | + display: flex; | |
| 382 | + height: 42rpx; | |
| 383 | + line-height: 42rpx; | |
| 384 | + margin: 15rpx 0; | |
| 385 | + width: 200rpx; | |
| 386 | +} | |
| 387 | + | |
| 388 | +.star { | |
| 389 | + width: 26rpx; | |
| 390 | + height: 26rpx; | |
| 391 | + margin-right: 5rpx; | |
| 392 | +} | |
| 393 | + | |
| 394 | +.state-spec { | |
| 395 | + margin: 15rpx 0; | |
| 396 | + float: right; | |
| 397 | + font-size: 24rpx; | |
| 398 | + color: #666; | |
| 399 | + width: 460rpx; | |
| 400 | + text-align: right; | |
| 401 | +} | |
| 402 | + | |
| 403 | +.comment-cont { | |
| 404 | + padding: 0 30rpx 30rpx; | |
| 405 | + border-bottom: 1px solid #eee; | |
| 406 | +} | |
| 407 | + | |
| 408 | +.comment-mes { | |
| 409 | + line-height: 42rpx; | |
| 410 | +} | |
| 411 | + | |
| 412 | +.img-ul { | |
| 413 | + display: flex; | |
| 414 | + flex-wrap: wrap; | |
| 415 | +} | |
| 416 | + | |
| 417 | +.img-li { | |
| 418 | + width: 150rpx; | |
| 419 | + height: 150rpx; | |
| 420 | + margin-top: 8rpx; | |
| 421 | + margin-right: 10rpx; | |
| 422 | +} | |
| 423 | + | |
| 424 | +.comment-btn { | |
| 425 | + height: 60rpx; | |
| 426 | + padding: 20rpx 30rpx; | |
| 427 | +} | |
| 428 | + | |
| 429 | +.comment-btn .btn { | |
| 430 | + display: flex; | |
| 431 | + justify-content: center; | |
| 432 | + align-items: center; | |
| 433 | + height: 60rpx; | |
| 434 | + width: 45%; | |
| 435 | + border: 1px solid #eee; | |
| 436 | +} | |
| 437 | + | |
| 438 | +.comment-btn .btn-img { | |
| 439 | + width: 30rpx; | |
| 440 | + height: 28rpx; | |
| 441 | + margin: 0 10rpx; | |
| 442 | +} | |
| 443 | + | |
| 444 | +.reply-ul { | |
| 445 | + margin-top: 20rpx; | |
| 446 | +} | |
| 447 | + | |
| 448 | +.reply-li { | |
| 449 | + color: #aaa; | |
| 450 | +} | |
| 451 | + | |
| 452 | +.join-cart { | |
| 453 | + position: fixed; | |
| 454 | + left: 0; | |
| 455 | + bottom: 0; | |
| 456 | + display: flex; | |
| 457 | + width: 100%; | |
| 458 | + height: 100rpx; | |
| 459 | + background-color: #fff; | |
| 460 | + z-index: 9; | |
| 461 | + border-top: 4rpx solid #eee; | |
| 462 | + | |
| 463 | +} | |
| 464 | + | |
| 465 | +.join-cart>view { | |
| 466 | + width: 29%; | |
| 467 | +} | |
| 468 | + | |
| 469 | +.join-cart>.new_split { | |
| 470 | + width: 13%; | |
| 471 | + text-align: center; | |
| 472 | + padding: 0; | |
| 473 | + margin: 0; | |
| 474 | +} | |
| 475 | + | |
| 476 | +.cart-ico { | |
| 477 | + font-size: 24rpx; | |
| 478 | + color: #333; | |
| 479 | +} | |
| 480 | + | |
| 481 | +.shopping-cart { | |
| 482 | + position: relative; | |
| 483 | +} | |
| 484 | + | |
| 485 | +.cs-img { | |
| 486 | + width: 45rpx; | |
| 487 | + height: 40rpx; | |
| 488 | + margin-top: 15rpx; | |
| 489 | +} | |
| 490 | + | |
| 491 | +.sc-img { | |
| 492 | + width: 42rpx; | |
| 493 | + height: 40rpx; | |
| 494 | + margin-top: 15rpx; | |
| 495 | +} | |
| 496 | + | |
| 497 | +.cart-num { | |
| 498 | + position: absolute; | |
| 499 | + left: 50%; | |
| 500 | + top: 1rpx; | |
| 501 | + width: 40rpx; | |
| 502 | + height: 40rpx; | |
| 503 | + line-height: 40rpx; | |
| 504 | + text-align: center; | |
| 505 | + border-radius: 50%; | |
| 506 | + color: #fff; | |
| 507 | + background-color: rgba(217, 81, 99, 0.9); | |
| 508 | +} | |
| 509 | + | |
| 510 | +.cart-btn { | |
| 511 | + font-size: 28rpx; | |
| 512 | + color: #fff; | |
| 513 | + line-height: 70rpx; | |
| 514 | + margin-top: 16rpx; | |
| 515 | + text-align: center; | |
| 516 | + | |
| 517 | + | |
| 518 | +} | |
| 519 | + | |
| 520 | +.join-btn { | |
| 521 | + background-color: #ffb03f; | |
| 522 | + height: 70rpx; | |
| 523 | + border-radius: 55rpx 0rpx 0rpx 55rpx; | |
| 524 | + margin-top: 16rpx; | |
| 525 | + | |
| 526 | + | |
| 527 | +} | |
| 528 | + | |
| 529 | +view.cart-btn-lg { | |
| 530 | + width: 50%; | |
| 531 | +} | |
| 532 | + | |
| 533 | +.buy-btn { | |
| 534 | + background-color: #f23030; | |
| 535 | + height: 70rpx; | |
| 536 | + border-radius: 0 56rpx 55rpx 0; | |
| 537 | + | |
| 538 | +} | |
| 539 | + | |
| 540 | +.buy-btn-all { | |
| 541 | + background-color: #f23030; | |
| 542 | + height: 70rpx; | |
| 543 | + border-radius: 56rpx; | |
| 544 | +} | |
| 545 | + | |
| 546 | + | |
| 547 | +.toTop { | |
| 548 | + position: fixed; | |
| 549 | + z-index: 3; | |
| 550 | + right: 20rpx; | |
| 551 | + bottom: 160rpx; | |
| 552 | + width: 68rpx; | |
| 553 | + height: 68rpx; | |
| 554 | + border: 1px solid #ddd; | |
| 555 | + border-radius: 50%; | |
| 556 | + overflow: hidden; | |
| 557 | + cursor: pointer; | |
| 558 | +} | |
| 559 | + | |
| 560 | +.comment-more { | |
| 561 | + height: 56rpx; | |
| 562 | + line-height: 56rpx; | |
| 563 | + font-size: 26rpx; | |
| 564 | + color: #999; | |
| 565 | + text-align: center; | |
| 566 | + background-color: #eee; | |
| 567 | +} | |
| 568 | + | |
| 569 | +.goods-more { | |
| 570 | + background-color: #fff; | |
| 571 | +} | |
| 572 | + | |
| 573 | +.goods-norms { | |
| 574 | + background-color: #fff; | |
| 575 | +} | |
| 576 | + | |
| 577 | +.type-navbar2 { | |
| 578 | + display: flex; | |
| 579 | + height: 72rpx; | |
| 580 | + border-top: 1px solid #ddd; | |
| 581 | + border-bottom: 1px solid #ddd; | |
| 582 | +} | |
| 583 | + | |
| 584 | +.type-box2 { | |
| 585 | + width: 50%; | |
| 586 | + font-size: 26rpx; | |
| 587 | + line-height: 72rpx; | |
| 588 | + text-align: center; | |
| 589 | + overflow: hidden; | |
| 590 | +} | |
| 591 | + | |
| 592 | +.type-item2-on { | |
| 593 | + color: #f23030; | |
| 594 | +} | |
| 595 | + | |
| 596 | +.parameter { | |
| 597 | + padding: 40rpx 0; | |
| 598 | +} | |
| 599 | + | |
| 600 | +.table { | |
| 601 | + width: 698rpx; | |
| 602 | + margin: 0 auto; | |
| 603 | + border: 1px solid #ddd; | |
| 604 | + border-bottom: none; | |
| 605 | +} | |
| 606 | + | |
| 607 | +.tb { | |
| 608 | + width: 100%; | |
| 609 | + min-height: 69rpx; | |
| 610 | + line-height: 69rpx; | |
| 611 | + border-bottom: 1px solid #ddd; | |
| 612 | + font-size: 28rpx; | |
| 613 | + text-align: center; | |
| 614 | + color: #333; | |
| 615 | +} | |
| 616 | + | |
| 617 | +.th-thitle { | |
| 618 | + font-weight: bold; | |
| 619 | + background-color: #f5fafe; | |
| 620 | +} | |
| 621 | + | |
| 622 | +.td-cont { | |
| 623 | + display: flex; | |
| 624 | +} | |
| 625 | + | |
| 626 | +.td-title { | |
| 627 | + width: 259rpx; | |
| 628 | + background-color: #f5fafe; | |
| 629 | + border-right: 1px solid #ddd; | |
| 630 | +} | |
| 631 | + | |
| 632 | +.td-text { | |
| 633 | + width: 439rpx; | |
| 634 | +} | |
| 635 | + | |
| 636 | +.goods-comment { | |
| 637 | + background-color: #fff; | |
| 638 | +} | |
| 639 | + | |
| 640 | +.type-navbar3 { | |
| 641 | + display: flex; | |
| 642 | + height: 88rpx; | |
| 643 | + border-top: 1px solid #ddd; | |
| 644 | + border-bottom: 1px solid #ddd; | |
| 645 | + padding: 10rpx 0; | |
| 646 | +} | |
| 647 | + | |
| 648 | +.type-box3 { | |
| 649 | + width: 20%; | |
| 650 | + font-size: 30rpx; | |
| 651 | + line-height: 44rpx; | |
| 652 | + text-align: center; | |
| 653 | + overflow: hidden; | |
| 654 | +} | |
| 655 | + | |
| 656 | +.type-item3-on { | |
| 657 | + color: #f23030; | |
| 658 | +} | |
| 659 | + | |
| 660 | +.spec-model { | |
| 661 | + position: fixed; | |
| 662 | + bottom: 0; | |
| 663 | + z-index: 20; | |
| 664 | + background: white; | |
| 665 | + width: 100%; | |
| 666 | + /* padding: 0 30rpx; */ | |
| 667 | + font-size: 32rpx; | |
| 668 | + box-sizing: border-box; | |
| 669 | + border-radius: 20rpx 20rpx 0 0; | |
| 670 | + /* height: 72%; */ | |
| 671 | +} | |
| 672 | + | |
| 673 | +.spec-model .pding { | |
| 674 | + padding: 0 20rpx; | |
| 675 | +} | |
| 676 | + | |
| 677 | +.spec-goods { | |
| 678 | + padding: 30rpx 0 20rpx; | |
| 679 | + /* float: left; */ | |
| 680 | + width: 100%; | |
| 681 | + /* border-bottom:2rpx solid #eee; */ | |
| 682 | +} | |
| 683 | + | |
| 684 | +.spec-img { | |
| 685 | + float: left; | |
| 686 | + height: 186rpx; | |
| 687 | + width: 186rpx; | |
| 688 | + border: 4rpx solid #eee | |
| 689 | +} | |
| 690 | + | |
| 691 | +.spec-goods-info { | |
| 692 | + float: left; | |
| 693 | + padding: 0 25rpx; | |
| 694 | + width: 400rpx; | |
| 695 | +} | |
| 696 | + | |
| 697 | +.spec-goods-name { | |
| 698 | + font-size: 30rpx; | |
| 699 | + line-height: 35rpx; | |
| 700 | + height: 70rpx; | |
| 701 | + margin: 15rpx 20rpx 25rpx 0; | |
| 702 | + overflow: hidden; | |
| 703 | + text-overflow: ellipsis; | |
| 704 | + color: #333; | |
| 705 | +} | |
| 706 | + | |
| 707 | +.spec-goods-price { | |
| 708 | + color: #d60021; | |
| 709 | + font-size: 33rpx; | |
| 710 | + font-weight: bold; | |
| 711 | + /* display: flex; */ | |
| 712 | +} | |
| 713 | + | |
| 714 | +.spec-goods-stock { | |
| 715 | + margin-top: 3rpx; | |
| 716 | + font-size: 24rpx; | |
| 717 | + color: #999999; | |
| 718 | + margin-right: 15rpx; | |
| 719 | +} | |
| 720 | + | |
| 721 | +.spec-name { | |
| 722 | + clear: both; | |
| 723 | + padding: 20rpx 0; | |
| 724 | + font-size: 30rpx; | |
| 725 | + color: #333; | |
| 726 | +} | |
| 727 | + | |
| 728 | +.quhuo { | |
| 729 | + font-size: 30rpx; | |
| 730 | + color: #000 | |
| 731 | +} | |
| 732 | + | |
| 733 | +.b_num { | |
| 734 | + display: flex; | |
| 735 | + font-size: 30rpx; | |
| 736 | + color: #333; | |
| 737 | + justify-content: space-between; | |
| 738 | + align-items: center; | |
| 739 | + padding: 20rpx 0; | |
| 740 | +} | |
| 741 | + | |
| 742 | +.count { | |
| 743 | + /* position: fixed; */ | |
| 744 | + display: flex; | |
| 745 | + height: 50rpx; | |
| 746 | + /* border: 1rpx solid #000; */ | |
| 747 | + font-size: 28rpx; | |
| 748 | + right: 30rpx; | |
| 749 | +} | |
| 750 | + | |
| 751 | + | |
| 752 | +.count>view, | |
| 753 | +.count>input { | |
| 754 | + width: 60rpx; | |
| 755 | + height: 50rpx; | |
| 756 | + line-height: 50rpx; | |
| 757 | + text-align: center; | |
| 758 | +} | |
| 759 | + | |
| 760 | +.spec_bt { | |
| 761 | + background: fff; | |
| 762 | + color: #333; | |
| 763 | + margin-left: 10rpx; | |
| 764 | + padding: 4rpx 15rpx 4rpx; | |
| 765 | + display: inline-block; | |
| 766 | + border-radius: 30rpx; | |
| 767 | + font-size: 24rpx; | |
| 768 | + border: 1rpx solid #ccc; | |
| 769 | + margin: 10rpx; | |
| 770 | + height: 40rpx; | |
| 771 | + line-height: 40rpx; | |
| 772 | +} | |
| 773 | + | |
| 774 | +.spec_bt.act { | |
| 775 | + background: #d60021; | |
| 776 | + color: #fff; | |
| 777 | + border: 1rpx solid #d60021; | |
| 778 | +} | |
| 779 | + | |
| 780 | +.sub, | |
| 781 | +.add, | |
| 782 | +.count>input { | |
| 783 | + /* border-right: 1px solid #000; */ | |
| 784 | + background-color: #f8f8f8; | |
| 785 | + border-radius: 8rpx; | |
| 786 | +} | |
| 787 | + | |
| 788 | +.sub.active { | |
| 789 | + /* background-color: #ddd; */ | |
| 790 | + color: #ccc; | |
| 791 | +} | |
| 792 | + | |
| 793 | +.count>input { | |
| 794 | + margin: 0 10rpx; | |
| 795 | +} | |
| 796 | + | |
| 797 | +.add { | |
| 798 | + /* background-color: #f8f8f8; */ | |
| 799 | + /* border-left: 1px solid #000; */ | |
| 800 | +} | |
| 801 | + | |
| 802 | +.spec-btn { | |
| 803 | + color: black; | |
| 804 | + background-color: white; | |
| 805 | + padding: 10rpx 10rpx; | |
| 806 | + font-size: 26rpx; | |
| 807 | + line-height: 28rpx; | |
| 808 | + float: left; | |
| 809 | + border: 1rpx solid #dedede; | |
| 810 | + margin: 4rpx 10rpx 4rpx 0; | |
| 811 | + border-radius: 4rpx; | |
| 812 | +} | |
| 813 | + | |
| 814 | +.spec-btn-click { | |
| 815 | + color: white; | |
| 816 | + background-color: #f23030; | |
| 817 | + border: 1rpx solid #f23030; | |
| 818 | +} | |
| 819 | + | |
| 820 | +.spec-cart-btns { | |
| 821 | + /* width: 92%; */ | |
| 822 | + line-height: 70rpx; | |
| 823 | + /* margin: 0rpx auto; | |
| 824 | + margin-top: 160rpx; */ | |
| 825 | + /* border-radius: 20rpx; */ | |
| 826 | + /* position: fixed; */ | |
| 827 | + /* bottom: 50rpx; */ | |
| 828 | + /* left: 4%; */ | |
| 829 | + padding: 20rpx; | |
| 830 | +} | |
| 831 | + | |
| 832 | +.spec-cart-btn { | |
| 833 | + | |
| 834 | + width: 100%; | |
| 835 | + font-size: 30rpx; | |
| 836 | + text-align: center; | |
| 837 | + color: white; | |
| 838 | + border-radius: 40rpx; | |
| 839 | +} | |
| 840 | + | |
| 841 | +.spec-cart-btn.w40 { | |
| 842 | + width: 46%; | |
| 843 | +} | |
| 844 | + | |
| 845 | +.spec-add-cart { | |
| 846 | + background-color: #ffb03f; | |
| 847 | +} | |
| 848 | + | |
| 849 | +.spec-buy { | |
| 850 | + background-color: #f23030; | |
| 851 | + /* margin-left: 34rpx; */ | |
| 852 | +} | |
| 853 | + | |
| 854 | +.spec-cart-disable { | |
| 855 | + background: #bbbbbb; | |
| 856 | +} | |
| 857 | + | |
| 858 | +.spec-cart-btn-lg { | |
| 859 | + width: 614rpx; | |
| 860 | +} | |
| 861 | + | |
| 862 | +.prom-model { | |
| 863 | + position: fixed; | |
| 864 | + bottom: 0; | |
| 865 | + z-index: 20; | |
| 866 | + background: white; | |
| 867 | + width: 100%; | |
| 868 | + padding: 0 30rpx 30rpx; | |
| 869 | + font-size: 32rpx; | |
| 870 | + box-sizing: border-box; | |
| 871 | + overflow-x: hidden; | |
| 872 | +} | |
| 873 | + | |
| 874 | +.prom-model .prom-title { | |
| 875 | + text-align: center; | |
| 876 | + margin: 30rpx 0; | |
| 877 | +} | |
| 878 | + | |
| 879 | +.prom-model .logistics-item { | |
| 880 | + border: 0; | |
| 881 | +} | |
| 882 | + | |
| 883 | +.prom-model .item-mes { | |
| 884 | + width: 500rpx; | |
| 885 | +} | |
| 886 | + | |
| 887 | +.integral-btn { | |
| 888 | + width: 100%; | |
| 889 | + padding: 0rpx; | |
| 890 | + margin: 0rpx; | |
| 891 | +} | |
| 892 | + | |
| 893 | +.clear { | |
| 894 | + clear: both; | |
| 895 | +} | |
| 896 | + | |
| 897 | +.sto_v .title, | |
| 898 | +.sto_v .stitle { | |
| 899 | + border-top: 1rpx solid #dedede; | |
| 900 | + border-bottom: 1rpx solid #dedede; | |
| 901 | + height: 78rpx; | |
| 902 | + line-height: 78rpx; | |
| 903 | +} | |
| 904 | + | |
| 905 | +.sto_v .title .tubiao, | |
| 906 | +.sto_v .stitle .tubiao { | |
| 907 | + width: 32rpx; | |
| 908 | + height: 32rpx; | |
| 909 | + margin-top: 23rpx; | |
| 910 | +} | |
| 911 | + | |
| 912 | +.itemlists .item { | |
| 913 | + border-bottom: 1rpx solid #dedede; | |
| 914 | + height: 72rpx; | |
| 915 | + line-height: 72rpx; | |
| 916 | + font-size: 28rpx; | |
| 917 | + margin: 0 10rpx; | |
| 918 | +} | |
| 919 | + | |
| 920 | +.cshu { | |
| 921 | + margin-bottom: 30rpx; | |
| 922 | + margin-top: 20rpx; | |
| 923 | +} | |
| 924 | + | |
| 925 | +.cshu view { | |
| 926 | + color: #999; | |
| 927 | + font-size: 30rpx; | |
| 928 | + margin-left: 26rpx; | |
| 929 | +} | |
| 930 | + | |
| 931 | + | |
| 932 | +/*---活动特殊显示---*/ | |
| 933 | +.prom_show { | |
| 934 | + height: 120rpx; | |
| 935 | + display: flex; | |
| 936 | +} | |
| 937 | + | |
| 938 | +.prom_show .secondkill-img { | |
| 939 | + width: 100%; | |
| 940 | + height: 100%; | |
| 941 | +} | |
| 942 | + | |
| 943 | +.prom_show .spike-img { | |
| 944 | + width: 283rpx; | |
| 945 | + height: 57rpx; | |
| 946 | + top: 35rpx; | |
| 947 | + left: 31rpx; | |
| 948 | +} | |
| 949 | + | |
| 950 | +.prom_show .stop { | |
| 951 | + color: #d81731; | |
| 952 | + top: 17rpx; | |
| 953 | + right: 65rpx; | |
| 954 | + font-weight: 600; | |
| 955 | +} | |
| 956 | + | |
| 957 | +.prom_show .start { | |
| 958 | + color: #009ae2; | |
| 959 | + top: 17rpx; | |
| 960 | + right: 65rpx; | |
| 961 | + font-weight: 600; | |
| 962 | +} | |
| 963 | + | |
| 964 | +.prom_show .timeac { | |
| 965 | + font-size: 32rpx; | |
| 966 | + height: 120rpx; | |
| 967 | + color: #333; | |
| 968 | +} | |
| 969 | + | |
| 970 | +.prom_show .timeac.left { | |
| 971 | + width: 66%; | |
| 972 | + color: #fff; | |
| 973 | + background: #f23030; | |
| 974 | +} | |
| 975 | + | |
| 976 | +.prom_show .timeac.right { | |
| 977 | + width: 34%; | |
| 978 | + background-color: #d7d7d7; | |
| 979 | + text-align: center | |
| 980 | +} | |
| 981 | + | |
| 982 | +.prom_show .secview .day { | |
| 983 | + padding-right: 10rpx; | |
| 984 | +} | |
| 985 | + | |
| 986 | +.prom_show .secview .time-val { | |
| 987 | + width: 36rpx; | |
| 988 | + height: 36rpx; | |
| 989 | + border-radius: 7rpx; | |
| 990 | + line-height: 36rpx; | |
| 991 | +} | |
| 992 | + | |
| 993 | +.prom_show .secview .time { | |
| 994 | + margin-right: 10rpx; | |
| 995 | + margin-left: 10rpx; | |
| 996 | +} | |
| 997 | + | |
| 998 | + | |
| 999 | +.prom_show .timeac.left view { | |
| 1000 | + margin-left: 20rpx | |
| 1001 | +} | |
| 1002 | + | |
| 1003 | +.prom_show .timeac.left view.firview { | |
| 1004 | + margin-top: 10rpx | |
| 1005 | +} | |
| 1006 | + | |
| 1007 | +.prom_show .timeac.left view .tr_line { | |
| 1008 | + text-decoration: line-through; | |
| 1009 | + font-size: 28rpx; | |
| 1010 | +} | |
| 1011 | + | |
| 1012 | +.prom_show .timeac.left view .bprice { | |
| 1013 | + font-size: 50rpx; | |
| 1014 | +} | |
| 1015 | + | |
| 1016 | +.prom_show .timeac.right view.firview { | |
| 1017 | + margin-top: 12rpx; | |
| 1018 | + margin-bottom: 10rpx | |
| 1019 | +} | |
| 1020 | + | |
| 1021 | +.prom_show .timeac.right view.secview { | |
| 1022 | + display: flex; | |
| 1023 | + text-align: center; | |
| 1024 | + justify-content: center; | |
| 1025 | + flex-direction: row; | |
| 1026 | +} | |
| 1027 | + | |
| 1028 | +.prom_show .timeac.right view .tui-conutdown-box { | |
| 1029 | + /* background: #6b6b6b; */ | |
| 1030 | + width: auto; | |
| 1031 | + /* min-width: 45rpx; */ | |
| 1032 | + height: 45rpx; | |
| 1033 | + color: #c4182e; | |
| 1034 | + font-size: 27rpx; | |
| 1035 | + text-align: center; | |
| 1036 | + line-height: 46rpx; | |
| 1037 | +} | |
| 1038 | + | |
| 1039 | +.huise { | |
| 1040 | + background: gray | |
| 1041 | +} | |
| 1042 | + | |
| 1043 | +.lanse { | |
| 1044 | + background: #0199e2 | |
| 1045 | +} | |
| 1046 | + | |
| 1047 | + | |
| 1048 | +/*------拼单------*/ | |
| 1049 | +.pt_view { | |
| 1050 | + text-align: center; | |
| 1051 | + width: 100%; | |
| 1052 | + height: 100rpx; | |
| 1053 | + line-height: 100rpx; | |
| 1054 | + font-size: 26rpx | |
| 1055 | +} | |
| 1056 | + | |
| 1057 | +.pt_view .secondkill-img { | |
| 1058 | + width: 100%; | |
| 1059 | + height: 100%; | |
| 1060 | +} | |
| 1061 | + | |
| 1062 | +.pt_fir { | |
| 1063 | + background: #fff; | |
| 1064 | + /* margin-bottom: 10rpx; */ | |
| 1065 | +} | |
| 1066 | + | |
| 1067 | +.pt_fir .pt_fir_title { | |
| 1068 | + display: flex; | |
| 1069 | + align-items: center; | |
| 1070 | + /* margin-left: 10rpx; margin-top: 20rpx; */ | |
| 1071 | + font-size: 28rpx; | |
| 1072 | + position: relative; | |
| 1073 | +} | |
| 1074 | + | |
| 1075 | +.pt_fir .pt_fir_title .kt_type { | |
| 1076 | + color: #fff; | |
| 1077 | + background: #e9030d; | |
| 1078 | + width: 100rpx; | |
| 1079 | + line-height: 40rpx; | |
| 1080 | + border-radius: 6rpx; | |
| 1081 | + margin: 0 10rpx; | |
| 1082 | + height: 40rpx; | |
| 1083 | + font-size: 24rpx; | |
| 1084 | + text-align: center; | |
| 1085 | +} | |
| 1086 | + | |
| 1087 | +.pt_fir .pt_fir_title .price { | |
| 1088 | + color: #e9030d; | |
| 1089 | + font-size: 26rpx; | |
| 1090 | +} | |
| 1091 | + | |
| 1092 | +.pt_fir .pt_fir_title .bigw { | |
| 1093 | + font-size: 36rpx; | |
| 1094 | +} | |
| 1095 | + | |
| 1096 | +.pt_fir .pt_fir_title .tprice { | |
| 1097 | + text-decoration: line-through; | |
| 1098 | + color: #949494 | |
| 1099 | +} | |
| 1100 | + | |
| 1101 | +.pt_fir .pt_fir_title .tprice.ml50 { | |
| 1102 | + margin-left: 50rpx | |
| 1103 | +} | |
| 1104 | + | |
| 1105 | +.pt_fir .pt_fir_title .js { | |
| 1106 | + padding: 0 15rpx; | |
| 1107 | + height: 40rpx; | |
| 1108 | + background: #e9030d; | |
| 1109 | + text-align: center; | |
| 1110 | + border-radius: 8rpx; | |
| 1111 | + color: #fff; | |
| 1112 | + margin-left: 10rpx; | |
| 1113 | +} | |
| 1114 | + | |
| 1115 | +.pt_fir .pt_fir_title .tuannum { | |
| 1116 | + color: #e9030d; | |
| 1117 | + position: absolute; | |
| 1118 | + right: 20rpx; | |
| 1119 | + font-size: 26rpx; | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +.pding { | |
| 1123 | + padding-top: 20rpx; | |
| 1124 | + padding-left: 20rpx; | |
| 1125 | + height: 81%; | |
| 1126 | + padding-right: 20rpx; | |
| 1127 | + font-size: 26rpx; | |
| 1128 | + color: #ea120f | |
| 1129 | +} | |
| 1130 | + | |
| 1131 | +.pdres { | |
| 1132 | + margin-left: 10rpx; | |
| 1133 | + color: #8f8f94 | |
| 1134 | +} | |
| 1135 | + | |
| 1136 | +.ptgz { | |
| 1137 | + position: relative; | |
| 1138 | + font-size: 30rpx; | |
| 1139 | + padding-left: 20rpx; | |
| 1140 | + margin-top: 10rpx; | |
| 1141 | + overflow: hidden | |
| 1142 | +} | |
| 1143 | + | |
| 1144 | +.shuxian { | |
| 1145 | + width: 6rpx; | |
| 1146 | + height: 28rpx; | |
| 1147 | + background: #ea120f; | |
| 1148 | + display: inline-block; | |
| 1149 | + top: 5rpx; | |
| 1150 | + position: relative; | |
| 1151 | + margin-right: 5rpx | |
| 1152 | +} | |
| 1153 | + | |
| 1154 | +.ptgz_an { | |
| 1155 | + position: absolute; | |
| 1156 | + top: 5rpx; | |
| 1157 | + right: 6rpx | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +.ptgz_an .arrow-two { | |
| 1161 | + width: 18rpx; | |
| 1162 | + height: 18rpx; | |
| 1163 | + border-color: #da0b31; | |
| 1164 | + margin-top: 30rpx; | |
| 1165 | +} | |
| 1166 | + | |
| 1167 | +.pt_fir.se { | |
| 1168 | + height: auto; | |
| 1169 | + margin-bottom: 10rpx | |
| 1170 | +} | |
| 1171 | + | |
| 1172 | +.t_gz { | |
| 1173 | + padding: 10rpx 20rpx; | |
| 1174 | + font-size: 28rpx | |
| 1175 | +} | |
| 1176 | + | |
| 1177 | +.pt_fir.se1 { | |
| 1178 | + height: auto; | |
| 1179 | + margin: 0 | |
| 1180 | +} | |
| 1181 | + | |
| 1182 | +.pt_fir.se2 { | |
| 1183 | + height: auto; | |
| 1184 | + margin: 0; | |
| 1185 | + /* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */ | |
| 1186 | +} | |
| 1187 | + | |
| 1188 | +.pt_hb { | |
| 1189 | + height: 78rpx; | |
| 1190 | + line-height: 75rpx; | |
| 1191 | + position: relative; | |
| 1192 | + font-size: 32rpx; | |
| 1193 | + overflow: hidden; | |
| 1194 | + width: 695rpx; | |
| 1195 | + margin-left: 28rpx; | |
| 1196 | + border-bottom: 1rpx solid #E5E5E5 | |
| 1197 | +} | |
| 1198 | + | |
| 1199 | +.ptgz_an.xq { | |
| 1200 | + font-size: 32rpx; | |
| 1201 | + color: #d40024 | |
| 1202 | +} | |
| 1203 | + | |
| 1204 | +.wf { | |
| 1205 | + display: flex; | |
| 1206 | + padding: 20rpx 0; | |
| 1207 | +} | |
| 1208 | + | |
| 1209 | +.wf .item { | |
| 1210 | + width: 24.5%; | |
| 1211 | + text-align: center; | |
| 1212 | + font-size: 26rpx; | |
| 1213 | + color: #666 | |
| 1214 | +} | |
| 1215 | + | |
| 1216 | +.wf .item .item_txy { | |
| 1217 | + position: relative; | |
| 1218 | + width: 60rpx; | |
| 1219 | + height: 60rpx; | |
| 1220 | + background: #ea120f; | |
| 1221 | + border-radius: 50%; | |
| 1222 | + left: 50%; | |
| 1223 | + margin-left: -30rpx; | |
| 1224 | + border: 3px #dfdfdf solid; | |
| 1225 | + text-align: center; | |
| 1226 | + line-height: 60rpx; | |
| 1227 | + color: #fff; | |
| 1228 | + margin-bottom: 10rpx; | |
| 1229 | +} | |
| 1230 | + | |
| 1231 | +.wf .item .item_txy.hs { | |
| 1232 | + background: #cbcbcb; | |
| 1233 | +} | |
| 1234 | + | |
| 1235 | +.po { | |
| 1236 | + margin-bottom: 20rpx; | |
| 1237 | +} | |
| 1238 | + | |
| 1239 | +.cart-btn.line-h { | |
| 1240 | + line-height: 26rpx; | |
| 1241 | +} | |
| 1242 | + | |
| 1243 | +.cart-btn .fir-v { | |
| 1244 | + margin-top: 10rpx; | |
| 1245 | +} | |
| 1246 | + | |
| 1247 | +.hyt { | |
| 1248 | + padding: 0 20rpx; | |
| 1249 | + font-size: 30rpx; | |
| 1250 | + display: flex; | |
| 1251 | + align-items: center; | |
| 1252 | + margin-top: 10rpx; | |
| 1253 | +} | |
| 1254 | + | |
| 1255 | +.hyt .r_f { | |
| 1256 | + color: #e9120f; | |
| 1257 | + font-size: 26rpx; | |
| 1258 | + position: relative; | |
| 1259 | + top: 3rpx | |
| 1260 | +} | |
| 1261 | + | |
| 1262 | +.hyt .byj { | |
| 1263 | + color: #e9120f; | |
| 1264 | + font-size: 32rpx; | |
| 1265 | + position: relative; | |
| 1266 | + top: 5rpx | |
| 1267 | +} | |
| 1268 | + | |
| 1269 | +.pt_fir .pt_fir_title.no-mar-b { | |
| 1270 | + margin-bottom: 0; | |
| 1271 | + padding-bottom: 10rpx; | |
| 1272 | + margin-left: 20rpx | |
| 1273 | +} | |
| 1274 | + | |
| 1275 | +.pt_fir .pt_fir_title.boder-1 { | |
| 1276 | + border-bottom: 1rpx #e7e7e7 solid | |
| 1277 | +} | |
| 1278 | + | |
| 1279 | +.jie_price { | |
| 1280 | + /* padding: 10rpx 30rpx; */ | |
| 1281 | +} | |
| 1282 | + | |
| 1283 | +.jie_price_title { | |
| 1284 | + font-size: 30rpx; | |
| 1285 | + color: #a26270; | |
| 1286 | + margin-bottom: 10rpx | |
| 1287 | +} | |
| 1288 | + | |
| 1289 | +.price_list { | |
| 1290 | + display: flex; | |
| 1291 | + width: 100%; | |
| 1292 | +} | |
| 1293 | + | |
| 1294 | +.price_item { | |
| 1295 | + width: 25%; | |
| 1296 | + font-size: 28rpx; | |
| 1297 | + color: #4c336c | |
| 1298 | +} | |
| 1299 | + | |
| 1300 | +.pt_fir.se2 .zzk-1 { | |
| 1301 | + /* margin-top: 23rpx; */ | |
| 1302 | + font-size: 30rpx; | |
| 1303 | + position: relative; | |
| 1304 | + /* margin-bottom: 30rpx; */ | |
| 1305 | + border-left: 4rpx solid red; | |
| 1306 | + /* margin-left:14rpx; */ | |
| 1307 | + height: 30rpx; | |
| 1308 | + line-height: 30rpx; | |
| 1309 | + /* padding-left:5rpx; */ | |
| 1310 | +} | |
| 1311 | + | |
| 1312 | +.ckgd { | |
| 1313 | + /* position: absolute;top:0;right:57rpx; */ | |
| 1314 | + color: #d70025; | |
| 1315 | + font-size: 26rpx; | |
| 1316 | +} | |
| 1317 | + | |
| 1318 | +.ckgd .arrow-one { | |
| 1319 | + width: 14rpx; | |
| 1320 | + height: 14rpx; | |
| 1321 | + border-color: #da0b31; | |
| 1322 | + /* margin-top:5rpx; */ | |
| 1323 | + margin: auto; | |
| 1324 | +} | |
| 1325 | + | |
| 1326 | +.bview { | |
| 1327 | + position: fixed; | |
| 1328 | + top: 0; | |
| 1329 | + left: 0; | |
| 1330 | + width: 100%; | |
| 1331 | + height: 100%; | |
| 1332 | + background-color: rgba(0, 0, 0, 0.5); | |
| 1333 | +} | |
| 1334 | + | |
| 1335 | +.juzhong { | |
| 1336 | + position: fixed; | |
| 1337 | + top: 0; | |
| 1338 | + left: 0; | |
| 1339 | + width: 100%; | |
| 1340 | + height: 100%; | |
| 1341 | + display: flex; | |
| 1342 | + flex-direction: row; | |
| 1343 | + justify-content: center; | |
| 1344 | + align-items: center; | |
| 1345 | +} | |
| 1346 | + | |
| 1347 | +.juzhong .xq { | |
| 1348 | + padding: 0 20rpx; | |
| 1349 | + background: #fff; | |
| 1350 | + font-size: 30rpx; | |
| 1351 | + padding-bottom: 20rpx; | |
| 1352 | +} | |
| 1353 | + | |
| 1354 | +.juzhong .xq .title { | |
| 1355 | + text-align: center; | |
| 1356 | + margin: 20rpx 0; | |
| 1357 | + position: relative; | |
| 1358 | + height: 50rpx; | |
| 1359 | +} | |
| 1360 | + | |
| 1361 | +.juzhong .xq .hs1 { | |
| 1362 | + font-size: 28rpx; | |
| 1363 | + color: #ab8f9e | |
| 1364 | +} | |
| 1365 | + | |
| 1366 | +.juzhong .xq .title .close { | |
| 1367 | + position: absolute; | |
| 1368 | + top: 0; | |
| 1369 | + right: 0; | |
| 1370 | + width: 45rpx; | |
| 1371 | + height: 45rpx; | |
| 1372 | +} | |
| 1373 | + | |
| 1374 | +.pt_qd { | |
| 1375 | + /* margin-top: 40rpx; height: auto; */ | |
| 1376 | + padding: 20rpx; | |
| 1377 | +} | |
| 1378 | + | |
| 1379 | +.spec-cart-btn.w100 { | |
| 1380 | + width: 95%; | |
| 1381 | + margin-left: 0; | |
| 1382 | + height: 75rpx; | |
| 1383 | + line-height: 75rpx; | |
| 1384 | + margin: auto; | |
| 1385 | +} | |
| 1386 | + | |
| 1387 | +.sto_v { | |
| 1388 | + color: #333; | |
| 1389 | +} | |
| 1390 | + | |
| 1391 | +.ellipsis { | |
| 1392 | + overflow: hidden; | |
| 1393 | + white-space: nowrap; | |
| 1394 | + text-overflow: ellipsis; | |
| 1395 | +} | |
| 1396 | + | |
| 1397 | + | |
| 1398 | +/*---多少人参加团--*/ | |
| 1399 | +.group { | |
| 1400 | + padding-top: 20rpx; | |
| 1401 | + padding-bottom: 20rpx; | |
| 1402 | + width: 100%; | |
| 1403 | + /* min-height: 92rpx; */ | |
| 1404 | + border-bottom: 2rpx solid #ebedf0; | |
| 1405 | + | |
| 1406 | +} | |
| 1407 | + | |
| 1408 | +.group .group-list { | |
| 1409 | + display: flex; | |
| 1410 | + align-items: center; | |
| 1411 | + justify-content: space-around; | |
| 1412 | + /* height: 90rpx; */ | |
| 1413 | + /* padding: 0 130rpx 0 100rpx; */ | |
| 1414 | + /* width: 470rpx; | |
| 1415 | + | |
| 1416 | + position: absolute; */ | |
| 1417 | +} | |
| 1418 | + | |
| 1419 | +.group .group-list .gtou { | |
| 1420 | + width: 70rpx; | |
| 1421 | + height: 70rpx; | |
| 1422 | + /* float: left; | |
| 1423 | + position: relative; | |
| 1424 | + top: 6rpx; | |
| 1425 | + left: -96rpx; */ | |
| 1426 | +} | |
| 1427 | + | |
| 1428 | +.group .group-list .gtou image { | |
| 1429 | + display: block; | |
| 1430 | + width: 100%; | |
| 1431 | + height: 100%; | |
| 1432 | + border-radius: 50%; | |
| 1433 | + background-color: #f0f0f0; | |
| 1434 | +} | |
| 1435 | + | |
| 1436 | +.group .group-list .gdn { | |
| 1437 | + width: 140rpx; | |
| 1438 | + text-align: center; | |
| 1439 | + /* float: left; */ | |
| 1440 | + font-size: 26rpx; | |
| 1441 | + /* padding-left: 20rpx; */ | |
| 1442 | + /* line-height: 48rpx; | |
| 1443 | + height: 48rpx; | |
| 1444 | + width: 168rpx; | |
| 1445 | + position: relative; | |
| 1446 | + left: -80rpx; | |
| 1447 | + top:20rpx; */ | |
| 1448 | + font-weight: bold; | |
| 1449 | +} | |
| 1450 | + | |
| 1451 | +.group .group-list .ghaicha { | |
| 1452 | + /* width:300rpx; */ | |
| 1453 | + font-size: 27rpx; | |
| 1454 | + /* margin-left:180rpx; | |
| 1455 | + top:13rpx; | |
| 1456 | + left:-3rpx; */ | |
| 1457 | + font-weight: bold; | |
| 1458 | + | |
| 1459 | + | |
| 1460 | +} | |
| 1461 | + | |
| 1462 | +.group .group-list .ghaicha .gred { | |
| 1463 | + /* height: 48rpx; | |
| 1464 | + width: 300rpx; */ | |
| 1465 | +} | |
| 1466 | + | |
| 1467 | +.gsj { | |
| 1468 | + float: left; | |
| 1469 | + color: #8f8f94; | |
| 1470 | +} | |
| 1471 | + | |
| 1472 | +.group .group-list .cjt { | |
| 1473 | + height: 42rpx; | |
| 1474 | + width: 137rpx; | |
| 1475 | + /* position: absolute; | |
| 1476 | + right: 4rpx; | |
| 1477 | + top:25rpx; */ | |
| 1478 | + line-height: 42rpx; | |
| 1479 | + font-size: 24rpx; | |
| 1480 | + color: #fff; | |
| 1481 | + border: 2rpx solid #d60024; | |
| 1482 | + background-color: #d60024; | |
| 1483 | + border-radius: 25rpx; | |
| 1484 | + | |
| 1485 | +} | |
| 1486 | + | |
| 1487 | +.gbody { | |
| 1488 | + background-color: white; | |
| 1489 | +} | |
| 1490 | + | |
| 1491 | +.t_show { | |
| 1492 | + /* overflow: hidden; */ | |
| 1493 | + display: flex; | |
| 1494 | + /* width: 300rpx; */ | |
| 1495 | + color: #292929; | |
| 1496 | + /* line-height: 36rpx; */ | |
| 1497 | + font-size: 26rpx; | |
| 1498 | +} | |
| 1499 | + | |
| 1500 | +.join-cart>view.set_width { | |
| 1501 | + width: 58%; | |
| 1502 | +} | |
| 1503 | + | |
| 1504 | +/*秒杀样式zwp*/ | |
| 1505 | +#zwpMs { | |
| 1506 | + width: 31%; | |
| 1507 | + color: #fff; | |
| 1508 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | |
| 1509 | + background-size: 100% 60px; | |
| 1510 | +} | |
| 1511 | + | |
| 1512 | + | |
| 1513 | +/*--------- 修改后的样式 -----------*/ | |
| 1514 | +.elli { | |
| 1515 | + overflow: hidden; | |
| 1516 | + text-overflow: ellipsis; | |
| 1517 | + display: -webkit-box; | |
| 1518 | + -webkit-line-clamp: 2; | |
| 1519 | + -webkit-box-orient: vertical; | |
| 1520 | +} | |
| 1521 | + | |
| 1522 | +.one_elli { | |
| 1523 | + overflow: hidden; | |
| 1524 | + text-overflow: ellipsis; | |
| 1525 | + white-space: nowrap; | |
| 1526 | +} | |
| 1527 | + | |
| 1528 | +.tuwen_title { | |
| 1529 | + /* height: 86rpx; */ | |
| 1530 | + background-color: #eeeeee; | |
| 1531 | + /* margin-bottom: 32rpx; */ | |
| 1532 | + position: relative; | |
| 1533 | + display: flex; | |
| 1534 | + justify-content: center; | |
| 1535 | + align-items: center; | |
| 1536 | + padding: 20rpx; | |
| 1537 | +} | |
| 1538 | + | |
| 1539 | +.tuwen_title .g_line { | |
| 1540 | + width: 496rpx; | |
| 1541 | + height: 1rpx; | |
| 1542 | + border-bottom: #ababab 1rpx solid; | |
| 1543 | +} | |
| 1544 | + | |
| 1545 | +.tuwen_title .center_s { | |
| 1546 | + width: 124rpx; | |
| 1547 | + position: absolute; | |
| 1548 | + height: 34rpx; | |
| 1549 | + background-color: #eeeeee; | |
| 1550 | + font-size: 32rpx; | |
| 1551 | + display: flex; | |
| 1552 | + overflow: hidden; | |
| 1553 | + justify-content: center; | |
| 1554 | + align-items: center; | |
| 1555 | +} | |
| 1556 | + | |
| 1557 | +.tuwen_title .center_s image { | |
| 1558 | + width: 34rpx; | |
| 1559 | + height: 26rpx; | |
| 1560 | + margin-right: 10rpx | |
| 1561 | +} | |
| 1562 | + | |
| 1563 | +.t_g_info { | |
| 1564 | + /* margin: 0 34rpx;margin-bottom: 20rpx; */ | |
| 1565 | + display: flex; | |
| 1566 | + align-items: center; | |
| 1567 | + padding: 20rpx; | |
| 1568 | +} | |
| 1569 | + | |
| 1570 | +.red_shu { | |
| 1571 | + width: 10rpx; | |
| 1572 | + height: 36rpx; | |
| 1573 | + background-color: #da0035; | |
| 1574 | + margin-right: 8rpx; | |
| 1575 | +} | |
| 1576 | + | |
| 1577 | +.tb-l { | |
| 1578 | + /* line-height: 96rpx; */ | |
| 1579 | +} | |
| 1580 | + | |
| 1581 | +.table_s { | |
| 1582 | + border: #e4e4e4 1rpx solid; | |
| 1583 | + box-sizing: border-box; | |
| 1584 | + font-size: 26rpx; | |
| 1585 | +} | |
| 1586 | + | |
| 1587 | +.tb_item { | |
| 1588 | + display: flex; | |
| 1589 | + /* height: 96rpx; */ | |
| 1590 | + border-bottom: 1rpx solid #e4e4e4 | |
| 1591 | +} | |
| 1592 | + | |
| 1593 | +.item_left { | |
| 1594 | + width: 210rpx; | |
| 1595 | + height: 100%; | |
| 1596 | + box-sizing: border-box; | |
| 1597 | + text-align: center; | |
| 1598 | + padding: 20rpx; | |
| 1599 | + background: #f9f9f9; | |
| 1600 | + border-right: 2rpx solid #e4e4e4 | |
| 1601 | +} | |
| 1602 | + | |
| 1603 | +.item_left text { | |
| 1604 | + /* margin-left: 44rpx; */ | |
| 1605 | +} | |
| 1606 | + | |
| 1607 | +.item_right { | |
| 1608 | + flex: 1; | |
| 1609 | + height: 100%; | |
| 1610 | + overflow: hidden; | |
| 1611 | + white-space: nowrap; | |
| 1612 | + text-overflow: ellipsis; | |
| 1613 | + padding: 20rpx; | |
| 1614 | +} | |
| 1615 | + | |
| 1616 | +.item_right text { | |
| 1617 | + /* margin-left: 66rpx; */ | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +.table_s .tb-l:last-child { | |
| 1621 | + border-bottom: none; | |
| 1622 | +} | |
| 1623 | + | |
| 1624 | +.bzfu_img { | |
| 1625 | + width: 164rpx; | |
| 1626 | + height: 34rpx; | |
| 1627 | + /* margin-right: 18rpx; margin-left: 12rpx */ | |
| 1628 | +} | |
| 1629 | + | |
| 1630 | +.bz_view { | |
| 1631 | + /* height:100rpx; padding: 0 34rpx 0 13rpx; */ | |
| 1632 | + color: #333; | |
| 1633 | + font-size: 28rpx; | |
| 1634 | + padding: 20rpx 20rpx 20rpx 10rpx; | |
| 1635 | + /* border-bottom: 3rpx solid #eee; */ | |
| 1636 | + /* border-top: 3rpx solid #eee; */ | |
| 1637 | +} | |
| 1638 | + | |
| 1639 | +.bz_view view { | |
| 1640 | + width: 520rpx; | |
| 1641 | + /* max-height: 70rpx; */ | |
| 1642 | + /* overflow: hidden; */ | |
| 1643 | +} | |
| 1644 | + | |
| 1645 | +.bb_view { | |
| 1646 | + display: flex; | |
| 1647 | + align-items: center; | |
| 1648 | + justify-content: space-between; | |
| 1649 | + padding: 20rpx; | |
| 1650 | + color: #333; | |
| 1651 | + font-size: 30rpx; | |
| 1652 | + /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ | |
| 1653 | +} | |
| 1654 | + | |
| 1655 | +.red_bb { | |
| 1656 | + color: #d70026; | |
| 1657 | + /* min-width:158rpx;width: auto; */ | |
| 1658 | +} | |
| 1659 | + | |
| 1660 | +.bg_jj { | |
| 1661 | + width: 14rpx; | |
| 1662 | + height: 14rpx; | |
| 1663 | + border-top: 2rpx solid #d70026; | |
| 1664 | + border-right: 2rpx solid #d70026; | |
| 1665 | + transform: rotateZ(45deg); | |
| 1666 | + display: inline-block; | |
| 1667 | + margin-bottom: 3rpx; | |
| 1668 | +} | |
| 1669 | + | |
| 1670 | +.bg_jj.down { | |
| 1671 | + transform: rotateZ(135deg); | |
| 1672 | +} | |
| 1673 | + | |
| 1674 | +.bg_jj.up { | |
| 1675 | + transform: rotateZ(-45deg); | |
| 1676 | + margin-top: 6rpx; | |
| 1677 | +} | |
| 1678 | + | |
| 1679 | +.bz-content { | |
| 1680 | + padding: 0 0 0 20rpx; | |
| 1681 | +} | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | +/* 顶部边框 */ | |
| 1687 | +.topframe { | |
| 1688 | + width: 100%; | |
| 1689 | + height: 172rpx; | |
| 1690 | + flex-direction: row; | |
| 1691 | + justify-content: space-between; | |
| 1692 | + border-bottom: 6rpx solid #eeeeee; | |
| 1693 | + overflow: hidden; | |
| 1694 | +} | |
| 1695 | + | |
| 1696 | +/* 评价人边框*/ | |
| 1697 | +.topframe .topframe-top { | |
| 1698 | + display: flex; | |
| 1699 | + margin-top: 40rpx; | |
| 1700 | + margin-bottom: 36rpx; | |
| 1701 | + color: #7d7d7d; | |
| 1702 | + padding-left: 20rpx; | |
| 1703 | + font-size: 32rpx; | |
| 1704 | +} | |
| 1705 | + | |
| 1706 | +/*评价人数量*/ | |
| 1707 | +.topframe .topframe-top .topframe-top-val { | |
| 1708 | + margin-left: 15rpx; | |
| 1709 | + | |
| 1710 | +} | |
| 1711 | + | |
| 1712 | +.topframe-top-content { | |
| 1713 | + display: flex; | |
| 1714 | + width: 36%; | |
| 1715 | +} | |
| 1716 | + | |
| 1717 | +/* 好评 */ | |
| 1718 | +.topframe-praise { | |
| 1719 | + width: 61%; | |
| 1720 | + text-align: right; | |
| 1721 | + color: #dc4355; | |
| 1722 | + font-size: 28rpx; | |
| 1723 | +} | |
| 1724 | + | |
| 1725 | +/* 按钮列表 */ | |
| 1726 | +.buttem-list { | |
| 1727 | + width: 100%; | |
| 1728 | + display: flex; | |
| 1729 | + font-size: 20rpx; | |
| 1730 | + overflow: hidden; | |
| 1731 | +} | |
| 1732 | + | |
| 1733 | +.buttem-list .item { | |
| 1734 | + min-width: 17%; | |
| 1735 | + font-size: 24rpx; | |
| 1736 | + border-radius: 20rpx; | |
| 1737 | + background: #ffe3e2; | |
| 1738 | + height: 38rpx; | |
| 1739 | + text-align: center; | |
| 1740 | + line-height: 38rpx; | |
| 1741 | + margin-left: 20rpx; | |
| 1742 | + justify-content: center; | |
| 1743 | +} | |
| 1744 | + | |
| 1745 | +.buttem-list .item.red { | |
| 1746 | + color: #fff; | |
| 1747 | + background: #d60022; | |
| 1748 | +} | |
| 1749 | + | |
| 1750 | +/* 用户评价 */ | |
| 1751 | +.middle { | |
| 1752 | + width: 95%; | |
| 1753 | + margin: 0 auto; | |
| 1754 | +} | |
| 1755 | + | |
| 1756 | +.middle-img-frame { | |
| 1757 | + height: 65rpx; | |
| 1758 | + display: flex; | |
| 1759 | + margin-top: 32rpx; | |
| 1760 | + | |
| 1761 | +} | |
| 1762 | + | |
| 1763 | +/* 评价的用户图片 */ | |
| 1764 | +.middle-img { | |
| 1765 | + width: 60rpx; | |
| 1766 | + height: 60rpx; | |
| 1767 | + border-radius: 50%; | |
| 1768 | + -moz-border-radius: 50%; | |
| 1769 | + -webkit-border-radius: 50%; | |
| 1770 | + margin-right: 15rpx; | |
| 1771 | +} | |
| 1772 | + | |
| 1773 | +/* 评价的用户边框 */ | |
| 1774 | +.middle-user-frame { | |
| 1775 | + height: 65rpx; | |
| 1776 | + overflow: hidden; | |
| 1777 | +} | |
| 1778 | + | |
| 1779 | +.middle-user { | |
| 1780 | + height: 25; | |
| 1781 | + font-size: 28rpx; | |
| 1782 | +} | |
| 1783 | + | |
| 1784 | +/* 评价图片 */ | |
| 1785 | +.middle-img-two { | |
| 1786 | + width: 115rpx; | |
| 1787 | + height: 25rpx; | |
| 1788 | + text-align: center; | |
| 1789 | + margin-bottom: 20rpx; | |
| 1790 | + margin-left: 5rpx; | |
| 1791 | +} | |
| 1792 | + | |
| 1793 | +.xc-pirces { | |
| 1794 | + margin-top: 14rpx; | |
| 1795 | +} | |
| 1796 | + | |
| 1797 | +/* 评价文字 */ | |
| 1798 | +.middle-font { | |
| 1799 | + font-size: 30rpx; | |
| 1800 | + | |
| 1801 | +} | |
| 1802 | + | |
| 1803 | +.iddle-goods-img { | |
| 1804 | + width: 100%; | |
| 1805 | + display: flex; | |
| 1806 | + margin-top: 22rpx; | |
| 1807 | +} | |
| 1808 | + | |
| 1809 | +/* 商品图片 */ | |
| 1810 | +.goods-img { | |
| 1811 | + width: 156rpx; | |
| 1812 | + height: 156rpx; | |
| 1813 | + margin-left: 22rpx; | |
| 1814 | + height: 100%; | |
| 1815 | +} | |
| 1816 | + | |
| 1817 | +.parameter-frame { | |
| 1818 | + margin-top: 14rxp; | |
| 1819 | + margin-bottom: 14rpx; | |
| 1820 | + width: 50%; | |
| 1821 | + height: 30rpx; | |
| 1822 | +} | |
| 1823 | + | |
| 1824 | +.z_parameter { | |
| 1825 | + width: 98%; | |
| 1826 | + height: 45rpx; | |
| 1827 | + display: flex; | |
| 1828 | + line-height: 45rpx; | |
| 1829 | + margin-top: 20rpx; | |
| 1830 | + margin-bottom: 14rpx; | |
| 1831 | + justify-content: space-between; | |
| 1832 | +} | |
| 1833 | + | |
| 1834 | +.parameter-font { | |
| 1835 | + font-size: 26rpx; | |
| 1836 | + | |
| 1837 | +} | |
| 1838 | + | |
| 1839 | +/* 规格 */ | |
| 1840 | +.parameter-state { | |
| 1841 | + width: 100rpx; | |
| 1842 | + font-size: 24rpx; | |
| 1843 | + color: #c4c4c4; | |
| 1844 | +} | |
| 1845 | + | |
| 1846 | +.parameter-dian { | |
| 1847 | + display: flex; | |
| 1848 | + width: 94rpx; | |
| 1849 | + height: 33rpx; | |
| 1850 | + font-size: 20rpx; | |
| 1851 | + border-radius: 20rpx; | |
| 1852 | + line-height: 33rpx; | |
| 1853 | + padding-left: 25rpx; | |
| 1854 | + border: 4rpx solid #eeeeee; | |
| 1855 | + | |
| 1856 | +} | |
| 1857 | + | |
| 1858 | +/* 点赞图片 */ | |
| 1859 | +.parameter-img { | |
| 1860 | + width: 27rpx; | |
| 1861 | + height: 27rpx; | |
| 1862 | + margin-top: 3rpx; | |
| 1863 | +} | |
| 1864 | + | |
| 1865 | +.parameter-val { | |
| 1866 | + margin-left: 25rpx; | |
| 1867 | + font-size: 26rpx; | |
| 1868 | + color: #999; | |
| 1869 | +} | |
| 1870 | + | |
| 1871 | +/* 回复 */ | |
| 1872 | +.reply { | |
| 1873 | + width: 95%; | |
| 1874 | + height: 120rpx; | |
| 1875 | + padding-top: 14rpx; | |
| 1876 | + border-top: 3rpx solid #eeeeee; | |
| 1877 | + margin: 0 auto; | |
| 1878 | + | |
| 1879 | +} | |
| 1880 | + | |
| 1881 | +.shop-reply { | |
| 1882 | + height: 30rpx; | |
| 1883 | + color: #d60022; | |
| 1884 | + font-size: 24rpx; | |
| 1885 | + overflow: hidden; | |
| 1886 | +} | |
| 1887 | + | |
| 1888 | +.shop-font { | |
| 1889 | + width: 94%; | |
| 1890 | + font-size: 24rpx; | |
| 1891 | + padding-top: 10rpx; | |
| 1892 | + | |
| 1893 | +} | |
| 1894 | + | |
| 1895 | +.line_bulge { | |
| 1896 | + width: 17rpx; | |
| 1897 | + height: 17rpx; | |
| 1898 | + border-top: 1rpx solid #eeeeee; | |
| 1899 | + border-left: 1rpx solid #eeeeee; | |
| 1900 | + transform: rotate(45deg); | |
| 1901 | + position: absolute; | |
| 1902 | + top: -12rpx; | |
| 1903 | + left: 50rpx; | |
| 1904 | + background: #fff; | |
| 1905 | +} | |
| 1906 | + | |
| 1907 | + | |
| 1908 | +.xc_comment { | |
| 1909 | + display: flex; | |
| 1910 | + justify-content: space-around; | |
| 1911 | + width: 100%; | |
| 1912 | + box-sizing: border-box; | |
| 1913 | + padding: 10rpx 20rpx; | |
| 1914 | + /* height: 42rpx; | |
| 1915 | + padding-left: 34rpx; */ | |
| 1916 | + color: #333; | |
| 1917 | + | |
| 1918 | +} | |
| 1919 | + | |
| 1920 | +.xc_comment-have-pictures { | |
| 1921 | + width: 153rpx; | |
| 1922 | + /* height: 42rpx; */ | |
| 1923 | + line-height: 42rpx; | |
| 1924 | + text-align: center; | |
| 1925 | + background: #ffe3e2; | |
| 1926 | + color: 28rpx; | |
| 1927 | + border-radius: 21rpx; | |
| 1928 | + font-size: 24rpx; | |
| 1929 | +} | |
| 1930 | + | |
| 1931 | +.xc_comment-discuss { | |
| 1932 | + width: 152rpx; | |
| 1933 | + height: 42rpx; | |
| 1934 | + line-height: 42rpx; | |
| 1935 | + text-align: center; | |
| 1936 | + background: #ffe3e2; | |
| 1937 | + color: 28rpx; | |
| 1938 | + border-radius: 20rpx; | |
| 1939 | + font-size: 24rpx; | |
| 1940 | + margin-left: 28rpx | |
| 1941 | +} | |
| 1942 | + | |
| 1943 | +.xc_comment-detail { | |
| 1944 | + display: flex; | |
| 1945 | + /* margin-top: 40rpx; */ | |
| 1946 | + /* width: 524rpx; */ | |
| 1947 | + /* margin-left: 34rpx; */ | |
| 1948 | + border-radius: 24rpx; | |
| 1949 | + border: 2rpx solid #ebedf0; | |
| 1950 | + margin-left: 20rpx; | |
| 1951 | + box-sizing: border-box; | |
| 1952 | + /* overflow: hidden; */ | |
| 1953 | +} | |
| 1954 | + | |
| 1955 | +.xc_user-img { | |
| 1956 | + border-radius: 50%; | |
| 1957 | + margin: auto 0; | |
| 1958 | +} | |
| 1959 | + | |
| 1960 | +.xc_comment-user { | |
| 1961 | + display: flex; | |
| 1962 | + /* margin-top: 22rpx; | |
| 1963 | + margin-left: 22rpx; */ | |
| 1964 | +} | |
| 1965 | + | |
| 1966 | +.xc_user { | |
| 1967 | + width: 170rpx; | |
| 1968 | + height: 60rpx; | |
| 1969 | + margin-left: 6rpx; | |
| 1970 | + overflow: hidden; | |
| 1971 | +} | |
| 1972 | + | |
| 1973 | +.xc_user-name { | |
| 1974 | + /* height: 25rpx; */ | |
| 1975 | +} | |
| 1976 | + | |
| 1977 | +.xc_comment-img { | |
| 1978 | + width: 22rpx; | |
| 1979 | + height: 22rpx; | |
| 1980 | + /* margin-top: 14rpx; */ | |
| 1981 | + margin-right: 5rpx | |
| 1982 | +} | |
| 1983 | + | |
| 1984 | +.xc_comment-font { | |
| 1985 | + /* height: 75rpx; */ | |
| 1986 | + /* margin-left: 22rpx; */ | |
| 1987 | + white-space: normal; | |
| 1988 | + overflow: hidden; | |
| 1989 | + /* margin-top: 8rpx; | |
| 1990 | + line-height: 38rpx; */ | |
| 1991 | + | |
| 1992 | +} | |
| 1993 | + | |
| 1994 | +.xc_comment-val { | |
| 1995 | + /* width: 88%; | |
| 1996 | + height: 30rpx; | |
| 1997 | + margin-left: 22rpx; | |
| 1998 | + display: flex; | |
| 1999 | + margin-top: 15rpx; | |
| 2000 | + margin-bottom:15rpx; */ | |
| 2001 | +} | |
| 2002 | + | |
| 2003 | +.xc_comment-time { | |
| 2004 | + /* height: 30rpx; */ | |
| 2005 | + font-size: 22rpx; | |
| 2006 | + color: #a5a5a5; | |
| 2007 | + overflow: hidden; | |
| 2008 | +} | |
| 2009 | + | |
| 2010 | +.xc_goods-img { | |
| 2011 | + width: 180rpx; | |
| 2012 | + height: 180rpx; | |
| 2013 | +} | |
| 2014 | + | |
| 2015 | +.xc_comment-left { | |
| 2016 | + display: inline-block; | |
| 2017 | + width: 312rpx; | |
| 2018 | + padding: 20rpx; | |
| 2019 | +} | |
| 2020 | + | |
| 2021 | +.xc_goods-img-frame { | |
| 2022 | + border-radius: 0 22rpx 22rpx 0; | |
| 2023 | + overflow: hidden; | |
| 2024 | + /* display:inline-block; */ | |
| 2025 | + /* width: 40%; | |
| 2026 | + height: 90%; | |
| 2027 | + text-align: center; | |
| 2028 | + padding-top: 30rpx; | |
| 2029 | + vertical-align: top; */ | |
| 2030 | +} | |
| 2031 | + | |
| 2032 | +.xc_imgs { | |
| 2033 | + width: 50rpx; | |
| 2034 | + height: 50rpx; | |
| 2035 | + border-radius: 50%; | |
| 2036 | + margin-right: 5rpx; | |
| 2037 | +} | |
| 2038 | + | |
| 2039 | +.pj_word_size { | |
| 2040 | + font-size: 28rpx | |
| 2041 | +} | |
| 2042 | + | |
| 2043 | +.pj_scroll { | |
| 2044 | + /* white-space: nowrap; */ | |
| 2045 | + /* height: 324rpx; */ | |
| 2046 | + /* margin-bottom: 50rpx; */ | |
| 2047 | + display: flex; | |
| 2048 | + align-items: center; | |
| 2049 | + padding: 20rpx 0; | |
| 2050 | + /* box-sizing: border-box; */ | |
| 2051 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | |
| 2052 | +} | |
| 2053 | + | |
| 2054 | + | |
| 2055 | +/*领券*/ | |
| 2056 | +.three-level-word { | |
| 2057 | + font-size: 25rpx; | |
| 2058 | +} | |
| 2059 | + | |
| 2060 | +.four-level-word { | |
| 2061 | + font-size: 23rpx; | |
| 2062 | +} | |
| 2063 | + | |
| 2064 | +.cx-frame { | |
| 2065 | + /* border-top:3rpx solid #eee; */ | |
| 2066 | + /* width:99%; | |
| 2067 | + height: 95rpx; | |
| 2068 | + line-height: 95rpx; | |
| 2069 | + padding-left:24rpx; */ | |
| 2070 | + padding: 20rpx; | |
| 2071 | +} | |
| 2072 | + | |
| 2073 | +.cx-frame .cx-sizs { | |
| 2074 | + /* width: 68rpx; */ | |
| 2075 | + /* height: 100%; */ | |
| 2076 | + /* line-height: 100rpx; */ | |
| 2077 | + /* overflow: hidden; */ | |
| 2078 | + /* margin-left: 10rpx; */ | |
| 2079 | +} | |
| 2080 | + | |
| 2081 | +.xc-coupon-fram { | |
| 2082 | + position: relative; | |
| 2083 | + margin-right: 16rpx; | |
| 2084 | + /* width:200rpx; */ | |
| 2085 | + /* padding-top:30rpx; */ | |
| 2086 | + | |
| 2087 | +} | |
| 2088 | + | |
| 2089 | +.xc-coupon-fram .xc-coupon { | |
| 2090 | + /* width:175rpx ; | |
| 2091 | + height: 40rpx; | |
| 2092 | + line-height: 40rpx; */ | |
| 2093 | + background-color: #d60021; | |
| 2094 | + /* margin:0 auto; */ | |
| 2095 | + color: #fff; | |
| 2096 | + padding: 6rpx 20rpx; | |
| 2097 | + | |
| 2098 | +} | |
| 2099 | + | |
| 2100 | +.xc-coupon-fram .xc-circular { | |
| 2101 | + width: 16rpx; | |
| 2102 | + height: 16rpx; | |
| 2103 | + background-color: white; | |
| 2104 | + position: absolute; | |
| 2105 | + top: 50%; | |
| 2106 | + /* left: -10rpx; */ | |
| 2107 | + transform: translateY(-50%); | |
| 2108 | +} | |
| 2109 | + | |
| 2110 | +.xc-coupon-fram .xc-one { | |
| 2111 | + left: -8rpx; | |
| 2112 | +} | |
| 2113 | + | |
| 2114 | +.xc-coupon-fram .xc-two { | |
| 2115 | + right: -8rpx; | |
| 2116 | +} | |
| 2117 | + | |
| 2118 | +.cx-obtain-coupon { | |
| 2119 | + /* width: 65rpx; | |
| 2120 | + height: 100%; | |
| 2121 | + padding-left:15rpx; */ | |
| 2122 | + color: #d70025; | |
| 2123 | + display: flex; | |
| 2124 | + align-items: center; | |
| 2125 | + /* position: absolute; | |
| 2126 | + right: 5rpx; */ | |
| 2127 | +} | |
| 2128 | + | |
| 2129 | +/* 自定义弹出窗口 */ | |
| 2130 | +.cx-popup { | |
| 2131 | + width: 100%; | |
| 2132 | + background: #fff; | |
| 2133 | + z-index: 35; | |
| 2134 | + border-top-left-radius: 25rpx; | |
| 2135 | + border-top-right-radius: 25rpx; | |
| 2136 | + position: fixed; | |
| 2137 | + bottom: 0; | |
| 2138 | +} | |
| 2139 | + | |
| 2140 | +.cx-popup .top { | |
| 2141 | + /* width: 90%; | |
| 2142 | + height:85rpx; */ | |
| 2143 | + font-size: 32rpx; | |
| 2144 | + padding: 20rpx 0; | |
| 2145 | + border-bottom: 2rpx solid #ebedf0; | |
| 2146 | + /* padding-top: 50rpx; | |
| 2147 | + font-weight:600; */ | |
| 2148 | + | |
| 2149 | +} | |
| 2150 | + | |
| 2151 | +.cx-popup .top-frame { | |
| 2152 | + /* width: 100%; | |
| 2153 | + display: flex; | |
| 2154 | + justify-content: center; | |
| 2155 | + overflow: hidden; */ | |
| 2156 | +} | |
| 2157 | + | |
| 2158 | +.xc-valid-coupon { | |
| 2159 | + width: 90%; | |
| 2160 | + height: 40rpx; | |
| 2161 | + padding-top: 24rpx; | |
| 2162 | + overflow: hidden; | |
| 2163 | +} | |
| 2164 | + | |
| 2165 | +.xc-frame { | |
| 2166 | + position: relative; | |
| 2167 | +} | |
| 2168 | + | |
| 2169 | +.xc-coupon-frame { | |
| 2170 | + width: 100%; | |
| 2171 | + max-height: 560rpx; | |
| 2172 | + overflow: auto; | |
| 2173 | + | |
| 2174 | +} | |
| 2175 | + | |
| 2176 | +.xc-coupon-frame .rel:not(:first-child) { | |
| 2177 | + margin-top: 20rpx; | |
| 2178 | +} | |
| 2179 | + | |
| 2180 | +.xc-coupon-frame .coupon { | |
| 2181 | + width: 100%; | |
| 2182 | + height: 168rpx; | |
| 2183 | + border-radius: 25rpx; | |
| 2184 | + border: 2rpx solid #ffdcdc; | |
| 2185 | + overflow: hidden; | |
| 2186 | + /* margin-top:16rpx; */ | |
| 2187 | + box-sizing: border-box; | |
| 2188 | + | |
| 2189 | +} | |
| 2190 | + | |
| 2191 | +/* .xc-coupon-frame .coupon ~ .coupon { | |
| 2192 | + margin-top:16rpx; | |
| 2193 | +} */ | |
| 2194 | +.xc-coupon-left { | |
| 2195 | + width: 216rpx; | |
| 2196 | + /* height: 100%; */ | |
| 2197 | + background-color: #ffeeef; | |
| 2198 | + border-right: 4rpx dashed #ffdbd9; | |
| 2199 | + overflow: hidden; | |
| 2200 | + /* line-height: 100%; */ | |
| 2201 | + display: flex; | |
| 2202 | + flex-direction: column; | |
| 2203 | + justify-content: center; | |
| 2204 | + align-items: center; | |
| 2205 | + flex-shrink: 0; | |
| 2206 | +} | |
| 2207 | + | |
| 2208 | +.xc-money { | |
| 2209 | + color: #f30026; | |
| 2210 | + text-align: center; | |
| 2211 | +} | |
| 2212 | + | |
| 2213 | +.xc-rmb { | |
| 2214 | + /* width:44rpx; | |
| 2215 | + padding-top:7rpx; */ | |
| 2216 | +} | |
| 2217 | + | |
| 2218 | +.xc-money-frame { | |
| 2219 | + /* margin-left:35rpx; | |
| 2220 | + margin-top:48rpx; */ | |
| 2221 | + | |
| 2222 | +} | |
| 2223 | + | |
| 2224 | +.xc-spacing { | |
| 2225 | + letter-spacing: 4rpx; | |
| 2226 | +} | |
| 2227 | + | |
| 2228 | +.xc-circular-one { | |
| 2229 | + position: absolute; | |
| 2230 | + top: -15rpx; | |
| 2231 | + left: 205rpx; | |
| 2232 | + width: 30rpx; | |
| 2233 | + height: 30rpx; | |
| 2234 | + background: #fff; | |
| 2235 | + overflow: hidden; | |
| 2236 | +} | |
| 2237 | + | |
| 2238 | +.xc-circular-two { | |
| 2239 | + position: absolute; | |
| 2240 | + bottom: -15rpx; | |
| 2241 | + /* top:150rpx; */ | |
| 2242 | + left: 205rpx; | |
| 2243 | + width: 30rpx; | |
| 2244 | + height: 30rpx; | |
| 2245 | + background: #fff; | |
| 2246 | +} | |
| 2247 | + | |
| 2248 | +.xc-detail-coupon { | |
| 2249 | + /* margin-left: 22rpx; | |
| 2250 | + overflow: hidden; | |
| 2251 | + padding-top: 43rpx; */ | |
| 2252 | + /* display: flex; | |
| 2253 | + align-items: center; */ | |
| 2254 | +} | |
| 2255 | + | |
| 2256 | +.xc-coupon-right { | |
| 2257 | + /* width: 455rpx; | |
| 2258 | + height: 100%; */ | |
| 2259 | + background: #fffaf9; | |
| 2260 | + padding: 20rpx; | |
| 2261 | + box-sizing: border-box; | |
| 2262 | + width: 100%; | |
| 2263 | + justify-content: space-between; | |
| 2264 | + align-items: center; | |
| 2265 | +} | |
| 2266 | + | |
| 2267 | +.xc-below { | |
| 2268 | + margin-top: 20rpx; | |
| 2269 | + | |
| 2270 | +} | |
| 2271 | + | |
| 2272 | +.xc-get { | |
| 2273 | + | |
| 2274 | + width: 140rpx; | |
| 2275 | + /* height: 48rpx; */ | |
| 2276 | + color: #fff; | |
| 2277 | + text-align: center; | |
| 2278 | + border-radius: 27rpx; | |
| 2279 | + line-height: 54rpx; | |
| 2280 | + /* margin-left:20rpx; */ | |
| 2281 | +} | |
| 2282 | + | |
| 2283 | +.background { | |
| 2284 | + background: #f40028; | |
| 2285 | +} | |
| 2286 | + | |
| 2287 | +/*--不可使用--*/ | |
| 2288 | +.background.nouse { | |
| 2289 | + background: gainsboro; | |
| 2290 | +} | |
| 2291 | + | |
| 2292 | +.xc-background { | |
| 2293 | + background: #b9b9b9; | |
| 2294 | +} | |
| 2295 | + | |
| 2296 | + | |
| 2297 | +.cx-confirm { | |
| 2298 | + width: 100%; | |
| 2299 | + padding: 20rpx; | |
| 2300 | + box-sizing: border-box; | |
| 2301 | + /* height: 160rpx; */ | |
| 2302 | + | |
| 2303 | +} | |
| 2304 | + | |
| 2305 | +.cx-confirm .confirm { | |
| 2306 | + /* width: 372rpx; | |
| 2307 | + height: 60rpx; */ | |
| 2308 | + background-color: #f40026; | |
| 2309 | + color: #fff; | |
| 2310 | + border-radius: 10rpx; | |
| 2311 | + line-height: 80rpx; | |
| 2312 | + font-size: 28rpx; | |
| 2313 | + | |
| 2314 | +} | |
| 2315 | + | |
| 2316 | +.up { | |
| 2317 | + animation: up .7s; | |
| 2318 | +} | |
| 2319 | + | |
| 2320 | +.down { | |
| 2321 | + animation: down 1s; | |
| 2322 | +} | |
| 2323 | + | |
| 2324 | +@keyframes up { | |
| 2325 | + 0% { | |
| 2326 | + transform: translateY(550rpx); | |
| 2327 | + } | |
| 2328 | + | |
| 2329 | + 100% { | |
| 2330 | + transform: translateY(0); | |
| 2331 | + } | |
| 2332 | +} | |
| 2333 | + | |
| 2334 | +@keyframes down { | |
| 2335 | + 0% { | |
| 2336 | + transform: translateY(0); | |
| 2337 | + } | |
| 2338 | + | |
| 2339 | + 100% { | |
| 2340 | + transform: translateY(550rpx); | |
| 2341 | + } | |
| 2342 | +} | |
| 2343 | + | |
| 2344 | + | |
| 2345 | +/* 分享 */ | |
| 2346 | +.icon-share { | |
| 2347 | + font-size: 42rpx; | |
| 2348 | + color: #d60021; | |
| 2349 | + line-height: 1; | |
| 2350 | +} | |
| 2351 | + | |
| 2352 | +.xc-share-frame { | |
| 2353 | + /* width: 129rpx; | |
| 2354 | + height: 48rpx; | |
| 2355 | + border-top-left-radius: 18rpx; | |
| 2356 | + border-bottom-left-radius: 18rpx; */ | |
| 2357 | + /* background: #d60021; */ | |
| 2358 | + /* position:absolute; | |
| 2359 | + left:622rpx; | |
| 2360 | + top:-37rpx; | |
| 2361 | + line-height:50rpx; | |
| 2362 | + margin-top:52rpx; */ | |
| 2363 | +} | |
| 2364 | + | |
| 2365 | +.xc-share-frame-jieti { | |
| 2366 | + width: 129rpx; | |
| 2367 | + height: 48rpx; | |
| 2368 | + border-top-left-radius: 18rpx; | |
| 2369 | + border-bottom-left-radius: 18rpx; | |
| 2370 | + background: #d60021; | |
| 2371 | + line-height: 50rpx; | |
| 2372 | +} | |
| 2373 | + | |
| 2374 | +.xc-share-frame .share-font, | |
| 2375 | +.xc-share-frame-jieti .share-font { | |
| 2376 | + font-size: 32rpx; | |
| 2377 | + color: #fff; | |
| 2378 | + margin-left: 10rpx; | |
| 2379 | + | |
| 2380 | +} | |
| 2381 | + | |
| 2382 | + | |
| 2383 | +.xc-share-frame .share-frame, | |
| 2384 | +.xc-share-frame-jieti .share-frame { | |
| 2385 | + width: 30rpx; | |
| 2386 | + height: 30rpx; | |
| 2387 | + margin-top: 9rpx; | |
| 2388 | + margin-left: 10rpx; | |
| 2389 | + | |
| 2390 | +} | |
| 2391 | + | |
| 2392 | +.xc-share { | |
| 2393 | + width: 90%; | |
| 2394 | + height: 800rpx; | |
| 2395 | + background: #fff; | |
| 2396 | + z-index: 35; | |
| 2397 | +} | |
| 2398 | + | |
| 2399 | +.img-frame { | |
| 2400 | + position: absolute; | |
| 2401 | + top: 175rpx; | |
| 2402 | + left: 100rpx; | |
| 2403 | + z-index: 55; | |
| 2404 | + overflow: hidden; | |
| 2405 | + | |
| 2406 | +} | |
| 2407 | + | |
| 2408 | +.img-frame .img { | |
| 2409 | + width: 100rpx; | |
| 2410 | + height: 100rpx; | |
| 2411 | + | |
| 2412 | +} | |
| 2413 | + | |
| 2414 | +.xc-share .top { | |
| 2415 | + height: 85rpx; | |
| 2416 | + width: 100%; | |
| 2417 | + border-bottom: 4rpx dashed #f5f5f5; | |
| 2418 | + overflow: hidden; | |
| 2419 | + | |
| 2420 | +} | |
| 2421 | + | |
| 2422 | +.xc-share .name { | |
| 2423 | + font-size: 25rpx; | |
| 2424 | + margin-left: 180rpx; | |
| 2425 | + color: #000; | |
| 2426 | + | |
| 2427 | +} | |
| 2428 | + | |
| 2429 | +.xc-share .recommend { | |
| 2430 | + width: 110rpx; | |
| 2431 | + height: 12rpx; | |
| 2432 | + color: #fff; | |
| 2433 | + background: #d60021; | |
| 2434 | + font-size: 20rpx; | |
| 2435 | + border-radius: 25rpx; | |
| 2436 | + margin-left: 10rpx; | |
| 2437 | + line-height: 37rpx; | |
| 2438 | +} | |
| 2439 | + | |
| 2440 | +.xc-left-circle { | |
| 2441 | + width: 40rpx; | |
| 2442 | + height: 25rpx; | |
| 2443 | + position: absolute; | |
| 2444 | + top: 280rpx; | |
| 2445 | + left: 29rpx; | |
| 2446 | + z-index: 55; | |
| 2447 | + background: #727272; | |
| 2448 | + border-radius: 50rpx 50rpx 0 0; | |
| 2449 | + transform: rotate(90deg); | |
| 2450 | + | |
| 2451 | +} | |
| 2452 | + | |
| 2453 | +.xc-right-circle { | |
| 2454 | + width: 40rpx; | |
| 2455 | + height: 25rpx; | |
| 2456 | + position: absolute; | |
| 2457 | + top: 280rpx; | |
| 2458 | + left: 683rpx; | |
| 2459 | + z-index: 55; | |
| 2460 | + background: #727272; | |
| 2461 | + border-radius: 50rpx 50rpx 0 0; | |
| 2462 | + transform: rotate(270deg); | |
| 2463 | + | |
| 2464 | +} | |
| 2465 | + | |
| 2466 | +.xc-circle-frame { | |
| 2467 | + width: 25rpx; | |
| 2468 | + height: 40rpx; | |
| 2469 | + overflow: hidden; | |
| 2470 | +} | |
| 2471 | + | |
| 2472 | +.xc-goods-name { | |
| 2473 | + width: 95%; | |
| 2474 | + font-size: 35rpx; | |
| 2475 | + padding-left: 75rpx; | |
| 2476 | + height: 50rpx; | |
| 2477 | + padding-top: 10rpx; | |
| 2478 | + color: #000; | |
| 2479 | + | |
| 2480 | +} | |
| 2481 | + | |
| 2482 | +.xc-good-img { | |
| 2483 | + width: 100%; | |
| 2484 | + height: 381rpx; | |
| 2485 | + margin-top: 5rpx; | |
| 2486 | + | |
| 2487 | +} | |
| 2488 | + | |
| 2489 | +.xc-good-img .img { | |
| 2490 | + width: 90%; | |
| 2491 | + height: 381rpx; | |
| 2492 | +} | |
| 2493 | + | |
| 2494 | +.xc-ensure-frame { | |
| 2495 | + width: 90%; | |
| 2496 | + height: 60rpx; | |
| 2497 | + border-bottom: 2rpx solid #d8d6d7; | |
| 2498 | +} | |
| 2499 | + | |
| 2500 | +.xc-ensure { | |
| 2501 | + width: 30%; | |
| 2502 | + height: 60rpx; | |
| 2503 | + line-height: 60rpx; | |
| 2504 | +} | |
| 2505 | + | |
| 2506 | +xc-ensure-div { | |
| 2507 | + width: 100%; | |
| 2508 | + height: 60rpx; | |
| 2509 | +} | |
| 2510 | + | |
| 2511 | +.xc-ensure .word { | |
| 2512 | + font-size: 25rpx; | |
| 2513 | + color: #d30025; | |
| 2514 | + margin-left: 9rpx; | |
| 2515 | + | |
| 2516 | +} | |
| 2517 | + | |
| 2518 | +.xc-ensure .img { | |
| 2519 | + width: 25rpx; | |
| 2520 | + height: 25rpx; | |
| 2521 | + margin-top: 18rpx; | |
| 2522 | + | |
| 2523 | +} | |
| 2524 | + | |
| 2525 | +.xc-bottmon { | |
| 2526 | + width: 100%; | |
| 2527 | +} | |
| 2528 | + | |
| 2529 | +.xc-bottmon .xc-left { | |
| 2530 | + width: 55%; | |
| 2531 | + margin-top: 30rpx; | |
| 2532 | + padding-left: 20rpx; | |
| 2533 | + | |
| 2534 | +} | |
| 2535 | + | |
| 2536 | +.xc-left .xc-top { | |
| 2537 | + font-size: 25rpx; | |
| 2538 | + height: 40rpx; | |
| 2539 | + line-height: 40rpx; | |
| 2540 | + color: #000; | |
| 2541 | +} | |
| 2542 | + | |
| 2543 | +.xc-left .xc-middle { | |
| 2544 | + font-size: 25rpx; | |
| 2545 | + color: #b2b2b2; | |
| 2546 | + height: 30rpx; | |
| 2547 | + line-height: 30rpx; | |
| 2548 | +} | |
| 2549 | + | |
| 2550 | +.xc-left .xc-buttem { | |
| 2551 | + font-size: 25rpx; | |
| 2552 | + height: 100rpx; | |
| 2553 | + line-height: 100rpx; | |
| 2554 | + color: #000; | |
| 2555 | +} | |
| 2556 | + | |
| 2557 | +.xc-ensure-right { | |
| 2558 | + width: 30%; | |
| 2559 | +} | |
| 2560 | + | |
| 2561 | +.xc-qrcode { | |
| 2562 | + width: 120rpx; | |
| 2563 | + height: 120rpx; | |
| 2564 | + margin-top: 43rpx; | |
| 2565 | + margin-left: 80rpx; | |
| 2566 | + | |
| 2567 | +} | |
| 2568 | + | |
| 2569 | +.xc-close { | |
| 2570 | + width: 50rpx; | |
| 2571 | + height: 50rpx; | |
| 2572 | + border-radius: 50%; | |
| 2573 | + border: 3rpx solid #fff; | |
| 2574 | + text-align: center; | |
| 2575 | + line-height: 41rpx; | |
| 2576 | + font-size: 50rpx; | |
| 2577 | + color: #fff; | |
| 2578 | + font-weight: lighter; | |
| 2579 | + font-family: MingLiU; | |
| 2580 | + transform: rotate(270deg); | |
| 2581 | + overflow: auto; | |
| 2582 | + margin-top: 6rpx; | |
| 2583 | + margin-bottom: 1rpx; | |
| 2584 | + | |
| 2585 | +} | |
| 2586 | + | |
| 2587 | +.xc-close-frame { | |
| 2588 | + position: absolute; | |
| 2589 | + margin-top: 30rpx; | |
| 2590 | + width: 90%; | |
| 2591 | + display: flex; | |
| 2592 | + justify-content: center; | |
| 2593 | + overflow: auto; | |
| 2594 | + | |
| 2595 | +} | |
| 2596 | + | |
| 2597 | +.xc-guanbi { | |
| 2598 | + width: 100%; | |
| 2599 | + height: 80rpx; | |
| 2600 | + overflow: hidden; | |
| 2601 | +} | |
| 2602 | + | |
| 2603 | + | |
| 2604 | +/* 自定义弹出窗口 */ | |
| 2605 | +.cx-popup { | |
| 2606 | + width: 100%; | |
| 2607 | + background: #fff; | |
| 2608 | + z-index: 35; | |
| 2609 | + border-top-left-radius: 10rpx; | |
| 2610 | + border-top-right-radius: 10rpx; | |
| 2611 | + position: fixed; | |
| 2612 | + bottom: 0; | |
| 2613 | +} | |
| 2614 | + | |
| 2615 | +.xc-top-content { | |
| 2616 | + width: 88%; | |
| 2617 | + height: 85rpx; | |
| 2618 | + padding-top: 50rpx; | |
| 2619 | + font-size: 36rpx; | |
| 2620 | +} | |
| 2621 | + | |
| 2622 | + | |
| 2623 | +.xc-valid-coupon { | |
| 2624 | + width: 90%; | |
| 2625 | + height: 40rpx; | |
| 2626 | + padding-top: 24rpx; | |
| 2627 | + overflow: hidden; | |
| 2628 | +} | |
| 2629 | + | |
| 2630 | +.xc-frame { | |
| 2631 | + /* width: 100%; | |
| 2632 | + margin-top:20rpx; */ | |
| 2633 | + padding: 20rpx; | |
| 2634 | +} | |
| 2635 | + | |
| 2636 | +.xc-frame .list-frame { | |
| 2637 | + width: 90%; | |
| 2638 | + height: 100%; | |
| 2639 | + overflow-y: scroll; | |
| 2640 | + | |
| 2641 | + margin-top: 20rpx; | |
| 2642 | + | |
| 2643 | +} | |
| 2644 | + | |
| 2645 | +.xc-close-frame { | |
| 2646 | + margin-top: 30rpx; | |
| 2647 | + width: 15%; | |
| 2648 | + display: flex; | |
| 2649 | +} | |
| 2650 | + | |
| 2651 | +.xc-close { | |
| 2652 | + width: 70rpx; | |
| 2653 | + height: 70rpx; | |
| 2654 | + border-radius: 50%; | |
| 2655 | + border: 5rpx solid #a5a5a7; | |
| 2656 | + text-align: center; | |
| 2657 | + line-height: 55rpx; | |
| 2658 | + font-size: 80rpx; | |
| 2659 | + color: #a5a5a7; | |
| 2660 | + font-family: "微软正黑体"; | |
| 2661 | + margin-top: 8rpx; | |
| 2662 | + | |
| 2663 | +} | |
| 2664 | + | |
| 2665 | +.xc-money { | |
| 2666 | + color: #ff0013; | |
| 2667 | +} | |
| 2668 | + | |
| 2669 | +.xc-money-frame { | |
| 2670 | + /* margin-left:35rpx; */ | |
| 2671 | + | |
| 2672 | +} | |
| 2673 | + | |
| 2674 | +.xc-coupon-effect { | |
| 2675 | + width: 99%; | |
| 2676 | + height: 128rpx; | |
| 2677 | + border-bottom: 3rpx solid #ddd; | |
| 2678 | + | |
| 2679 | + | |
| 2680 | +} | |
| 2681 | + | |
| 2682 | +.xc-goods-coupon { | |
| 2683 | + width: 80%; | |
| 2684 | + height: 100%; | |
| 2685 | + | |
| 2686 | +} | |
| 2687 | + | |
| 2688 | +.xc-title { | |
| 2689 | + width: 50%; | |
| 2690 | + margin-left: 222rpx; | |
| 2691 | + | |
| 2692 | +} | |
| 2693 | + | |
| 2694 | +.xc-coupon-money { | |
| 2695 | + color: #c91e31; | |
| 2696 | + font-size: 35rpx; | |
| 2697 | + margin-top: 20rpx; | |
| 2698 | + | |
| 2699 | +} | |
| 2700 | + | |
| 2701 | +.xc-coupon-time { | |
| 2702 | + height: 50rpx; | |
| 2703 | + font-size: 27rpx; | |
| 2704 | + color: #a4a4a4; | |
| 2705 | +} | |
| 2706 | + | |
| 2707 | +.xc-coupon-time .time { | |
| 2708 | + margin-left: 15rpx; | |
| 2709 | + font-size: 27rpx; | |
| 2710 | +} | |
| 2711 | + | |
| 2712 | +.xc-coupon-selection { | |
| 2713 | + width: 99%; | |
| 2714 | + height: 100%; | |
| 2715 | + | |
| 2716 | + | |
| 2717 | +} | |
| 2718 | + | |
| 2719 | +.xc-confirm { | |
| 2720 | + width: 90%; | |
| 2721 | + height: 75rpx; | |
| 2722 | + margin: 0 auto; | |
| 2723 | + background: #c41830; | |
| 2724 | + color: #fff; | |
| 2725 | + border-radius: 10rpx; | |
| 2726 | + font-size: 30rpx; | |
| 2727 | + margin-top: 50rpx; | |
| 2728 | +} | |
| 2729 | + | |
| 2730 | +.xc-not-Selection { | |
| 2731 | + width: 60rpx; | |
| 2732 | + height: 60rpx; | |
| 2733 | + background: #eeeeee; | |
| 2734 | +} | |
| 2735 | + | |
| 2736 | +/*---------------视频图片---------------*/ | |
| 2737 | +.xc-imageCount { | |
| 2738 | + width: 95rpx; | |
| 2739 | + height: 50rpx; | |
| 2740 | + background-color: rgba(0, 0, 0, 0.3); | |
| 2741 | + border-radius: 40rpx; | |
| 2742 | + line-height: 50rpx; | |
| 2743 | + color: #fff; | |
| 2744 | + text-align: center; | |
| 2745 | + font-size: 26rpx; | |
| 2746 | + position: absolute; | |
| 2747 | + | |
| 2748 | + right: 23rpx; | |
| 2749 | + bottom: 21rpx; | |
| 2750 | +} | |
| 2751 | + | |
| 2752 | + | |
| 2753 | +/* 视频图片的边框 */ | |
| 2754 | +.xc-videos-picture { | |
| 2755 | + width: 100%; | |
| 2756 | + height: 750rpx; | |
| 2757 | +} | |
| 2758 | + | |
| 2759 | +/* 视频 */ | |
| 2760 | +.xc-videos { | |
| 2761 | + width: 100%; | |
| 2762 | + height: 544rpx; | |
| 2763 | + | |
| 2764 | + | |
| 2765 | +} | |
| 2766 | + | |
| 2767 | +/* 点击视频或图片 */ | |
| 2768 | +.xc-video-picture { | |
| 2769 | + | |
| 2770 | + bottom: 20rpx; | |
| 2771 | + left: 0rpx; | |
| 2772 | + display: flex; | |
| 2773 | + align-items: center; | |
| 2774 | + justify-content: center; | |
| 2775 | + width: 45%; | |
| 2776 | + height: 60rpx; | |
| 2777 | + margin-left: 215rpx; | |
| 2778 | + | |
| 2779 | +} | |
| 2780 | + | |
| 2781 | +.xc-video-button:before { | |
| 2782 | + content: ""; | |
| 2783 | + position: absolute; | |
| 2784 | + left: 48%; | |
| 2785 | + top: 40%; | |
| 2786 | + width: 0; | |
| 2787 | + height: 0; | |
| 2788 | + margin-left: -36rpx; | |
| 2789 | + margin-top: -10rpx; | |
| 2790 | + border-width: 13rpx; | |
| 2791 | + border-style: dashed; | |
| 2792 | + border-color: transparent transparent transparent #fff; | |
| 2793 | + font-size: 0; | |
| 2794 | + line-height: 0; | |
| 2795 | + z-index: 2; | |
| 2796 | + -webkit-backface-visibility: hidden; | |
| 2797 | +} | |
| 2798 | + | |
| 2799 | +.xc-video-buttons:before { | |
| 2800 | + content: ""; | |
| 2801 | + position: absolute; | |
| 2802 | + left: 50%; | |
| 2803 | + top: 41%; | |
| 2804 | + width: 0; | |
| 2805 | + height: 0; | |
| 2806 | + margin-left: -36rpx; | |
| 2807 | + margin-top: -10rpx; | |
| 2808 | + border-width: 13rpx; | |
| 2809 | + border-style: dashed; | |
| 2810 | + border-color: transparent transparent transparent #000; | |
| 2811 | + font-size: 0; | |
| 2812 | + line-height: 0; | |
| 2813 | + z-index: 2; | |
| 2814 | + -webkit-backface-visibility: hidden; | |
| 2815 | +} | |
| 2816 | + | |
| 2817 | +.xc-video { | |
| 2818 | + /* width:100rpx; */ | |
| 2819 | + /* height: 50rpx; | |
| 2820 | + line-height: 50rpx; */ | |
| 2821 | + text-align: center; | |
| 2822 | + /* margin-left:-30rpx; */ | |
| 2823 | + | |
| 2824 | + | |
| 2825 | +} | |
| 2826 | + | |
| 2827 | +/* 图片 */ | |
| 2828 | +.xc-picture { | |
| 2829 | + color: #000; | |
| 2830 | + background: #dcdcdc; | |
| 2831 | + width: 94rpx; | |
| 2832 | + height: 45rpx; | |
| 2833 | + font-size: 25rpx; | |
| 2834 | + border-radius: 25rpx; | |
| 2835 | + font-family: 'SimHei', Arial; | |
| 2836 | + text-align: center; | |
| 2837 | + line-height: 45rpx; | |
| 2838 | + margin-left: 53rpx | |
| 2839 | +} | |
| 2840 | + | |
| 2841 | +/* 点击视频 */ | |
| 2842 | +.xc-video-button { | |
| 2843 | + position: relative; | |
| 2844 | + color: #000; | |
| 2845 | + background: #dcdcdc; | |
| 2846 | + width: 85rpx; | |
| 2847 | + height: 45rpx; | |
| 2848 | + line-height: 45rpx; | |
| 2849 | + font-size: 30rpx; | |
| 2850 | + border-radius: 25rpx; | |
| 2851 | + font-family: 'SimHei', Arial; | |
| 2852 | + padding-left: 11rpx; | |
| 2853 | +} | |
| 2854 | + | |
| 2855 | + | |
| 2856 | +.xc-sn { | |
| 2857 | + color: #fff; | |
| 2858 | + background: #c7161e; | |
| 2859 | + border-color: transparent transparent transparent #fff; | |
| 2860 | +} | |
| 2861 | + | |
| 2862 | +/* 图片 */ | |
| 2863 | +.xc-pictures { | |
| 2864 | + width: 100%; | |
| 2865 | + height: 529rpx; | |
| 2866 | + | |
| 2867 | +} | |
| 2868 | + | |
| 2869 | +/*视频封面的图片 */ | |
| 2870 | +.xc-picturess { | |
| 2871 | + position: relative; | |
| 2872 | + width: 100%; | |
| 2873 | + height: 529rpx; | |
| 2874 | +} | |
| 2875 | + | |
| 2876 | +/* 播放 */ | |
| 2877 | +.xc-play { | |
| 2878 | + width: 130rpx; | |
| 2879 | + height: 130rpx; | |
| 2880 | + position: absolute; | |
| 2881 | + top: 207rpx; | |
| 2882 | + left: 309rpx; | |
| 2883 | +} | |
| 2884 | + | |
| 2885 | +.xc-video-buttons { | |
| 2886 | + position: relative; | |
| 2887 | + color: #000; | |
| 2888 | + background: #dcdcdc; | |
| 2889 | + width: 85rpx; | |
| 2890 | + height: 45rpx; | |
| 2891 | + line-height: 45rpx; | |
| 2892 | + font-size: 30rpx; | |
| 2893 | + border-radius: 25rpx; | |
| 2894 | + font-family: 'SimHei', Arial; | |
| 2895 | + padding-left: 11rpx; | |
| 2896 | +} | |
| 2897 | + | |
| 2898 | + | |
| 2899 | +.wsize { | |
| 2900 | + font-size: 32rpx | |
| 2901 | +} | |
| 2902 | + | |
| 2903 | +.five-level-word { | |
| 2904 | + font-size: 24rpx; | |
| 2905 | +} | |
| 2906 | + | |
| 2907 | + | |
| 2908 | +/*-- 推荐商品 --*/ | |
| 2909 | +.xc-goods { | |
| 2910 | + height: auto; | |
| 2911 | + background: #f2f2f2; | |
| 2912 | + padding: 0 20rpx; | |
| 2913 | + margin-top: -25rpx; | |
| 2914 | + padding-bottom: 20rpx | |
| 2915 | +} | |
| 2916 | + | |
| 2917 | +.xc-goods-recommend { | |
| 2918 | + border-radius: 20rpx; | |
| 2919 | + width: 345rpx; | |
| 2920 | + height: 450rpx; | |
| 2921 | + margin-top: 25rpx; | |
| 2922 | + display: inline-block; | |
| 2923 | + | |
| 2924 | +} | |
| 2925 | + | |
| 2926 | +.xc-goods-recommend.ml { | |
| 2927 | + margin-left: 22rpx | |
| 2928 | +} | |
| 2929 | + | |
| 2930 | +.xc-goods-recommend .xc-goods-imgs { | |
| 2931 | + width: 100%; | |
| 2932 | + height: 325rpx; | |
| 2933 | + border-radius: 20rpx 20rpx 0 0; | |
| 2934 | +} | |
| 2935 | + | |
| 2936 | +.xc-goods-bottom { | |
| 2937 | + width: 345rpx; | |
| 2938 | + height: 134rpx; | |
| 2939 | + background: #fff; | |
| 2940 | + border-radius: 0 0 20rpx 20rpx; | |
| 2941 | + bottom: -8rpx; | |
| 2942 | + left: 0rpx; | |
| 2943 | +} | |
| 2944 | + | |
| 2945 | +.xc-goods-bottom .monry-frame { | |
| 2946 | + width: 283rpx; | |
| 2947 | + height: 52rpx; | |
| 2948 | + padding-left: 24rpx; | |
| 2949 | + | |
| 2950 | +} | |
| 2951 | + | |
| 2952 | +.xc-good-explain { | |
| 2953 | + width: 283rpx; | |
| 2954 | + height: 60rpx; | |
| 2955 | + word-break: normal; | |
| 2956 | + margin-left: 30rpx; | |
| 2957 | + font-size: 26rpx; | |
| 2958 | + line-height: 30rpx; | |
| 2959 | + margin-top: 5rpx; | |
| 2960 | +} | |
| 2961 | + | |
| 2962 | +.money-color-val { | |
| 2963 | + color: #c6172f; | |
| 2964 | +} | |
| 2965 | + | |
| 2966 | +.rmb-symbol { | |
| 2967 | + line-height: 81rpx; | |
| 2968 | + height: 53rpx; | |
| 2969 | + font-size: 28rpx; | |
| 2970 | +} | |
| 2971 | + | |
| 2972 | +.xc-original-price { | |
| 2973 | + color: #c0c0c0; | |
| 2974 | +} | |
| 2975 | + | |
| 2976 | +/* 文字中间加线条 */ | |
| 2977 | +.word-lines { | |
| 2978 | + text-decoration: line-through; | |
| 2979 | + line-height: 90rpx; | |
| 2980 | + margin-left: 10rpx; | |
| 2981 | + font-size: 20rpx; | |
| 2982 | +} | |
| 2983 | + | |
| 2984 | +.xc-linellae-frame { | |
| 2985 | + width: 100%; | |
| 2986 | + height: 70rpx; | |
| 2987 | + background: #f2f2f2; | |
| 2988 | +} | |
| 2989 | + | |
| 2990 | +.xc-linellae-frame .xc-linellae { | |
| 2991 | + width: 386rpx; | |
| 2992 | + height: 1rpx; | |
| 2993 | + border-bottom: 1rpx solid #ebedf0; | |
| 2994 | +} | |
| 2995 | + | |
| 2996 | +.xc-recommend-frame { | |
| 2997 | + background: #f2f2f2; | |
| 2998 | + width: 97rpx; | |
| 2999 | + height: 100%; | |
| 3000 | + padding-left: 10rpx; | |
| 3001 | +} | |
| 3002 | + | |
| 3003 | +.xc-recommend-frame .xc-recommend { | |
| 3004 | + width: 35rpx; | |
| 3005 | + height: 27rpx; | |
| 3006 | +} | |
| 3007 | + | |
| 3008 | +.xc-recommend-frame .xc-recommend-word { | |
| 3009 | + width: 58rpx; | |
| 3010 | + font-size: 24rpx; | |
| 3011 | + color: #a9a9a9; | |
| 3012 | + margin-left: 5rpx; | |
| 3013 | + margin-bottom: 5rpx; | |
| 3014 | + margin-top: 1rpx; | |
| 3015 | + | |
| 3016 | +} | |
| 3017 | + | |
| 3018 | +.xc-price-frame { | |
| 3019 | + color: #ec0022; | |
| 3020 | + align-items: baseline; | |
| 3021 | + /* height:44rpx; */ | |
| 3022 | +} | |
| 3023 | + | |
| 3024 | +.xc-price-frame .sign { | |
| 3025 | + margin-top: 19rpx; | |
| 3026 | + margin-left: -4px; | |
| 3027 | +} | |
| 3028 | + | |
| 3029 | +.xc-val-price { | |
| 3030 | + margin-left: 24rpx; | |
| 3031 | + color: #ec0022; | |
| 3032 | + padding-top: 13rpx; | |
| 3033 | +} | |
| 3034 | + | |
| 3035 | +.xc-val-price .save { | |
| 3036 | + border-radius: 10rpx; | |
| 3037 | + margin-top: 5rpx; | |
| 3038 | + background: #fed2d9; | |
| 3039 | + min-width: 230rpx; | |
| 3040 | + height: 40rpx; | |
| 3041 | + line-height: 40rpx; | |
| 3042 | + width: auto; | |
| 3043 | + padding-left: 12rpx; | |
| 3044 | + padding-right: 12rpx; | |
| 3045 | + | |
| 3046 | +} | |
| 3047 | + | |
| 3048 | +.xc-unit-price { | |
| 3049 | + margin-top: 25rpx; | |
| 3050 | + padding-left: -4rpx; | |
| 3051 | + | |
| 3052 | +} | |
| 3053 | + | |
| 3054 | +.xc-explain { | |
| 3055 | + color: #292929; | |
| 3056 | + width: 542rpx; | |
| 3057 | + margin: 10rpx 0 20rpx; | |
| 3058 | + width: 100%; | |
| 3059 | + font-weight: bold; | |
| 3060 | +} | |
| 3061 | + | |
| 3062 | +.xc-item { | |
| 3063 | + width: 16%; | |
| 3064 | + font-size: 26rpx; | |
| 3065 | + color: #666; | |
| 3066 | + margin-right: 5rpx; | |
| 3067 | +} | |
| 3068 | + | |
| 3069 | +.xc-item .yuan { | |
| 3070 | + width: 38rpx; | |
| 3071 | + height: 38rpx; | |
| 3072 | + line-height: 38rpx; | |
| 3073 | + border: 1rpx solid #f3f1f2; | |
| 3074 | + margin-left: 33rpx; | |
| 3075 | + | |
| 3076 | +} | |
| 3077 | + | |
| 3078 | +.xc-item .word { | |
| 3079 | + width: 104rpx; | |
| 3080 | + margin-top: 16rpx; | |
| 3081 | + color: #363636; | |
| 3082 | + font-weight: 600; | |
| 3083 | + | |
| 3084 | +} | |
| 3085 | + | |
| 3086 | +.xc-item .circle-color { | |
| 3087 | + background: #d60024; | |
| 3088 | + color: #fff; | |
| 3089 | +} | |
| 3090 | + | |
| 3091 | +.xc-item .circle-color1 { | |
| 3092 | + background: #fefefe; | |
| 3093 | + color: #666666; | |
| 3094 | +} | |
| 3095 | + | |
| 3096 | +.link { | |
| 3097 | + height: 6rpx; | |
| 3098 | + width: 180rpx; | |
| 3099 | + top: 54rpx; | |
| 3100 | + left: 32px; | |
| 3101 | +} | |
| 3102 | + | |
| 3103 | +.link1 { | |
| 3104 | + height: 6rpx; | |
| 3105 | + width: 166rpx; | |
| 3106 | + top: 54rpx; | |
| 3107 | + left: 264rpx; | |
| 3108 | +} | |
| 3109 | + | |
| 3110 | +.link2 { | |
| 3111 | + height: 6rpx; | |
| 3112 | + width: 157rpx; | |
| 3113 | + top: 54rpx; | |
| 3114 | + right: 87rpx; | |
| 3115 | +} | |
| 3116 | + | |
| 3117 | +.link-color-red { | |
| 3118 | + background: #d60024; | |
| 3119 | +} | |
| 3120 | + | |
| 3121 | +.link-color { | |
| 3122 | + background: #e5e5e5; | |
| 3123 | +} | |
| 3124 | + | |
| 3125 | +.xc-qt-price { | |
| 3126 | + top: -15rpx; | |
| 3127 | + left: 25rpx; | |
| 3128 | + color: #fff; | |
| 3129 | +} | |
| 3130 | + | |
| 3131 | +.xc-qt-price .xc-qtunit-price { | |
| 3132 | + margin-left: 6rpx; | |
| 3133 | + margin-top: -4rpx; | |
| 3134 | +} | |
| 3135 | + | |
| 3136 | +.xc-nanber { | |
| 3137 | + top: -25rpx; | |
| 3138 | + left: 289rpx; | |
| 3139 | + | |
| 3140 | +} | |
| 3141 | + | |
| 3142 | +.xc-qtsign { | |
| 3143 | + margin-top: 5rpx; | |
| 3144 | + | |
| 3145 | +} | |
| 3146 | + | |
| 3147 | +.xc-people-img { | |
| 3148 | + height: 36rpx; | |
| 3149 | + width: 36rpx; | |
| 3150 | + background: #fff; | |
| 3151 | + border-radius: 7rpx; | |
| 3152 | + | |
| 3153 | +} | |
| 3154 | + | |
| 3155 | +.xc-people-img .imgs { | |
| 3156 | + width: 28rpx; | |
| 3157 | + height: 28rpx; | |
| 3158 | + margin-top: 4rpx; | |
| 3159 | + | |
| 3160 | +} | |
| 3161 | + | |
| 3162 | +.xc-people-val { | |
| 3163 | + | |
| 3164 | + height: 32rpx; | |
| 3165 | + border-top: 1rpx solid #fff; | |
| 3166 | + border-bottom: 1rpx solid #fff; | |
| 3167 | + border-right: 1rpx solid #fff; | |
| 3168 | + border-radius: 0 7rpx 7rpx 0; | |
| 3169 | + line-height: 32rpx; | |
| 3170 | + margin-left: -6rpx; | |
| 3171 | + padding: 0 12rpx; | |
| 3172 | +} | |
| 3173 | + | |
| 3174 | +.word-color { | |
| 3175 | + color: #d70024; | |
| 3176 | +} | |
| 3177 | + | |
| 3178 | +.word-color-lan { | |
| 3179 | + color: #0393e1; | |
| 3180 | +} | |
| 3181 | + | |
| 3182 | +.pt_view .hy-stop { | |
| 3183 | + top: -23rpx; | |
| 3184 | + right: 56rpx; | |
| 3185 | +} | |
| 3186 | + | |
| 3187 | +.xc-time-val { | |
| 3188 | + width: 36rpx; | |
| 3189 | + height: 36rpx; | |
| 3190 | + border-radius: 7rpx; | |
| 3191 | + line-height: 36rpx; | |
| 3192 | +} | |
| 3193 | + | |
| 3194 | +.xc-time { | |
| 3195 | + margin-right: 10rpx; | |
| 3196 | + margin-left: 10rpx; | |
| 3197 | + margin-top: -32rpx; | |
| 3198 | +} | |
| 3199 | + | |
| 3200 | +.xc-goods-explain { | |
| 3201 | + width: 100%; | |
| 3202 | + /* padding-left:30rpx; | |
| 3203 | + margin-left:-9rpx; | |
| 3204 | + height: 150rpx */ | |
| 3205 | +} | |
| 3206 | + | |
| 3207 | +.xc-partner-frame { | |
| 3208 | + border-bottom: 2rpx solid #eee; | |
| 3209 | + width: 100%; | |
| 3210 | + padding: 20rpx; | |
| 3211 | + /* height:56rpx; */ | |
| 3212 | + box-sizing: border-box; | |
| 3213 | +} | |
| 3214 | + | |
| 3215 | +.xc-person-number { | |
| 3216 | + width: 120rpx; | |
| 3217 | + color: #999999; | |
| 3218 | + padding-left: 8rpx; | |
| 3219 | + text-align: left | |
| 3220 | +} | |
| 3221 | + | |
| 3222 | +.xc-miaosha-time { | |
| 3223 | + right: 17rpx; | |
| 3224 | + top: 55rpx; | |
| 3225 | +} | |
| 3226 | + | |
| 3227 | +.pd_top1 { | |
| 3228 | + padding-top: 10rpx | |
| 3229 | +} | |
| 3230 | + | |
| 3231 | +.s_ms_bth { | |
| 3232 | + margin-top: 85rpx | |
| 3233 | +} | |
| 3234 | + | |
| 3235 | + | |
| 3236 | +.no_pj_list { | |
| 3237 | + text-align: center; | |
| 3238 | + width: 100%; | |
| 3239 | + color: #999; | |
| 3240 | + margin: 30rpx 0; | |
| 3241 | + display: inline-block; | |
| 3242 | + font-size: 28rpx | |
| 3243 | +} | |
| 3244 | + | |
| 3245 | +/* 门店地址 */ | |
| 3246 | +.xc-address_frame { | |
| 3247 | + /* border-top:1rpx solid #eee; */ | |
| 3248 | + width: 100%; | |
| 3249 | + height: auto; | |
| 3250 | + padding: 20rpx; | |
| 3251 | + box-sizing: border-box; | |
| 3252 | +} | |
| 3253 | + | |
| 3254 | +.on_height { | |
| 3255 | + height: 90rpx; | |
| 3256 | +} | |
| 3257 | + | |
| 3258 | +.sn_height { | |
| 3259 | + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ | |
| 3260 | +} | |
| 3261 | + | |
| 3262 | +.xc-address_frame .address_frame { | |
| 3263 | + width: 100%; | |
| 3264 | + /* padding-left: 10rpx; | |
| 3265 | +margin: auto; */ | |
| 3266 | + | |
| 3267 | +} | |
| 3268 | + | |
| 3269 | +.shop_name {} | |
| 3270 | + | |
| 3271 | +.stores-img { | |
| 3272 | + width: 28rpx; | |
| 3273 | + height: 28rpx; | |
| 3274 | + margin-right: 10rpx; | |
| 3275 | +} | |
| 3276 | + | |
| 3277 | +.shop_name { | |
| 3278 | + margin-right: 10rpx; | |
| 3279 | +} | |
| 3280 | + | |
| 3281 | +.address { | |
| 3282 | + /* width: 100%; | |
| 3283 | + margin-top: 5rpx; | |
| 3284 | + margin-bottom: 5rpx; */ | |
| 3285 | +} | |
| 3286 | + | |
| 3287 | +.distance { | |
| 3288 | + padding-left: 20rpx; | |
| 3289 | + padding-right: 20rpx; | |
| 3290 | + background: #eee; | |
| 3291 | + border-radius: 20rpx; | |
| 3292 | + /* margin-right: 5rpx; */ | |
| 3293 | + color: #999; | |
| 3294 | + height: 38rpx; | |
| 3295 | + line-height: 38rpx; | |
| 3296 | + | |
| 3297 | +} | |
| 3298 | + | |
| 3299 | +/* 选择门店的弹窗 */ | |
| 3300 | +.mongolia-layer { | |
| 3301 | + position: fixed; | |
| 3302 | + left: 0; | |
| 3303 | + top: 0; | |
| 3304 | + right: 0; | |
| 3305 | + bottom: 0; | |
| 3306 | + z-index: 11; | |
| 3307 | + background: rgba(0, 0, 0, 0.4); | |
| 3308 | + width: 100%; | |
| 3309 | + height: 91.9%; | |
| 3310 | + | |
| 3311 | +} | |
| 3312 | + | |
| 3313 | +.popup-frame { | |
| 3314 | + position: fixed; | |
| 3315 | + z-index: 20; | |
| 3316 | + background: white; | |
| 3317 | + width: 100%; | |
| 3318 | + border-radius: 20rpx 20rpx 0 0; | |
| 3319 | + height: auto; | |
| 3320 | + bottom: 0; | |
| 3321 | +} | |
| 3322 | + | |
| 3323 | +.popup-top { | |
| 3324 | + border-bottom: 1rpx solid #eee; | |
| 3325 | + height: 155rpx; | |
| 3326 | + width: 95%; | |
| 3327 | + margin: auto; | |
| 3328 | + line-height: 155rpx; | |
| 3329 | + | |
| 3330 | +} | |
| 3331 | + | |
| 3332 | +.bg_rights { | |
| 3333 | + border-top: 2rpx solid; | |
| 3334 | + border-right: 2rpx solid; | |
| 3335 | + transform: rotate(45deg); | |
| 3336 | + display: inline-block; | |
| 3337 | + width: 15rpx; | |
| 3338 | + height: 15rpx; | |
| 3339 | + border-color: #da0b31; | |
| 3340 | +} | |
| 3341 | + | |
| 3342 | +.modal-closes { | |
| 3343 | + position: absolute; | |
| 3344 | + right: 30rpx; | |
| 3345 | + top: -15rpx; | |
| 3346 | + height: 25rpx; | |
| 3347 | + | |
| 3348 | +} | |
| 3349 | + | |
| 3350 | +.choose_more { | |
| 3351 | + margin-top: 40rpx; | |
| 3352 | + margin-right: 20rpx; | |
| 3353 | + | |
| 3354 | +} | |
| 3355 | + | |
| 3356 | +.choose_mores { | |
| 3357 | + margin-top: 30rpx; | |
| 3358 | + margin-right: 15rpx; | |
| 3359 | + | |
| 3360 | +} | |
| 3361 | + | |
| 3362 | +.store-list { | |
| 3363 | + width: 95%; | |
| 3364 | + min-height: 300rpx; | |
| 3365 | + overflow-y: scroll; | |
| 3366 | + margin: auto; | |
| 3367 | + max-height: 610rpx; | |
| 3368 | +} | |
| 3369 | + | |
| 3370 | +.store-list .store_choose { | |
| 3371 | + width: 100%; | |
| 3372 | + height: 120rpx; | |
| 3373 | + line-height: 125rpx; | |
| 3374 | + border-bottom: 1rpx solid #eee; | |
| 3375 | + | |
| 3376 | +} | |
| 3377 | + | |
| 3378 | +.store-list .store_choose .store { | |
| 3379 | + width: 100%; | |
| 3380 | + margin: auto; | |
| 3381 | + line-height: 37rpx; | |
| 3382 | + padding-left: 20rpx; | |
| 3383 | + | |
| 3384 | +} | |
| 3385 | + | |
| 3386 | +.xc-hook { | |
| 3387 | + width: 35rpx; | |
| 3388 | + height: 35rpx; | |
| 3389 | + transform: rotate(-145deg); | |
| 3390 | + line-height: 37rpx; | |
| 3391 | + text-align: center; | |
| 3392 | +} | |
| 3393 | + | |
| 3394 | +.xc-hooks { | |
| 3395 | + width: 30rpx; | |
| 3396 | + height: 30rpx; | |
| 3397 | + border: 1rpx solid #999; | |
| 3398 | +} | |
| 3399 | + | |
| 3400 | +.address-frame { | |
| 3401 | + width: 93%; | |
| 3402 | + margin-left: 7rpx; | |
| 3403 | + | |
| 3404 | +} | |
| 3405 | + | |
| 3406 | +.nearby_store { | |
| 3407 | + margin-left: 17rpx; | |
| 3408 | +} | |
| 3409 | + | |
| 3410 | +.address_name { | |
| 3411 | + margin-right: 10rpx; | |
| 3412 | + | |
| 3413 | +} | |
| 3414 | + | |
| 3415 | +.address-val { | |
| 3416 | + height: 38rpx; | |
| 3417 | + line-height: 38rpx; | |
| 3418 | + | |
| 3419 | +} | |
| 3420 | + | |
| 3421 | +.store-bottom { | |
| 3422 | + width: 85%; | |
| 3423 | + margin: auto; | |
| 3424 | + height: 90rpx; | |
| 3425 | +} | |
| 3426 | + | |
| 3427 | +.determine { | |
| 3428 | + width: 260rpx; | |
| 3429 | + height: 55rpx; | |
| 3430 | + border-radius: 50rpx; | |
| 3431 | + line-height: 55rpx; | |
| 3432 | +} | |
| 3433 | + | |
| 3434 | +.default { | |
| 3435 | + width: 260rpx; | |
| 3436 | + height: 55rpx; | |
| 3437 | + border: 3rpx solid #c8c8c8; | |
| 3438 | + border-radius: 50rpx; | |
| 3439 | + line-height: 55rpx; | |
| 3440 | +} | |
| 3441 | + | |
| 3442 | +.store-bottom-frame { | |
| 3443 | + width: 95%; | |
| 3444 | + margin: auto; | |
| 3445 | + | |
| 3446 | +} | |
| 3447 | + | |
| 3448 | +/* 门店分类列表 */ | |
| 3449 | +.sort_store_list { | |
| 3450 | + height: 82%; | |
| 3451 | + overflow: hidden; | |
| 3452 | + overflow-y: scroll; | |
| 3453 | + width: 95%; | |
| 3454 | + margin: auto; | |
| 3455 | +} | |
| 3456 | + | |
| 3457 | +.sort_store_list .sort-store-frame { | |
| 3458 | + width: 100%; | |
| 3459 | + height: 100rpx; | |
| 3460 | + line-height: 100rpx; | |
| 3461 | + border-bottom: 1rpx solid #eee; | |
| 3462 | + | |
| 3463 | +} | |
| 3464 | + | |
| 3465 | +.sort_store_list .sort-store-frame .sort-store { | |
| 3466 | + width: 94.5%; | |
| 3467 | + margin: auto; | |
| 3468 | +} | |
| 3469 | + | |
| 3470 | +.black_rights-frame { | |
| 3471 | + width: 50%; | |
| 3472 | +} | |
| 3473 | + | |
| 3474 | +.black_rights-frame .black_rights { | |
| 3475 | + border-top: 3rpx solid; | |
| 3476 | + border-right: 3rpx solid; | |
| 3477 | + transform: rotate(45deg); | |
| 3478 | + display: inline-block; | |
| 3479 | + width: 20rpx; | |
| 3480 | + height: 20rpx; | |
| 3481 | +} | |
| 3482 | + | |
| 3483 | +.xc-val-money { | |
| 3484 | + height: 55rpx; | |
| 3485 | +} | |
| 3486 | + | |
| 3487 | +.xc-distance-bottom { | |
| 3488 | + margin-bottom: 40rpx; | |
| 3489 | +} | |
| 3490 | + | |
| 3491 | +.xc-distance-top { | |
| 3492 | + margin-top: 10rpx; | |
| 3493 | +} | |
| 3494 | + | |
| 3495 | +.xc-width { | |
| 3496 | + width: 100%; | |
| 3497 | +} | |
| 3498 | + | |
| 3499 | +.right-arrow { | |
| 3500 | + width: 15rpx; | |
| 3501 | + height: 15rpx; | |
| 3502 | + border-top: 2rpx solid #d70026; | |
| 3503 | + border-right: 2rpx solid #d70026; | |
| 3504 | + transform: rotate(45deg); | |
| 3505 | + display: inline-block; | |
| 3506 | + margin-bottom: 3rpx; | |
| 3507 | +} | |
| 3508 | + | |
| 3509 | +.xc-goods-attribute { | |
| 3510 | + border-bottom: 1px solid #eee; | |
| 3511 | + padding-bottom: 20rpx; | |
| 3512 | + /* margin-bottom:40rpx; */ | |
| 3513 | +} | |
| 3514 | + | |
| 3515 | +.xc-val-fream { | |
| 3516 | + width: 105rpx; | |
| 3517 | +} | |
| 3518 | + | |
| 3519 | +.is_stock { | |
| 3520 | + width: 58%; | |
| 3521 | + height: 70rpx; | |
| 3522 | + border-radius: 55rpx; | |
| 3523 | +} | |
| 3524 | + | |
| 3525 | +.select_store_height { | |
| 3526 | + height: 50rpx; | |
| 3527 | +} | |
| 3528 | + | |
| 3529 | +.butttem5 { | |
| 3530 | + margin-bottom: 5rpx; | |
| 3531 | +} | |
| 3532 | + | |
| 3533 | +.no_pj_list { | |
| 3534 | + text-align: center; | |
| 3535 | + width: 100%; | |
| 3536 | + color: #999; | |
| 3537 | + margin-top: 30rpx; | |
| 3538 | + display: inline-block; | |
| 3539 | + font-size: 28rpx | |
| 3540 | +} | |
| 3541 | + | |
| 3542 | + | |
| 3543 | +.join-cart>view.no_store { | |
| 3544 | + width: 58%; | |
| 3545 | + background-color: #adadad; | |
| 3546 | +} | |
| 3547 | + | |
| 3548 | +.s_btn { | |
| 3549 | + margin-top: 25rpx; | |
| 3550 | +} | |
| 3551 | + | |
| 3552 | +/* 美妆价的样式 */ | |
| 3553 | +.beauty-makeup-frame { | |
| 3554 | + /* width: 101.5%; | |
| 3555 | + margin: auto; */ | |
| 3556 | + height: 120rpx; | |
| 3557 | + border-radius: 15rpx; | |
| 3558 | + margin-top: 10px; | |
| 3559 | + | |
| 3560 | +} | |
| 3561 | + | |
| 3562 | +.beauty-makeup-frame .left { | |
| 3563 | + width: 80%; | |
| 3564 | + height: 100%; | |
| 3565 | + background: #f7f7f7; | |
| 3566 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | |
| 3567 | + /* padding: 0 10rpx; */ | |
| 3568 | +} | |
| 3569 | + | |
| 3570 | +.card-frame { | |
| 3571 | + margin-top: 0rpx; | |
| 3572 | + /* padding-right: 23rpx; | |
| 3573 | + margin-right: 15rpx; */ | |
| 3574 | +} | |
| 3575 | + | |
| 3576 | +.advert-card { | |
| 3577 | + margin-top: 0rpx !important; | |
| 3578 | + | |
| 3579 | +} | |
| 3580 | + | |
| 3581 | +.beauty-makeup-frame .right { | |
| 3582 | + width: 20%; | |
| 3583 | + height: 100%; | |
| 3584 | + background: #f3efe3; | |
| 3585 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | |
| 3586 | +} | |
| 3587 | + | |
| 3588 | +.grade-card-frame { | |
| 3589 | + | |
| 3590 | + /* height:45rpx ; */ | |
| 3591 | + background: #3c300a; | |
| 3592 | + border-radius: 20rpx; | |
| 3593 | + /* margin-top: 10px; | |
| 3594 | + margin-left: 7rpx; */ | |
| 3595 | + justify-content: center; | |
| 3596 | + padding: 4rpx 12rpx; | |
| 3597 | +} | |
| 3598 | + | |
| 3599 | +.grade-card-frame .img { | |
| 3600 | + width: 24rpx; | |
| 3601 | + height: 24rpx; | |
| 3602 | + margin-top: 2px; | |
| 3603 | + | |
| 3604 | +} | |
| 3605 | + | |
| 3606 | +.grade-card-frame .card-name { | |
| 3607 | + margin-left: 8rpx; | |
| 3608 | + /* max-width: 120rpx; */ | |
| 3609 | + max-width: 165rpx; | |
| 3610 | +} | |
| 3611 | + | |
| 3612 | +.card-effect { | |
| 3613 | + /* margin-left: 15rpx; */ | |
| 3614 | +} | |
| 3615 | + | |
| 3616 | +.at_once_carde { | |
| 3617 | + width: 65rpx; | |
| 3618 | + height: 75rpx; | |
| 3619 | + line-height: 38rpx; | |
| 3620 | +} | |
| 3621 | + | |
| 3622 | +.bg_right { | |
| 3623 | + width: 18rpx; | |
| 3624 | + height: 18rpx; | |
| 3625 | + border-top: 2rpx solid #333; | |
| 3626 | + border-right: 2rpx solid #333; | |
| 3627 | + transform: rotate(45deg); | |
| 3628 | + display: inline-block; | |
| 3629 | + margin-bottom: 3rpx; | |
| 3630 | + | |
| 3631 | +} | |
| 3632 | + | |
| 3633 | +.carde_frame { | |
| 3634 | + height: 50rpx; | |
| 3635 | + /* line-height: 18rpx */ | |
| 3636 | +} | |
| 3637 | + | |
| 3638 | +button.custom-service { | |
| 3639 | + line-height: normal; | |
| 3640 | + border: 0; | |
| 3641 | +} | |
| 3642 | + | |
| 3643 | +button.custom-service::after { | |
| 3644 | + border: 0; | |
| 3645 | +} | |
| 3646 | + | |
| 3647 | +.no_store { | |
| 3648 | + color: #d60021; | |
| 3649 | + font-size: 26rpx; | |
| 3650 | +} | |
| 3651 | + | |
| 3652 | +.cx_show_view { | |
| 3653 | + width: 580rpx; | |
| 3654 | + /* line-height: 30rpx; margin-bottom: 6rpx; */ | |
| 3655 | +} | |
| 3656 | + | |
| 3657 | +.cx_show_view .word { | |
| 3658 | + width: 400rpx | |
| 3659 | +} | |
| 3660 | + | |
| 3661 | +.prom_condition { | |
| 3662 | + color: #f23030; | |
| 3663 | + /* width: 180rpx; */ | |
| 3664 | + /* height: 30rpx; */ | |
| 3665 | + /* font-size: 20rpx; */ | |
| 3666 | + /* padding-top: 0.01rpx; */ | |
| 3667 | + /* display: flex; | |
| 3668 | + justify-content: center; | |
| 3669 | + align-items: center; */ | |
| 3670 | + border: 2rpx solid #f23030; | |
| 3671 | + border-radius: 6rpx; | |
| 3672 | + /* margin-right: 10rpx; */ | |
| 3673 | + /* margin-left: 10rpx; */ | |
| 3674 | + font-size: 24rpx; | |
| 3675 | + padding-right: 6rpx; | |
| 3676 | + /* padding: 0 10rpx; */ | |
| 3677 | +} | |
| 3678 | + | |
| 3679 | +.hui_img { | |
| 3680 | + width: 44rpx; | |
| 3681 | + height: 44rpx; | |
| 3682 | + margin-right: 8rpx | |
| 3683 | +} | |
| 3684 | + | |
| 3685 | +.order_hui { | |
| 3686 | + color: #444; | |
| 3687 | + width: 420rpx | |
| 3688 | +} | |
| 3689 | + | |
| 3690 | +.order_hui view { | |
| 3691 | + height: 34rpx; | |
| 3692 | + line-height: 34rpx; | |
| 3693 | +} | |
| 3694 | + | |
| 3695 | +.dp_img { | |
| 3696 | + width: 240rpx; | |
| 3697 | + height: 240rpx; | |
| 3698 | + margin: 0 40rpx | |
| 3699 | +} | |
| 3700 | + | |
| 3701 | +.dp_cx_view { | |
| 3702 | + border-bottom: 0.02rpx solid #eee; | |
| 3703 | + padding-bottom: 40rpx | |
| 3704 | +} | |
| 3705 | + | |
| 3706 | +.act_content { | |
| 3707 | + margin-top: 40rpx | |
| 3708 | +} | |
| 3709 | + | |
| 3710 | +.act_content view { | |
| 3711 | + margin-bottom: 12rpx | |
| 3712 | +} | |
| 3713 | + | |
| 3714 | +.color_b { | |
| 3715 | + color: #ff9c00 | |
| 3716 | +} | |
| 3717 | + | |
| 3718 | +.poster-container { | |
| 3719 | + box-sizing: border-box; | |
| 3720 | + position: fixed; | |
| 3721 | + top: 50%; | |
| 3722 | + left: 50%; | |
| 3723 | + transform: translate(-50%, -50%); | |
| 3724 | + width: calc(100% - 210rpx); | |
| 3725 | + z-index: 1000; | |
| 3726 | +} | |
| 3727 | + | |
| 3728 | +.mask { | |
| 3729 | + position: fixed; | |
| 3730 | + top: 0; | |
| 3731 | + left: 0; | |
| 3732 | + width: 100%; | |
| 3733 | + height: 100%; | |
| 3734 | + z-index: 999; | |
| 3735 | + background-color: rgba(0, 0, 0, .6); | |
| 3736 | +} | |
| 3737 | + | |
| 3738 | +.poster-wrapper { | |
| 3739 | + width: 100%; | |
| 3740 | +} | |
| 3741 | + | |
| 3742 | +.poster { | |
| 3743 | + box-sizing: border-box; | |
| 3744 | + width: 100%; | |
| 3745 | + height: 940rpx; | |
| 3746 | + border-radius: 16rpx; | |
| 3747 | + /* box-shadow: 0 8px 12px #666; */ | |
| 3748 | + position: relative; | |
| 3749 | + z-index: 999; | |
| 3750 | + overflow: hidden; | |
| 3751 | +} | |
| 3752 | + | |
| 3753 | +.poster-img { | |
| 3754 | + display: block; | |
| 3755 | + width: 100%; | |
| 3756 | + height: 100%; | |
| 3757 | +} | |
| 3758 | + | |
| 3759 | +.btn-container { | |
| 3760 | + display: flex; | |
| 3761 | + justify-content: space-around; | |
| 3762 | +} | |
| 3763 | + | |
| 3764 | +.btn-share { | |
| 3765 | + display: block; | |
| 3766 | + background-color: #FE6867; | |
| 3767 | + color: white; | |
| 3768 | + border-radius: 8rpx; | |
| 3769 | + line-height: 80rpx; | |
| 3770 | + margin-top: 28rpx; | |
| 3771 | + padding: 0 60rpx; | |
| 3772 | +} | |
| 3773 | + | |
| 3774 | +/* .btn-close { | |
| 3775 | + background-color: rgba(0,0,0,.5); | |
| 3776 | + color: white; | |
| 3777 | + width: 40rpx; | |
| 3778 | + height: 40rpx; | |
| 3779 | + line-height: 40rpx; | |
| 3780 | + text-align: center; | |
| 3781 | + border-radius: 50%; | |
| 3782 | + position: absolute; | |
| 3783 | + right: 20rpx; | |
| 3784 | + top: 10rpx; | |
| 3785 | +} */ | |
| 3786 | + | |
| 3787 | +.goods-price .rel_txt { | |
| 3788 | + /* position: relative; top: 32rpx; */ | |
| 3789 | + font-size: 30rpx; | |
| 3790 | +} | |
| 3791 | + | |
| 3792 | +.goods-price .rel_img { | |
| 3793 | + width: 62rpx; | |
| 3794 | + height: 62rpx; | |
| 3795 | + position: relative; | |
| 3796 | + top: 8rpx; | |
| 3797 | +} | |
| 3798 | + | |
| 3799 | +.btn-close { | |
| 3800 | + /* background-color: rgba(0,0,0,.5); */ | |
| 3801 | + color: #ccc; | |
| 3802 | + /* width: 50rpx; | |
| 3803 | + height: 50rpx; | |
| 3804 | + line-height: 50rpx; | |
| 3805 | + text-align: center; */ | |
| 3806 | + border-radius: 50%; | |
| 3807 | + position: absolute; | |
| 3808 | + right: 20rpx; | |
| 3809 | + top: 20rpx; | |
| 3810 | +} | |
| 3811 | + | |
| 3812 | +.icon-close { | |
| 3813 | + font-size: 36rpx; | |
| 3814 | +} | |
| 3815 | + | |
| 3816 | +.quan_price { | |
| 3817 | + background-color: #ff4700; | |
| 3818 | + color: #fff; | |
| 3819 | + padding: 10rpx 25rpx; | |
| 3820 | + margin-left: 10rpx; | |
| 3821 | + border-radius: 30rpx; | |
| 3822 | +} | |
| 3823 | + | |
| 3824 | +/*--闪白屏--*/ | |
| 3825 | +.g_img_box { | |
| 3826 | + background-position: center center; | |
| 3827 | + background-repeat: no-repeat; | |
| 3828 | + -webkit-background-size: cover; | |
| 3829 | + -moz-background-size: cover; | |
| 3830 | + background-size: cover; | |
| 3831 | +} | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | +.arrow { | |
| 3836 | + width: auto !important; | |
| 3837 | + position: absolute; | |
| 3838 | + right: 0; | |
| 3839 | + top: 50%; | |
| 3840 | + transform: translateY(-50%); | |
| 3841 | +} | |
| 3842 | + | |
| 3843 | + | |
| 3844 | +.logo-container { | |
| 3845 | + -webkit-filter: brightness(80%); | |
| 3846 | + filter: brightness(80%); | |
| 3847 | +} | |
| 3848 | + | |
| 3849 | +.logo { | |
| 3850 | + width: 132rpx; | |
| 3851 | + height: 37rpx; | |
| 3852 | + margin-right: 10rpx; | |
| 3853 | +} | |
| 3854 | + | |
| 3855 | +.miao_lab { | |
| 3856 | + width: 36rpx; | |
| 3857 | + height: 36rpx; | |
| 3858 | + border: 4rpx solid #e71f19; | |
| 3859 | + color: #e71f19; | |
| 3860 | + text-align: center; | |
| 3861 | + margin-right: 10rpx; | |
| 3862 | + line-height: 36rpx; | |
| 3863 | + font-size: 22rpx; | |
| 3864 | + font-weight: bolder; | |
| 3865 | + border-radius: 50%; | |
| 3866 | +} | |
| 3867 | + | |
| 3868 | +.pop_more_act .content { | |
| 3869 | + position: fixed; | |
| 3870 | + background: #fff; | |
| 3871 | + width: 100%; | |
| 3872 | + left: 0; | |
| 3873 | + bottom: 0; | |
| 3874 | + z-index: 1000; | |
| 3875 | +} | |
| 3876 | + | |
| 3877 | +.p_btn { | |
| 3878 | + background-color: #f23030; | |
| 3879 | + height: 70rpx; | |
| 3880 | + line-height: 70rpx; | |
| 3881 | + color: #fff; | |
| 3882 | +} | |
| 3883 | + | |
| 3884 | +.mt20 { | |
| 3885 | + margin-top: 20rpx | |
| 3886 | +} | |
| 3887 | + | |
| 3888 | +.group .group-list.luck { | |
| 3889 | + padding: 0 20rpx; | |
| 3890 | + justify-content: flex-start; | |
| 3891 | +} | |
| 3892 | + | |
| 3893 | +.group-list.luck .gtou~.gtou { | |
| 3894 | + margin-left: -16rpx; | |
| 3895 | +} | |
| 3896 | + | |
| 3897 | +.gtou.more { | |
| 3898 | + background-color: #ddd; | |
| 3899 | + text-align: center; | |
| 3900 | + line-height: 70rpx; | |
| 3901 | + border-radius: 50%; | |
| 3902 | + color: #aaa; | |
| 3903 | +} | |
| 3904 | + | |
| 3905 | + | |
| 3906 | +.tick { | |
| 3907 | + position: relative; | |
| 3908 | +} | |
| 3909 | + | |
| 3910 | +.tick:before { | |
| 3911 | + content: ''; | |
| 3912 | + display: inline-block; | |
| 3913 | + vertical-align: middle; | |
| 3914 | + margin-top: -4rpx; | |
| 3915 | + margin-right: 12rpx; | |
| 3916 | + width: 22rpx; | |
| 3917 | + height: 22rpx; | |
| 3918 | + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat; | |
| 3919 | + background-size: 22rpx auto; | |
| 3920 | +} | |
| 3921 | + | |
| 3922 | +.details::after { | |
| 3923 | + content: ''; | |
| 3924 | + position: absolute; | |
| 3925 | + right: 0; | |
| 3926 | + top: 0; | |
| 3927 | + bottom: 0; | |
| 3928 | + margin: auto; | |
| 3929 | + display: inline-block; | |
| 3930 | + width: 40rpx; | |
| 3931 | + height: 40rpx; | |
| 3932 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=); | |
| 3933 | + background-repeat: no-repeat; | |
| 3934 | + background-size: 40rpx auto; | |
| 3935 | +} | |
| 3936 | + | |
| 3937 | +.lh2 { | |
| 3938 | + line-height: 2; | |
| 3939 | +} | |
| 3940 | + | |
| 3941 | +.fill-box { | |
| 3942 | + background-color: #f23030; | |
| 3943 | + color: white; | |
| 3944 | + padding: 0 6rpx; | |
| 3945 | + border-radius: 0 0 10rpx 0; | |
| 3946 | + margin-right: 4rpx; | |
| 3947 | +} | |
| 3948 | + | |
| 3949 | +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx } | |
| 3950 | + | |
| 3951 | +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx } | |
| 3952 | +/* 历史购买 */ | |
| 3953 | +.swiper-container { | |
| 3954 | + position: absolute; | |
| 3955 | + top: 0; | |
| 3956 | + left: 0; | |
| 3957 | + padding: 20rpx 10rpx; | |
| 3958 | + width: 100%; | |
| 3959 | + box-sizing: border-box; | |
| 3960 | + z-index: 98; | |
| 3961 | +} | |
| 3962 | + | |
| 3963 | +.swiper { | |
| 3964 | + height: 60rpx; | |
| 3965 | + color: white; | |
| 3966 | + font-size: 26rpx; | |
| 3967 | +} | |
| 3968 | + | |
| 3969 | +.swiper-item { | |
| 3970 | + /* width: auto !important; | |
| 3971 | + background-color: rgba(0,0,0,.4); | |
| 3972 | + border-radius: 60rpx; */ | |
| 3973 | + position: relative; | |
| 3974 | +} | |
| 3975 | + | |
| 3976 | +.swiper-item .item { | |
| 3977 | + position: absolute; | |
| 3978 | +} | |
| 3979 | + | |
| 3980 | +.item { | |
| 3981 | + /* position: absolute; */ | |
| 3982 | + display: flex; | |
| 3983 | + align-items: center; | |
| 3984 | + /* justify-content: center; */ | |
| 3985 | + border-radius: 60rpx; | |
| 3986 | + background-color: rgba(0,0,0,.4); | |
| 3987 | + /* position: absolute; */ | |
| 3988 | +} | |
| 3989 | + | |
| 3990 | +.avatar-container { | |
| 3991 | + width: 60rpx; | |
| 3992 | + height: 60rpx; | |
| 3993 | + border-radius: 50%; | |
| 3994 | + overflow: hidden; | |
| 3995 | + flex-shrink: 0; | |
| 3996 | +} | |
| 3997 | +.avatar-container image { | |
| 3998 | + width: 100%; | |
| 3999 | + height: 100%; | |
| 4000 | +} | |
| 4001 | + | |
| 4002 | +.hideArea { | |
| 4003 | + position: absolute; | |
| 4004 | + left: -1000px; | |
| 4005 | + top: -1000px; | |
| 4006 | +} | ... | ... |
packageA/pages/serviceCard_pd/team_show/team_show.js
0 → 100644
| 1 | +var t = require("../../../../utils/util.js"), | |
| 2 | + ut = t, | |
| 3 | + e = require("../../../../utils/common.js"), | |
| 4 | + a = require("../../../../utils/wxParse/wxParse.js"), | |
| 5 | + s = getApp(), | |
| 6 | + i = s.request, | |
| 7 | + rq = i, | |
| 8 | + oo = s.globalData, | |
| 9 | + o = s.globalData.setting, | |
| 10 | + os = o; | |
| 11 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 12 | + | |
| 13 | + | |
| 14 | +Page({ | |
| 15 | + data: { | |
| 16 | + | |
| 17 | + num: 1, //输入框值 加减之间的值 | |
| 18 | + minusStatus: 'disable', //禁用按钮 | |
| 19 | + ii_endname: 'disable', //吐司的禁用按钮 | |
| 20 | + pd_xx: false, //弹框 | |
| 21 | + buy_start_date: null, //转换完的时间 | |
| 22 | + ssl: null, | |
| 23 | + yijian: false, //一键参加按钮显示隐藏 | |
| 24 | + | |
| 25 | + //选择门店 | |
| 26 | + qh: true, //取货 | |
| 27 | + xz: false, //选择 | |
| 28 | + one: false, //第一层显示隐藏 | |
| 29 | + se: false, //已选择的值 | |
| 30 | + list: false, //第二层显示隐藏 | |
| 31 | + ssl_child: null, //第二层的值 | |
| 32 | + sele_dl_name: "", //选择的值 | |
| 33 | + end_name: "", //最后显示的值 | |
| 34 | + | |
| 35 | + ii: 0, //选择门店显示隐藏 | |
| 36 | + zk: true, //展开列表显示隐藏 | |
| 37 | + stoid: o.stoid, | |
| 38 | + hiddenName: false, //收起列表显示隐藏 | |
| 39 | + teamlist: null, //活动主表 | |
| 40 | + teamgroup: null, //活动从表 | |
| 41 | + goods: null, //商品数据 | |
| 42 | + pindGoods: null, //拼单数据 | |
| 43 | + imageurl: os.imghost, //有礼派图片地址 | |
| 44 | + team_id: 0, //支付是否成功 | |
| 45 | + listno: "", //订单编号 | |
| 46 | + | |
| 47 | + //选择的门店id | |
| 48 | + pick_id:0, | |
| 49 | + //会员团满团时的判断 | |
| 50 | + tg_arr:null, | |
| 51 | + //是否显示 | |
| 52 | + is_show:0, | |
| 53 | + //是不是团结束 | |
| 54 | + is_group_end:0, | |
| 55 | + //团结束的提示语句 | |
| 56 | + end_text:"", | |
| 57 | + //是开团或者参团,0参团,1开团(但是,商家团还是参团) | |
| 58 | + is_kt_or_ct:0, | |
| 59 | + //判断redis的数组 | |
| 60 | + redis_arr:null, | |
| 61 | + | |
| 62 | + iurl:os.imghost, | |
| 63 | + | |
| 64 | + | |
| 65 | + openSpecModal: !1, | |
| 66 | + openSpecModal_pt: !1, //拼单的弹起, | |
| 67 | + | |
| 68 | + | |
| 69 | + //门店相关 | |
| 70 | + ismend: 0, | |
| 71 | + is_sec_mend: 0, | |
| 72 | + sto_sele_name: "", //选中的门店名称 | |
| 73 | + sto_sele_id: "", //选中的门店id | |
| 74 | + sto_sele_distr: "", //选择的门店的配送方式 | |
| 75 | + is_show_sto_cat: 1, //是否显示门店分类 | |
| 76 | + only_pk: null, | |
| 77 | + all_sto: null, | |
| 78 | + sec_sto: null, //选择了的门店分类 | |
| 79 | + pickpu_list: null, //读出的所有门店list | |
| 80 | + def_pickpu_list: null, //一开始5个门店list | |
| 81 | + sec_pick_index: 0, //第二级门店选择ID | |
| 82 | + fir_pick_index: 0, //第一级门店选择ID | |
| 83 | + all_pick_list:null,//所有的门店先记录起来 | |
| 84 | + bconfig:null, | |
| 85 | + def_pick_store: null, // 默认的门店 | |
| 86 | + fir_def_store:null, //客户默认的门店的 | |
| 87 | + lat: null, //维度 | |
| 88 | + lon: null, //经度 | |
| 89 | + | |
| 90 | + is_get_local_ok: 0, //获取坐标是否完成 | |
| 91 | + | |
| 92 | + sort_store: 0, //门店分类 | |
| 93 | + choice_sort_store: 0, //选择分类门店 | |
| 94 | + | |
| 95 | + }, | |
| 96 | + onLoad: function(options) { | |
| 97 | + wx.setNavigationBarTitle({ title: "拼团订单",}) | |
| 98 | + //var postdata=getApp().globalData.to_group; | |
| 99 | + var postdata=options; | |
| 100 | + var tg_id = postdata.tg_id, first_leader=options.first_leader,goods_id=options.goods_id; | |
| 101 | + //如果tg_id是空的话 | |
| 102 | + if(tg_id==null ||goods_id==null){ | |
| 103 | + var tg_id_str=decodeURIComponent(postdata.scene); | |
| 104 | + tg_id_str=tg_id_str.split("_"); | |
| 105 | + console.log(tg_id_str.length); | |
| 106 | + //tg_id_str[0] teamgroup.id tg_id_str[1] user_id tg_id_str[2] goods_id | |
| 107 | + switch(tg_id_str.length){ | |
| 108 | + case 1: | |
| 109 | + tg_id=tg_id_str[0]; | |
| 110 | + break; | |
| 111 | + case 2: | |
| 112 | + tg_id=tg_id_str[0]; | |
| 113 | + first_leader=tg_id_str[1]; | |
| 114 | + break; | |
| 115 | + case 3: | |
| 116 | + tg_id=tg_id_str[0]; | |
| 117 | + first_leader=tg_id_str[1]; | |
| 118 | + goods_id=tg_id_str[2]; | |
| 119 | + break; | |
| 120 | + } | |
| 121 | + } | |
| 122 | + //--判断一下是不是导购-- | |
| 123 | + if(first_leader){ | |
| 124 | + getApp().globalData.first_leader=first_leader; | |
| 125 | + //调用接口判断是不是会员 | |
| 126 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ | |
| 127 | + if(res.data.code==0){ | |
| 128 | + getApp().globalData.guide_id=res.data.data.id; | |
| 129 | + } | |
| 130 | + }) | |
| 131 | + } | |
| 132 | + this.setData({tg_id: tg_id,goods_id}); | |
| 133 | + getApp().globalData.to_group=null; | |
| 134 | + | |
| 135 | + var th=this; | |
| 136 | + getApp().getConfig2(function(e) { | |
| 137 | + th.setData({ bconfig: e,}); | |
| 138 | + th.wait_for_store_config(); //获取默认的门店 | |
| 139 | + }) | |
| 140 | + | |
| 141 | + }, | |
| 142 | + | |
| 143 | + //显示加载 | |
| 144 | + onShow:function(){ | |
| 145 | + getApp().check_can_share(); | |
| 146 | + var tg_id = this.data.tg_id,th=this; | |
| 147 | + this.init(tg_id); | |
| 148 | + }, | |
| 149 | + | |
| 150 | + //c点击打开拼团弹窗 | |
| 151 | + cpd: function() { | |
| 152 | + this.setData({ pd_xx: true,}) | |
| 153 | + }, | |
| 154 | + | |
| 155 | + //点击关闭拼团弹窗 | |
| 156 | + close_pt_xx: function() { | |
| 157 | + this.setData({ pd_xx: false, }) | |
| 158 | + }, | |
| 159 | + | |
| 160 | + //按钮点击一键参加团按钮 | |
| 161 | + cyijian: function(e) { | |
| 162 | + //--先判断会员状态-- | |
| 163 | + var user_info=getApp().globalData.userInfo; | |
| 164 | + if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){ | |
| 165 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 166 | + return false; | |
| 167 | + } | |
| 168 | + | |
| 169 | + var is_kt_or_ct=e.currentTarget.dataset.isct; | |
| 170 | + this.setData({ | |
| 171 | + yijian: true,is_kt_or_ct:is_kt_or_ct, | |
| 172 | + }) | |
| 173 | + }, | |
| 174 | + //关闭展开列表 | |
| 175 | + click: function(e) { | |
| 176 | + this.setData({ | |
| 177 | + hiddenName: !this.data.hiddenName, | |
| 178 | + zk: !this.data.zk, | |
| 179 | + }) | |
| 180 | + }, | |
| 181 | + //打开收起拼团列表 | |
| 182 | + czk: function(e) { | |
| 183 | + this.setData({ | |
| 184 | + zk: !this.data.zk, | |
| 185 | + hiddenName: !this.data.hiddenName, | |
| 186 | + }) | |
| 187 | + }, | |
| 188 | + //关闭购买页面 | |
| 189 | + cbcou: function(e) { | |
| 190 | + this.setData({ | |
| 191 | + yijian: false, | |
| 192 | + }) | |
| 193 | + | |
| 194 | + }, | |
| 195 | + //qh点击取货 | |
| 196 | + cqh: function(e) { | |
| 197 | + if(this.data.ssl) { | |
| 198 | + this.setData({ | |
| 199 | + qh: false, | |
| 200 | + xz: true, | |
| 201 | + one: true, | |
| 202 | + }) | |
| 203 | + }else{ | |
| 204 | + this.setData({ | |
| 205 | + qh: false, | |
| 206 | + xz: true, | |
| 207 | + one: false, | |
| 208 | + list:1, | |
| 209 | + }) | |
| 210 | + } | |
| 211 | + | |
| 212 | + }, | |
| 213 | + | |
| 214 | + //cxz点击选择门店 | |
| 215 | + cxz: function(e) { | |
| 216 | + this.setData({ | |
| 217 | + qh: true, | |
| 218 | + xz: false, | |
| 219 | + one: false, | |
| 220 | + }) | |
| 221 | + }, | |
| 222 | + //ccc点击选择的 | |
| 223 | + sel: function(e) { | |
| 224 | + this.setData({ | |
| 225 | + list: false, | |
| 226 | + se: false, | |
| 227 | + one: true, | |
| 228 | + xz: true, | |
| 229 | + }) | |
| 230 | + }, | |
| 231 | + //list点击底二层 | |
| 232 | + clist: function(e) { | |
| 233 | + var i = e.currentTarget.dataset.end; | |
| 234 | + var pick_id = e.currentTarget.dataset.pick_id; | |
| 235 | + var pick_dis = e.currentTarget.dataset.pick_dis; | |
| 236 | + | |
| 237 | + this.setData({ | |
| 238 | + end_name: i, | |
| 239 | + pick_id: pick_id, | |
| 240 | + ii: 1, | |
| 241 | + qh: true, | |
| 242 | + se: false, | |
| 243 | + list: false, | |
| 244 | + pick_dis: pick_dis | |
| 245 | + }) | |
| 246 | + }, | |
| 247 | + | |
| 248 | + //点击第一层 | |
| 249 | + setchild: function(e) { | |
| 250 | + var ind = e.currentTarget.dataset.bindex; | |
| 251 | + var nn = e.currentTarget.dataset.bname; | |
| 252 | + console.log(nn); | |
| 253 | + var list = this.data.ssl[ind].s_arr; | |
| 254 | + this.setData({ | |
| 255 | + ssl_child: list, | |
| 256 | + sele_dl_name: nn, | |
| 257 | + xz: false, | |
| 258 | + one: false, | |
| 259 | + list: true, | |
| 260 | + se: true | |
| 261 | + }); | |
| 262 | + }, | |
| 263 | + | |
| 264 | + //事件处理函数 | |
| 265 | + /*点击减号*/ | |
| 266 | + bindMinus: function() { | |
| 267 | + var num = this.data.num; | |
| 268 | + if (num > 1) { | |
| 269 | + num--; | |
| 270 | + } | |
| 271 | + var minusStatus = num > 1 ? 'normal' : 'disable'; | |
| 272 | + this.setData({ | |
| 273 | + num: num, | |
| 274 | + minusStatus: minusStatus, | |
| 275 | + }) | |
| 276 | + }, | |
| 277 | + | |
| 278 | + /*点击加号*/ | |
| 279 | + bindPlus: function() { | |
| 280 | + var th=this; | |
| 281 | + var num = this.data.num; | |
| 282 | + var ii = this.data.ii; | |
| 283 | + var minusStatus = num > 1 ? 'normal' : 'disable'; | |
| 284 | + | |
| 285 | + num++; | |
| 286 | + //要判断库存数量,限购数量 | |
| 287 | + th.check_num(num,minusStatus); | |
| 288 | + | |
| 289 | + }, | |
| 290 | + | |
| 291 | + async check_num(num,minusStatus){ | |
| 292 | + | |
| 293 | + var gd=this.data.goods; | |
| 294 | + var th=this; | |
| 295 | + var user_id=getApp().globalData.user_id; | |
| 296 | + var promgoodsbuynum=0; | |
| 297 | + var goodsbuynum=0; | |
| 298 | + getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 299 | + data: { | |
| 300 | + store_id: os.stoid, | |
| 301 | + user_id: user_id, | |
| 302 | + goods_id: gd.goods_id, | |
| 303 | + prom_type: gd.prom_type, | |
| 304 | + prom_id: gd.prom_id | |
| 305 | + | |
| 306 | + }, | |
| 307 | + }).then(res=>{ | |
| 308 | + var buy_num_data=res.data.data; | |
| 309 | + if(buy_num_data.promgoodsbuynum) promgoodsbuynum=buy_num_data.promgoodsbuynum; | |
| 310 | + goodsbuynum=buy_num_data.goodsbuynum; | |
| 311 | + }) | |
| 312 | + | |
| 313 | + //先判断限购 | |
| 314 | + if (num+goodsbuynum>gd.viplimited && gd.viplimited>0) { | |
| 315 | + getApp().confirmBox("超出商品限购"); | |
| 316 | + return false; | |
| 317 | + } | |
| 318 | + if (num+promgoodsbuynum>th.data.teamlist.buy_limit && th.data.teamlist.buy_limit>0) { | |
| 319 | + getApp().confirmBox("超出活动限购"); | |
| 320 | + return false; | |
| 321 | + } | |
| 322 | + //判断库存 | |
| 323 | + if ( num>gd.store_count) { | |
| 324 | + getApp().confirmBox("超出商品库存"); | |
| 325 | + return false; | |
| 326 | + } | |
| 327 | + var r_num=0; | |
| 328 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.teamlist.id, { | |
| 329 | + 1: 1 | |
| 330 | + }).then(res => { | |
| 331 | + var em = res; | |
| 332 | + if (em.data.code == 0) { | |
| 333 | + r_num=em.data.data; | |
| 334 | + } | |
| 335 | + }) | |
| 336 | + //--判断库存--- | |
| 337 | + if ( num>r_num) { | |
| 338 | + getApp().confirmBox("超出商品库存"); | |
| 339 | + return false; | |
| 340 | + } | |
| 341 | + | |
| 342 | + this.setData({ | |
| 343 | + num: num, | |
| 344 | + minusStatus: minusStatus, | |
| 345 | + }) | |
| 346 | + | |
| 347 | + }, | |
| 348 | + | |
| 349 | + /*输入框事件*/ | |
| 350 | + bindManual: function(e) { | |
| 351 | + var num = e.detail.value; | |
| 352 | + var minusStatus = num > 1 ? 'normal' : 'disable'; | |
| 353 | + this.setData({ | |
| 354 | + num: num, | |
| 355 | + minusStatus: minusStatus | |
| 356 | + }) | |
| 357 | + }, | |
| 358 | + | |
| 359 | + //---------------初始化代码---------------- | |
| 360 | + async init(tg_id) { | |
| 361 | + var goods_id = 0, //商品ID, | |
| 362 | + pageteam = null, // | |
| 363 | + original_img = null, //商品图片 | |
| 364 | + ee = this, | |
| 365 | + ordertx = [], | |
| 366 | + teamlist = null, //活动表 | |
| 367 | + goods = null, //商品 | |
| 368 | + teamgroup = null, //活動从表 | |
| 369 | + max_num = 0, | |
| 370 | + min_price = 0, | |
| 371 | + th=this, | |
| 372 | + that=th, | |
| 373 | + flag=null; | |
| 374 | + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2",{ | |
| 375 | + data:{ | |
| 376 | + store_id: os.stoid, | |
| 377 | + is_end: 0, | |
| 378 | + is_show: 1, | |
| 379 | + user_id: getApp().globalData.user_id, | |
| 380 | + pageSize:1000 | |
| 381 | + } | |
| 382 | + }).then(res=>{ | |
| 383 | + let pd_list=res.data.data.pageData; | |
| 384 | + if(res.data.code==0 && pd_list.length>0){ | |
| 385 | + flag =pd_list.some(pd=>{ | |
| 386 | + // if(th.data.goods_id){ | |
| 387 | + return pd.goods_id==th.data.goods_id; | |
| 388 | + // } | |
| 389 | + }) | |
| 390 | + } | |
| 391 | + }) | |
| 392 | + if(!flag){ | |
| 393 | + wx.showToast({title: "当前会员身份不符,无法参与", icon: 'none', duration: 3000}); | |
| 394 | + setTimeout(function () { | |
| 395 | + ut.wx_back(); | |
| 396 | + }, 1000) | |
| 397 | + return false; | |
| 398 | + } | |
| 399 | + | |
| 400 | + //获取活动从表信息team_id,listno团编号(券号) | |
| 401 | + await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { | |
| 402 | + }).then(res => { | |
| 403 | + | |
| 404 | + if(res.data.code !=0 ){ | |
| 405 | + getApp().showWarning(res.data.msg); | |
| 406 | + th.go_back(); | |
| 407 | + return false; | |
| 408 | + } | |
| 409 | + | |
| 410 | + if(res.data && res.data.data ) { | |
| 411 | + | |
| 412 | + teamgroup = res.data.data; | |
| 413 | + //获取当前时间,并且判断剩余时间 | |
| 414 | + var nt = ut.gettimestamp(); | |
| 415 | + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss"); | |
| 416 | + ee.setData({ | |
| 417 | + pindGoods: teamgroup, | |
| 418 | + buy_start_date: buy_start_date | |
| 419 | + }); | |
| 420 | + | |
| 421 | + if(nt>teamgroup.kt_end_time) { | |
| 422 | + th.setData({is_group_end:1,end_text:"团期已经结束"}) | |
| 423 | + } | |
| 424 | + if(teamgroup.state==1) { | |
| 425 | + th.setData({is_group_end:1,end_text:"团期已经结束"}) | |
| 426 | + } | |
| 427 | + if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) { | |
| 428 | + th.setData({is_group_end:2,end_text:"团期已满"}) | |
| 429 | + } | |
| 430 | + | |
| 431 | + } | |
| 432 | + }) | |
| 433 | + | |
| 434 | + //判断是不是要继续的开关 | |
| 435 | + var is_ok=1; | |
| 436 | + | |
| 437 | + //要先读取订单,看自己有没有买过该团的商品 | |
| 438 | + await getApp().request.promiseGet("/api/weshop/order/page", { | |
| 439 | + data: { | |
| 440 | + pt_prom_id:teamgroup.team_id, | |
| 441 | + user_id: oo.user_id, | |
| 442 | + store_id: os.stoid, | |
| 443 | + pageSize: 1, | |
| 444 | + page: 1 | |
| 445 | + } | |
| 446 | + }).then(res => { | |
| 447 | + var e=res; | |
| 448 | + if (e.data.code != 0) { | |
| 449 | + getApp().showWarning("读取订单失败"); | |
| 450 | + th.go_back(); | |
| 451 | + is_ok=0; | |
| 452 | + return fasle; | |
| 453 | + } | |
| 454 | + //--跳转到已经购买的情况-- | |
| 455 | + if (e.data.data.pageData.length > 0) { | |
| 456 | + var odr = e.data.data.pageData[0]; | |
| 457 | + //还未支付 | |
| 458 | + if (odr.pt_status == 0 && odr.order_status == 1) { | |
| 459 | + wx.navigateTo({ | |
| 460 | + url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, | |
| 461 | + }); | |
| 462 | + is_ok=0; | |
| 463 | + }else if (odr.pt_status == 1 && odr.order_status == 1){ | |
| 464 | + wx.navigateTo({ | |
| 465 | + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, | |
| 466 | + }); | |
| 467 | + is_ok=0; | |
| 468 | + } | |
| 469 | + } | |
| 470 | + }) | |
| 471 | + if(!is_ok) return false; | |
| 472 | + | |
| 473 | + //获取活动表的信息根据活动team_id | |
| 474 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, { | |
| 475 | + data: {} | |
| 476 | + }).then(res => { | |
| 477 | + if (res.data.code == 0) { | |
| 478 | + teamlist = res.data.data; | |
| 479 | + goods_id = res.data.data.goods_id; | |
| 480 | + //----------查看阶梯团------------ | |
| 481 | + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) { | |
| 482 | + var ct_rylist = JSON.parse(teamlist.ct_rylist); | |
| 483 | + var max = 0; var pri = 0; | |
| 484 | + ct_rylist.forEach(function (val, ind) { | |
| 485 | + if (val.rynum > max) { | |
| 486 | + max = val.rynum; | |
| 487 | + pri = val.price; | |
| 488 | + } | |
| 489 | + }) | |
| 490 | + max_num = max; | |
| 491 | + min_price = pri; | |
| 492 | + } | |
| 493 | + | |
| 494 | + } | |
| 495 | + }) | |
| 496 | + | |
| 497 | + if(!teamlist){ | |
| 498 | + getApp().showWarning("未找到活动"); | |
| 499 | + is_ok=0; | |
| 500 | + }else{ | |
| 501 | + if(teamlist.is_end==1){ | |
| 502 | + getApp().showWarning("拼单活动已经结束"); is_ok=0; | |
| 503 | + } | |
| 504 | + var now=ut.gettimestamp(); | |
| 505 | + if(teamlist.end_time<now && is_ok){ | |
| 506 | + getApp().showWarning("拼单活动已经结束"); is_ok=0; | |
| 507 | + } | |
| 508 | + } | |
| 509 | + if(!is_ok) { | |
| 510 | + th.go_back(); | |
| 511 | + return false; | |
| 512 | + } | |
| 513 | + | |
| 514 | + //多少人参团头像 | |
| 515 | + await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
| 516 | + data: { | |
| 517 | + store_id: o.stoid, | |
| 518 | + pt_listno: teamgroup.listno, | |
| 519 | + } | |
| 520 | + }).then(res => { | |
| 521 | + ordertx = res.data.data.pageData; | |
| 522 | + }) | |
| 523 | + | |
| 524 | + //获取商品信息 | |
| 525 | + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, { | |
| 526 | + }).then(res => { | |
| 527 | + //商品地址 | |
| 528 | + original_img = ee.data.imageurl + res.data.data.original_img, | |
| 529 | + goods = res.data.data | |
| 530 | + }) | |
| 531 | + | |
| 532 | + //显示商品规格 | |
| 533 | + var gg = ""; | |
| 534 | + if(goods.goods_spec=="null" || goods.goods_spec==null ) goods.goods_spec=""; | |
| 535 | + if(goods.goods_color=="null" || goods.goods_color==null) goods.goods_color=""; | |
| 536 | + | |
| 537 | + if (goods.goods_spec != "" && goods.goods_color != "") { | |
| 538 | + gg = goods.goods_spec + "/" + goods.goods_color; | |
| 539 | + } else if (goods.goods_spec != "" || goods.goods_color != "") { | |
| 540 | + gg = goods.goods_spec + goods.goods_color; | |
| 541 | + } else { | |
| 542 | + gg = "规格1"; | |
| 543 | + } | |
| 544 | + goods.gg = gg; | |
| 545 | + | |
| 546 | + //只装5个 | |
| 547 | + var ordertx2 = [], sf_num = 0, ct_nun = teamlist.ct_num; | |
| 548 | + if (max_num) { | |
| 549 | + ct_nun = parseInt(max_num); | |
| 550 | + if (ct_nun < ordertx.length) ct_nun = ordertx.length; | |
| 551 | + } | |
| 552 | + | |
| 553 | + if (ct_nun > 5) ct_nun = 5; | |
| 554 | + for (var i = 0; i < ct_nun; i++) { | |
| 555 | + if (i >= ordertx.length) sf_num++ | |
| 556 | + else | |
| 557 | + ordertx2.push(ordertx[i]); | |
| 558 | + } | |
| 559 | + | |
| 560 | + var sf_arr = []; | |
| 561 | + for (var i = 0; i < sf_num; i++) { | |
| 562 | + sf_arr.push(i); | |
| 563 | + } | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + if(th.data.is_group_end==1 || th.data.is_group_end==2 ){ | |
| 568 | + getApp().confirmBox(th.data.end_text); | |
| 569 | + wx.redirectTo({ | |
| 570 | + url: "/pages/goods/goodsInfo/goodsInfo?goods_id=" + goods.goods_id, | |
| 571 | + }); | |
| 572 | + return false; | |
| 573 | + } | |
| 574 | + | |
| 575 | + //--当是会员团的时候才显示倒计时多久可以参团-- | |
| 576 | + if(teamlist.kttype==2) { | |
| 577 | + //显示判断多久才能购买商品,获取没有支付的会员 | |
| 578 | + await getApp().request.promiseGet("/api/weshop/teamgroup/getTeamUser/" + os.stoid + "/" + teamgroup.id, { | |
| 579 | + 1: 1 | |
| 580 | + }).then(res => { | |
| 581 | + var em = res; | |
| 582 | + if (em.data.code == 0) { | |
| 583 | + var tg_list = em.data.data.split("|"); | |
| 584 | + var t_obj = {}; | |
| 585 | + t_obj.order_id = tg_list[0]; | |
| 586 | + t_obj.time = parseFloat(tg_list[1]) + 5 * 60; //五分钟后 | |
| 587 | + t_obj.user_name = tg_list[2]; | |
| 588 | + th.setData({tg_arr: t_obj}) | |
| 589 | + } | |
| 590 | + }) | |
| 591 | + } | |
| 592 | + | |
| 593 | + //获取大家都在团信息 | |
| 594 | + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/"+os.stoid, { | |
| 595 | + data: { | |
| 596 | + pageSize: 2, | |
| 597 | + page: 1, | |
| 598 | + store_id: 1, | |
| 599 | + is_end: 0, | |
| 600 | + is_show: 1 | |
| 601 | + } | |
| 602 | + }).then(res => { | |
| 603 | + if(ut.ajax_ok(res)){ | |
| 604 | + pageteam = res.data.data.pageData; | |
| 605 | + } | |
| 606 | + }); | |
| 607 | + | |
| 608 | + //-- 获取用户的默认门店 -- | |
| 609 | + getApp().get_user_store(function(ee) { | |
| 610 | + if(!ee) { | |
| 611 | + th.data.fir_def_store={}; //赋值空对象 | |
| 612 | + return false; | |
| 613 | + } | |
| 614 | + //--定时器推迟一下-- | |
| 615 | + setTimeout(function () { | |
| 616 | + if(!th.data.goods) return false; | |
| 617 | + var g_distr_type=th.data.goods.distr_type; | |
| 618 | + //--如果默认门店的配送方式不对,就不能被选择-- | |
| 619 | + if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ | |
| 620 | + //th.data.fir_def_store={}; //赋值空对象 | |
| 621 | + //return false; | |
| 622 | + ee.is_no_dis=1; | |
| 623 | + } | |
| 624 | + | |
| 625 | + var appd=getApp().globalData; | |
| 626 | + var w_time = setInterval(function() { | |
| 627 | + if (that.data.is_get_local_ok == 0) return false; | |
| 628 | + clearInterval(w_time); | |
| 629 | + var distance = null; | |
| 630 | + var e=JSON.parse(JSON.stringify(ee)); | |
| 631 | + | |
| 632 | + //如果有开启近距离的话,同时距离优不一样了 | |
| 633 | + if (that.data.lat != null) { | |
| 634 | + //如果经纬度有变化的话 | |
| 635 | + if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){ | |
| 636 | + that.data.fir_def_store=e; | |
| 637 | + that.setData({ | |
| 638 | + def_pick_store: e, | |
| 639 | + sto_sele_name: e.pickup_name, | |
| 640 | + sto_sele_id: e.pickup_id, | |
| 641 | + sto_sele_distr: e.distr_type | |
| 642 | + }) | |
| 643 | + }else{ | |
| 644 | + //要用接口是获取距离,js的计算不准 | |
| 645 | + getApp().request.promiseGet("/api/weshop/pickup/list",{ | |
| 646 | + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon,is_pos: 1}, | |
| 647 | + }).then(res=>{ | |
| 648 | + if(ut.ajax_ok(res)){ | |
| 649 | + e=res.data.data.pageData[0]; | |
| 650 | + if (e){ | |
| 651 | + appd.pk_store=e; | |
| 652 | + that.data.fir_def_store=e; | |
| 653 | + that.setData({ | |
| 654 | + def_pick_store: e, | |
| 655 | + sto_sele_name: e.pickup_name, | |
| 656 | + sto_sele_id: e.pickup_id, | |
| 657 | + sto_sele_distr: e.distr_type | |
| 658 | + }) | |
| 659 | + } | |
| 660 | + | |
| 661 | + } | |
| 662 | + }) | |
| 663 | + } | |
| 664 | + | |
| 665 | + //e.distance = distance; | |
| 666 | + appd.lat=that.data.lat; | |
| 667 | + appd.lon=that.data.lon; | |
| 668 | + | |
| 669 | + }else{ | |
| 670 | + if (e) { | |
| 671 | + e.distance = null; | |
| 672 | + that.data.fir_def_store=e; | |
| 673 | + that.setData({ | |
| 674 | + def_pick_store: e, | |
| 675 | + sto_sele_name: e.pickup_name, | |
| 676 | + sto_sele_id: e.pickup_id, | |
| 677 | + sto_sele_distr: e.distr_type | |
| 678 | + }) | |
| 679 | + } | |
| 680 | + } | |
| 681 | + | |
| 682 | + }, 500) | |
| 683 | + },1000) | |
| 684 | + }); | |
| 685 | + | |
| 686 | + //获取下redis长度,如果团已经弄完,或者拼单已经卖完 | |
| 687 | + //设置值 | |
| 688 | + ee.setData({ | |
| 689 | + ordertx2: ordertx2, | |
| 690 | + ordertx: ordertx, | |
| 691 | + teamlist: teamlist, | |
| 692 | + teamgroup: teamgroup, | |
| 693 | + goods: goods, | |
| 694 | + pageteam: pageteam, | |
| 695 | + image: original_img, | |
| 696 | + is_show:1, | |
| 697 | + sf_arr: sf_arr | |
| 698 | + }); | |
| 699 | + ee.countDown2(); | |
| 700 | + //---设置门店--- | |
| 701 | + ee.get_sto(); | |
| 702 | + //---定时设置一下待支付的订单--- | |
| 703 | + ee.time_out(); | |
| 704 | + }, | |
| 705 | + | |
| 706 | + onHide:function(){ | |
| 707 | + this.setData({is_show:0,}); | |
| 708 | + }, | |
| 709 | + go_back:function(){ | |
| 710 | + if(getCurrentPages()>1) | |
| 711 | + wx.navigateBack({delta: 1}) | |
| 712 | + else | |
| 713 | + wx.navigateTo({ | |
| 714 | + url: "/pages/index/index/index" | |
| 715 | + }); | |
| 716 | + }, | |
| 717 | + //---小于10的格式化函数---- | |
| 718 | + timeFormat(param) { | |
| 719 | + return param < 10 ? '0' + param : param; | |
| 720 | + }, | |
| 721 | + countDown2() { | |
| 722 | + var th = this; | |
| 723 | + // 获取当前时间,同时得到活动结束时间数组 | |
| 724 | + var newTime = ut.gettimestamp(); | |
| 725 | + var o = this.data.pindGoods; | |
| 726 | + var endTime = o.kt_end_time; | |
| 727 | + | |
| 728 | + let obj = null; | |
| 729 | + // 如果活动未结束,对时间进行处理 | |
| 730 | + if (endTime - newTime > 0) { | |
| 731 | + let time = (endTime - newTime); | |
| 732 | + // 获取天、时、分、秒 | |
| 733 | + let day = parseInt(time / (60 * 60 * 24)); | |
| 734 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 735 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 736 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 737 | + obj = { | |
| 738 | + day: this.timeFormat(day), | |
| 739 | + hou: this.timeFormat(hou), | |
| 740 | + min: this.timeFormat(min), | |
| 741 | + sec: this.timeFormat(sec) | |
| 742 | + } | |
| 743 | + } else { | |
| 744 | + //活动已结束,全部设置为'00' | |
| 745 | + obj = { | |
| 746 | + day: '00', | |
| 747 | + hou: '00', | |
| 748 | + min: '00', | |
| 749 | + sec: '00' | |
| 750 | + } | |
| 751 | + } | |
| 752 | + var txt = "pindGoods.djs"; | |
| 753 | + th.setData({ | |
| 754 | + obj: obj | |
| 755 | + }); | |
| 756 | + setTimeout(th.countDown2, 1000); | |
| 757 | + }, | |
| 758 | + | |
| 759 | + //------去支付,购买------- | |
| 760 | + go_pay:function () { | |
| 761 | + var th=this; | |
| 762 | + var def_pick_store=this.data.def_pick_store; | |
| 763 | + if(def_pick_store && def_pick_store.pickup_id) { | |
| 764 | + th.data.pick_id=def_pick_store.pickup_id; //选择门店 | |
| 765 | + th.data.end_name=def_pick_store.pickup_name; | |
| 766 | + } | |
| 767 | + if (!th.data.pick_id) return s.my_warnning("请选择门店", 0, th); | |
| 768 | + if (th.data.pick_id==0) return s.my_warnning("请选择门店", 0, th); | |
| 769 | + | |
| 770 | + //----判断起购数---- | |
| 771 | + var qnum=parseFloat(th.data.teamlist.minbuynum); | |
| 772 | + if(qnum>0 && qnum>th.data.num ){ | |
| 773 | + getApp().confirmBox("拼团商品至少要买"+qnum+"件!"); | |
| 774 | + return false; | |
| 775 | + } | |
| 776 | + //先判断团的redis数量 | |
| 777 | + this.buy_check_redis(function () { | |
| 778 | + var arr=th.data.redis_arr; | |
| 779 | + if(th.data.num>arr[0]){ | |
| 780 | + if(arr[0]>0){ | |
| 781 | + getApp().showWarning("超出活动库存"); | |
| 782 | + }else{ | |
| 783 | + getApp().showWarning("拼单已经抢光"); | |
| 784 | + } | |
| 785 | + return false; | |
| 786 | + } | |
| 787 | + if(th.data.teamlist.kttype==2 && 1>arr[1]){ | |
| 788 | + getApp().showWarning("拼团已满"); | |
| 789 | + return false; | |
| 790 | + } | |
| 791 | + | |
| 792 | + //--------------此时操作的数据------------ | |
| 793 | + var newd = { | |
| 794 | + goods_id: th.data.goods.goods_id, | |
| 795 | + goods_num: th.data.num, | |
| 796 | + pick_id: th.data.pick_id, | |
| 797 | + user_id: oo.user_id, | |
| 798 | + store_id: th.data.stoid, | |
| 799 | + goods_name: th.data.goods.goods_name, | |
| 800 | + goods_sn: th.data.goods.goods_sn, | |
| 801 | + }; | |
| 802 | + | |
| 803 | + //---是不是从收藏夹出来的--- | |
| 804 | + if(th.data.c_guide_id){ | |
| 805 | + newd['guide_id'] = th.data.c_guide_id; | |
| 806 | + newd['guide_type']=2; | |
| 807 | + | |
| 808 | + }else{ | |
| 809 | + if(getApp().globalData.guide_id){ | |
| 810 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 811 | + newd['guide_type']=0; | |
| 812 | + | |
| 813 | + } | |
| 814 | + } | |
| 815 | + | |
| 816 | + //-----拼团----- | |
| 817 | + newd.goods_price = th.data.teamlist.price; | |
| 818 | + newd.prom_type = 6; | |
| 819 | + newd.prom_id = th.data.teamlist.id; | |
| 820 | + newd.kt_type = th.data.teamlist.kttype; //开团类型 | |
| 821 | + newd.is_pt_tz = 0; | |
| 822 | + newd.pick_name = th.data.end_name; | |
| 823 | + newd.pick_dis = 1; | |
| 824 | + newd.is_normal = 0; | |
| 825 | + //判断开团还是参团 | |
| 826 | + switch (th.data.is_kt_or_ct) { | |
| 827 | + case "0": | |
| 828 | + //如果不是商家团,就要带团期号 | |
| 829 | + if(th.data.teamlist.kttype>1){ | |
| 830 | + newd.qh=th.data.teamgroup.listno; | |
| 831 | + } | |
| 832 | + break; | |
| 833 | + case "1": | |
| 834 | + //阶梯团和会员团都要设置is_pt_tz | |
| 835 | + if (newd.kt_type > 1) { | |
| 836 | + newd.is_pt_tz = 1; //开团类型 | |
| 837 | + } | |
| 838 | + break; | |
| 839 | + } | |
| 840 | + newd['pick_dis'] = th.data.pick_dis; | |
| 841 | + | |
| 842 | + if(getApp().globalData.guide_id){ | |
| 843 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 844 | + newd['guide_type']=0; | |
| 845 | + } | |
| 846 | + | |
| 847 | + s.set_b_now(newd); | |
| 848 | + wx.navigateTo({ | |
| 849 | + url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + th.data.goods.goods_id, | |
| 850 | + }); | |
| 851 | + }); | |
| 852 | + }, | |
| 853 | + | |
| 854 | + //购买前的判断redis | |
| 855 | + async buy_check_redis(func){ | |
| 856 | + //获取redis中的数量 | |
| 857 | + var r_num=0,prom_type=6,prom_id=this.data.teamlist.id; | |
| 858 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 859 | + 1: 1 | |
| 860 | + }).then(res => { | |
| 861 | + var em = res; | |
| 862 | + if (em.data.code == 0) { | |
| 863 | + r_num=em.data.data; | |
| 864 | + } | |
| 865 | + }) | |
| 866 | + | |
| 867 | + //只有会员团要判断团的人数 | |
| 868 | + var gr_num=0,grp_id=this.data.teamgroup.id; | |
| 869 | + if(this.data.teamlist.kttype==2){ | |
| 870 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActTuanLen/" + os.stoid + "/" + grp_id, { | |
| 871 | + 1: 1 | |
| 872 | + }).then(res => { | |
| 873 | + var em = res; | |
| 874 | + if (em.data.code == 0) { | |
| 875 | + gr_num=em.data.data; | |
| 876 | + } | |
| 877 | + }) | |
| 878 | + } | |
| 879 | + var arr=[];arr.push(r_num);arr.push(gr_num); | |
| 880 | + this.data.redis_arr=arr; | |
| 881 | + func(); | |
| 882 | + }, | |
| 883 | + | |
| 884 | + //定时设置一下待支付的订单 | |
| 885 | + time_out:function () { | |
| 886 | + var list=this.data.tg_arr,th=this; | |
| 887 | + if(!list) return false; | |
| 888 | + // 获取当前时间,同时得到活动结束时间数组 | |
| 889 | + var newTime = ut.gettimestamp(); | |
| 890 | + var endTime = list.time; | |
| 891 | + | |
| 892 | + let obj = null; | |
| 893 | + // 如果活动未结束,对时间进行处理 | |
| 894 | + if (endTime - newTime > 0) { | |
| 895 | + let time = (endTime - newTime); | |
| 896 | + // 获取天、时、分、秒 | |
| 897 | + let day = parseInt(time / (60 * 60 * 24)); | |
| 898 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 899 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 900 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 901 | + obj = { | |
| 902 | + day: th.timeFormat(day), | |
| 903 | + hou: th.timeFormat(hou), | |
| 904 | + min: th.timeFormat(min), | |
| 905 | + sec: th.timeFormat(sec) | |
| 906 | + } | |
| 907 | + } else { | |
| 908 | + //活动已结束,全部设置为'00' | |
| 909 | + obj = { | |
| 910 | + day: '00', | |
| 911 | + hou: '00', | |
| 912 | + min: '00', | |
| 913 | + sec: '00' | |
| 914 | + } | |
| 915 | + | |
| 916 | + //调用接口清理订单,并且返回redis数量 | |
| 917 | + th.back_order(function () { | |
| 918 | + th.setData({ tg_arr: null}); | |
| 919 | + }); | |
| 920 | + return false; | |
| 921 | + } | |
| 922 | + var txt = "pindGoods.djs"; | |
| 923 | + th.setData({ | |
| 924 | + r_obj: obj | |
| 925 | + }); | |
| 926 | + setTimeout(th.time_out, 1000); | |
| 927 | + }, | |
| 928 | + | |
| 929 | + //清理订单,并且返回redis数量ss | |
| 930 | + back_order:function (func) { | |
| 931 | + var th=this; | |
| 932 | + //---取消订单--- | |
| 933 | + getApp().request.delete("/api/weshop/order/cancelTeamOrder/"+th.data.stoid+"/"+th.data.tg_arr.order_id,{ | |
| 934 | + data:{}, | |
| 935 | + success: function(t) { | |
| 936 | + if(t.data.code==0){ | |
| 937 | + th.setData({tg_arr:null}) | |
| 938 | + } | |
| 939 | + }, | |
| 940 | + }) | |
| 941 | + }, | |
| 942 | + | |
| 943 | + go_goodsinfo:function (e) { | |
| 944 | + var gid=e.currentTarget.dataset.gid; | |
| 945 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | |
| 946 | + wx.navigateTo({ url: url, }) //跳到非tabbar页 | |
| 947 | + }, | |
| 948 | + | |
| 949 | + gohome:function(){ | |
| 950 | + getApp().goto("/pages/index/index/index"); | |
| 951 | + }, | |
| 952 | + | |
| 953 | + //-----图片失败,默认图片----- | |
| 954 | + bind_bnerr: function (e) { | |
| 955 | + var _errImg = e.target.dataset.errorimg; | |
| 956 | + var _errObj = {}; | |
| 957 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
| 958 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 959 | + }, | |
| 960 | + | |
| 961 | + //------ 分享配置 -------- | |
| 962 | + onShareAppMessage: function (e) { | |
| 963 | + getApp().globalData.no_clear=1; | |
| 964 | + var curPage=this; | |
| 965 | + var pagePath = curPage.route; //当前页面url | |
| 966 | + if (pagePath.indexOf('/') != 0) { | |
| 967 | + pagePath = '/' + pagePath; | |
| 968 | + } | |
| 969 | + var url=pagePath; | |
| 970 | + | |
| 971 | + //--分享图片-- | |
| 972 | + img=th.data.iurl+th.data.teamlist.share_imgurl; | |
| 973 | + //--把会员分享出去-- | |
| 974 | + if(getApp().globalData.user_id){ | |
| 975 | + if(url.indexOf("?")>0) | |
| 976 | + url+="&first_leader="+getApp().globalData.user_id; | |
| 977 | + else | |
| 978 | + url+="?first_leader="+getApp().globalData.user_id; | |
| 979 | + } | |
| 980 | + | |
| 981 | + return { | |
| 982 | + path:url, | |
| 983 | + title: "商品分类", | |
| 984 | + imageUrl: img, | |
| 985 | + } | |
| 986 | + }, | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + closeSpecModal: function() { | |
| 993 | + this.setData({ | |
| 994 | + yijian: false | |
| 995 | + }); | |
| 996 | + }, | |
| 997 | + | |
| 998 | + close_popup: function() { | |
| 999 | + this.setData({ | |
| 1000 | + showStore: true | |
| 1001 | + }); | |
| 1002 | + }, | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + //-- 选择门店。此时的门店选择与门店有关系 -- | |
| 1007 | + choice_store: function(ee) { | |
| 1008 | + | |
| 1009 | + var th = this; | |
| 1010 | + var bconfig = th.data.bconfig; | |
| 1011 | + if(!th.data.only_pk && !th.data.def_pickpu_list){ | |
| 1012 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
| 1013 | + return false; | |
| 1014 | + } | |
| 1015 | + if(th.data.only_pk && !th.data.only_pk.length){ | |
| 1016 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
| 1017 | + return false; | |
| 1018 | + } | |
| 1019 | + if(th.data.def_pickpu_list && !th.data.def_pickpu_list.length){ | |
| 1020 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | |
| 1021 | + return false; | |
| 1022 | + } | |
| 1023 | + | |
| 1024 | + if ( bconfig && bconfig.is_sort_storage) { | |
| 1025 | + wx.getLocation({ | |
| 1026 | + type: 'gcj02', | |
| 1027 | + success: function(res) { | |
| 1028 | + | |
| 1029 | + th.data.lat = res.latitude; | |
| 1030 | + th.data.lon = res.longitude; | |
| 1031 | + th.data.is_get_local_ok = 1; | |
| 1032 | + th.setData({ | |
| 1033 | + is_gps: 1 | |
| 1034 | + }); | |
| 1035 | + //th.onShow(); | |
| 1036 | + th.get_sto(); | |
| 1037 | + }, | |
| 1038 | + fail: function(res) { | |
| 1039 | + //th.onShow(); | |
| 1040 | + th.data.is_get_local_ok = 1; | |
| 1041 | + th.get_sto(); | |
| 1042 | + if (res.errCode == 2) { | |
| 1043 | + th.setData({ | |
| 1044 | + is_gps: 0 | |
| 1045 | + }); | |
| 1046 | + if (th.data.is_gps == 0) { | |
| 1047 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
| 1048 | + } | |
| 1049 | + } else { | |
| 1050 | + th.setData({ | |
| 1051 | + is_gps: "3" | |
| 1052 | + }); | |
| 1053 | + } | |
| 1054 | + | |
| 1055 | + } | |
| 1056 | + }) | |
| 1057 | + }else{ | |
| 1058 | + th.data.is_get_local_ok = 1; | |
| 1059 | + th.get_sto(); | |
| 1060 | + } | |
| 1061 | + | |
| 1062 | + this.setData({ | |
| 1063 | + store: 1, | |
| 1064 | + yijian: false, | |
| 1065 | + choice_sort_store:0 | |
| 1066 | + }) | |
| 1067 | + | |
| 1068 | + }, | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + //选择更多门店 | |
| 1072 | + more_store: function() { | |
| 1073 | + this.setData({ sort_store: 1}); | |
| 1074 | + }, | |
| 1075 | + | |
| 1076 | + // 返回按钮 | |
| 1077 | + returns: function() { | |
| 1078 | + this.setData({ | |
| 1079 | + sort_store: 0,choice_sort_store: 0 | |
| 1080 | + }); | |
| 1081 | + }, | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + //-- 等待获取定位系统 -- | |
| 1085 | + wait_for_store_config: function() { | |
| 1086 | + var th = this; | |
| 1087 | + var t_time = setInterval(function() { | |
| 1088 | + if (th.data.bconfig == null) false; | |
| 1089 | + var e = th.data.bconfig; | |
| 1090 | + if (e && e.is_sort_storage) { | |
| 1091 | + wx.getLocation({ | |
| 1092 | + type: 'gcj02', | |
| 1093 | + success: function(res) { | |
| 1094 | + th.data.lat = res.latitude; | |
| 1095 | + th.data.lon = res.longitude; | |
| 1096 | + th.data.is_get_local_ok = 1; | |
| 1097 | + }, | |
| 1098 | + fail: function(res) { | |
| 1099 | + if (res.errCode == 2) { | |
| 1100 | + th.setData({ | |
| 1101 | + is_gps: 0 | |
| 1102 | + }); | |
| 1103 | + if (th.data.is_gps == 0) { | |
| 1104 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | |
| 1105 | + } | |
| 1106 | + | |
| 1107 | + } else { | |
| 1108 | + th.setData({ | |
| 1109 | + is_gps: "3" | |
| 1110 | + }); | |
| 1111 | + } | |
| 1112 | + | |
| 1113 | + th.data.is_get_local_ok = 1; | |
| 1114 | + } | |
| 1115 | + }) | |
| 1116 | + } else { | |
| 1117 | + th.data.is_get_local_ok = 1; | |
| 1118 | + } | |
| 1119 | + clearInterval(t_time); | |
| 1120 | + }, 500) | |
| 1121 | + }, | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + //---------拿出门店分类和门店------------ | |
| 1125 | + get_sto(e) { | |
| 1126 | + var th = this,that=this; | |
| 1127 | + var timer_get = setInterval(function() { | |
| 1128 | + if (th.data.is_get_local_ok == 0) return false; | |
| 1129 | + if (!th.data.goods) return false; | |
| 1130 | + var dd = null, | |
| 1131 | + i = getApp().request; | |
| 1132 | + var g_distr_type = th.data.goods.distr_type; | |
| 1133 | + if (g_distr_type != 0) { | |
| 1134 | + dd = { | |
| 1135 | + store_id: o.stoid, | |
| 1136 | + distr_type: g_distr_type, | |
| 1137 | + isstop: 0, | |
| 1138 | + is_pos: 1, | |
| 1139 | + pageSize: 2000 | |
| 1140 | + } | |
| 1141 | + } else { | |
| 1142 | + dd = { | |
| 1143 | + store_id: o.stoid, | |
| 1144 | + isstop: 0, | |
| 1145 | + is_pos: 1, | |
| 1146 | + pageSize: 2000 | |
| 1147 | + } | |
| 1148 | + } | |
| 1149 | + //如果有距离的话 | |
| 1150 | + if (th.data.lat != null) { | |
| 1151 | + dd.lat = th.data.lat; | |
| 1152 | + dd.lon = th.data.lon; | |
| 1153 | + } | |
| 1154 | + clearInterval(timer_get); | |
| 1155 | + | |
| 1156 | + //如果会员是有默认的门店话 | |
| 1157 | + if(!th.data.def_pick_store && th.data.fir_def_store){ | |
| 1158 | + th.setData({def_pick_store:th.data.fir_def_store}); | |
| 1159 | + } | |
| 1160 | + | |
| 1161 | + //----------获取门店---------------- | |
| 1162 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 1163 | + data: dd, | |
| 1164 | + }).then(res => { | |
| 1165 | + var e = res; | |
| 1166 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { | |
| 1167 | + | |
| 1168 | + var his_cate_num=0; | |
| 1169 | + for(let i in e.data.data.pageData){ | |
| 1170 | + let item=e.data.data.pageData[i]; | |
| 1171 | + if(item.category_id>0){ | |
| 1172 | + his_cate_num=1;break; | |
| 1173 | + } | |
| 1174 | + } | |
| 1175 | + e.his_cate_num=his_cate_num; | |
| 1176 | + | |
| 1177 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
| 1178 | + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ | |
| 1179 | + th.setData({ | |
| 1180 | + def_pick_store:e.data.data.pageData[0], | |
| 1181 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 1182 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 1183 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
| 1184 | + }); | |
| 1185 | + th.data.fir_def_store=e.data.data.pageData[0]; | |
| 1186 | + } | |
| 1187 | + | |
| 1188 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- | |
| 1189 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | |
| 1190 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
| 1191 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
| 1192 | + e.data.data.pageData.splice(k, 1); //删除 | |
| 1193 | + break; | |
| 1194 | + } | |
| 1195 | + } | |
| 1196 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
| 1197 | + } | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + th.setData({all_pick_list:e.data.data.pageData}); | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + setTimeout(function(){ | |
| 1204 | + th.deal_pickup(e); //--普通门店排版-- | |
| 1205 | + },800) | |
| 1206 | + | |
| 1207 | + } | |
| 1208 | + }) | |
| 1209 | + }, 200) | |
| 1210 | + | |
| 1211 | + }, | |
| 1212 | + | |
| 1213 | + //------------处理门店,拼团活动只有线上库存--------------- | |
| 1214 | + deal_pickup(e){ | |
| 1215 | + var th=this; | |
| 1216 | + var g_distr_type=th.data.goods.distr_type; | |
| 1217 | + //单总量超出5个的时候 | |
| 1218 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
| 1219 | + getApp().request.get("/api/weshop/storagecategory/page", { | |
| 1220 | + data: { | |
| 1221 | + store_id: o.stoid, | |
| 1222 | + pageSize: 1000, | |
| 1223 | + orderField:"sort", | |
| 1224 | + orderType:'asc', | |
| 1225 | + }, | |
| 1226 | + success: function(ee) { | |
| 1227 | + if (ee.data.code == 0) { | |
| 1228 | + | |
| 1229 | + var check_all_cate=0; | |
| 1230 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){ | |
| 1231 | + for(let i in ee.data.data.pageData){ | |
| 1232 | + let item=ee.data.data.pageData[i]; | |
| 1233 | + if(item.is_show==1){ | |
| 1234 | + check_all_cate=1;break | |
| 1235 | + } | |
| 1236 | + } | |
| 1237 | + } | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + if (check_all_cate) { | |
| 1242 | + | |
| 1243 | + var sto_cate = ee.data.data.pageData; | |
| 1244 | + var sto_arr = e.data.data.pageData; | |
| 1245 | + var newarr = new Array(); | |
| 1246 | + var qita = new Array(); | |
| 1247 | + | |
| 1248 | + var is_del_pk=0; | |
| 1249 | + //----要进行门店分组-------- | |
| 1250 | + for (var i = 0; i < sto_arr.length; i++) { | |
| 1251 | + //找一下这个门店有没有在分类数组内 | |
| 1252 | + var find2 = 0,find2name = "",sort=0; | |
| 1253 | + is_del_pk=0; | |
| 1254 | + for (var m = 0; m < sto_cate.length; m++) { | |
| 1255 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | |
| 1256 | + if(sto_cate[m].is_show!=1){ | |
| 1257 | + is_del_pk=1; sto_arr.splice(i,1); | |
| 1258 | + i--; | |
| 1259 | + }else { | |
| 1260 | + find2 = sto_cate[m].cat_id; | |
| 1261 | + find2name = sto_cate[m].cat_name; | |
| 1262 | + sort = sto_cate[m].sort; | |
| 1263 | + is_del_pk=0; | |
| 1264 | + } | |
| 1265 | + break; | |
| 1266 | + } | |
| 1267 | + } | |
| 1268 | + if(is_del_pk) continue; | |
| 1269 | + | |
| 1270 | + if (newarr.length > 0) { | |
| 1271 | + var find = 0; | |
| 1272 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 1273 | + if (find2 != 0) { | |
| 1274 | + for (var ii = 0; ii < newarr.length; ii++) { | |
| 1275 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | |
| 1276 | + newarr[ii].s_arr.push(sto_arr[i]); | |
| 1277 | + find = 1; | |
| 1278 | + break; | |
| 1279 | + } | |
| 1280 | + } | |
| 1281 | + if (find == 0) { | |
| 1282 | + var arr0 = new Array(); | |
| 1283 | + arr0.push(sto_arr[i]); | |
| 1284 | + var item = { | |
| 1285 | + cat_id: find2, | |
| 1286 | + name: find2name, | |
| 1287 | + sort:sort, | |
| 1288 | + s_arr: arr0 | |
| 1289 | + }; | |
| 1290 | + newarr.push(item); | |
| 1291 | + } | |
| 1292 | + } else { | |
| 1293 | + qita.push(sto_arr[i]); | |
| 1294 | + } | |
| 1295 | + } else { | |
| 1296 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 1297 | + if (find2 != 0) { | |
| 1298 | + var arr0 = new Array(); | |
| 1299 | + arr0.push(sto_arr[i]); | |
| 1300 | + var item = { | |
| 1301 | + cat_id: find2, | |
| 1302 | + name: find2name, | |
| 1303 | + sort:sort, | |
| 1304 | + s_arr: arr0 | |
| 1305 | + }; | |
| 1306 | + newarr.push(item); | |
| 1307 | + } else { | |
| 1308 | + qita.push(sto_arr[i]); | |
| 1309 | + } | |
| 1310 | + } | |
| 1311 | + } | |
| 1312 | + | |
| 1313 | + var def_arr = new Array(); | |
| 1314 | + //-- 开始就看10个门店 -- | |
| 1315 | + for (var k = 0; k < 10; k++) { | |
| 1316 | + if (k == sto_arr.length) break; | |
| 1317 | + def_arr.push(sto_arr[k]); | |
| 1318 | + } | |
| 1319 | + | |
| 1320 | + th.setData({ | |
| 1321 | + def_pickpu_list: def_arr, | |
| 1322 | + pickpu_list: ee.data.data.pageData | |
| 1323 | + }); | |
| 1324 | + | |
| 1325 | + //门店分类要排序下 | |
| 1326 | + function compare(property){ | |
| 1327 | + return function(a,b){ | |
| 1328 | + var value1 = a[property]; | |
| 1329 | + var value2 = b[property]; | |
| 1330 | + return value1 - value2; | |
| 1331 | + } | |
| 1332 | + } | |
| 1333 | + if(newarr.length>0) | |
| 1334 | + newarr.sort(compare("sort")); | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + //----安排其他的分类----- | |
| 1338 | + if (qita.length > 0) { | |
| 1339 | + var item = { | |
| 1340 | + cat_id: -1, | |
| 1341 | + name: "其他", | |
| 1342 | + s_arr: qita | |
| 1343 | + }; | |
| 1344 | + newarr.push(item); | |
| 1345 | + } | |
| 1346 | + | |
| 1347 | + var sd={ | |
| 1348 | + all_sto: newarr, | |
| 1349 | + is_show_sto_cat:1 | |
| 1350 | + } | |
| 1351 | + if(!sto_arr || sto_arr.length<=10){ | |
| 1352 | + sd.is_show_sto_cat=-1; | |
| 1353 | + sd.only_pk=sto_arr; | |
| 1354 | + } | |
| 1355 | + th.setData(sd); | |
| 1356 | + | |
| 1357 | + } else { | |
| 1358 | + th.setData({ | |
| 1359 | + is_show_sto_cat: -1, | |
| 1360 | + only_pk: e.data.data.pageData | |
| 1361 | + }); | |
| 1362 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
| 1363 | + if (!th.data.def_pick_store) { | |
| 1364 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | |
| 1365 | + } | |
| 1366 | + } | |
| 1367 | + } else { | |
| 1368 | + th.setData({ | |
| 1369 | + is_show_sto_cat: -1, | |
| 1370 | + only_pk: e.data.data.pageData | |
| 1371 | + }); | |
| 1372 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
| 1373 | + if (!th.data.def_pick_store) { | |
| 1374 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | |
| 1375 | + } | |
| 1376 | + | |
| 1377 | + } | |
| 1378 | + } | |
| 1379 | + }); | |
| 1380 | + } else { | |
| 1381 | + th.setData({ | |
| 1382 | + is_show_sto_cat: 0, | |
| 1383 | + only_pk: e.data.data.pageData | |
| 1384 | + }); | |
| 1385 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | |
| 1386 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
| 1387 | + th.setData({ | |
| 1388 | + def_pick_store:e.data.data.pageData[0], | |
| 1389 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 1390 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 1391 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
| 1392 | + }) | |
| 1393 | + } | |
| 1394 | + } | |
| 1395 | + }, | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + //---选择分类门店--- | |
| 1400 | + choice_sort_store: function(e) { | |
| 1401 | + var index = e.currentTarget.dataset.index; | |
| 1402 | + var region_name = e.currentTarget.dataset.region; | |
| 1403 | + var item = this.data.all_sto[index]; | |
| 1404 | + this.setData({ | |
| 1405 | + region_name: region_name, | |
| 1406 | + sort_store: 0, | |
| 1407 | + choice_sort_store: 1, | |
| 1408 | + sec_sto: item, | |
| 1409 | + sec_pick_index: 0, | |
| 1410 | + }); | |
| 1411 | + }, | |
| 1412 | + | |
| 1413 | + choose_for_store_fir: function(e) { | |
| 1414 | + var index_c = e.currentTarget.dataset.ind; | |
| 1415 | + var th=this; | |
| 1416 | + th.setData({ | |
| 1417 | + fir_pick_index: index_c | |
| 1418 | + }) | |
| 1419 | + }, | |
| 1420 | + | |
| 1421 | + //---点击二级之后的选择--- | |
| 1422 | + choose_for_store: function(e) { | |
| 1423 | + var index_c = e.currentTarget.dataset.ind; | |
| 1424 | + var th=this; | |
| 1425 | + th.setData({ | |
| 1426 | + sec_pick_index: index_c, | |
| 1427 | + fir_pick_index: index_c | |
| 1428 | + }) | |
| 1429 | + | |
| 1430 | + }, | |
| 1431 | + | |
| 1432 | + //确定def_pick为选择的门店 | |
| 1433 | + sure_pick: function(e) { | |
| 1434 | + var th = this; | |
| 1435 | + var item = null; | |
| 1436 | + | |
| 1437 | + if (th.data.choice_sort_store == 0) { | |
| 1438 | + var index = th.data.fir_pick_index; | |
| 1439 | + if (th.data.is_show_sto_cat == 1) { | |
| 1440 | + item = th.data.def_pickpu_list[index]; | |
| 1441 | + } else { | |
| 1442 | + item = th.data.only_pk[index]; //当没有门店分类的时候 | |
| 1443 | + } | |
| 1444 | + | |
| 1445 | + } else { | |
| 1446 | + var index = th.data.sec_pick_index; | |
| 1447 | + item = th.data.sec_sto.s_arr[index]; | |
| 1448 | + } | |
| 1449 | + if(!item) return false; | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + th.setData({ | |
| 1453 | + def_pick_store: item, | |
| 1454 | + sto_sele_name: item.pickup_name, | |
| 1455 | + sto_sele_id: item.pickup_id, | |
| 1456 | + sto_sele_distr: item.distr_type, | |
| 1457 | + store: 0, | |
| 1458 | + choice_sort_store: 0, | |
| 1459 | + fir_pick_index: 0 | |
| 1460 | + }); | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + th.setData({ | |
| 1464 | + yijian: 1, //打开拼团购买界面 | |
| 1465 | + store: 0, //关闭门店 | |
| 1466 | + choice_sort_store: 0, //关闭门店2级 | |
| 1467 | + sort_store: 0, //关闭门店2级 | |
| 1468 | + }); | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + }, | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + //把选择的门店设置成默认的门店def_pick | |
| 1476 | + set_def_pick: function(e) { | |
| 1477 | + var th = this; | |
| 1478 | + var item = null; | |
| 1479 | + if (th.data.choice_sort_store == 0) { | |
| 1480 | + var index = th.data.fir_pick_index; | |
| 1481 | + if (th.data.is_show_sto_cat == 1) { | |
| 1482 | + item = th.data.def_pickpu_list[index]; | |
| 1483 | + } else { | |
| 1484 | + item = th.data.only_pk[index]; //当没有门店分类的时候 | |
| 1485 | + } | |
| 1486 | + } else { | |
| 1487 | + var index = th.data.sec_pick_index; | |
| 1488 | + item = th.data.sec_sto.s_arr[index]; | |
| 1489 | + } | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + var store_id = o.stoid; | |
| 1493 | + var user_id = getApp().globalData.user_id; | |
| 1494 | + var def_pickup_id = item.pickup_id; | |
| 1495 | + | |
| 1496 | + getApp().request.put('/api/weshop/users/update', { | |
| 1497 | + data: { | |
| 1498 | + user_id, | |
| 1499 | + def_pickup_id | |
| 1500 | + }, | |
| 1501 | + success: function(res) { | |
| 1502 | + if (res.data.code == 0) { | |
| 1503 | + if (th.data.choice_sort_store == 0) th.setData({ | |
| 1504 | + fir_pick_index: 0 | |
| 1505 | + }); | |
| 1506 | + getApp().globalData.pk_store = item; | |
| 1507 | + } else { | |
| 1508 | + getApp().my_warnning("设置默认门店地址失败",0,th) | |
| 1509 | + } | |
| 1510 | + | |
| 1511 | + } | |
| 1512 | + }); | |
| 1513 | + | |
| 1514 | + th.setData({ | |
| 1515 | + def_pick_store: item, | |
| 1516 | + sto_sele_name: item.pickup_name, | |
| 1517 | + sto_sele_id: item.pickup_id, | |
| 1518 | + sto_sele_distr: item.distr_type, | |
| 1519 | + store: 0, | |
| 1520 | + choice_sort_store: 0 | |
| 1521 | + }); | |
| 1522 | + | |
| 1523 | + //4就是拼团 | |
| 1524 | + th.setData({ | |
| 1525 | + yijian: 1, //打开拼团购买界面 | |
| 1526 | + store: 0, //关闭门店 | |
| 1527 | + choice_sort_store: 0, //关闭门店2级 | |
| 1528 | + sort_store: 0, //关闭门店2级 | |
| 1529 | + }); | |
| 1530 | + | |
| 1531 | + }, | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + //-- 关闭选择门店 -- | |
| 1535 | + close_popup: function(e) { | |
| 1536 | + var th=this; | |
| 1537 | + this.setData({ | |
| 1538 | + store: 0, | |
| 1539 | + choice_sort_store: 0, | |
| 1540 | + sort_store: 0, | |
| 1541 | + fir_pick_index:0, | |
| 1542 | + sec_pick_index:0, | |
| 1543 | + yijian: 1, //打开拼团购买界面 | |
| 1544 | + }) | |
| 1545 | + | |
| 1546 | + }, | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | +}) | |
| 0 | 1553 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/team_show/team_show.json
0 → 100644
| 1 | +{ | |
| 2 | + "windom": { | |
| 3 | + "navigationBarTitleText": "拼团订单", | |
| 4 | + "backgroundTextStyle": "light", | |
| 5 | + "navigationBarTextStyle": "white", | |
| 6 | + "navigationBarBackgroundColor": "#ffffff", | |
| 7 | + "backgroundColor": "#eeeeee" | |
| 8 | + }, | |
| 9 | + "usingComponents": { | |
| 10 | + "warn": "/components/long_warn/long_warn" | |
| 11 | + } | |
| 12 | +} | |
| 0 | 13 | \ No newline at end of file | ... | ... |
packageA/pages/serviceCard_pd/team_show/team_show.wxml
0 → 100644
| 1 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
| 2 | +<!---- //文字"--> | |
| 3 | +<view wx:if="{{is_show}}"> | |
| 4 | + | |
| 5 | + <!--图片区域--> | |
| 6 | + <view class='center'> | |
| 7 | + <view class='cenleft'> | |
| 8 | + <image src='{{image}}' binderror='bind_bnerr' data-errorimg='image'></image> | |
| 9 | + </view> | |
| 10 | + <view class='cenright'> | |
| 11 | + <view class='cenrt'> | |
| 12 | + | |
| 13 | + <view class='xc-goods-details ellipsis-2 fs28'> | |
| 14 | + <span>{{goods.goods_name}}</span> | |
| 15 | + </view> | |
| 16 | + </view> | |
| 17 | + <view class='cenrcen flex-vertical-between'> | |
| 18 | + <view> | |
| 19 | + <view class="fs40 xc-wc" style='font-size:40rpx'> | |
| 20 | + <span class="fs28" style="font-weight:500;">¥</span>{{teamlist.price}}</view> | |
| 21 | + <view class="fs22 word-line xc-wc"> | |
| 22 | + 零售价¥{{goods.market_price}} | |
| 23 | + </view> | |
| 24 | + </view> | |
| 25 | + <view class="xc-wc fs24"> | |
| 26 | + <view> | |
| 27 | + <view class="">已拼{{teamlist.buy_num}}件</view> | |
| 28 | + <view class="flex xc-valframe t-c"> | |
| 29 | + <view class="xc-frame-img"> | |
| 30 | + <image class="picture" src="{{imageurl}}/miniapp/images/bai-ren.png"></image> | |
| 31 | + </view> | |
| 32 | + <view style='margin-left:9rpx;'> | |
| 33 | + {{teamlist.ct_num}}人拼 | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + </view> | |
| 37 | + </view> | |
| 38 | + </view> | |
| 39 | + </view> | |
| 40 | + </view> | |
| 41 | + | |
| 42 | + <view class='body oh'> | |
| 43 | + <!-- 等待团员 --> | |
| 44 | + <!-- <view class='bodytop' wx:if="{{teamlist.kt_type==3}}"> --> | |
| 45 | + <!-- 拼团成功 --> | |
| 46 | + <view class="xc-ptcomplete flex-level fs28" wx:if="{{val==2}}"> | |
| 47 | + | |
| 48 | + <view class="xc-wc">拼团成功</view>,为您节省<text class="xc-wc">25</text>元 | |
| 49 | + <view class="xc-img-frame oh" wx:if="{{val==2}}"> | |
| 50 | + <image class="img" src="{{imageurl}}/miniapp/images/xc_qtcg.png"></image> | |
| 51 | + </view> | |
| 52 | + </view> | |
| 53 | + <!-- 拼团失败 --> | |
| 54 | + <view class="xc-ptcomplete flex-level fs28" wx:if="{{val==3}}"> | |
| 55 | + <view class="xc-wc xc-end">拼团失败</view> | |
| 56 | + <view class="xc-img-frames oh iw" wx:if="{{val==3}}"> | |
| 57 | + <image class="img " src="{{imageurl}}/miniapp/images/xc-qtshibai.png"></image> | |
| 58 | + </view> | |
| 59 | + </view> | |
| 60 | + <!--头像--> | |
| 61 | + <view class="flex_tou"> | |
| 62 | + <view class='bodyimg flex-level' wx:for="{{ordertx2}}" wx:key> | |
| 63 | + <view class='d'> | |
| 64 | + <image src='{{item.head_pic}}'></image> | |
| 65 | + <span wx:if="{{item.is_pt_tz==1}}">团长</span> | |
| 66 | + </view> | |
| 67 | + </view> | |
| 68 | + <view class='d' wx:for="{{sf_arr}}"> | |
| 69 | + <image src='{{iurl}}/miniapp/images/shafa.png' style='width:100%; height:100%'></image> | |
| 70 | + </view> | |
| 71 | + <view class='xc-ellipsis-img' wx:if="{{ordertx.length>5}}"> | |
| 72 | + <image style='width:56rpx;height:56rpx;margin-left:10rpx;' src="{{imageurl}}/miniapp/images/xc_ellipsis.png"></image> | |
| 73 | + </view> | |
| 74 | + | |
| 75 | + | |
| 76 | + </view> | |
| 77 | + | |
| 78 | + <view class='bodytime'> | |
| 79 | + <!--/ //旁边直线--> | |
| 80 | + <view class='bodytimeleft'> | |
| 81 | + <view class='xian'></view> | |
| 82 | + </view> | |
| 83 | + <!--/ // //时间--> | |
| 84 | + <!--许程 <view class='bodytimecen' wx:if='{{obj}}'> --> | |
| 85 | + <view class='bodytimecen'> | |
| 86 | + 剩余 | |
| 87 | + <span wx:if="{{obj.day!=0}}"> {{obj.day}} </span>: | |
| 88 | + <span> {{obj.hou}} </span>: | |
| 89 | + <span> {{obj.min}} </span>: | |
| 90 | + <span> {{obj.sec}} </span>结束 | |
| 91 | + </view> | |
| 92 | + | |
| 93 | + | |
| 94 | + <!----/ 旁边直线----> | |
| 95 | + <view class='bodytimeright'> | |
| 96 | + <view class='xian'></view> | |
| 97 | + </view> | |
| 98 | + </view> | |
| 99 | + | |
| 100 | + <view style='height:50rpx;width:100%' wx:if="{{val==1}}"></view> | |
| 101 | + <!--如果团还没有满--> | |
| 102 | + <block wx:if="{{tg_arr==null}}"> | |
| 103 | + <!--按钮--> | |
| 104 | + <view wx:if="{{is_group_end==0}}" class='bodybutton white fs32'> | |
| 105 | + <view class="xc-good-friend" bindtap='cyijian' data-isct="0">去参团</view> | |
| 106 | + <view class="xc-home-page" bindtap='gohome'>返回首页</view> | |
| 107 | + </view> | |
| 108 | + <view wx:elif="{{teamlist.kttype>1}}" class='bodybutton' bindtap='cyijian' data-isct="1"> | |
| 109 | + <view class="xc-good-friend">一键参团</view> | |
| 110 | + <view class="xc-home-page" bindtap='gohome'>返回首页</view> | |
| 111 | + </view> | |
| 112 | + <view wx:else class='bodybutton' bindtap='cyijian' data-isct="1"> | |
| 113 | + <view class="xc-good-friend">一键参团</view> | |
| 114 | + <view class="xc-home-page" bindtap='gohome'>返回首页</view> | |
| 115 | + </view> | |
| 116 | + </block> | |
| 117 | + <block wx:else> | |
| 118 | + <view class="show_zf_dd"> | |
| 119 | + <view>会员'{{tg_arr.user_name}}'待付款,若{{r_obj.min}}分{{r_obj.sec}}秒后该会员未支付您可以继续参团哦!</view> | |
| 120 | + </view> | |
| 121 | + | |
| 122 | + <view class='bodybutton white fs32'> | |
| 123 | + <view class="xc-good-friend co-w" data-isct="0">去参团</view> | |
| 124 | + <view class="xc-home-page" bindtap='gohome'>返回首页</view> | |
| 125 | + </view> | |
| 126 | + | |
| 127 | + </block> | |
| 128 | + | |
| 129 | + </view> | |
| 130 | + <!--展开拼团列表--> | |
| 131 | + <view class='mck'> | |
| 132 | + <view class='bodyfoot'> | |
| 133 | + <view class='bodyselect' wx:if="{{zk}}" bindtap='czk'> | |
| 134 | + <span>展开拼团列表 | |
| 135 | + <view class='down-arrow'></view> | |
| 136 | + </span> | |
| 137 | + </view> | |
| 138 | + <!----收起拼团列表----> | |
| 139 | + <view class='zhangxi' wx:if="{{hiddenName}}"> | |
| 140 | + | |
| 141 | + <view class='zspan' bindtap='click'>收起拼团列表 | |
| 142 | + <view class='down-arrow1'></view> | |
| 143 | + </view> | |
| 144 | + | |
| 145 | + <view class="ia" wx:for="{{ordertx}}" wx:for-index="ky"> | |
| 146 | + <view class='img'> | |
| 147 | + <image src='{{item.head_pic}}'></image> | |
| 148 | + <span>{{item.nickname}}</span> | |
| 149 | + </view> | |
| 150 | + <view class='zssj' wx:if="{{ky==0}}">{{item.add_time_date}} 开团</view> | |
| 151 | + <view class='zssj' wx:else>{{item.add_time_date}} 参团</view> | |
| 152 | + </view> | |
| 153 | + </view> | |
| 154 | + </view> | |
| 155 | + </view> | |
| 156 | + <!----//拼团玩法----> | |
| 157 | + <!-- <view class='pintuan' bindtap="cpd"> | |
| 158 | + <view class='pintuanzhou'>拼团玩法</view> | |
| 159 | + <view class='pintuanyou'>开团/参团>邀请参团>人满成团</view> | |
| 160 | + </view> --> | |
| 161 | + <!--大家都在团--> | |
| 162 | + <view class='goodslist'> | |
| 163 | + <view class='goodslisttop'> | |
| 164 | + <span class='goodslistspan'>大家都在团</span> | |
| 165 | + <view class='goodslisttopright'></view> | |
| 166 | + </view> | |
| 167 | + <view class="changxin"> | |
| 168 | + <view class='onegoods' wx:for='{{pageteam}}' wx:key="{{index}}" bindtap="go_goodsinfo" data-gid="{{item.goods_id}}"> | |
| 169 | + <view class='onegoodsimg'> | |
| 170 | + <image src="{{imageurl+item.share_imgurl}}"></image> | |
| 171 | + </view> | |
| 172 | + <view class='onegoodsdesc'> | |
| 173 | + <text>{{item.goods_name}}</text> | |
| 174 | + </view> | |
| 175 | + <view class='price'> | |
| 176 | + <view class='jgleft'>¥{{item.price}}</view> | |
| 177 | + <view class='jgright'>{{item.ct_num}}人 | |
| 178 | + <span>参团</span> | |
| 179 | + </view> | |
| 180 | + </view> | |
| 181 | + </view> | |
| 182 | + </view> | |
| 183 | + </view> | |
| 184 | +</view> | |
| 185 | + | |
| 186 | +<!--弹出购物模块--> | |
| 187 | +<view class="pop_up" wx:if="{{yijian}}"> | |
| 188 | + <view> | |
| 189 | + | |
| 190 | + <!----弹起来,选择规格数量,拼单商品购买------> | |
| 191 | + <!-- <view> --> | |
| 192 | + <!-- <view hidden="{{!openSpecModal_pt}}"> --> | |
| 193 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | |
| 194 | + <view class="spec-model"> | |
| 195 | + <view class="pding"> | |
| 196 | + <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 197 | + <!-- 商品名称 --> | |
| 198 | + <view class="spec-goods"> | |
| 199 | + <image class="wh100 spec-img xc-distance-bottom" src="{{image}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 200 | + <view class="spec-goods-info"> | |
| 201 | + <view class="spec-goods-name ellipsis-1">{{goods.goods_name}}商品名称</view> | |
| 202 | + <view class="flex ai_end xc-val-money"> | |
| 203 | + <view class="spec-goods-price"> | |
| 204 | + <span class='t1'>¥</span><text class='t2'>{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}}</text> | |
| 205 | + </view> | |
| 206 | + </view> | |
| 207 | + <view class="flex"> | |
| 208 | + <view class="spec-goods-stock">已售:{{teamlist.buy_num}}</view> | |
| 209 | + <view class="spec-goods-stock">可售:{{teamlist.goods_num-teamlist.buy_num}}</view> | |
| 210 | + </view> | |
| 211 | + </view> | |
| 212 | + </view> | |
| 213 | + | |
| 214 | + <view style="clear: both"></view> | |
| 215 | + <view style="margin-top: 20rpx"> | |
| 216 | + <view class="flex-space-between address ai_end xc-width "> | |
| 217 | + | |
| 218 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 219 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 220 | + | |
| 221 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | |
| 222 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 223 | + </view> | |
| 224 | + </view> | |
| 225 | + | |
| 226 | + | |
| 227 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 228 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 229 | + <view class="fs28 xc-ash-9f">选择门店</view> | |
| 230 | + </view> | |
| 231 | + | |
| 232 | + <view class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | |
| 233 | + | |
| 234 | + | |
| 235 | + </view> | |
| 236 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 237 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:elif="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 238 | + | |
| 239 | + </view> | |
| 240 | + <!-- 商品的属性项目 --> | |
| 241 | + <view> | |
| 242 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 243 | + <block> | |
| 244 | + <view hidden="{{ismend==1}}" class="flex"> | |
| 245 | + <view class="spec_bt act" >{{goods.gg}} | |
| 246 | + </view> | |
| 247 | + </view> | |
| 248 | + </block> | |
| 249 | + <view class="clear"></view> | |
| 250 | + </view> | |
| 251 | + | |
| 252 | + <view> | |
| 253 | + <view class="b_num" hidden="{{ismend==1}}" style="margin-top: 20rpx"> | |
| 254 | + <view>购买数量</view> | |
| 255 | + <view class="count"> | |
| 256 | + <view bindtap="{{num <= 1 ? '':'bindMinus'}}" class="sub {{num <= 1 ? 'active':''}}">-</view> | |
| 257 | + <!-- <view class='{{minusStatus}}' bindtap="bindMinus" class="sub">-</view> --> | |
| 258 | + <input bindblur="bindManual" class="xc-val-fream" type="number" value="{{num}}">1</input> | |
| 259 | + <view bindtap="bindPlus" class="add">+</view> | |
| 260 | + </view> | |
| 261 | + </view> | |
| 262 | + | |
| 263 | + <!-- <view class="clear"></view> --> | |
| 264 | + | |
| 265 | + </view> | |
| 266 | + </view> | |
| 267 | + | |
| 268 | + <view class="pt_qd"> | |
| 269 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">确定</view> | |
| 270 | + <view wx:else bindtap="go_pay" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | |
| 271 | + </view> | |
| 272 | + | |
| 273 | + </view> | |
| 274 | + <!-- </view> --> | |
| 275 | + | |
| 276 | + </view> | |
| 277 | +</view> | |
| 278 | + | |
| 279 | +<!-- 选择门店的弹框,1.1版最新的 --> | |
| 280 | +<block wx:if="{{store==1}}"> | |
| 281 | + <view class="mongolia-layer" bindtap="close_popup"></view> | |
| 282 | + <view class="popup-frame"> | |
| 283 | + <block wx:if="{{sort_store==0}}"> | |
| 284 | + <!-- 头部 标题 --> | |
| 285 | + <view class="popup-top flex-space-between"> | |
| 286 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | |
| 287 | + <view> | |
| 288 | + <view> | |
| 289 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
| 290 | + </view> | |
| 291 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}"> | |
| 292 | + <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text> | |
| 293 | + <view class="bg_rights"></view> | |
| 294 | + </view> | |
| 295 | + </view> | |
| 296 | + </view> | |
| 297 | + <!-- 门店列表,最外层的门店列表,一开始 --> | |
| 298 | + <view class="store-list"> | |
| 299 | + <!--如果还没有点击更多门店的时候 --> | |
| 300 | + <block wx:if="{{choice_sort_store==0}}"> | |
| 301 | + <!-- 需要for循环 --> | |
| 302 | + <block wx:if="{{is_show_sto_cat==1}}"> | |
| 303 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 304 | + <view class="store flex-vertical"> | |
| 305 | + <!-- 需要点击事件 --> | |
| 306 | + <block wx:if="{{index==fir_pick_index}}"> | |
| 307 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 308 | + </block> | |
| 309 | + <block wx:else> | |
| 310 | + <view class="circle xc-hooks"></view> | |
| 311 | + </block> | |
| 312 | + <view class="address-frame xc-ash"> | |
| 313 | + <view class="flex-vertical-between butttem5"> | |
| 314 | + <view class="flex xc-ash"> | |
| 315 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
| 316 | + </view> | |
| 317 | + <view> | |
| 318 | + <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | |
| 319 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> | |
| 320 | + </view> | |
| 321 | + </view> | |
| 322 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 323 | + </view> | |
| 324 | + </view> | |
| 325 | + </view> | |
| 326 | + </block> | |
| 327 | + <block wx:else> | |
| 328 | + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 329 | + <view class="store flex-vertical"> | |
| 330 | + <!-- 需要点击事件 --> | |
| 331 | + <block wx:if="{{index==fir_pick_index}}" > | |
| 332 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 333 | + </block> | |
| 334 | + <block wx:else> | |
| 335 | + <view class="circle xc-hooks"></view> | |
| 336 | + </block> | |
| 337 | + | |
| 338 | + <view class="address-frame xc-ash"> | |
| 339 | + <view class="flex-vertical-between "> | |
| 340 | + <view class="flex xc-ash"> | |
| 341 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
| 342 | + </view> | |
| 343 | + <view> | |
| 344 | + <view class="distance fs24 address-val" | |
| 345 | + wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
| 346 | + </view> | |
| 347 | + </view> | |
| 348 | + </view> | |
| 349 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 350 | + </view> | |
| 351 | + </view> | |
| 352 | + </view> | |
| 353 | + </block> | |
| 354 | + </block> | |
| 355 | + <block wx:else> <!-- 如果是点击选择门店分类后显示分类下的门店 --> | |
| 356 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | |
| 357 | + <view class="store flex-vertical"> | |
| 358 | + <!-- 需要点击事件 --> | |
| 359 | + <block wx:if="{{index==sec_pick_index}}"> | |
| 360 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 361 | + </block> | |
| 362 | + <block wx:else> | |
| 363 | + <view class="circle xc-hooks"></view> | |
| 364 | + </block> | |
| 365 | + | |
| 366 | + <view class="address-frame xc-ash"> | |
| 367 | + <view class="flex-vertical-between "> | |
| 368 | + <view class="flex xc-ash"> | |
| 369 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | |
| 370 | + </view> | |
| 371 | + <view> | |
| 372 | + <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | |
| 373 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view> | |
| 374 | + </view> | |
| 375 | + </view> | |
| 376 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 377 | + </view> | |
| 378 | + </view> | |
| 379 | + </view> | |
| 380 | + </block> | |
| 381 | + | |
| 382 | + </view> | |
| 383 | + | |
| 384 | + <!-- 门店列表底部 --> | |
| 385 | + <view class="store-bottom-frame"> | |
| 386 | + <view class="store-bottom flex-vertical-between"> | |
| 387 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" | |
| 388 | + data-openindstore="{{open_ind_store}}">确定</view> | |
| 389 | + <view class="default t-c fs28" bindtap="set_def_pick"data-openindstore="{{open_ind_store}}">设为默认</view> | |
| 390 | + </view> | |
| 391 | + </view> | |
| 392 | + | |
| 393 | + </block> | |
| 394 | + | |
| 395 | + | |
| 396 | + <block wx:else> | |
| 397 | + <view class="popup-top flex-space-between"> | |
| 398 | + <text class="fs32 nearby_store">门店分类选择</text> | |
| 399 | + <view> | |
| 400 | + <view><icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon></view> | |
| 401 | + <view class="felx choose_mores" bindtap="returns"><text class="fs26 red-co">返回</text></view> | |
| 402 | + </view> | |
| 403 | + </view> | |
| 404 | + <view class="sort_store_list"> | |
| 405 | + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
| 406 | + <view class="sort-store flex-vertical-between" > | |
| 407 | + <view class="fs30" di>{{item.name}}</view> | |
| 408 | + <view class="black_rights-frame"> | |
| 409 | + <view class="black_rights"></view> | |
| 410 | + </view> | |
| 411 | + </view> | |
| 412 | + </view> | |
| 413 | + | |
| 414 | + </view> | |
| 415 | + </block> | |
| 416 | + </view> | |
| 417 | +</block> | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | +<!-- <view class='buy-option'> --> | |
| 425 | +<!--头部图片--> | |
| 426 | +<!-- <view class='buy-top'> | |
| 427 | + <view class='buy-image mimg'> | |
| 428 | + <image src='{{image}}'></image> | |
| 429 | + <view> | |
| 430 | + <view> | |
| 431 | + <span class='t1'>¥</span><text class='t2'>{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}}</text> | |
| 432 | + </view> | |
| 433 | + <view class="ellipsis-2"> | |
| 434 | + {{goods.goods_name}} | |
| 435 | + </view> | |
| 436 | + </view> | |
| 437 | + | |
| 438 | + </view> | |
| 439 | + | |
| 440 | + <view class='buy-cou' bindtap='cbcou'>⊗</view> | |
| 441 | + <view class='clear'></view> | |
| 442 | + </view> --> | |
| 443 | + | |
| 444 | +<!--取货门店--> | |
| 445 | +<!-- <view class='quhuo' wx:if="{{qh}}" bindtap='cqh'> --> | |
| 446 | +<!--当ii==0请选择门店显示,ii==1最后名字显示--> | |
| 447 | +<!-- <text>取货门店</text><view class='end_name' wx:if="{{ii==1 }}">({{end_name}})</view><view wx:if="{{ii==0 }}" class='ttxz'>(请选择门店)</view> | |
| 448 | + </view> --> | |
| 449 | +<!--选择门店--> | |
| 450 | +<!-- <view class='xuanze1' wx:if="{{xz}}" bindtap='cxz'> | |
| 451 | + <text decode='true'>< 选择门店</text> | |
| 452 | + </view> | |
| 453 | + <view class='x-z'> --> | |
| 454 | +<!--第一层--> | |
| 455 | +<!-- <block wx:if="{{one}}"> | |
| 456 | + <view class="fir_view"> | |
| 457 | + <view> | |
| 458 | + <view class='xuanze' bindtap='setchild' data-bindex='{{bindex}}' data-bname='{{item.name}}' wx:for-index="bindex" wx:for="{{ssl}}" wx:key> | |
| 459 | + <text decode='true'>{{item.name}}</text> | |
| 460 | + </view> | |
| 461 | + </view> | |
| 462 | + </view> | |
| 463 | + </block> --> | |
| 464 | +<!--选择的--> | |
| 465 | +<!-- <view class='xuanze1' wx:if="{{se}}" bindtap='sel'><text decode='true'><</text> {{sele_dl_name}}</view> --> | |
| 466 | +<!--第二层list--> | |
| 467 | +<!-- <block wx:if="{{list}}"> | |
| 468 | + <scroll-view scroll-y="true" style="max-height: 460rpx"> | |
| 469 | + <view class='xuanze' wx:for="{{ssl_child}}" wx:key bindtap='clist' | |
| 470 | + data-pick_dis="{{item.distr_type}}" | |
| 471 | + data-end='{{item.pickup_name}}' data-pick_id='{{item.pickup_id}}'> | |
| 472 | + <text decode='true'>{{item.pickup_name}}</text> | |
| 473 | + </view> | |
| 474 | + </scroll-view> | |
| 475 | + </block> | |
| 476 | + </view> --> | |
| 477 | + | |
| 478 | +<!--数量--> | |
| 479 | +<!-- <view class='buy-button' wx:if="{{qh}}"> | |
| 480 | + <text>数量</text> | |
| 481 | + <view class='stepper sum'> | |
| 482 | + <text class='{{minusStatus}}' type='number' bindtap='bindMinus' class="jiajian">-</text> | |
| 483 | + <input bindinput='bindManual' value='{{num}}'></input> | |
| 484 | + <text bindtap='bindPlus' class="jiajian">+</text> | |
| 485 | + </view> | |
| 486 | + <view class='clear'></view> | |
| 487 | + </view> --> | |
| 488 | + | |
| 489 | +<!-- <view class="clear"></view> | |
| 490 | + </view> --> | |
| 491 | +<!--支付--> | |
| 492 | +<!-- <view class='btn' bindtap="go_pay">立即支付</view> --> | |
| 493 | +<!-- </view> | |
| 494 | +</view> --> | |
| 495 | + | |
| 496 | +<!--mask吐司内容--> | |
| 497 | +<view class="toast_mask" wx:if="{{isShowToast}}"></view> | |
| 498 | + | |
| 499 | +<!--以下为toast显示的内容--> | |
| 500 | +<view class="toast_content_box" wx:if="{{isShowToast}}"> | |
| 501 | + <view class="toast_content"> | |
| 502 | + <view class="toast_content_text"> | |
| 503 | + {{toastText}} | |
| 504 | + </view> | |
| 505 | + </view> | |
| 506 | +</view> | |
| 507 | + | |
| 508 | +<!--拼团玩法弹出框--> | |
| 509 | +<!----弹起的----> | |
| 510 | +<block wx:if="{{pd_xx}}"> | |
| 511 | + <view class="bview"></view> | |
| 512 | + <view class="juzhong"> | |
| 513 | + <view class="xq"> | |
| 514 | + <view class="title" bindtap="close_pt_xx">拼团玩法介绍 | |
| 515 | + <image src="{{iurl}}/miniapp/images/gbi.png" class="close"></image> | |
| 516 | + </view> | |
| 517 | + <view>1.开团: | |
| 518 | + <text class="hs1">选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;</text> | |
| 519 | + </view> | |
| 520 | + <view>2.参团: | |
| 521 | + <text class="hs1">进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;</text> | |
| 522 | + </view> | |
| 523 | + <view>3.成团: | |
| 524 | + <text class="hs1">在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;</text> | |
| 525 | + </view> | |
| 526 | + <view>4.组团失败: | |
| 527 | + <text class="hs1">在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;</text> | |
| 528 | + </view> | |
| 529 | + <view>5. | |
| 530 | + <text class="hs1">组团有效期间内,拼购商品订单不允许取消。 </text> | |
| 531 | + </view> | |
| 532 | + </view> | |
| 533 | + </view> | |
| 534 | +</block> | |
| 535 | + | |
| 536 | +<warn id="warn"></warn> | ... | ... |
packageA/pages/serviceCard_pd/team_show/team_show.wxss
0 → 100644
| 1 | +page { | |
| 2 | + background-color: #eee; | |
| 3 | +} | |
| 4 | + | |
| 5 | +.top { | |
| 6 | + background-color: rgb(216, 230, 220); | |
| 7 | + color: rgb(98, 155, 13); | |
| 8 | + text-align: center; | |
| 9 | + height: 110rpx; | |
| 10 | + width: 100%; | |
| 11 | +} | |
| 12 | + | |
| 13 | +.center { | |
| 14 | + height: 240rpx; | |
| 15 | + width: 100%; | |
| 16 | + background: #fff; | |
| 17 | +} | |
| 18 | + | |
| 19 | +.cenleft { | |
| 20 | + width: 240rpx; | |
| 21 | + height: 100%; | |
| 22 | + float: left; | |
| 23 | + display: flex; | |
| 24 | + justify-content: center; | |
| 25 | + align-items: center; | |
| 26 | +} | |
| 27 | + | |
| 28 | +.cenleft image { | |
| 29 | + background-color: white; | |
| 30 | + width: 200rpx; | |
| 31 | + height: 200rpx; | |
| 32 | +} | |
| 33 | + | |
| 34 | +.cenrt {} | |
| 35 | + | |
| 36 | +.cenright { | |
| 37 | + height: 100%; | |
| 38 | + width: auto; | |
| 39 | + float: left; | |
| 40 | +} | |
| 41 | + | |
| 42 | +.cenrtoptitle { | |
| 43 | + float: left; | |
| 44 | + width: 240rpx; | |
| 45 | + height: 40rpx; | |
| 46 | + margin-left: 12rpx; | |
| 47 | + font-size: 28rpx; | |
| 48 | + margin-top: 12rpx; | |
| 49 | +} | |
| 50 | + | |
| 51 | +.cenrcen { | |
| 52 | + height: 70rpx; | |
| 53 | + margin-top: 35rpx; | |
| 54 | + width: 479rpx; | |
| 55 | +} | |
| 56 | + | |
| 57 | +.jg { | |
| 58 | + font-size: 40rpx; | |
| 59 | + margin-right: 30rpx; | |
| 60 | +} | |
| 61 | + | |
| 62 | +.jgx { | |
| 63 | + font-size: 24rpx; | |
| 64 | + color: #777; | |
| 65 | + text-decoration: line-through; | |
| 66 | + margin-top: 12rpx; | |
| 67 | +} | |
| 68 | + | |
| 69 | +.cenrfoot { | |
| 70 | + align-content: center; | |
| 71 | + text-align: center; | |
| 72 | + border: 2rpx solid red; | |
| 73 | + border-radius: 10rpx; | |
| 74 | + color: red; | |
| 75 | + float: left; | |
| 76 | + font-size: 24rpx; | |
| 77 | + padding: 4rpx 16rpx; | |
| 78 | + margin-top: 12rpx; | |
| 79 | +} | |
| 80 | + | |
| 81 | +.body { | |
| 82 | + background-color: white; | |
| 83 | + height: 472rpx; | |
| 84 | + width: 100%; | |
| 85 | + margin-top: 4rpx; | |
| 86 | +} | |
| 87 | + | |
| 88 | +.d { | |
| 89 | + font-size: 24rpx; | |
| 90 | +} | |
| 91 | + | |
| 92 | +.bodytop { | |
| 93 | + background-color: white; | |
| 94 | + text-align: center; | |
| 95 | + font-size: 28rpx; | |
| 96 | + padding-top: 16rpx; | |
| 97 | + height: 90rpx; | |
| 98 | + | |
| 99 | +} | |
| 100 | + | |
| 101 | +.bodytop span { | |
| 102 | + color: red; | |
| 103 | +} | |
| 104 | + | |
| 105 | +.bodyimg { | |
| 106 | + height: 155rpx; | |
| 107 | + /* display: flex; | |
| 108 | + justify-content: center; | |
| 109 | + align-items: center; */ | |
| 110 | + | |
| 111 | + | |
| 112 | +} | |
| 113 | + | |
| 114 | +.bodyimg image { | |
| 115 | + border-radius: 50rpx; | |
| 116 | + height: 96rpx; | |
| 117 | + width: 96rpx; | |
| 118 | + margin-top: 30rpx; | |
| 119 | + position: absolute; | |
| 120 | + | |
| 121 | +} | |
| 122 | + | |
| 123 | +.d { | |
| 124 | + width: 101rpx; | |
| 125 | + height: 101rpx; | |
| 126 | + display: inline-block; | |
| 127 | + | |
| 128 | +} | |
| 129 | + | |
| 130 | +.bodyimg span { | |
| 131 | + background-color: #e22b44; | |
| 132 | + color: white; | |
| 133 | + font-size: 24rpx; | |
| 134 | + border-radius: 6rpx; | |
| 135 | + padding: 3rpx 10rpx; | |
| 136 | + position: relative; | |
| 137 | + top: 8px; | |
| 138 | + left: 40rpx; | |
| 139 | +} | |
| 140 | + | |
| 141 | +.bodyspan { | |
| 142 | + color: red; | |
| 143 | + text-align: center; | |
| 144 | + font-size: 24rpx; | |
| 145 | +} | |
| 146 | + | |
| 147 | +.bodytime { | |
| 148 | + height: 55rpx; | |
| 149 | + width: 100%; | |
| 150 | + display: flex; | |
| 151 | + flex-wrap: nowrap; | |
| 152 | + padding-left: 40rpx; | |
| 153 | + align-items: center; | |
| 154 | + | |
| 155 | +} | |
| 156 | + | |
| 157 | +.bodytimeleft { | |
| 158 | + text-decoration: line-through; | |
| 159 | + flex-grow: 1.7; | |
| 160 | +} | |
| 161 | + | |
| 162 | +.bodytimecen { | |
| 163 | + text-align: center; | |
| 164 | + flex-grow: 1; | |
| 165 | + | |
| 166 | + font-size: 30rpx; | |
| 167 | + color: #000; | |
| 168 | + width: 415rpx; | |
| 169 | + | |
| 170 | +} | |
| 171 | + | |
| 172 | +.bodytimecen span { | |
| 173 | + background-color: #333333; | |
| 174 | + color: white; | |
| 175 | + border-radius: 7rpx; | |
| 176 | + padding-left: 20rpx; | |
| 177 | + font-size: 30rpx; | |
| 178 | + margin: 0 auto; | |
| 179 | + padding-right: 10rpx; | |
| 180 | + margin-right: 5px; | |
| 181 | + | |
| 182 | + | |
| 183 | +} | |
| 184 | + | |
| 185 | +.bodytimecen span:last-child { | |
| 186 | + margin-right: 10rpx; | |
| 187 | + | |
| 188 | +} | |
| 189 | + | |
| 190 | +.bodytimeright { | |
| 191 | + flex-grow: 1.7; | |
| 192 | + margin-right: 72rpx; | |
| 193 | + | |
| 194 | +} | |
| 195 | + | |
| 196 | +.bodybutton { | |
| 197 | + min-height: 170rpx; | |
| 198 | + width: 90%; | |
| 199 | + margin: 0 auto; | |
| 200 | + text-align: center; | |
| 201 | + line-height: 70rpx; | |
| 202 | + border-radius: 15rpx; | |
| 203 | + height: auto; | |
| 204 | + padding-top: 38rpx | |
| 205 | +} | |
| 206 | + | |
| 207 | +.bodybutton button { | |
| 208 | + height: 100%; | |
| 209 | + width: 100%; | |
| 210 | + background-color: red; | |
| 211 | + color: white; | |
| 212 | + font-size: 32rpx; | |
| 213 | +} | |
| 214 | + | |
| 215 | +.bodybutton.co-w { | |
| 216 | + color: #333; | |
| 217 | + background-color: #adadad; | |
| 218 | + font-size: 32rpx; | |
| 219 | + | |
| 220 | +} | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | +.bodyfoot { | |
| 225 | + width: 100%; | |
| 226 | + text-align: center; | |
| 227 | + font-size: 28rpx; | |
| 228 | + color: #777; | |
| 229 | + background-color: white; | |
| 230 | +} | |
| 231 | + | |
| 232 | +.pintuan { | |
| 233 | + width: 100%; | |
| 234 | + height: 84rpx; | |
| 235 | + background-color: white; | |
| 236 | + color: black; | |
| 237 | + text-align: center; | |
| 238 | + font-size: 36rpx; | |
| 239 | + margin-top: 0rpx; | |
| 240 | +} | |
| 241 | + | |
| 242 | + | |
| 243 | +.pintuanzhou { | |
| 244 | + float: left; | |
| 245 | + line-height: 84rpx; | |
| 246 | + width: 226rpx; | |
| 247 | + background: url('https://mshopimg.yolipai.net/miniapp/images/user/wh.png') no-repeat right center; | |
| 248 | + background-size: 42rpx; | |
| 249 | + margin-left: -18rpx; | |
| 250 | + font-size: 32rpx; | |
| 251 | +} | |
| 252 | + | |
| 253 | +.pintuanyou { | |
| 254 | + float: right; | |
| 255 | + color: rgb(168, 167, 167); | |
| 256 | + line-height: 84rpx; | |
| 257 | + font-size: 32rpx; | |
| 258 | + margin-right: 24rpx; | |
| 259 | +} | |
| 260 | + | |
| 261 | +.onegoods { | |
| 262 | + background-color: white; | |
| 263 | + width: 372rpx; | |
| 264 | + height: 560rpx; | |
| 265 | + border-left: 2rpx solid #eee; | |
| 266 | + float: left; | |
| 267 | +} | |
| 268 | + | |
| 269 | +.goodsl { | |
| 270 | + background-color: white; | |
| 271 | +} | |
| 272 | + | |
| 273 | +.onegoodsimg { | |
| 274 | + width: 100%; | |
| 275 | + height: 360rpx; | |
| 276 | + margin-bottom: 20rpx; | |
| 277 | +} | |
| 278 | + | |
| 279 | +.onegoodsimg image { | |
| 280 | + height: 100%; | |
| 281 | + width: 100%; | |
| 282 | +} | |
| 283 | + | |
| 284 | +.onegoodsdesc { | |
| 285 | + color: rgb(168, 167, 167); | |
| 286 | + padding-left: 20rpx; | |
| 287 | + height: 100rpx; | |
| 288 | + font-size: 32rpx; | |
| 289 | + width: 92%; | |
| 290 | + line-height: 100rpx; | |
| 291 | + overflow: hidden; | |
| 292 | + text-overflow: ellipsis; | |
| 293 | + white-space: nowrap; | |
| 294 | + padding-right: 20rpx; | |
| 295 | +} | |
| 296 | + | |
| 297 | +.onegoodsdesc text {} | |
| 298 | + | |
| 299 | +.price { | |
| 300 | + color: red; | |
| 301 | + width: 100%; | |
| 302 | +} | |
| 303 | + | |
| 304 | +.jgleft { | |
| 305 | + float: left; | |
| 306 | + width: 100rpx; | |
| 307 | + margin-left: 20rpx; | |
| 308 | + font-size: 40rpx; | |
| 309 | + margin-top: -8rpx; | |
| 310 | +} | |
| 311 | + | |
| 312 | +.jgright { | |
| 313 | + font-size: 28rpx; | |
| 314 | + float: right; | |
| 315 | + width: 120rpx; | |
| 316 | +} | |
| 317 | + | |
| 318 | +.jgright span { | |
| 319 | + color: rgb(168, 167, 167); | |
| 320 | +} | |
| 321 | + | |
| 322 | +.goodslisttop { | |
| 323 | + background-color: white; | |
| 324 | + width: 100%; | |
| 325 | +} | |
| 326 | + | |
| 327 | +.goodslist { | |
| 328 | + background-color: white; | |
| 329 | +} | |
| 330 | + | |
| 331 | +.goodslisttop { | |
| 332 | + background-color: white; | |
| 333 | + width: 100%; | |
| 334 | + height: 80rpx; | |
| 335 | + margin-top: 20rpx; | |
| 336 | + text-align: center; | |
| 337 | +} | |
| 338 | + | |
| 339 | +.goodslistspan { | |
| 340 | + margin: 0 auto; | |
| 341 | + padding-top: 20rpx; | |
| 342 | + display: inline-block; | |
| 343 | + padding: 0 10px; | |
| 344 | + background: #fff; | |
| 345 | + margin-top: 12rpx; | |
| 346 | + font-size: 28rpx; | |
| 347 | + color: rgb(168, 167, 167); | |
| 348 | +} | |
| 349 | + | |
| 350 | +.xian { | |
| 351 | + height: 50%; | |
| 352 | + width: 100%; | |
| 353 | + border-bottom: 4rpx solid #eee; | |
| 354 | + float: left; | |
| 355 | +} | |
| 356 | + | |
| 357 | +.bodyselect { | |
| 358 | + height: 50px; | |
| 359 | + background-color: white; | |
| 360 | + width: 100%; | |
| 361 | + line-height: 50px; | |
| 362 | + font-size: 28rpx; | |
| 363 | +} | |
| 364 | + | |
| 365 | +.changxin { | |
| 366 | + float: left; | |
| 367 | + width: 100%; | |
| 368 | +} | |
| 369 | + | |
| 370 | +.zhangxi { | |
| 371 | + width: 100%; | |
| 372 | + min-height: 100rpx; | |
| 373 | + background-color: white; | |
| 374 | + color: black; | |
| 375 | +} | |
| 376 | + | |
| 377 | +.img { | |
| 378 | + width: 30%; | |
| 379 | + height: 100rpx; | |
| 380 | + margin-bottom: 0rpx; | |
| 381 | + color: black; | |
| 382 | + margin-left: 36rpx; | |
| 383 | + font-size: 26rpx; | |
| 384 | + display: flex; | |
| 385 | +} | |
| 386 | + | |
| 387 | +.img span { | |
| 388 | + height: 100rpx; | |
| 389 | + display: block; | |
| 390 | + line-height: 100rpx; | |
| 391 | + text-overflow: ellipsis; | |
| 392 | + white-space: nowrap; | |
| 393 | + overflow: hidden; | |
| 394 | + padding: 0rpx; | |
| 395 | + width: 120rpx; | |
| 396 | +} | |
| 397 | + | |
| 398 | +.zhangxi image { | |
| 399 | + border-radius: 50rpx; | |
| 400 | + height: 80rpx; | |
| 401 | + width: 80rpx; | |
| 402 | + float: left; | |
| 403 | + margin-top: 12rpx; | |
| 404 | + background-color: red; | |
| 405 | + margin-right: 10rpx; | |
| 406 | +} | |
| 407 | + | |
| 408 | +.zhangxi .zssj { | |
| 409 | + height: 100rpx; | |
| 410 | + width: 70%; | |
| 411 | + margin-right: 40rpx; | |
| 412 | + line-height: 100rpx; | |
| 413 | + font-size: 26rpx; | |
| 414 | + text-align: right; | |
| 415 | +} | |
| 416 | + | |
| 417 | +.zhangxi .zssj text { | |
| 418 | + width: 100%; | |
| 419 | +} | |
| 420 | + | |
| 421 | +.ia { | |
| 422 | + display: flex; | |
| 423 | +} | |
| 424 | + | |
| 425 | +.zspan { | |
| 426 | + text-align: center; | |
| 427 | + border-bottom: 2rpx #eee solid; | |
| 428 | + width: 100%; | |
| 429 | + display: flex; | |
| 430 | + align-items: center; | |
| 431 | + justify-content: center; | |
| 432 | + font-size: 28rpx; | |
| 433 | + color: #777; | |
| 434 | + line-height: 100rpx; | |
| 435 | + height: auto; | |
| 436 | + | |
| 437 | +} | |
| 438 | + | |
| 439 | +.mtop { | |
| 440 | + text-align: center; | |
| 441 | + color: white; | |
| 442 | + background-color: #4c4c4c; | |
| 443 | + width: 100%; | |
| 444 | + height: 100%; | |
| 445 | + position: fixed; | |
| 446 | + z-index: 5; | |
| 447 | + top: 0; | |
| 448 | + left: 0; | |
| 449 | +} | |
| 450 | + | |
| 451 | +.mt1 { | |
| 452 | + margin-top: 100px; | |
| 453 | + margin-bottom: 20rpx; | |
| 454 | +} | |
| 455 | + | |
| 456 | +.mts { | |
| 457 | + color: #e1e10b; | |
| 458 | +} | |
| 459 | + | |
| 460 | +.mcou { | |
| 461 | + font-size: 48rpx; | |
| 462 | +} | |
| 463 | + | |
| 464 | +.mfoot { | |
| 465 | + width: 100%; | |
| 466 | + margin-top: 700rpx; | |
| 467 | +} | |
| 468 | + | |
| 469 | +.mbtn { | |
| 470 | + margin-top: 60rpx; | |
| 471 | + width: 400rpx; | |
| 472 | + background: #666; | |
| 473 | + color: #fff; | |
| 474 | + border-radius: 20rpx; | |
| 475 | + font-size: 32rpx; | |
| 476 | +} | |
| 477 | + | |
| 478 | +.etop { | |
| 479 | + padding-top: 200rpx; | |
| 480 | + width: 100%; | |
| 481 | + height: 100%; | |
| 482 | + position: fixed; | |
| 483 | + left: 0rpx; | |
| 484 | + top: 0rpx; | |
| 485 | + z-index: 12rpx; | |
| 486 | + background-color: white; | |
| 487 | +} | |
| 488 | + | |
| 489 | +.emyimage { | |
| 490 | + display: flex; | |
| 491 | + justify-content: center; | |
| 492 | + align-items: center; | |
| 493 | +} | |
| 494 | + | |
| 495 | +.emyimage image { | |
| 496 | + background-color: red; | |
| 497 | + width: 160rpx; | |
| 498 | + height: 160rpx; | |
| 499 | + margin: 0 auto; | |
| 500 | +} | |
| 501 | + | |
| 502 | +.espan { | |
| 503 | + font-size: 32rpx; | |
| 504 | + margin-top: 10rpx; | |
| 505 | +} | |
| 506 | + | |
| 507 | +.erweima { | |
| 508 | + margin-top: 10rpx; | |
| 509 | + width: 100%; | |
| 510 | +} | |
| 511 | + | |
| 512 | +.erzhou { | |
| 513 | + width: 200rpx; | |
| 514 | + float: left; | |
| 515 | + margin-right: 20rpx; | |
| 516 | +} | |
| 517 | + | |
| 518 | +.erzhou image { | |
| 519 | + background-color: blanchedalmond; | |
| 520 | + width: 200rpx; | |
| 521 | + height: 200rpx; | |
| 522 | +} | |
| 523 | + | |
| 524 | +.eright { | |
| 525 | + width: 500rpx; | |
| 526 | + float: left; | |
| 527 | + font-size: 32rpx; | |
| 528 | +} | |
| 529 | + | |
| 530 | +.body { | |
| 531 | + background-color: white; | |
| 532 | + height: auto; | |
| 533 | + width: 100%; | |
| 534 | + margin-top: 4rpx; | |
| 535 | +} | |
| 536 | + | |
| 537 | +.cenrtoptitle { | |
| 538 | + float: left; | |
| 539 | + width: 450rpx; | |
| 540 | + font-size: 28rpx; | |
| 541 | + margin-top: 20rpx; | |
| 542 | + | |
| 543 | +} | |
| 544 | + | |
| 545 | +.cenrtop { | |
| 546 | + margin-top: 20rpx; | |
| 547 | + background-color: red; | |
| 548 | + color: white; | |
| 549 | + border-radius: 10rpx; | |
| 550 | + padding: 0 16rpx; | |
| 551 | + font-size: 28rpx; | |
| 552 | + float: left; | |
| 553 | + height: 40rpx; | |
| 554 | +} | |
| 555 | + | |
| 556 | +.yijian { | |
| 557 | + position: fixed; | |
| 558 | + top: 0rpx; | |
| 559 | + left: 0rpx; | |
| 560 | + width: 100%; | |
| 561 | + height: 100%; | |
| 562 | + z-index: 14rpx; | |
| 563 | + background-color: rgba(0, 0, 0, 0.3); | |
| 564 | +} | |
| 565 | + | |
| 566 | +.buy-option { | |
| 567 | + background: #fff; | |
| 568 | + box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); | |
| 569 | + padding: 20rpx; | |
| 570 | + min-height: 400rpx; | |
| 571 | + padding-bottom: 120rpx; | |
| 572 | + width: 100%; | |
| 573 | + margin-top: 180rpx; | |
| 574 | +} | |
| 575 | + | |
| 576 | +.buy-top { | |
| 577 | + width: 100%; | |
| 578 | +} | |
| 579 | + | |
| 580 | +.buy-image { | |
| 581 | + margin-right: 20rpx; | |
| 582 | + width: 320rpx; | |
| 583 | + height: 200rpx; | |
| 584 | + float: left; | |
| 585 | +} | |
| 586 | + | |
| 587 | +.buy-image image { | |
| 588 | + width: 200rpx; | |
| 589 | + height: 200rpx; | |
| 590 | + background-color: burlywood; | |
| 591 | + float: left; | |
| 592 | +} | |
| 593 | + | |
| 594 | +.buy-image text { | |
| 595 | + margin-left: 10rpx; | |
| 596 | + color: red; | |
| 597 | +} | |
| 598 | + | |
| 599 | +.buy-cou { | |
| 600 | + float: right; | |
| 601 | + width: 100rpx; | |
| 602 | + height: 200rpx; | |
| 603 | + background-color: white; | |
| 604 | + font-size: 60rpx; | |
| 605 | + color: black; | |
| 606 | +} | |
| 607 | + | |
| 608 | +.t1 { | |
| 609 | + float: left; | |
| 610 | + font-size: 28rpx; | |
| 611 | + padding-left: 4rpx; | |
| 612 | + color: red; | |
| 613 | + padding-top: 10rpx; | |
| 614 | +} | |
| 615 | + | |
| 616 | +.buy-button { | |
| 617 | + width: 100%; | |
| 618 | + float: left; | |
| 619 | + margin-top: 22rpx; | |
| 620 | +} | |
| 621 | + | |
| 622 | +.buy-button text { | |
| 623 | + float: left; | |
| 624 | +} | |
| 625 | + | |
| 626 | +.stepper { | |
| 627 | + height: 52rpx; | |
| 628 | + float: left; | |
| 629 | + border: 2rpx solid #ccc; | |
| 630 | + border-radius: 6rpx; | |
| 631 | + margin-left: 28rpx; | |
| 632 | +} | |
| 633 | + | |
| 634 | +/*加号和减号*/ | |
| 635 | + | |
| 636 | +.stepper text { | |
| 637 | + float: left; | |
| 638 | + width: 76rpx; | |
| 639 | + line-height: 52rpx; | |
| 640 | + text-align: center; | |
| 641 | +} | |
| 642 | + | |
| 643 | +/*数值*/ | |
| 644 | + | |
| 645 | +.stepper input { | |
| 646 | + width: 80rpx; | |
| 647 | + height: 52rpx; | |
| 648 | + float: left; | |
| 649 | + margin: 0 auto; | |
| 650 | + text-align: center; | |
| 651 | + font-size: 24rpx; | |
| 652 | + border-left: 2rpx solid #ccc; | |
| 653 | + border-right: 2rpx solid #ccc; | |
| 654 | +} | |
| 655 | + | |
| 656 | +/*普通样式*/ | |
| 657 | + | |
| 658 | +.stepper .normal { | |
| 659 | + color: black; | |
| 660 | +} | |
| 661 | + | |
| 662 | +/*禁用样式*/ | |
| 663 | + | |
| 664 | +.stepper .disable { | |
| 665 | + color: #ccc; | |
| 666 | +} | |
| 667 | + | |
| 668 | +.quhuo { | |
| 669 | + width: 100%; | |
| 670 | + color: rgb(51, 51, 51); | |
| 671 | + float: left; | |
| 672 | + margin-top: 20rpx; | |
| 673 | +} | |
| 674 | + | |
| 675 | +.x-z { | |
| 676 | + width: 100%; | |
| 677 | + float: left; | |
| 678 | + color: rgb(51, 51, 51); | |
| 679 | + font-size: 36rpx; | |
| 680 | +} | |
| 681 | + | |
| 682 | +.btn { | |
| 683 | + width: 94%; | |
| 684 | + background-color: red; | |
| 685 | + color: white; | |
| 686 | + text-align: center; | |
| 687 | + height: 88rpx; | |
| 688 | + line-height: 88rpx; | |
| 689 | + float: left; | |
| 690 | + margin: 0 auto; | |
| 691 | +} | |
| 692 | + | |
| 693 | +.mck { | |
| 694 | + min-height: 100rpx; | |
| 695 | + width: 100%; | |
| 696 | + border-bottom: 24rpx #eee solid; | |
| 697 | +} | |
| 698 | + | |
| 699 | +/* pages/yi/yi.wxss */ | |
| 700 | + | |
| 701 | +.buy-option { | |
| 702 | + background: #fff; | |
| 703 | + padding: 20rpx; | |
| 704 | + margin-top: 650rpx; | |
| 705 | + width: 100%; | |
| 706 | +} | |
| 707 | + | |
| 708 | +.buy-top { | |
| 709 | + width: 100%; | |
| 710 | +} | |
| 711 | + | |
| 712 | +.buy-image { | |
| 713 | + margin-right: 20rpx; | |
| 714 | + width: 630rpx; | |
| 715 | + height: 200rpx; | |
| 716 | + float: left; | |
| 717 | +} | |
| 718 | + | |
| 719 | +.buy-image image { | |
| 720 | + width: 200rpx; | |
| 721 | + height: 200rpx; | |
| 722 | + background-color: burlywood; | |
| 723 | + float: left; | |
| 724 | + margin-right: 16rpx; | |
| 725 | +} | |
| 726 | + | |
| 727 | + | |
| 728 | +.buy-image text { | |
| 729 | + margin-left: 10rpx; | |
| 730 | + color: red; | |
| 731 | +} | |
| 732 | + | |
| 733 | +.buy-cou { | |
| 734 | + float: right; | |
| 735 | + width: 60rpx; | |
| 736 | + height: 60rpx; | |
| 737 | + background-color: white; | |
| 738 | + font-size: 60rpx; | |
| 739 | + color: black; | |
| 740 | + margin-right: 40rpx; | |
| 741 | + text-align: center; | |
| 742 | + line-height: 60rpx; | |
| 743 | + padding-bottom: 4rpx; | |
| 744 | +} | |
| 745 | + | |
| 746 | +.t1 { | |
| 747 | + font-size: 28rpx; | |
| 748 | + padding-left: 4rpx; | |
| 749 | + color: red; | |
| 750 | + padding-top: 10rpx; | |
| 751 | +} | |
| 752 | + | |
| 753 | +.buy-button { | |
| 754 | + width: 100%; | |
| 755 | + margin-top: 30rpx; | |
| 756 | +} | |
| 757 | + | |
| 758 | +.buy-button text { | |
| 759 | + /*float: left;*/ | |
| 760 | + display: inline-block; | |
| 761 | +} | |
| 762 | + | |
| 763 | +.stepper { | |
| 764 | + height: 52rpx; | |
| 765 | + display: inline-block; | |
| 766 | + border: 2rpx solid #ccc; | |
| 767 | + border-radius: 6rpx; | |
| 768 | + margin-left: 28rpx; | |
| 769 | +} | |
| 770 | + | |
| 771 | +/*加号和减号*/ | |
| 772 | + | |
| 773 | +.stepper text { | |
| 774 | + float: left; | |
| 775 | + width: 65rpx; | |
| 776 | + line-height: 52rpx; | |
| 777 | + text-align: center; | |
| 778 | +} | |
| 779 | + | |
| 780 | +/*数值*/ | |
| 781 | + | |
| 782 | +.stepper input { | |
| 783 | + width: 84rpx; | |
| 784 | + height: 52rpx; | |
| 785 | + float: left; | |
| 786 | + margin: 0 auto; | |
| 787 | + text-align: center; | |
| 788 | + font-size: 24rpx; | |
| 789 | + border-left: 2rpx solid #ccc; | |
| 790 | + border-right: 2rpx solid #ccc; | |
| 791 | +} | |
| 792 | + | |
| 793 | +/*普通样式*/ | |
| 794 | + | |
| 795 | +.stepper .normal { | |
| 796 | + color: black; | |
| 797 | +} | |
| 798 | + | |
| 799 | +/*禁用样式*/ | |
| 800 | + | |
| 801 | +.stepper .disable { | |
| 802 | + color: #ccc; | |
| 803 | +} | |
| 804 | + | |
| 805 | +.quhuo { | |
| 806 | + width: 100%; | |
| 807 | + color: rgb(51, 51, 51); | |
| 808 | + margin-top: 45rpx; | |
| 809 | + font-size: 32rpx | |
| 810 | +} | |
| 811 | + | |
| 812 | +.quhuo image { | |
| 813 | + width: 40rpx; | |
| 814 | + height: 40rpx; | |
| 815 | + display: inline-block; | |
| 816 | + position: relative; | |
| 817 | + left: 500rpx; | |
| 818 | +} | |
| 819 | + | |
| 820 | +.ttxz { | |
| 821 | + display: inline-block; | |
| 822 | +} | |
| 823 | + | |
| 824 | +.xuanze { | |
| 825 | + width: 100%; | |
| 826 | + height: 80rpx; | |
| 827 | + display: inline-block; | |
| 828 | + border-bottom: 1rpx #e7e7e7 solid; | |
| 829 | + font-size: 32rpx; | |
| 830 | + line-height: 80rpx; | |
| 831 | +} | |
| 832 | + | |
| 833 | +.xuanze1 { | |
| 834 | + width: 100%; | |
| 835 | + color: rgb(51, 51, 51); | |
| 836 | + height: 80rpx; | |
| 837 | + display: inline-block; | |
| 838 | + border-bottom: 1rpx #e7e7e7 solid; | |
| 839 | + line-height: 80rpx; | |
| 840 | + overflow: hidden; | |
| 841 | +} | |
| 842 | + | |
| 843 | +.x-z { | |
| 844 | + width: 100%; | |
| 845 | + color: rgb(51, 51, 51); | |
| 846 | + font-size: 36rpx; | |
| 847 | + height: auto; | |
| 848 | +} | |
| 849 | + | |
| 850 | +.btn { | |
| 851 | + width: 100%; | |
| 852 | + background-color: red; | |
| 853 | + color: white; | |
| 854 | + text-align: center; | |
| 855 | + height: 88rpx; | |
| 856 | + line-height: 88rpx; | |
| 857 | +} | |
| 858 | + | |
| 859 | +.clear { | |
| 860 | + clear: both; | |
| 861 | +} | |
| 862 | + | |
| 863 | +.fir_view { | |
| 864 | + max-height: 300rpx; | |
| 865 | + overflow-y: scroll; | |
| 866 | +} | |
| 867 | + | |
| 868 | +.pop_up { | |
| 869 | + min-height: 200rpx; | |
| 870 | + position: fixed; | |
| 871 | + bottom: 0; | |
| 872 | + left: 0; | |
| 873 | + width: 100%; | |
| 874 | + background-color: rgba(0, 0, 0, 0.3); | |
| 875 | + font-size: 34rpx; | |
| 876 | + color: rgb(51, 51, 51); | |
| 877 | + | |
| 878 | +} | |
| 879 | + | |
| 880 | +.end_name { | |
| 881 | + display: inline-block; | |
| 882 | +} | |
| 883 | + | |
| 884 | +/*mask*/ | |
| 885 | + | |
| 886 | +.toast_mask { | |
| 887 | + opacity: 0; | |
| 888 | + width: 100%; | |
| 889 | + height: 100%; | |
| 890 | + overflow: hidden; | |
| 891 | + position: fixed; | |
| 892 | + top: 0rpx; | |
| 893 | + left: 0rpx; | |
| 894 | + z-index: 888; | |
| 895 | +} | |
| 896 | + | |
| 897 | +/*toast*/ | |
| 898 | + | |
| 899 | +.toast_content_box { | |
| 900 | + display: flex; | |
| 901 | + width: 100%; | |
| 902 | + height: 100%; | |
| 903 | + justify-content: center; | |
| 904 | + align-items: center; | |
| 905 | + position: fixed; | |
| 906 | + z-index: 999; | |
| 907 | + top: 0rpx; | |
| 908 | +} | |
| 909 | + | |
| 910 | +.toast_content { | |
| 911 | + width: 50%; | |
| 912 | + padding: 20rpx; | |
| 913 | + background: rgba(0, 0, 0, 0.5); | |
| 914 | + border-radius: 20rpx; | |
| 915 | +} | |
| 916 | + | |
| 917 | +.toast_content_text { | |
| 918 | + height: 100%; | |
| 919 | + width: 100%; | |
| 920 | + color: #fff; | |
| 921 | + font-size: 28rpx; | |
| 922 | + text-align: center; | |
| 923 | +} | |
| 924 | + | |
| 925 | +.jt { | |
| 926 | + width: 30rpx; | |
| 927 | + height: 30rpx; | |
| 928 | + display: inline-block; | |
| 929 | +} | |
| 930 | + | |
| 931 | +.jiajian { | |
| 932 | + color: #999; | |
| 933 | +} | |
| 934 | + | |
| 935 | +.t_wz { | |
| 936 | + line-height: 110rpx; | |
| 937 | + height: 110rpx; | |
| 938 | + font-size: 36rpx; | |
| 939 | +} | |
| 940 | + | |
| 941 | +.down-arrow { | |
| 942 | + display: inline-block; | |
| 943 | + position: relative; | |
| 944 | + width: 40rpx; | |
| 945 | + height: 30rpx; | |
| 946 | + margin-right: 20rpx; | |
| 947 | +} | |
| 948 | + | |
| 949 | +.down-arrow::after { | |
| 950 | + display: inline-block; | |
| 951 | + content: " "; | |
| 952 | + height: 18rpx; | |
| 953 | + width: 18rpx; | |
| 954 | + border-width: 0 2rpx 2rpx 0; | |
| 955 | + border-color: #999; | |
| 956 | + border-style: solid; | |
| 957 | + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); | |
| 958 | + transform-origin: center; | |
| 959 | + transition: transform 0.3s; | |
| 960 | + position: absolute; | |
| 961 | + top: 50%; | |
| 962 | + right: 10rpx; | |
| 963 | + margin-top: -10rpx; | |
| 964 | +} | |
| 965 | + | |
| 966 | +.down-arrow1 { | |
| 967 | + display: inline-block; | |
| 968 | + position: relative; | |
| 969 | + width: 40rpx; | |
| 970 | + height: 30rpx; | |
| 971 | + margin-right: 20rpx; | |
| 972 | + margin-top: 12rpx; | |
| 973 | +} | |
| 974 | + | |
| 975 | +.down-arrow1::after { | |
| 976 | + display: inline-block; | |
| 977 | + content: " "; | |
| 978 | + height: 18rpx; | |
| 979 | + width: 18rpx; | |
| 980 | + border-width: 0 2rpx 2rpx 0; | |
| 981 | + border-color: #999; | |
| 982 | + border-style: solid; | |
| 983 | + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); | |
| 984 | + transform-origin: center; | |
| 985 | + transition: transform 0.3s; | |
| 986 | + position: absolute; | |
| 987 | + top: 50%; | |
| 988 | + right: 10rpx; | |
| 989 | + margin-top: -10rpx; | |
| 990 | +} | |
| 991 | + | |
| 992 | +.down-arrow1::after { | |
| 993 | + transform-origin: center; | |
| 994 | + transform: rotate(-135deg); | |
| 995 | + transition: transform 0.3s; | |
| 996 | +} | |
| 997 | + | |
| 998 | +.goodslisttop::after { | |
| 999 | + content: ""; | |
| 1000 | + width: 100%; | |
| 1001 | + height: 1px; | |
| 1002 | + border-bottom: 1px #d4d4d4 solid; | |
| 1003 | + display: block; | |
| 1004 | + margin-top: -12px; | |
| 1005 | +} | |
| 1006 | + | |
| 1007 | +.ia { | |
| 1008 | + display: flex; | |
| 1009 | + width: 100%; | |
| 1010 | +} | |
| 1011 | + | |
| 1012 | +.bview { | |
| 1013 | + position: fixed; | |
| 1014 | + top: 0; | |
| 1015 | + left: 0; | |
| 1016 | + width: 100%; | |
| 1017 | + height: 100%; | |
| 1018 | + background-color: rgba(0, 0, 0, 0.5); | |
| 1019 | +} | |
| 1020 | + | |
| 1021 | +.juzhong { | |
| 1022 | + position: fixed; | |
| 1023 | + top: 0; | |
| 1024 | + left: 0; | |
| 1025 | + width: 100%; | |
| 1026 | + height: 100%; | |
| 1027 | + display: flex; | |
| 1028 | + flex-direction: row; | |
| 1029 | + justify-content: center; | |
| 1030 | + align-items: center; | |
| 1031 | +} | |
| 1032 | + | |
| 1033 | +.juzhong .xq { | |
| 1034 | + padding: 0 20rpx; | |
| 1035 | + background: #fff; | |
| 1036 | + font-size: 30rpx; | |
| 1037 | + padding-bottom: 20rpx; | |
| 1038 | +} | |
| 1039 | + | |
| 1040 | +.juzhong .xq .title { | |
| 1041 | + text-align: center; | |
| 1042 | + margin: 20rpx 0; | |
| 1043 | + position: relative; | |
| 1044 | + height: 50rpx; | |
| 1045 | +} | |
| 1046 | + | |
| 1047 | +.juzhong .xq .hs1 { | |
| 1048 | + font-size: 28rpx; | |
| 1049 | + color: #ab8f9e; | |
| 1050 | +} | |
| 1051 | + | |
| 1052 | +.juzhong .xq .title .close { | |
| 1053 | + position: absolute; | |
| 1054 | + top: 0; | |
| 1055 | + right: 0; | |
| 1056 | + width: 45rpx; | |
| 1057 | + height: 45rpx; | |
| 1058 | +} | |
| 1059 | + | |
| 1060 | +/* .pt_qd { | |
| 1061 | + margin-top: 40rpx; | |
| 1062 | + height: auto; | |
| 1063 | +} */ | |
| 1064 | + | |
| 1065 | +.spec-cart-btn.w100 { | |
| 1066 | + width: 100%; | |
| 1067 | + margin-left: 0; | |
| 1068 | + height: 80rpx; | |
| 1069 | + line-height: 80rpx; | |
| 1070 | +} | |
| 1071 | + | |
| 1072 | + | |
| 1073 | +.bview { | |
| 1074 | + position: fixed; | |
| 1075 | + top: 0; | |
| 1076 | + left: 0; | |
| 1077 | + width: 100%; | |
| 1078 | + height: 100%; | |
| 1079 | + background-color: rgba(0, 0, 0, 0.5); | |
| 1080 | +} | |
| 1081 | + | |
| 1082 | +.juzhong { | |
| 1083 | + position: fixed; | |
| 1084 | + top: 0; | |
| 1085 | + left: 0; | |
| 1086 | + width: 100%; | |
| 1087 | + height: 100%; | |
| 1088 | + display: flex; | |
| 1089 | + flex-direction: row; | |
| 1090 | + justify-content: center; | |
| 1091 | + align-items: center; | |
| 1092 | +} | |
| 1093 | + | |
| 1094 | +.juzhong .xq { | |
| 1095 | + padding: 0 20rpx; | |
| 1096 | + background: #fff; | |
| 1097 | + font-size: 30rpx; | |
| 1098 | + padding-bottom: 20rpx; | |
| 1099 | +} | |
| 1100 | + | |
| 1101 | +.juzhong .xq .title { | |
| 1102 | + text-align: center; | |
| 1103 | + margin: 20rpx 0; | |
| 1104 | + position: relative; | |
| 1105 | + height: 50rpx; | |
| 1106 | +} | |
| 1107 | + | |
| 1108 | +.juzhong .xq .hs1 { | |
| 1109 | + font-size: 28rpx; | |
| 1110 | + color: #ab8f9e; | |
| 1111 | +} | |
| 1112 | + | |
| 1113 | +.juzhong .xq .title .close { | |
| 1114 | + position: absolute; | |
| 1115 | + top: 0; | |
| 1116 | + right: 0; | |
| 1117 | + width: 45rpx; | |
| 1118 | + height: 45rpx; | |
| 1119 | +} | |
| 1120 | + | |
| 1121 | +.pt_qd { | |
| 1122 | + /* margin-top: 40rpx; | |
| 1123 | + height: auto; */ | |
| 1124 | + padding: 20rpx; | |
| 1125 | +} | |
| 1126 | + | |
| 1127 | +.spec-cart-btn.w100 { | |
| 1128 | + width: 100%; | |
| 1129 | + margin-left: 0; | |
| 1130 | + height: 80rpx; | |
| 1131 | + line-height: 80rpx; | |
| 1132 | +} | |
| 1133 | + | |
| 1134 | +.show_zf_dd { | |
| 1135 | + display: flex; | |
| 1136 | + padding: 15rpx 40rpx; | |
| 1137 | + justify-content: space-between; | |
| 1138 | + font-size: 30rpx; | |
| 1139 | + color: #666; | |
| 1140 | +} | |
| 1141 | + | |
| 1142 | +.flex_tou { | |
| 1143 | + display: flex; | |
| 1144 | + justify-content: center; | |
| 1145 | + width: 100%; | |
| 1146 | + height: 175rpx; | |
| 1147 | + align-items: center; | |
| 1148 | +} | |
| 1149 | + | |
| 1150 | +.xc-goods-details { | |
| 1151 | + width: 479rpx; | |
| 1152 | + margin-top: 20rpx; | |
| 1153 | + height: 80rpx; | |
| 1154 | + align-items: center; | |
| 1155 | + | |
| 1156 | +} | |
| 1157 | + | |
| 1158 | +.xc-valframe { | |
| 1159 | + border-radius: 7rpx; | |
| 1160 | + border: 1rpx solid; | |
| 1161 | + margin-top: 3rpx; | |
| 1162 | +} | |
| 1163 | + | |
| 1164 | +.xc-valframe .xc-frame-img { | |
| 1165 | + width: 30rpx; | |
| 1166 | + height: 100%; | |
| 1167 | + background: #e22b44; | |
| 1168 | +} | |
| 1169 | + | |
| 1170 | +.xc-valframe .xc-frame-img .picture { | |
| 1171 | + width: 25rpx; | |
| 1172 | + height: 25rpx; | |
| 1173 | + margin-top: 4rpx; | |
| 1174 | + | |
| 1175 | +} | |
| 1176 | + | |
| 1177 | +.bodybutton .xc-good-friend { | |
| 1178 | + background: #fab55a; | |
| 1179 | + border-radius: 15rpx; | |
| 1180 | +} | |
| 1181 | + | |
| 1182 | +.bodybutton .xc-home-page { | |
| 1183 | + margin-top: 20rpx; | |
| 1184 | + background-color: #e22b44; | |
| 1185 | + border-radius: 15rpx; | |
| 1186 | +} | |
| 1187 | + | |
| 1188 | +.xc-ellipsis-img { | |
| 1189 | + width: 56rpx; | |
| 1190 | + height: 56rpx; | |
| 1191 | + padding-top: 15rpx; | |
| 1192 | +} | |
| 1193 | + | |
| 1194 | +.xc-ptcomplete { | |
| 1195 | + width: 74%; | |
| 1196 | + height: 105rpx; | |
| 1197 | + line-height: 105rpx; | |
| 1198 | + float: right; | |
| 1199 | + | |
| 1200 | +} | |
| 1201 | + | |
| 1202 | +.xc-ptcomplete .xc-img-frame .img { | |
| 1203 | + width: 105rpx; | |
| 1204 | + height: 105rpx; | |
| 1205 | + float: right; | |
| 1206 | +} | |
| 1207 | + | |
| 1208 | +.xc-ptcomplete .xc-img-frame { | |
| 1209 | + width: 205rpx; | |
| 1210 | + height: 105rpx; | |
| 1211 | + margin-top: 20rpx; | |
| 1212 | +} | |
| 1213 | + | |
| 1214 | +.xc-ptcomplete .xc-end { | |
| 1215 | + width: 283rpx; | |
| 1216 | + text-align: right; | |
| 1217 | +} | |
| 1218 | + | |
| 1219 | +.iw { | |
| 1220 | + padding-right: 33rpx; | |
| 1221 | +} | |
| 1222 | + | |
| 1223 | +.xc-ptcomplete .xc-img-frames { | |
| 1224 | + width: 345rpx; | |
| 1225 | + height: 105rpx; | |
| 1226 | + margin-top: 20rpx; | |
| 1227 | + | |
| 1228 | +} | |
| 1229 | + | |
| 1230 | +.xc-ptcomplete .xc-img-frames .img { | |
| 1231 | + width: 105rpx; | |
| 1232 | + height: 105rpx; | |
| 1233 | + float: right; | |
| 1234 | +} | |
| 1235 | + | |
| 1236 | +.bodybutton .xc-good-friend.co-w { | |
| 1237 | + background-color: #aeaeae | |
| 1238 | +} | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | +.spec-model { | |
| 1255 | + position: fixed; | |
| 1256 | + bottom: 0; | |
| 1257 | + z-index: 20; | |
| 1258 | + background: white; | |
| 1259 | + width: 100%; | |
| 1260 | + /* padding: 0 30rpx; */ | |
| 1261 | + font-size: 32rpx; | |
| 1262 | + box-sizing: border-box; | |
| 1263 | + border-radius: 20rpx; | |
| 1264 | + /* height: 72%; */ | |
| 1265 | +} | |
| 1266 | + | |
| 1267 | +.spec-model .pding { | |
| 1268 | + padding: 0 30rpx; | |
| 1269 | +} | |
| 1270 | + | |
| 1271 | +.spec-goods { | |
| 1272 | + padding: 30rpx 0 20rpx; | |
| 1273 | + float: left; | |
| 1274 | + width: 100%; | |
| 1275 | + border-bottom: 2rpx solid #eee; | |
| 1276 | +} | |
| 1277 | + | |
| 1278 | +.spec-img { | |
| 1279 | + float: left; | |
| 1280 | + height: 186rpx; | |
| 1281 | + width: 186rpx; | |
| 1282 | + border: 4rpx solid #eee | |
| 1283 | +} | |
| 1284 | + | |
| 1285 | +.spec-goods-info { | |
| 1286 | + float: left; | |
| 1287 | + padding: 0 25rpx; | |
| 1288 | + width: 400rpx; | |
| 1289 | +} | |
| 1290 | + | |
| 1291 | +.spec-goods-name { | |
| 1292 | + font-size: 30rpx; | |
| 1293 | + line-height: 35rpx; | |
| 1294 | + height: 70rpx; | |
| 1295 | + margin: 15rpx 20rpx 25rpx 0; | |
| 1296 | + overflow: hidden; | |
| 1297 | + text-overflow: ellipsis; | |
| 1298 | + color: #333; | |
| 1299 | +} | |
| 1300 | + | |
| 1301 | +.spec-goods-price { | |
| 1302 | + color: #d60021; | |
| 1303 | + font-size: 33rpx; | |
| 1304 | + font-weight: bold; | |
| 1305 | +} | |
| 1306 | + | |
| 1307 | +.spec-goods-stock { | |
| 1308 | + margin-top: 3rpx; | |
| 1309 | + font-size: 24rpx; | |
| 1310 | + color: #999999; | |
| 1311 | + margin-right: 15rpx; | |
| 1312 | +} | |
| 1313 | + | |
| 1314 | +.spec-name { | |
| 1315 | + clear: both; | |
| 1316 | + padding: 20rpx 0; | |
| 1317 | + font-size: 30rpx; | |
| 1318 | + color: #333; | |
| 1319 | +} | |
| 1320 | + | |
| 1321 | +.quhuo { | |
| 1322 | + font-size: 30rpx; | |
| 1323 | + color: #000 | |
| 1324 | +} | |
| 1325 | + | |
| 1326 | +.b_num { | |
| 1327 | + display: flex; | |
| 1328 | + font-size: 30rpx; | |
| 1329 | + color: #333; | |
| 1330 | + justify-content: space-between; | |
| 1331 | +} | |
| 1332 | + | |
| 1333 | +.count { | |
| 1334 | + /* position: fixed; */ | |
| 1335 | + display: flex; | |
| 1336 | + height: 50rpx; | |
| 1337 | + /* border: 1rpx solid #000; */ | |
| 1338 | + font-size: 28rpx; | |
| 1339 | + /* right: 30rpx; */ | |
| 1340 | + /* justify-content: space-between; */ | |
| 1341 | +} | |
| 1342 | + | |
| 1343 | + | |
| 1344 | +.count>view, | |
| 1345 | +.count>input { | |
| 1346 | + width: 60rpx; | |
| 1347 | + height: 50rpx; | |
| 1348 | + line-height: 50rpx; | |
| 1349 | + text-align: center; | |
| 1350 | +} | |
| 1351 | + | |
| 1352 | +.spec_bt { | |
| 1353 | + background: fff; | |
| 1354 | + color: #333; | |
| 1355 | + margin-left: 10rpx; | |
| 1356 | + padding: 4rpx 15rpx 4rpx; | |
| 1357 | + display: inline-block; | |
| 1358 | + border-radius: 30rpx; | |
| 1359 | + font-size: 24rpx; | |
| 1360 | + border: 1rpx solid #ccc; | |
| 1361 | + margin: 10rpx; | |
| 1362 | + height: 40rpx; | |
| 1363 | + line-height: 40rpx; | |
| 1364 | +} | |
| 1365 | + | |
| 1366 | +.spec_bt.act { | |
| 1367 | + background: #d60021; | |
| 1368 | + color: #fff; | |
| 1369 | + border: 1rpx solid #d60021; | |
| 1370 | +} | |
| 1371 | + | |
| 1372 | +.sub, .add, .count>input { | |
| 1373 | + /* border-right: 1px solid #000; */ | |
| 1374 | + background-color: #f8f8f8; | |
| 1375 | + border-radius: 8rpx; | |
| 1376 | +} | |
| 1377 | +.sub.active { | |
| 1378 | + /* background-color: #ddd; */ | |
| 1379 | + color: #ccc; | |
| 1380 | +} | |
| 1381 | +.count>input { | |
| 1382 | + margin: 0 10rpx; | |
| 1383 | + line-height: normal; | |
| 1384 | +} | |
| 1385 | + | |
| 1386 | +/* .sub { | |
| 1387 | + border-right: 1px solid #000; | |
| 1388 | +} | |
| 1389 | + | |
| 1390 | +.add { | |
| 1391 | + border-left: 1px solid #000; | |
| 1392 | +} */ | |
| 1393 | + | |
| 1394 | +.spec-btn { | |
| 1395 | + color: black; | |
| 1396 | + background-color: white; | |
| 1397 | + padding: 10rpx 10rpx; | |
| 1398 | + font-size: 26rpx; | |
| 1399 | + line-height: 28rpx; | |
| 1400 | + float: left; | |
| 1401 | + border: 1rpx solid #dedede; | |
| 1402 | + margin: 4rpx 10rpx 4rpx 0; | |
| 1403 | + border-radius: 4rpx; | |
| 1404 | +} | |
| 1405 | + | |
| 1406 | +.spec-btn-click { | |
| 1407 | + color: white; | |
| 1408 | + background-color: #f23030; | |
| 1409 | + border: 1rpx solid #f23030; | |
| 1410 | +} | |
| 1411 | + | |
| 1412 | +.spec-cart-btns { | |
| 1413 | + width: 92%; | |
| 1414 | + line-height: 70rpx; | |
| 1415 | + margin: 0rpx auto; | |
| 1416 | + margin-top: 160rpx; | |
| 1417 | + border-radius: 20rpx; | |
| 1418 | + position: fixed; | |
| 1419 | + bottom: 50rpx; | |
| 1420 | + left: 4%; | |
| 1421 | + | |
| 1422 | +} | |
| 1423 | + | |
| 1424 | +.spec-cart-btn { | |
| 1425 | + | |
| 1426 | + width: 100%; | |
| 1427 | + font-size: 30rpx; | |
| 1428 | + text-align: center; | |
| 1429 | + color: white; | |
| 1430 | + border-radius: 40rpx; | |
| 1431 | +} | |
| 1432 | + | |
| 1433 | +.spec-add-cart { | |
| 1434 | + background-color: #ffb03f; | |
| 1435 | +} | |
| 1436 | + | |
| 1437 | +.spec-buy { | |
| 1438 | + background-color: #f23030; | |
| 1439 | + /* margin-left: 34rpx; */ | |
| 1440 | +} | |
| 1441 | + | |
| 1442 | +.spec-cart-disable { | |
| 1443 | + background: #bbbbbb; | |
| 1444 | +} | |
| 1445 | + | |
| 1446 | +.spec-cart-btn-lg { | |
| 1447 | + width: 614rpx; | |
| 1448 | +} | |
| 1449 | + | |
| 1450 | +.prom-model { | |
| 1451 | + position: fixed; | |
| 1452 | + bottom: 0; | |
| 1453 | + z-index: 20; | |
| 1454 | + background: white; | |
| 1455 | + width: 100%; | |
| 1456 | + padding: 0 30rpx 30rpx; | |
| 1457 | + font-size: 32rpx; | |
| 1458 | + box-sizing: border-box; | |
| 1459 | + overflow-x: hidden; | |
| 1460 | +} | |
| 1461 | + | |
| 1462 | +.prom-model .prom-title { | |
| 1463 | + text-align: center; | |
| 1464 | + margin: 30rpx 0; | |
| 1465 | +} | |
| 1466 | + | |
| 1467 | +.prom-model .logistics-item { | |
| 1468 | + border: 0; | |
| 1469 | +} | |
| 1470 | + | |
| 1471 | +.prom-model .item-mes { | |
| 1472 | + width: 500rpx; | |
| 1473 | +} | |
| 1474 | + | |
| 1475 | +.integral-btn { | |
| 1476 | + width: 100%; | |
| 1477 | + padding: 0rpx; | |
| 1478 | + margin: 0rpx; | |
| 1479 | +} | |
| 1480 | + | |
| 1481 | +.clear { | |
| 1482 | + clear: both; | |
| 1483 | +} | |
| 1484 | + | |
| 1485 | +.sto_v .title, | |
| 1486 | +.sto_v .stitle { | |
| 1487 | + border-top: 1rpx solid #dedede; | |
| 1488 | + border-bottom: 1rpx solid #dedede; | |
| 1489 | + height: 78rpx; | |
| 1490 | + line-height: 78rpx; | |
| 1491 | +} | |
| 1492 | + | |
| 1493 | +.sto_v .title .tubiao, | |
| 1494 | +.sto_v .stitle .tubiao { | |
| 1495 | + width: 32rpx; | |
| 1496 | + height: 32rpx; | |
| 1497 | + margin-top: 23rpx; | |
| 1498 | +} | |
| 1499 | + | |
| 1500 | +.itemlists .item { | |
| 1501 | + border-bottom: 1rpx solid #dedede; | |
| 1502 | + height: 72rpx; | |
| 1503 | + line-height: 72rpx; | |
| 1504 | + font-size: 28rpx; | |
| 1505 | + margin: 0 10rpx; | |
| 1506 | +} | |
| 1507 | + | |
| 1508 | +.cshu { | |
| 1509 | + margin-bottom: 30rpx; | |
| 1510 | + margin-top: 20rpx; | |
| 1511 | +} | |
| 1512 | + | |
| 1513 | +.cshu view { | |
| 1514 | + color: #999; | |
| 1515 | + font-size: 30rpx; | |
| 1516 | + margin-left: 26rpx; | |
| 1517 | +} | |
| 1518 | + | |
| 1519 | + | |
| 1520 | +/*---活动特殊显示---*/ | |
| 1521 | +.prom_show { | |
| 1522 | + height: 120rpx; | |
| 1523 | + display: flex; | |
| 1524 | +} | |
| 1525 | + | |
| 1526 | +.prom_show .secondkill-img { | |
| 1527 | + width: 100%; | |
| 1528 | + height: 100%; | |
| 1529 | +} | |
| 1530 | + | |
| 1531 | +.prom_show .spike-img { | |
| 1532 | + width: 283rpx; | |
| 1533 | + height: 57rpx; | |
| 1534 | + top: 35rpx; | |
| 1535 | + left: 31rpx; | |
| 1536 | +} | |
| 1537 | + | |
| 1538 | +.prom_show .stop { | |
| 1539 | + color: #d81731; | |
| 1540 | + top: 17rpx; | |
| 1541 | + right: 65rpx; | |
| 1542 | + font-weight: 600; | |
| 1543 | +} | |
| 1544 | + | |
| 1545 | +.prom_show .start { | |
| 1546 | + color: #009ae2; | |
| 1547 | + top: 17rpx; | |
| 1548 | + right: 65rpx; | |
| 1549 | + font-weight: 600; | |
| 1550 | +} | |
| 1551 | + | |
| 1552 | +.prom_show .timeac { | |
| 1553 | + font-size: 32rpx; | |
| 1554 | + height: 120rpx; | |
| 1555 | + color: #333; | |
| 1556 | +} | |
| 1557 | + | |
| 1558 | +.prom_show .timeac.left { | |
| 1559 | + width: 66%; | |
| 1560 | + color: #fff; | |
| 1561 | + background: #f23030; | |
| 1562 | +} | |
| 1563 | + | |
| 1564 | +.prom_show .timeac.right { | |
| 1565 | + width: 34%; | |
| 1566 | + background-color: #d7d7d7; | |
| 1567 | + text-align: center | |
| 1568 | +} | |
| 1569 | + | |
| 1570 | +.prom_show .secview .day { | |
| 1571 | + padding-right: 10rpx; | |
| 1572 | +} | |
| 1573 | + | |
| 1574 | +.prom_show .secview .time-val { | |
| 1575 | + width: 36rpx; | |
| 1576 | + height: 36rpx; | |
| 1577 | + border-radius: 7rpx; | |
| 1578 | + line-height: 36rpx; | |
| 1579 | +} | |
| 1580 | + | |
| 1581 | +.prom_show .secview .time { | |
| 1582 | + margin-right: 10rpx; | |
| 1583 | + margin-left: 10rpx; | |
| 1584 | +} | |
| 1585 | + | |
| 1586 | + | |
| 1587 | +.prom_show .timeac.left view { | |
| 1588 | + margin-left: 20rpx | |
| 1589 | +} | |
| 1590 | + | |
| 1591 | +.prom_show .timeac.left view.firview { | |
| 1592 | + margin-top: 10rpx | |
| 1593 | +} | |
| 1594 | + | |
| 1595 | +.prom_show .timeac.left view .tr_line { | |
| 1596 | + text-decoration: line-through; | |
| 1597 | + font-size: 28rpx; | |
| 1598 | +} | |
| 1599 | + | |
| 1600 | +.prom_show .timeac.left view .bprice { | |
| 1601 | + font-size: 50rpx; | |
| 1602 | +} | |
| 1603 | + | |
| 1604 | +.prom_show .timeac.right view.firview { | |
| 1605 | + margin-top: 12rpx; | |
| 1606 | + margin-bottom: 10rpx | |
| 1607 | +} | |
| 1608 | + | |
| 1609 | +.prom_show .timeac.right view.secview { | |
| 1610 | + display: flex; | |
| 1611 | + text-align: center; | |
| 1612 | + justify-content: center; | |
| 1613 | + flex-direction: row; | |
| 1614 | +} | |
| 1615 | + | |
| 1616 | +.prom_show .timeac.right view .tui-conutdown-box { | |
| 1617 | + /* background: #6b6b6b; */ | |
| 1618 | + width: auto; | |
| 1619 | + /* min-width: 45rpx; */ | |
| 1620 | + height: 45rpx; | |
| 1621 | + color: #c4182e; | |
| 1622 | + font-size: 27rpx; | |
| 1623 | + text-align: center; | |
| 1624 | + line-height: 46rpx; | |
| 1625 | +} | |
| 1626 | + | |
| 1627 | +.huise { | |
| 1628 | + background: gray | |
| 1629 | +} | |
| 1630 | + | |
| 1631 | +.lanse { | |
| 1632 | + background: #0199e2 | |
| 1633 | +} | |
| 1634 | + | |
| 1635 | + | |
| 1636 | +/*------拼单------*/ | |
| 1637 | +.pt_view { | |
| 1638 | + text-align: center; | |
| 1639 | + width: 100%; | |
| 1640 | + height: 100rpx; | |
| 1641 | + line-height: 100rpx; | |
| 1642 | + font-size: 26rpx | |
| 1643 | +} | |
| 1644 | + | |
| 1645 | +.pt_view .secondkill-img { | |
| 1646 | + width: 100%; | |
| 1647 | + height: 100%; | |
| 1648 | +} | |
| 1649 | + | |
| 1650 | +.pt_fir { | |
| 1651 | + background: #fff; | |
| 1652 | + margin-bottom: 10rpx; | |
| 1653 | +} | |
| 1654 | + | |
| 1655 | +.pt_fir .pt_fir_title { | |
| 1656 | + display: flex; | |
| 1657 | + align-items: center; | |
| 1658 | + margin-left: 10rpx; | |
| 1659 | + margin-top: 20rpx; | |
| 1660 | + font-size: 28rpx; | |
| 1661 | + position: relative; | |
| 1662 | +} | |
| 1663 | + | |
| 1664 | +.pt_fir .pt_fir_title .kt_type { | |
| 1665 | + color: #fff; | |
| 1666 | + background: #e9030d; | |
| 1667 | + width: 100rpx; | |
| 1668 | + line-height: 40rpx; | |
| 1669 | + border-radius: 6rpx; | |
| 1670 | + margin: 0 10rpx; | |
| 1671 | + height: 40rpx; | |
| 1672 | + font-size: 24rpx; | |
| 1673 | + text-align: center; | |
| 1674 | +} | |
| 1675 | + | |
| 1676 | +.pt_fir .pt_fir_title .price { | |
| 1677 | + color: #e9030d; | |
| 1678 | + font-size: 26rpx; | |
| 1679 | +} | |
| 1680 | + | |
| 1681 | +.pt_fir .pt_fir_title .bigw { | |
| 1682 | + font-size: 36rpx; | |
| 1683 | +} | |
| 1684 | + | |
| 1685 | +.pt_fir .pt_fir_title .tprice { | |
| 1686 | + text-decoration: line-through; | |
| 1687 | + color: #949494 | |
| 1688 | +} | |
| 1689 | + | |
| 1690 | +.pt_fir .pt_fir_title .tprice.ml50 { | |
| 1691 | + margin-left: 50rpx | |
| 1692 | +} | |
| 1693 | + | |
| 1694 | +.pt_fir .pt_fir_title .js { | |
| 1695 | + padding: 0 15rpx; | |
| 1696 | + height: 40rpx; | |
| 1697 | + background: #e9030d; | |
| 1698 | + text-align: center; | |
| 1699 | + border-radius: 8rpx; | |
| 1700 | + color: #fff; | |
| 1701 | + margin-left: 10rpx; | |
| 1702 | +} | |
| 1703 | + | |
| 1704 | +.pt_fir .pt_fir_title .tuannum { | |
| 1705 | + color: #e9030d; | |
| 1706 | + position: absolute; | |
| 1707 | + right: 20rpx; | |
| 1708 | + font-size: 26rpx; | |
| 1709 | +} | |
| 1710 | + | |
| 1711 | +.pding { | |
| 1712 | + padding-top: 20rpx; | |
| 1713 | + padding-left: 20rpx; | |
| 1714 | + height: 81%; | |
| 1715 | + padding-right: 20rpx; | |
| 1716 | + font-size: 26rpx; | |
| 1717 | + color: #ea120f | |
| 1718 | +} | |
| 1719 | + | |
| 1720 | +.pdres { | |
| 1721 | + margin-left: 10rpx; | |
| 1722 | + color: #8f8f94 | |
| 1723 | +} | |
| 1724 | + | |
| 1725 | +.ptgz { | |
| 1726 | + position: relative; | |
| 1727 | + font-size: 30rpx; | |
| 1728 | + padding-left: 20rpx; | |
| 1729 | + margin-top: 10rpx; | |
| 1730 | + overflow: hidden | |
| 1731 | +} | |
| 1732 | + | |
| 1733 | +.shuxian { | |
| 1734 | + width: 6rpx; | |
| 1735 | + height: 28rpx; | |
| 1736 | + background: #ea120f; | |
| 1737 | + display: inline-block; | |
| 1738 | + top: 5rpx; | |
| 1739 | + position: relative; | |
| 1740 | + margin-right: 5rpx | |
| 1741 | +} | |
| 1742 | + | |
| 1743 | +.ptgz_an { | |
| 1744 | + position: absolute; | |
| 1745 | + top: 5rpx; | |
| 1746 | + right: 6rpx | |
| 1747 | +} | |
| 1748 | + | |
| 1749 | +.ptgz_an .arrow-two { | |
| 1750 | + width: 18rpx; | |
| 1751 | + height: 18rpx; | |
| 1752 | + border-color: #da0b31; | |
| 1753 | + margin-top: 30rpx; | |
| 1754 | +} | |
| 1755 | + | |
| 1756 | +.pt_fir.se { | |
| 1757 | + height: auto; | |
| 1758 | + margin-bottom: 10rpx | |
| 1759 | +} | |
| 1760 | + | |
| 1761 | +.t_gz { | |
| 1762 | + padding: 10rpx 20rpx; | |
| 1763 | + font-size: 28rpx | |
| 1764 | +} | |
| 1765 | + | |
| 1766 | +.pt_fir.se1 { | |
| 1767 | + height: auto; | |
| 1768 | + margin: 0 | |
| 1769 | +} | |
| 1770 | + | |
| 1771 | +.pt_fir.se2 { | |
| 1772 | + height: auto; | |
| 1773 | + margin: 0; | |
| 1774 | + border-top: 6rpx solid #eeeeee; | |
| 1775 | + border-bottom: 2rpx solid #eeeeee; | |
| 1776 | +} | |
| 1777 | + | |
| 1778 | +.pt_hb { | |
| 1779 | + height: 78rpx; | |
| 1780 | + line-height: 75rpx; | |
| 1781 | + position: relative; | |
| 1782 | + font-size: 32rpx; | |
| 1783 | + overflow: hidden; | |
| 1784 | + width: 695rpx; | |
| 1785 | + margin-left: 28rpx; | |
| 1786 | + border-bottom: 1rpx solid #E5E5E5 | |
| 1787 | +} | |
| 1788 | + | |
| 1789 | +.ptgz_an.xq { | |
| 1790 | + font-size: 32rpx; | |
| 1791 | + color: #d40024 | |
| 1792 | +} | |
| 1793 | + | |
| 1794 | +.wf { | |
| 1795 | + display: flex; | |
| 1796 | + padding: 20rpx 0; | |
| 1797 | +} | |
| 1798 | + | |
| 1799 | +.wf .item { | |
| 1800 | + width: 24.5%; | |
| 1801 | + text-align: center; | |
| 1802 | + font-size: 26rpx; | |
| 1803 | + color: #666 | |
| 1804 | +} | |
| 1805 | + | |
| 1806 | +.wf .item .item_txy { | |
| 1807 | + position: relative; | |
| 1808 | + width: 60rpx; | |
| 1809 | + height: 60rpx; | |
| 1810 | + background: #ea120f; | |
| 1811 | + border-radius: 50%; | |
| 1812 | + left: 50%; | |
| 1813 | + margin-left: -30rpx; | |
| 1814 | + border: 3px #dfdfdf solid; | |
| 1815 | + text-align: center; | |
| 1816 | + line-height: 60rpx; | |
| 1817 | + color: #fff; | |
| 1818 | + margin-bottom: 10rpx; | |
| 1819 | +} | |
| 1820 | + | |
| 1821 | +.wf .item .item_txy.hs { | |
| 1822 | + background: #cbcbcb; | |
| 1823 | +} | |
| 1824 | + | |
| 1825 | +.po { | |
| 1826 | + margin-bottom: 20rpx; | |
| 1827 | +} | |
| 1828 | + | |
| 1829 | +.cart-btn.line-h { | |
| 1830 | + line-height: 26rpx; | |
| 1831 | +} | |
| 1832 | + | |
| 1833 | +.cart-btn .fir-v { | |
| 1834 | + margin-top: 10rpx; | |
| 1835 | +} | |
| 1836 | + | |
| 1837 | +.hyt { | |
| 1838 | + padding: 0 20rpx; | |
| 1839 | + font-size: 30rpx; | |
| 1840 | + display: flex; | |
| 1841 | + align-items: center; | |
| 1842 | + margin-top: 10rpx; | |
| 1843 | +} | |
| 1844 | + | |
| 1845 | +.hyt .r_f { | |
| 1846 | + color: #e9120f; | |
| 1847 | + font-size: 26rpx; | |
| 1848 | + position: relative; | |
| 1849 | + top: 3rpx | |
| 1850 | +} | |
| 1851 | + | |
| 1852 | +.hyt .byj { | |
| 1853 | + color: #e9120f; | |
| 1854 | + font-size: 32rpx; | |
| 1855 | + position: relative; | |
| 1856 | + top: 5rpx | |
| 1857 | +} | |
| 1858 | + | |
| 1859 | +.pt_fir .pt_fir_title.no-mar-b { | |
| 1860 | + margin-bottom: 0; | |
| 1861 | + padding-bottom: 10rpx; | |
| 1862 | + margin-left: 20rpx | |
| 1863 | +} | |
| 1864 | + | |
| 1865 | +.pt_fir .pt_fir_title.boder-1 { | |
| 1866 | + border-bottom: 1rpx #e7e7e7 solid | |
| 1867 | +} | |
| 1868 | + | |
| 1869 | +.jie_price { | |
| 1870 | + padding: 10rpx 30rpx; | |
| 1871 | +} | |
| 1872 | + | |
| 1873 | +.jie_price_title { | |
| 1874 | + font-size: 30rpx; | |
| 1875 | + color: #a26270; | |
| 1876 | + margin-bottom: 10rpx | |
| 1877 | +} | |
| 1878 | + | |
| 1879 | +.price_list { | |
| 1880 | + display: flex; | |
| 1881 | + width: 100%; | |
| 1882 | +} | |
| 1883 | + | |
| 1884 | +.price_item { | |
| 1885 | + width: 25%; | |
| 1886 | + font-size: 28rpx; | |
| 1887 | + color: #4c336c | |
| 1888 | +} | |
| 1889 | + | |
| 1890 | +.pt_fir.se2 .zzk-1 { | |
| 1891 | + margin-top: 23rpx; | |
| 1892 | + font-size: 30rpx; | |
| 1893 | + position: relative; | |
| 1894 | + margin-bottom: 30rpx; | |
| 1895 | + border-left: 4rpx solid red; | |
| 1896 | + margin-left: 14rpx; | |
| 1897 | + height: 30rpx; | |
| 1898 | + line-height: 30rpx; | |
| 1899 | + padding-left: 5rpx; | |
| 1900 | +} | |
| 1901 | + | |
| 1902 | +.ckgd { | |
| 1903 | + position: absolute; | |
| 1904 | + top: 0; | |
| 1905 | + right: 57rpx; | |
| 1906 | + color: #d70025; | |
| 1907 | + font-size: 32rpx; | |
| 1908 | +} | |
| 1909 | + | |
| 1910 | +.ckgd .arrow-one { | |
| 1911 | + width: 18rpx; | |
| 1912 | + height: 18rpx; | |
| 1913 | + border-color: #da0b31; | |
| 1914 | + margin-top: 5rpx; | |
| 1915 | +} | |
| 1916 | + | |
| 1917 | +.bview { | |
| 1918 | + position: fixed; | |
| 1919 | + top: 0; | |
| 1920 | + left: 0; | |
| 1921 | + width: 100%; | |
| 1922 | + height: 100%; | |
| 1923 | + background-color: rgba(0, 0, 0, 0.5); | |
| 1924 | +} | |
| 1925 | + | |
| 1926 | +.juzhong { | |
| 1927 | + position: fixed; | |
| 1928 | + top: 0; | |
| 1929 | + left: 0; | |
| 1930 | + width: 100%; | |
| 1931 | + height: 100%; | |
| 1932 | + display: flex; | |
| 1933 | + flex-direction: row; | |
| 1934 | + justify-content: center; | |
| 1935 | + align-items: center; | |
| 1936 | +} | |
| 1937 | + | |
| 1938 | +.juzhong .xq { | |
| 1939 | + padding: 0 20rpx; | |
| 1940 | + background: #fff; | |
| 1941 | + font-size: 30rpx; | |
| 1942 | + padding-bottom: 20rpx; | |
| 1943 | +} | |
| 1944 | + | |
| 1945 | +.juzhong .xq .title { | |
| 1946 | + text-align: center; | |
| 1947 | + margin: 20rpx 0; | |
| 1948 | + position: relative; | |
| 1949 | + height: 50rpx; | |
| 1950 | +} | |
| 1951 | + | |
| 1952 | +.juzhong .xq .hs1 { | |
| 1953 | + font-size: 28rpx; | |
| 1954 | + color: #ab8f9e | |
| 1955 | +} | |
| 1956 | + | |
| 1957 | +.juzhong .xq .title .close { | |
| 1958 | + position: absolute; | |
| 1959 | + top: 0; | |
| 1960 | + right: 0; | |
| 1961 | + width: 45rpx; | |
| 1962 | + height: 45rpx; | |
| 1963 | +} | |
| 1964 | + | |
| 1965 | +.pt_qd { | |
| 1966 | + /* margin-top: 40rpx; | |
| 1967 | + height: auto; */ | |
| 1968 | +} | |
| 1969 | + | |
| 1970 | +.spec-cart-btn.w100 { | |
| 1971 | + width: 95%; | |
| 1972 | + margin-left: 0; | |
| 1973 | + height: 75rpx; | |
| 1974 | + line-height: 75rpx; | |
| 1975 | + margin: auto; | |
| 1976 | +} | |
| 1977 | + | |
| 1978 | +.sto_v { | |
| 1979 | + color: #333; | |
| 1980 | +} | |
| 1981 | + | |
| 1982 | +.ellipsis { | |
| 1983 | + overflow: hidden; | |
| 1984 | + white-space: nowrap; | |
| 1985 | + text-overflow: ellipsis; | |
| 1986 | +} | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | +/* 房子图标 */ | |
| 1992 | +.stores-img { | |
| 1993 | + width: 40rpx; | |
| 1994 | + height: 35rpx; | |
| 1995 | + margin-right: 10rpx; | |
| 1996 | +} | |
| 1997 | + | |
| 1998 | +.right-arrow { | |
| 1999 | + width: 15rpx; | |
| 2000 | + height: 15rpx; | |
| 2001 | + border-top: 2rpx solid #d70026; | |
| 2002 | + border-right: 2rpx solid #d70026; | |
| 2003 | + transform: rotate(45deg); | |
| 2004 | + display: inline-block; | |
| 2005 | + margin-bottom: 3rpx; | |
| 2006 | +} | |
| 2007 | + | |
| 2008 | +.distance{ | |
| 2009 | + padding-left: 15rpx; | |
| 2010 | + padding-right: 15rpx; | |
| 2011 | + background: #eee; | |
| 2012 | + border-radius: 20rpx; | |
| 2013 | + margin-right: 5rpx; | |
| 2014 | + color: #999; | |
| 2015 | + height: 38rpx; | |
| 2016 | + line-height: 38rpx; | |
| 2017 | +} | |
| 2018 | + | |
| 2019 | +.shop_name{ | |
| 2020 | + margin-right: 10rpx; | |
| 2021 | +} | |
| 2022 | + | |
| 2023 | +.xc-distance-top{ | |
| 2024 | + margin-top: 10rpx; | |
| 2025 | +} | |
| 2026 | + | |
| 2027 | + | |
| 2028 | +.popup-frame{ | |
| 2029 | + position: fixed; | |
| 2030 | + /* bottom:99rpx; */ | |
| 2031 | + bottom: 0; | |
| 2032 | + z-index: 20; | |
| 2033 | + background: white; | |
| 2034 | + width: 100%; | |
| 2035 | + border-radius: 20rpx 20rpx 0 0; | |
| 2036 | + height: auto; | |
| 2037 | +} | |
| 2038 | + | |
| 2039 | +.popup-top{ | |
| 2040 | + border-bottom: 1rpx solid #eee; | |
| 2041 | + height: 155rpx; | |
| 2042 | + width: 95%; | |
| 2043 | + margin: auto; | |
| 2044 | + line-height: 155rpx; | |
| 2045 | + | |
| 2046 | +} | |
| 2047 | + | |
| 2048 | + | |
| 2049 | +/* .flex-space-between{ | |
| 2050 | + display: flex; | |
| 2051 | + justify-content:space-between; | |
| 2052 | +} */ | |
| 2053 | + | |
| 2054 | +.modal-closes { | |
| 2055 | + position: absolute; | |
| 2056 | + right: 30rpx; | |
| 2057 | + top: -15rpx; | |
| 2058 | + height: 25rpx; | |
| 2059 | +} | |
| 2060 | + | |
| 2061 | +.choose_more{ | |
| 2062 | + margin-top: 40rpx; | |
| 2063 | + margin-right: 20rpx; | |
| 2064 | + | |
| 2065 | +} | |
| 2066 | +.choose_mores{ | |
| 2067 | + margin-top: 30rpx; | |
| 2068 | + margin-right: 15rpx; | |
| 2069 | + | |
| 2070 | +} | |
| 2071 | + | |
| 2072 | +.bg_rights{ | |
| 2073 | + border-top: 2rpx solid ; | |
| 2074 | + border-right: 2rpx solid ; | |
| 2075 | + transform: rotate(45deg); | |
| 2076 | + display: inline-block; | |
| 2077 | + width: 15rpx;height:15rpx; | |
| 2078 | + border-color: #da0b31; | |
| 2079 | +} | |
| 2080 | + | |
| 2081 | + | |
| 2082 | +.mongolia-layer{ | |
| 2083 | + position: fixed; | |
| 2084 | + left: 0; | |
| 2085 | + top: 0; | |
| 2086 | + right: 0; | |
| 2087 | + bottom: 0; | |
| 2088 | + z-index: 11; | |
| 2089 | + background: rgba(0,0,0,0.4); | |
| 2090 | + width: 100%; | |
| 2091 | + height: 91.9%; | |
| 2092 | +} | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | +.store-list{ | |
| 2098 | + width: 95%; | |
| 2099 | + min-height:300rpx; | |
| 2100 | + overflow-y: scroll; | |
| 2101 | + margin: auto; | |
| 2102 | + max-height: 610rpx; | |
| 2103 | +} | |
| 2104 | + | |
| 2105 | +.store-list .store_choose{ | |
| 2106 | + width: 100%; | |
| 2107 | + height: 120rpx; | |
| 2108 | + line-height: 125rpx; | |
| 2109 | + border-bottom: 1rpx solid #eee; | |
| 2110 | +} | |
| 2111 | + | |
| 2112 | +.store-list .store_choose .store{ | |
| 2113 | + width: 100%; | |
| 2114 | + margin: auto; | |
| 2115 | + line-height: 37rpx; | |
| 2116 | + padding-left: 20rpx; | |
| 2117 | +} | |
| 2118 | + | |
| 2119 | +.xc-hook{ | |
| 2120 | + width: 35rpx; | |
| 2121 | + height: 35rpx; | |
| 2122 | + transform: rotate(-145deg); | |
| 2123 | + line-height: 37rpx; | |
| 2124 | + text-align: center; | |
| 2125 | +} | |
| 2126 | + | |
| 2127 | +.butttem5{ | |
| 2128 | + margin-bottom: 5rpx; | |
| 2129 | +} | |
| 2130 | + | |
| 2131 | +.address-frame{ | |
| 2132 | + width: 93%; | |
| 2133 | + margin-left: 7rpx; | |
| 2134 | +} | |
| 2135 | + | |
| 2136 | +.store-bottom{ | |
| 2137 | + width: 85%; | |
| 2138 | + margin: auto; | |
| 2139 | + height: 90rpx; | |
| 2140 | + } | |
| 2141 | + | |
| 2142 | + .determine{ | |
| 2143 | + width: 260rpx; | |
| 2144 | + height: 55rpx; | |
| 2145 | + border-radius: 50rpx; | |
| 2146 | + line-height: 55rpx; | |
| 2147 | + } | |
| 2148 | + | |
| 2149 | + .default{ | |
| 2150 | + width: 260rpx; | |
| 2151 | + height: 55rpx; | |
| 2152 | + border:3rpx solid #c8c8c8; | |
| 2153 | + border-radius: 50rpx; | |
| 2154 | + line-height: 55rpx; | |
| 2155 | + } | |
| 2156 | + | |
| 2157 | + .sort_store_list .sort-store-frame .sort-store { | |
| 2158 | + width: 94.5%; | |
| 2159 | + margin: auto; | |
| 2160 | + } | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + .sort_store_list .sort-store-frame{ | |
| 2164 | + width: 100%; | |
| 2165 | + height: 100rpx; | |
| 2166 | + line-height:100rpx; | |
| 2167 | + border-bottom: 1rpx solid #eee; | |
| 2168 | + } | |
| 2169 | + | |
| 2170 | + .black_rights-frame .black_rights{ | |
| 2171 | + border-top: 3rpx solid; | |
| 2172 | + border-right: 3rpx solid; | |
| 2173 | + transform: rotate(45deg); | |
| 2174 | + display: inline-block; | |
| 2175 | + width: 20rpx; | |
| 2176 | + height: 20rpx; | |
| 2177 | + } | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + .sort_store_list{ | |
| 2181 | + height: 82%; | |
| 2182 | + overflow: hidden; | |
| 2183 | + overflow-y: scroll; | |
| 2184 | + width: 95%; | |
| 2185 | + margin: auto; | |
| 2186 | + } | |
| 2187 | + | |
| 2188 | + .xc-hooks{ | |
| 2189 | + width: 30rpx; | |
| 2190 | + height: 30rpx; | |
| 2191 | + border: 1rpx solid #999; | |
| 2192 | +} | |
| 2193 | + | |
| 2194 | +.no_store{color:#d60021; font-size: 26rpx;} | |
| 2195 | + | |
| 2196 | +.sub.active { | |
| 2197 | + /* background-color: #ddd; */ | |
| 2198 | + color: #ccc; | |
| 2199 | +} | ... | ... |