Commit 460365c837d2b81b2385e5d0b5e09a7b65488f30

Authored by 后端开发-许程
1 parent bea6c4cb

首页拼单页面修改

components/goods_list/goods_list.js
@@ -73,6 +73,7 @@ Component({ @@ -73,6 +73,7 @@ Component({
73 reset:function(){ 73 reset:function(){
74 curPage=1; 74 curPage=1;
75 }, 75 },
  76 +
76 77
77 78
78 }, 79 },
components/goods_list/goods_list.wxml
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 <view class="hang "> 4 <view class="hang ">
5 <!-- 商品详情 --> 5 <!-- 商品详情 -->
6 <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> 6 <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  7 + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
7 <!-- 商品图片 --> 8 <!-- 商品图片 -->
8 <image class="sp" src="{{url+item.original_img}}" mode="scaleToFill" binderror="bind_bnerr_xc" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> 9 <image class="sp" src="{{url+item.original_img}}" mode="scaleToFill" binderror="bind_bnerr_xc" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image>
9 <view class="bottom"> 10 <view class="bottom">
@@ -23,6 +24,7 @@ @@ -23,6 +24,7 @@
23 </view> 24 </view>
24 </view> 25 </view>
25 </view> 26 </view>
  27 + </navigator>
26 </view> 28 </view>
27 </view> 29 </view>
28 <view class="nothing flex-center" wx:if="{{is_no_more==0}}"> 30 <view class="nothing flex-center" wx:if="{{is_no_more==0}}">
pages/activity/seckill_list/seckill_list.js
@@ -102,6 +102,7 @@ Page({ @@ -102,6 +102,7 @@ Page({
102 alllist.push(plist[i]); 102 alllist.push(plist[i]);
103 } 103 }
104 e.data.currentPage++; 104 e.data.currentPage++;
  105 + console.log("秒杀商品列表", alllist);
105 th.setData({goodlist:alllist,isshow:1}); 106 th.setData({goodlist:alllist,isshow:1});
106 107
107 }, 108 },
pages/activity/seckill_list/seckill_list.wxml
  1 +<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
1 <block wx:if="{{isshow}}"> 2 <block wx:if="{{isshow}}">
2 <view class=" body_frame"> 3 <view class=" body_frame">
3 4
@@ -5,7 +6,7 @@ @@ -5,7 +6,7 @@
5 </image> 6 </image>
6 7
7 8
8 -<view class="kill-list abs seckill_list"> 9 +<view class="kill-list abs seckill_list">
9 <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide}}" > 10 <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide}}" >
10 <navigator class="kill-pic rel" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> 11 <navigator class="kill-pic rel" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
11 <image class="abs xc-miaosha" src="{{url}}/miniapp/images/zms.png"></image> 12 <image class="abs xc-miaosha" src="{{url}}/miniapp/images/zms.png"></image>
@@ -18,13 +19,13 @@ @@ -18,13 +19,13 @@
18 <view class="xc-strip-blank rel"> 19 <view class="xc-strip-blank rel">
19 20
20 <view class="flex-vertical rel total"> 21 <view class="flex-vertical rel total">
21 - <view class="t-c abs xc-fill"style="width:{{type==1?100-item.buy_num/item.goods_num*100:'100'}}%;background:{{type==1?'#e4374d':'#059de5'}};"> 22 + <view class="t-c abs xc-fill"style="width:{{type==1?100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100:'100'}}%;background:{{type==1?'#e4374d':'#059de5'}};">
22 </view> 23 </view>
23 - <text class="fs20 white abs xc-fill-text" style="">剩余{{type==1?100-item.buy_num/item.goods_num*100:'100'}}%</text> 24 + <text class="fs20 white abs xc-fill-text" style="">剩余{{type==1?filters.toFix(100-(item.buy_num+item.virtual)/(item.goods_num+item.virtual)*100,0):'100'}}%</text>
24 </view> 25 </view>
25 26
26 </view> 27 </view>
27 - <view class=" ml10 fs20 " > 已抢{{item.buy_num}}件</view> 28 + <view class=" ml10 fs20 " > 已抢{{item.buy_num+item.virtual}}件</view>
28 </view> 29 </view>
29 30
30 31
pages/goods/categoryList/categoryList.js
@@ -9,7 +9,7 @@ Page({ @@ -9,7 +9,7 @@ Page({
9 windowHeight:0, 9 windowHeight:0,
10 windowWidth: 0, 10 windowWidth: 0,
11 eachLetterHeight:0, 11 eachLetterHeight:0,
12 - lettersPosition:0, 12 + lettersPosition:0,
13 catelist:null, //分类读取 13 catelist:null, //分类读取
14 nationlist: null,//国家读取 14 nationlist: null,//国家读取
15 groups: null, //品牌读取 15 groups: null, //品牌读取
pages/goods/goodsInfo/goodsInfo.js
@@ -8,7 +8,7 @@ var t = require(&quot;../../../utils/util.js&quot;), @@ -8,7 +8,7 @@ var t = require(&quot;../../../utils/util.js&quot;),
8 oo = s.globalData, 8 oo = s.globalData,
9 o = s.globalData.setting, 9 o = s.globalData.setting,
10 os = o; 10 os = o;
11 -//评价加载更多 11 +//评价加载更多
12 var more = function(e) { 12 var more = function(e) {
13 return e && e.__esModule ? e : { 13 return e && e.__esModule ? e : {
14 default: e 14 default: e
@@ -1376,6 +1376,7 @@ Page({ @@ -1376,6 +1376,7 @@ Page({
1376 prom_start_time: prom_start_time, 1376 prom_start_time: prom_start_time,
1377 isshow:1, 1377 isshow:1,
1378 }); 1378 });
  1379 +
1379 1380
1380 var newTime = ut.gettimestamp(); 1381 var newTime = ut.gettimestamp();
1381 var endTime2 = t.data.data.end_time; 1382 var endTime2 = t.data.data.end_time;
pages/goods/goodsInfo/goodsInfo.wxml
@@ -266,7 +266,7 @@ @@ -266,7 +266,7 @@
266 </view> 266 </view>
267 <view class="word-line fs24 xc-unit-price">零售价¥{{data.market_price}}</view> 267 <view class="word-line fs24 xc-unit-price">零售价¥{{data.market_price}}</view>
268 </view> 268 </view>
269 - <view class="xc-val-price"> 269 + <view class="xc-val-price">
270 <view class="fs30" style='padding-left:13rpx;'>已抢:{{prom_act.buy_num+prom_act.virtual}}件</view> 270 <view class="fs30" style='padding-left:13rpx;'>已抢:{{prom_act.buy_num+prom_act.virtual}}件</view>
271 <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view> 271 <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view>
272 </view> 272 </view>
pages/goods/search/search.js
@@ -48,7 +48,7 @@ Page({ @@ -48,7 +48,7 @@ Page({
48 //扫一扫过来,显示搜索的内容 48 //扫一扫过来,显示搜索的内容
49 var s_key = t.s_key; 49 var s_key = t.s_key;
50 if (s_key){ 50 if (s_key){
51 - this.search(s_key); his.openSearchModal(); 51 + this.search(s_key); this.openSearchModal();
52 return; 52 return;
53 } 53 }
54 54
@@ -81,7 +81,7 @@ Page({ @@ -81,7 +81,7 @@ Page({
81 requestSearch: function(t) { 81 requestSearch: function(t) {
82 var a = this; 82 var a = this;
83 console.log('requestSearch'); 83 console.log('requestSearch');
84 - console.log(t); 84 + console.log(t,"扫描商品的搜索商品1111111111111111111111111111");
85 85
86 this.data.requestUrl = t, 86 this.data.requestUrl = t,
87 //t += "&orderField=" + a.data.tabname; 87 //t += "&orderField=" + a.data.tabname;
@@ -144,6 +144,7 @@ Page({ @@ -144,6 +144,7 @@ Page({
144 144
145 //-----点击搜索按钮---- 145 //-----点击搜索按钮----
146 search: function(t) { 146 search: function(t) {
  147 + console.log(t,"是什么的");
147 if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); 148 if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词");
148 this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); 149 this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
149 }, 150 },
pages/index/index/index.js
@@ -565,8 +565,9 @@ Page({ @@ -565,8 +565,9 @@ Page({
565 wx.scanCode({ 565 wx.scanCode({
566 success: (res) => { 566 success: (res) => {
567 var result = res.result; 567 var result = res.result;
  568 + console.log(res,"是什么所扫码的内容"+result);
568 wx.navigateTo({ 569 wx.navigateTo({
569 - url: "/pages/goods/search/search?s_key=" + result, 570 + url: "/pages/goods/search/search?s_key="+result,
570 }); 571 });
571 } 572 }
572 }) 573 })
pages/index/index/index.wxml
@@ -148,7 +148,7 @@ @@ -148,7 +148,7 @@
148 <image wx:if="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"></image> 148 <image wx:if="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"></image>
149 </view> 149 </view>
150 <view class="ellipsis-2">{{aitem.title}}</view> 150 <view class="ellipsis-2">{{aitem.title}}</view>
151 - <view class="red-co mar-top10"> <text class="fs20">¥</text>{{aitem.price}} 151 + <view class="red-co mar-top10 is_seckill_height" > <text class="fs20">¥</text>{{aitem.price}}
152 <text class="un_line">¥{{aitem.market_price}}</text> 152 <text class="un_line">¥{{aitem.market_price}}</text>
153 </view> 153 </view>
154 </navigator> 154 </navigator>
@@ -161,7 +161,7 @@ @@ -161,7 +161,7 @@
161 </view> 161 </view>
162 </view> 162 </view>
163 <!----拼单----> 163 <!----拼单---->
164 - <view class="seckill" wx:if="{{pindGoods!=null && pindGoods.length!=0 }}"> 164 + <view class="seckill assemble-top-border" wx:if="{{pindGoods!=null && pindGoods.length!=0 }}">
165 <navigator url="/pages/activity/pind_list/pind_list"> 165 <navigator url="/pages/activity/pind_list/pind_list">
166 <view class="seckill-time"> 166 <view class="seckill-time">
167 <view class="classname flex"> 167 <view class="classname flex">
pages/index/index/index.wxss
@@ -65,7 +65,7 @@ left: 10%; @@ -65,7 +65,7 @@ left: 10%;
65 } 65 }
66 .s_prom{ 66 .s_prom{
67 width: 100%; 67 width: 100%;
68 - height: 380rpx; 68 + height: 340rpx;
69 } 69 }
70 .s_proms{ 70 .s_proms{
71 width: 100%; 71 width: 100%;
@@ -265,7 +265,7 @@ left: 10%; @@ -265,7 +265,7 @@ left: 10%;
265 265
266 .seckill-list view.imgview{ 266 .seckill-list view.imgview{
267 width: 203rpx; 267 width: 203rpx;
268 - height: 226rpx; 268 + height: 210rpx;
269 position: relative; 269 position: relative;
270 overflow: hidden; 270 overflow: hidden;
271 271
@@ -518,7 +518,7 @@ margin-top: 10rpx; @@ -518,7 +518,7 @@ margin-top: 10rpx;
518 518
519 .title .China { 519 .title .China {
520 width: 100%; 520 width: 100%;
521 - margin-top: 50rpx; 521 + margin-top: 10rpx;
522 margin-bottom: 10rpx; 522 margin-bottom: 10rpx;
523 line-height: 0rpx; 523 line-height: 0rpx;
524 } 524 }
@@ -715,4 +715,14 @@ margin-top: 4rpx; @@ -715,4 +715,14 @@ margin-top: 4rpx;
715 } 715 }
716 .time-blue{ 716 .time-blue{
717 margin-left: 10rpx; 717 margin-left: 10rpx;
718 -}  
719 \ No newline at end of file 718 \ No newline at end of file
  719 +}
  720 +.is_seckill_height{
  721 + height:40rpx;line-height:32rpx;
  722 +}
  723 +
  724 +
  725 +.assemble-top-border{
  726 + border-top: 10rpx solid #eee;
  727 + padding-top:20rpx;
  728 + margin-top:0rpx;
  729 +}