Commit 78ed026a authored by zhangjianguo's avatar zhangjianguo

购物车的失效样式添加

parent 35a35d6a
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<Text>收货人</Text> <Text>收货人</Text>
<input class="uni-input inputM" v-model="msg.name" /> <input class="uni-input inputM" v-model="msg.name" />
</view> </view>
<view style="width: 100%;height: 1px;background: #e4e7ed;"/> <view style="width: 100%;height: 1px;background: #f5f5f5;"/>
<view class="addcenter_item2"> <view class="addcenter_item2">
<Text>联系电话</Text> <Text>联系电话</Text>
<input class="uni-input inputM" v-model="msg.mobile" /> <input class="uni-input inputM" v-model="msg.mobile" />
</view> </view>
<view style="width: 100%;height: 1px;background: #e4e7ed;"/> <view style="width: 100%;height: 1px;background: #f5f5f5;"/>
<!-- TODO 动态获取地址数据 --> <!-- TODO 动态获取地址数据 -->
<view class="addcenter_item"> <view class="addcenter_item">
<Text>所在地区</Text> <Text>所在地区</Text>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<u-icon name="arrow" color="#B2B2B2" size="30" ></u-icon> <u-icon name="arrow" color="#B2B2B2" size="30" ></u-icon>
</view> </view>
</view> </view>
<view style="width: 100%;height: 1px;background: #e4e7ed;"/> <view style="width: 100%;height: 1px;background: #f5f5f5;"/>
<!-- TODO 定位地址 --> <!-- TODO 定位地址 -->
<view class="addcenter_item"> <view class="addcenter_item">
<Text>定位地址</Text> <Text>定位地址</Text>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<u-icon name="arrow" color="#B2B2B2" size="30" ></u-icon> <u-icon name="arrow" color="#B2B2B2" size="30" ></u-icon>
</view> </view>
</view> </view>
<view style="width: 100%;height: 1px;background: #e4e7ed;"/> <view style="width: 100%;height: 1px;background: #f5f5f5;"/>
<view class="addcenter_item2"> <view class="addcenter_item2">
<Text>详细地址</Text> <Text>详细地址</Text>
<input class="uni-input inputM" v-model="msg.detail" /> <input class="uni-input inputM" v-model="msg.detail" />
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<Text>{{item.mobile}}</Text> <Text>{{item.mobile}}</Text>
</view> </view>
<Text style='width: 100%;'>收货地址:{{item.address}}</Text> <Text style='width: 100%;'>收货地址:{{item.address}}</Text>
<view style="width: 100%;height: 2rpx;background: #EEEEEE;margin-top: 15rpx;"></view> <view style="width: 100%;height: 2rpx;background: #f5f5f5;margin-top: 15rpx;"></view>
<view class="addresclo"> <view class="addresclo">
<u-checkbox-group @change="isdefault(item)"> <u-checkbox-group @change="isdefault(item)">
<u-checkbox v-model="item.is_default==1?true:false" shape="circle" :active-color="mainColor"> <u-checkbox v-model="item.is_default==1?true:false" shape="circle" :active-color="mainColor">
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
:name="item.name" :name="item.name"
> >
<u-checkbox-group <u-checkbox-group
v-if='item.new_status==0 || editType==true'
@change="clickcheckbox(item.checked, item.attrs.price, index,i)" @change="clickcheckbox(item.checked, item.attrs.price, index,i)"
> >
<u-checkbox <u-checkbox
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
:active-color="mc" :active-color="mc"
></u-checkbox> ></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<Text v-if='item.new_status!=0 && editType==false' style='color: #a0a09d;width: 22px;'>失效</Text>
<image <image
:src="item.attrs.pic_url ? item.attrs.pic_url : item.goods.cover_pic" :src="item.attrs.pic_url ? item.attrs.pic_url : item.goods.cover_pic"
mode="aspectFill" mode="aspectFill"
...@@ -277,7 +279,7 @@ export default { ...@@ -277,7 +279,7 @@ export default {
list.forEach((x) => { list.forEach((x) => {
x.checked = false; x.checked = false;
x.goods_list.forEach((j)=>{ x.goods_list.forEach((j)=>{
j.checked = false j.checked = false;
}) })
}); });
this.list = list; this.list = list;
...@@ -294,7 +296,7 @@ export default { ...@@ -294,7 +296,7 @@ export default {
this.TotalPrice += price * this.list[i].goods_list[index].num; this.TotalPrice += price * this.list[i].goods_list[index].num;
let goods_list_all = true; //判断该商场是否全选 let goods_list_all = true; //判断该商场是否全选
this.list[i].goods_list.forEach((x) => { this.list[i].goods_list.forEach((x) => {
if (x.checked == false) { if (x.checked == false&& x.new_status==0) {
goods_list_all = false; goods_list_all = false;
} }
}); });
...@@ -343,9 +345,14 @@ export default { ...@@ -343,9 +345,14 @@ export default {
if(checked == true){ if(checked == true){
let add_cartlist=[]; let add_cartlist=[];
let new_statusnum=0
this.list[i].goods_list.forEach((x)=>{ this.list[i].goods_list.forEach((x)=>{
x.checked = true; if(x.new_status==0){
this.TotalPrice +=x.attrs.price*x.num; this.TotalPrice +=x.attrs.price*x.num;
x.checked = true;
new_statusnum++
}
//编辑时候的商城全选 //编辑时候的商城全选
if(this.cart_id_list.length>0){ if(this.cart_id_list.length>0){
this.cart_id_list.forEach((z) => { this.cart_id_list.forEach((z) => {
...@@ -375,12 +382,17 @@ export default { ...@@ -375,12 +382,17 @@ export default {
if (list_all == true) { if (list_all == true) {
this.allchecked = true; this.allchecked = true;
} }
this.checkCount+=this.list[i].goods_list.length; this.checkCount+=new_statusnum;
}else{ }else{
let new_statusnum=0
this.list[i].goods_list.forEach((x)=>{ this.list[i].goods_list.forEach((x)=>{
x.checked = false; if(x.new_status==0){
this.TotalPrice -=x.attrs.price*x.num; x.checked = false;
this.TotalPrice -=x.attrs.price*x.num;
new_statusnum++
}
//编辑时候的商城全选 //编辑时候的商城全选
this.cart_id_list.forEach((z,m) => { this.cart_id_list.forEach((z,m) => {
if (x.id == z.id) { if (x.id == z.id) {
...@@ -389,7 +401,7 @@ export default { ...@@ -389,7 +401,7 @@ export default {
}); });
}) })
this.allchecked = false; this.allchecked = false;
this.checkCount-=this.list[i].goods_list.length; this.checkCount-=new_statusnum;
} }
}, },
SelectAll() { SelectAll() {
...@@ -401,9 +413,12 @@ export default { ...@@ -401,9 +413,12 @@ export default {
list.forEach((x) => { list.forEach((x) => {
x.checked = true; x.checked = true;
x.goods_list.forEach((j)=>{ x.goods_list.forEach((j)=>{
j.checked = true; if(j.new_status==0){
this.checkCount++; j.checked = true;
this.TotalPrice+=j.attrs.price*j.num this.checkCount++;
this.TotalPrice+=j.attrs.price*j.num
}
//编辑的时候 //编辑的时候
if (this.editType == true) { if (this.editType == true) {
this.cart_id_list.push({ this.cart_id_list.push({
......
...@@ -250,9 +250,8 @@ ...@@ -250,9 +250,8 @@
}, },
onConfirm(res){ onConfirm(res){
console.log(res)
let start = res.obj.fyear + "-" + res.obj.fmonth + "-" + res.obj.fday+' '+ '00:00:00'; let start = res.obj.fyear + "-" + res.obj.fmonth + "-" + res.obj.fday+' '+ '00:00:00';
let end = res.obj.fyear + "-" + res.obj.fmonth + "-" + res.obj.fday+' '+ '23:59:59'; let end = res.obj.tyear + "-" + res.obj.tmonth + "-" + res.obj.tday +' '+ '23:59:59';
this.start_time= start; this.start_time= start;
this.end_time=end; this.end_time=end;
this.page = 1 this.page = 1
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<Text style='margin-left: 10rpx;'>{{meueData.user_center.foot_bar[0].name}}</Text> <Text style='margin-left: 10rpx;'>{{meueData.user_center.foot_bar[0].name}}</Text>
</view> </view>
</view> </view>
<view style="width: 1rpx;height: 60rpx;background: #000000;"></view> <view style="width: 1px;height: 60rpx;background: #000000;"></view>
<view class="footprint_item" @click="goUrl('/pages/foot/index/index')"> <view class="footprint_item" @click="goUrl('/pages/foot/index/index')">
<text>{{user_info.footprint}}</text> <text>{{user_info.footprint}}</text>
<view class="footprint_item_bottom"> <view class="footprint_item_bottom">
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<Text style='margin-left: 10rpx;'>{{meueData.user_center.account_bar.integral.text}}</Text> <Text style='margin-left: 10rpx;'>{{meueData.user_center.account_bar.integral.text}}</Text>
</view> </view>
</view> </view>
<view style="width: 1rpx;height: 60rpx;background: #EEEEEE;"></view> <view style="width: 1px;height: 60rpx;background: #f5f5f5;"></view>
<view class="account_bar_item"> <view class="account_bar_item">
<Text :style="{'color':secondary}">{{user_info.balance}}</Text> <Text :style="{'color':secondary}">{{user_info.balance}}</Text>
<view class="footprint_item_bottom"> <view class="footprint_item_bottom">
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
<Text style='margin-left: 10rpx;'>{{meueData.user_center.account_bar.balance.text}}</Text> <Text style='margin-left: 10rpx;'>{{meueData.user_center.account_bar.balance.text}}</Text>
</view> </view>
</view> </view>
<view style="width: 1rpx;height: 60rpx;background: #EEEEEE;"></view> <view style="width: 1px;height: 60rpx;background: #f5f5f5;"></view>
<view class="account_bar_item"> <view class="account_bar_item">
<Text :style="{'color':secondary}">{{user_info.coupon}}</Text> <Text :style="{'color':secondary}">{{user_info.coupon}}</Text>
<view class="footprint_item_bottom"> <view class="footprint_item_bottom">
...@@ -57,7 +58,8 @@ ...@@ -57,7 +58,8 @@
<Text style='margin-left: 10rpx;'>{{meueData.user_center.account_bar.coupon.text}}</Text> <Text style='margin-left: 10rpx;'>{{meueData.user_center.account_bar.coupon.text}}</Text>
</view> </view>
</view> </view>
<view style="width: 1rpx;height: 60rpx;background: #EEEEEE;"></view> <view style="width: 1px;height: 60rpx;background: #f5f5f5;"></view>
<view class="account_bar_item"> <view class="account_bar_item">
<Text :style="{'color':secondary}">{{user_info.card}}</Text> <Text :style="{'color':secondary}">{{user_info.card}}</Text>
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
</view> </view>
<view class="order_bar" v-if='meueData.user_center.is_order_bar_status==1'> <view class="order_bar" v-if='meueData.user_center.is_order_bar_status==1'>
<u-section title="我的订单" sub-title="查看更多" style='width: 100%;padding: ;'></u-section> <u-section title="我的订单" sub-title="查看更多" style='width: 100%;padding: ;' @click="goUrl('/pages/order/index/index?status=0')"></u-section>
<view class="order_bar_list"> <view class="order_bar_list">
<view class="order_bar_item" v-for="(item, index) in meueData.user_center.order_bar" :key="index" <view class="order_bar_item" v-for="(item, index) in meueData.user_center.order_bar" :key="index"
:name="item.name" @click="goUrl(item.link_url)"> :name="item.name" @click="goUrl(item.link_url)">
...@@ -268,7 +270,7 @@ ...@@ -268,7 +270,7 @@
} }
.userStyle .footprint_item{ .userStyle .footprint_item{
width: 200rpx; width: 200rpx;
height: 100rpx; height: 90rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment