Browse Source

秒杀活动,商品详情UI样式修改

home_hotList^2
ld0104 2 years ago
parent
commit
a942d23222
  1. 4
      assets/css/style.css
  2. 4
      assets/css/style.less
  3. 12
      components/ProductWindow.vue
  4. 5
      pages/activity/SeckillDetails/index.vue
  5. 3
      pages/activity/activity/index.vue
  6. 19
      pages/shop/GoodsCon/index.vue
  7. 1
      pages/user/PersonalData/index.vue

4
assets/css/style.css

@ -555,6 +555,10 @@ page {
color: #fff;
background: #2DB5AE;
}
.product-window .productWinList .item .listn .itemn.isNo {
color: #fff;
background: #a0d2d0;
}
.product-window .cart {
border-top: 2rpx solid #979797;
margin: 0 32rpx;

4
assets/css/style.less

@ -841,6 +841,10 @@ page {
color: #fff;
background: #2DB5AE;
}
.product-window .productWinList .item .listn .itemn.isNo {
color: #fff;
background: #a0d2d0;
}
.product-window .cart {
border-top: 2rpx solid #979797;

12
components/ProductWindow.vue

@ -35,13 +35,15 @@
>
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view
<view
class="itemn"
:class="item.index == indexn ? 'on' : ''"
:class="item.index == indexn? (attr.productSelect.stock!==0?'on':'isNo') : ''"
v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)"
:key="indexn"
>{{ itemn.attr }}</view
>
{{ itemn.attr }}
</view
>
</view>
</view>
@ -103,8 +105,9 @@ export default {
return {};
},
mounted: function () {
console.log(this.attr)
console.log(this.attr)
console.log(this);
// this.tapAttr(0,0)
},
watch: {
attr(nextAttr) {
@ -159,3 +162,4 @@ export default {
},
};
</script>

5
pages/activity/SeckillDetails/index.vue

@ -166,8 +166,9 @@
</view> -->
</view>
<view class="tui-operation-right" v-if="seckillStatus == 1 && storeInfo.num <= 0 && storeInfo.stock <= 0">
<view class="btn">已售罄</view>
<!-- <view class="tui-operation-right" v-if="seckillStatus == 1 && storeInfo.num <= 0 && storeInfo.stock <= 0"> -->
<view class="tui-operation-right" v-if="seckillStatus == 1 && storeInfo.stock <= 0">
<view class="btn" style="background: #a0d2d0">已售罄</view>
<!-- <view class="tui-flex-1">
<tui-button height="68rpx" :size="26" type="warning" shape="circle" disabled>已售罄</tui-button>
</view>

3
pages/activity/activity/index.vue

@ -81,7 +81,7 @@
<view class="otPrice" v-if="activityType === 0">¥{{item.otPrice}}</view>
</view>
<!-- <view class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':'立即秒杀'):'发起' + (activityType == 1?'拼团':'砍价')}}</view> -->
<view :style="tabType==1 && activityType!==0 ? 'background-color:#EC3A5B':''" class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':'立即秒杀'):(tabType==0?('发起'+(activityType == 1?'拼团':'砍价')):'参与中')}}</view>
<view :style="[{backgroundColor:tabType==1 && activityType!==0 ? '#EC3A5B':''},{backgroundColor:item.stock==0 &&tabType==0&&activityType==0?'#a0d2d0':''}]" class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':(item.stock==0?'待补货':'立即秒杀')):(tabType==0?('发起'+(activityType == 1?'拼团':'砍价')):'参与中')}}</view>
</view>
</view>
@ -322,6 +322,7 @@
this.seckillList.push.apply(this.seckillList, res.data);
if(this.activityType === 0) {
this.goodsList = this.seckillList;
console.log(this.goodsList,11111111);
}
this.seckillForm.page++;
uni.hideLoading();

19
pages/shop/GoodsCon/index.vue

@ -249,10 +249,10 @@
<text>{{storeInfo.userCollect?'已收藏':'收藏'}}</text>
</view>
<view class="bnt acea-row row-between">
<view class="joinCart" @click="joinCart">
<view class="joinCart" :class="{'isOn':attr.productSelect.stock==0}" @click="joinCart">
<text>加入购物车</text>
</view>
<view class="buy" @click="tapBuy">
<view class="buy" :class="{'isOn':attr.productSelect.stock==0}" @click="tapBuy">
<text>立即购买</text>
</view>
</view>
@ -574,6 +574,13 @@
})
getProductDetail(that.id, from)
.then(res => {
// for(let key in res.data.productValue){
// if(res.data.productValue[key].stock==0){
// res.data.productValue[key].isNo=false
// }else{
// res.data.productValue[key].isNo=true
// }
// }
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi,
'<img style="max-width:100%;height:auto;"')
// res.data.storeInfo.description = res.data.storeInfo.description.replace(/&nbsp;/gi,'')
@ -582,6 +589,7 @@
// attr attr
that.$set(that.attr, 'productAttr', res.data.productAttr)
that.$set(that, 'productValue', res.data.productValue)
that.$set(that.attr, 'productValues', res.data.productValue)
that.$set(that, 'replyCount', res.data.replyCount)
that.$set(that, 'replyChance', res.data.replyChance)
that.reply = res.data.reply ? [res.data.reply] : []
@ -754,7 +762,6 @@
//
ChangeAttr: function(res) {
//
let productSelect = this.productValue[res.value]
console.log(productSelect)
if (productSelect) {
@ -805,6 +812,7 @@
//
joinCart: function() {
//0=
if(this.attr.productSelect.stock==0) return
this.goCat(0)
},
//
@ -900,6 +908,7 @@
//
tapBuy: function() {
// 1=
if(this.attr.productSelect.stock==0) return
this.goCat(1)
},
linktap(e) {
@ -976,6 +985,10 @@
</script>
<style scoped lang="less">
.isOn{
background-color: #a0d2d0 !important;
// color: #3A3A3C;
}
// .geoPage {
// position: fixed;
// width: 100%;

1
pages/user/PersonalData/index.vue

@ -149,7 +149,6 @@
this.$yrouter.push("/pages/user/ChangePassword/index");
},
switchAccounts: function(index) {
console.log(index, '1111111111111111188');
let that = this;
this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex];

Loading…
Cancel
Save