Commit 661b78d268322f7a8ed21cc5a5df6610517eebde

Authored by yvan.ni
1 parent 29b29ae0

购物车购买修改, 商品无库存显示,首页二维码

pages/cart/cart2/cart2.wxml
... ... @@ -263,11 +263,12 @@
263 263 <view class="xc-coupon-effect flex-vertical flex-space-between" wx:for="{{selected_quan_list}}" wx:if="{{!item.is_using}}" bindtap="sele_quan_item" data-ind="{{index}}">
264 264 <view class="xc-goods-coupon ">
265 265 <view class="xc-coupon-money">{{item.Sum}}元</view>
266   - <view class="xc-coupon-money1">订单满{{item.BuySum}}元使用</view>
  266 + <view class="xc-coupon-money1">订单满{{item.BuySum?item.BuySum:0}}元使用</view>
267 267 <view class="flex xc-coupon-time">使用期限
268 268 <view class="time" wx:if="{{item.BeginDate && item.ValidDate}}" >
269 269 {{filters.replace_time(item.BeginDate)}}至{{filters.replace_time(item.ValidDate)}}
270 270 </view>
  271 + <view wx:else>: 无限制</view>
271 272 </view>
272 273 </view>
273 274 <view class="xc-coupon-selection flex-right-vertical" >
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -643,8 +643,15 @@
643 643 </view>
644 644 <!---<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}">立即购买</view>-->
645 645 <block wx:if="{{prom_type==0}}">
646   - <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view>
647   - <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view>
  646 +
  647 + <block wx:if="{{data.store_count>0}}">
  648 + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view>
  649 + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view>
  650 + </block>
  651 + <block wx:else>
  652 + <view data-ind="1" class="join-btn cart-btn no_store">库存不足</view>
  653 + </block>
  654 +
648 655 </block>
649 656  
650 657 <!-------秒杀-------->
... ...
pages/goods/goodsInfo/goodsInfo.wxss
... ... @@ -2226,4 +2226,8 @@ right:17rpx; top:55rpx;
2226 2226 line-height:15rpx;
2227 2227 }
2228 2228  
2229   -.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx}
2230 2229 \ No newline at end of file
  2230 +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx}
  2231 +
  2232 +.join-cart>view.no_store {
  2233 + width: 58%;
  2234 +}
... ...
pages/user/index/index.js
1 1 var auth = require("../../../utils/auth.js"),rq = require("../../../utils/request.js");
2 2 var e = getApp(),app=e, s = e.globalData.setting,os=s,app_d = e.globalData;
3 3 var regeneratorRuntime = require('../../../utils/runtime.js');
  4 +const {
  5 + barcode,
  6 + qrcode
  7 +} = require('../../../utils/index.js')
  8 +
4 9  
5 10 Page({
6 11 /**
... ... @@ -225,13 +230,12 @@ Page({
225 230 /**
226 231 * 用户点击右上角分享
227 232 */
228   - onShareAppMessage: function () {
229   -
230   - },
  233 + onShareAppMessage: function () {},
231 234  
232 235 //------卡片的显示和关闭--------
233 236 show_tc:function(){
234 237 if(!this.data.userInfo) return false;
  238 + qrcode('qrcode',this.data.userInfo.mobile, 480, 480,this);
235 239 this.setData({
236 240 tc_hide:false,
237 241 });
... ... @@ -354,7 +358,6 @@ Page({
354 358 return false;
355 359 }
356 360  
357   -
358 361 var url=e.currentTarget.dataset.img;
359 362  
360 363 switch (no) {
... ...
pages/user/index/index.wxml
... ... @@ -259,7 +259,8 @@
259 259 </view>
260 260 </view>
261 261 <view class="m_ta">
262   - <image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>
  262 + <!--<image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>-->
  263 + <canvas class="g_img" canvas-id="qrcode" />
263 264 </view>
264 265 <view class="s_sao">扫一扫上面的二维码图案,即可消费</view>
265 266 </view>
... ...