完成3.1样式修改
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,19 @@
|
||||
|
||||
view,
|
||||
scroll-view,
|
||||
swiper,
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
label,
|
||||
navigator,
|
||||
image {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page {
|
||||
background: #f5f5f5;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.newsList .newsSwitch .van-hairline--top-bottom::after {
|
||||
@ -6947,7 +6961,7 @@ page {
|
||||
}
|
||||
|
||||
.flash-sale .list .item .text {
|
||||
width: 5*100rpx;
|
||||
width: 4.7*100rpx;
|
||||
font-size: 0.3*100rpx;
|
||||
color: #333;
|
||||
height: 1.66*100rpx;
|
||||
@ -8612,3 +8626,574 @@ rich-text {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*单行文本溢出省略号*/
|
||||
.one-t {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: all linear 0.2s;
|
||||
}
|
||||
/*多行文本溢出省略号*/
|
||||
.more-t {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
transition: all linear 0.2s;
|
||||
}
|
||||
|
||||
/* ==================
|
||||
flex布局(colorui里面也有相关基础样式)
|
||||
==================== */
|
||||
/* x水平排列*/
|
||||
.x-f {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/*x两端且水平居中*/
|
||||
.x-bc {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
/*x平分且水平居中*/
|
||||
.x-ac {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
}
|
||||
/*x水平靠上对齐*/
|
||||
.x-start {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
/*x水平靠下对齐*/
|
||||
.x-end {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
/*上下左右居中*/
|
||||
.x-c {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/*y竖直靠左*/
|
||||
.y-start {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
/*y竖直靠右*/
|
||||
.y-end {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
/*y竖直居中*/
|
||||
.y-f {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
// y竖直两端
|
||||
.y-b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
/*y竖直两端居中*/
|
||||
.y-bc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
/* ==================
|
||||
自定义变量
|
||||
==================== */
|
||||
/*盒子模型*/
|
||||
.mt2 {
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
|
||||
.mr2 {
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.mb2 {
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.ml2 {
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
|
||||
.mx2 {
|
||||
margin-left: 2rpx;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.my2 {
|
||||
margin-top: 2rpx;
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.ma2 {
|
||||
margin: 2rpx;
|
||||
}
|
||||
|
||||
.mt4 {
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.mr4 {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.mb4 {
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.ml4 {
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.mx4 {
|
||||
margin-left: 4rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.my4 {
|
||||
margin-top: 4rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.ma4 {
|
||||
margin: 4rpx;
|
||||
}
|
||||
|
||||
.mt8 {
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.mr8 {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.mb8 {
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.ml8 {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.mx8 {
|
||||
margin-left: 8rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.my8 {
|
||||
margin-top: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.ma8 {
|
||||
margin: 8rpx;
|
||||
}
|
||||
|
||||
.mt10 {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.mb10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.ml10 {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.mx10 {
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.my10 {
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.ma10 {
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.mr15 {
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.mb15 {
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.ml15 {
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.mx15 {
|
||||
margin-left: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.my15 {
|
||||
margin-top: 15rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.ma15 {
|
||||
margin: 15rpx;
|
||||
}
|
||||
|
||||
.mt20 {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.mr20 {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.mb20 {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ml20 {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.mx20 {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.my20 {
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ma20 {
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.mt24 {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.mr24 {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.mb24 {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.ml24 {
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.mx24 {
|
||||
margin-left: 24rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.my24 {
|
||||
margin-top: 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.ma24 {
|
||||
margin: 24rpx;
|
||||
}
|
||||
|
||||
.mt30 {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.mr30 {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.mb30 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.ml30 {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.mx30 {
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.my30 {
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.ma30 {
|
||||
margin: 30rpx;
|
||||
}
|
||||
|
||||
.pt2 {
|
||||
padding-top: 2rpx;
|
||||
}
|
||||
|
||||
.pr2 {
|
||||
padding-right: 2rpx;
|
||||
}
|
||||
|
||||
.pb2 {
|
||||
padding-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.pl2 {
|
||||
padding-left: 2rpx;
|
||||
}
|
||||
|
||||
.px2 {
|
||||
padding-left: 2rpx;
|
||||
padding-right: 2rpx;
|
||||
}
|
||||
|
||||
.py2 {
|
||||
padding-top: 2rpx;
|
||||
padding-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.pa2 {
|
||||
padding: 2rpx;
|
||||
}
|
||||
|
||||
.pt4 {
|
||||
padding-top: 4rpx;
|
||||
}
|
||||
|
||||
.pr4 {
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
|
||||
.pb4 {
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.pl4 {
|
||||
padding-left: 4rpx;
|
||||
}
|
||||
|
||||
.px4 {
|
||||
padding-left: 4rpx;
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
|
||||
.py4 {
|
||||
padding-top: 4rpx;
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.pa4 {
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
.pt8 {
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
|
||||
.pr8 {
|
||||
padding-right: 8rpx;
|
||||
}
|
||||
|
||||
.pb8 {
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.pl8 {
|
||||
padding-left: 8rpx;
|
||||
}
|
||||
|
||||
.px8 {
|
||||
padding-left: 8rpx;
|
||||
padding-right: 8rpx;
|
||||
}
|
||||
|
||||
.py8 {
|
||||
padding-top: 8rpx;
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.pa8 {
|
||||
padding: 8rpx;
|
||||
}
|
||||
|
||||
.pt10 {
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.pr10 {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.pb10 {
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.pl10 {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.px10 {
|
||||
padding-left: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.py10 {
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.pa10 {
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.pt15 {
|
||||
padding-top: 15rpx;
|
||||
}
|
||||
|
||||
.pr15 {
|
||||
padding-right: 15rpx;
|
||||
}
|
||||
|
||||
.pb15 {
|
||||
padding-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.pl15 {
|
||||
padding-left: 15rpx;
|
||||
}
|
||||
|
||||
.px15 {
|
||||
padding-left: 15rpx;
|
||||
padding-right: 15rpx;
|
||||
}
|
||||
|
||||
.py15 {
|
||||
padding-top: 15rpx;
|
||||
padding-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.pa15 {
|
||||
padding: 15rpx;
|
||||
}
|
||||
|
||||
.pt20 {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.pr20 {
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.pb20 {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.pl20 {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.px20 {
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.py20 {
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.pa20 {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.pt24 {
|
||||
padding-top: 24rpx;
|
||||
}
|
||||
|
||||
.pr24 {
|
||||
padding-right: 24rpx;
|
||||
}
|
||||
|
||||
.pb24 {
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.pl24 {
|
||||
padding-left: 24rpx;
|
||||
}
|
||||
|
||||
.px24 {
|
||||
padding-left: 24rpx;
|
||||
padding-right: 24rpx;
|
||||
}
|
||||
|
||||
.py24 {
|
||||
padding-top: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.pa24 {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.pt30 {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.pr30 {
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.pb30 {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.pl30 {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.px30 {
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.py30 {
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.pa30 {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<view class="promotionGood" v-if="benefit.length > 0">
|
||||
<view class="goods-box" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @tap="routerGo(item)">
|
||||
<view>
|
||||
<view class="sh-title-card mb10">
|
||||
<view class="title-box">
|
||||
<image class="title-bg" src="@/static/images/title1.png" mode="aspectFill"></image>
|
||||
<view class="title-text" :style="{ color: detail.color }">为你推荐</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hot-goods mx20 mb10" v-if="benefit.length">
|
||||
<view class="goods-list x-f">
|
||||
<view class="goods-item" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex">
|
||||
<view class="goods-box" @tap="routerGo(item)">
|
||||
<view class="img-box">
|
||||
<!-- <image class="tag-img" :src="item.image" mode=""></image> -->
|
||||
<image class="img" :src="item.image" lazy-load mode="aspectFill"></image>
|
||||
@ -9,7 +18,8 @@
|
||||
<view class="title more-t">{{ item.storeName }}</view>
|
||||
<view class="price-box">
|
||||
<view class="flex x-bc align-end">
|
||||
<view class="current">{{ item.activity_type === 'groupon' ? item.price : item.otPrice }}</view>
|
||||
<view class="current">{{ item.activity_type === 'groupon' ? item.price : item.otPrice }}
|
||||
</view>
|
||||
<view class="sales miso-font">仅剩:{{ item.stock }}{{ item.unitName }}</view>
|
||||
</view>
|
||||
<view class="x-f tag-box">
|
||||
@ -19,26 +29,57 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: 'PromotionGood',
|
||||
props: ['benefit'],
|
||||
data: function() {
|
||||
data: function () {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
routerGo(item) {
|
||||
this.$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: item.id } });
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
};
|
||||
mounted() {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.goods-box {
|
||||
|
||||
.sh-title-card {
|
||||
width: 750rpx;
|
||||
}
|
||||
.title-box {
|
||||
width: 710rpx;
|
||||
height: 88rpx;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
border-radius: 30rpx;
|
||||
|
||||
.title-bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.title-text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.goods-box {
|
||||
width: 345rpx;
|
||||
background: #fff;
|
||||
padding-bottom: 20rpx;
|
||||
@ -90,6 +131,8 @@ export default {
|
||||
.price-box {
|
||||
padding: 10rpx 20rpx 0;
|
||||
width: 344rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.sales {
|
||||
font-size: 20rpx;
|
||||
font-family: PingFang SC;
|
||||
@ -98,12 +141,14 @@ export default {
|
||||
line-height: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.current {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(225, 33, 43, 1);
|
||||
line-height: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
&:before {
|
||||
content: '¥';
|
||||
font-size: 26rpx;
|
||||
@ -118,6 +163,7 @@ export default {
|
||||
margin-left: 14rpx;
|
||||
line-height: 22rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
&:before {
|
||||
content: '¥';
|
||||
font-size: 20rpx;
|
||||
@ -138,5 +184,28 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 为你推荐
|
||||
.hot-goods {
|
||||
background: linear-gradient(#fff 200rpx, #f6f6f6 500rpx, #f6f6f6);
|
||||
border-radius: 20rpx;
|
||||
|
||||
.goods-list {
|
||||
flex-wrap: wrap;
|
||||
width: 710rpx;
|
||||
|
||||
.goods-item {
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
width: 345rpx;
|
||||
box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
|
||||
border-radius: 20rpx;
|
||||
|
||||
&:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
84
components/sh-activity-goods.vue
Normal file
84
components/sh-activity-goods.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view class="min-goods" @tap="jump('/pages/goods/detail/index', { id: detail.id })">
|
||||
<view class="img-box">
|
||||
<view class="tag" >{{ detail.people}}人团</view>
|
||||
<image class="img" :src="detail.image" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="price-box">
|
||||
<view class="y-f">
|
||||
<text class="seckill-current">¥{{ detail.price }}</text>
|
||||
<text class="original">{{ detail.browse }}人浏览</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title"><slot name="titleText"></slot></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
props: {
|
||||
detail: Object
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 路由跳转
|
||||
jump(path, parmas) {
|
||||
this.$Router.push({ path: path, query: parmas });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.min-goods {
|
||||
width: 152rpx;
|
||||
background: #fff;
|
||||
.img-box {
|
||||
width: 152rpx;
|
||||
height: 152rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.tag {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0rpx;
|
||||
z-index: 2;
|
||||
line-height: 35rpx;
|
||||
background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
|
||||
border-radius: 0px 18rpx 18rpx 0px;
|
||||
padding: 0 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: rgba(120, 79, 6, 1);
|
||||
}
|
||||
.img {
|
||||
width: 100%;
|
||||
background-color: #ccc;
|
||||
}
|
||||
}
|
||||
.price-box {
|
||||
width: 100%;
|
||||
margin-top: 10rpx;
|
||||
.seckill-current {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(225, 33, 43, 1);
|
||||
}
|
||||
.original {
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
color: rgba(153, 153, 153, 1);
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
260
components/sh-adv.vue
Normal file
260
components/sh-adv.vue
Normal file
@ -0,0 +1,260 @@
|
||||
<template>
|
||||
<view class="adv-box mx20 mb10">
|
||||
<!-- 模板1-->
|
||||
<view class="x-f" v-if="detail.style == 1">
|
||||
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
<!-- 模板2-->
|
||||
<view class="type1 x-f" v-if="detail.style == 2">
|
||||
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
||||
</image>
|
||||
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<!-- 模板3-->
|
||||
<view class="type2 x-bc" v-if="detail.style == 3">
|
||||
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
||||
</image>
|
||||
<view class="y-f type2-box">
|
||||
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
||||
style="border-bottom:1rpx solid #f6f6f6"></image>
|
||||
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 模板4-->
|
||||
<view class="type3 x-bc" v-if="detail.style == 4">
|
||||
<view class="type3-box y-f">
|
||||
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||
mode="aspectFill"></image>
|
||||
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<!-- 模板5-->
|
||||
<view class="type4 y-f" v-if="detail.style == 5">
|
||||
<view class="type4-box x-f">
|
||||
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||
mode="aspectFill"></image>
|
||||
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<!-- 模板6-->
|
||||
<view class="type5 y-f" v-if="detail.style == 6">
|
||||
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
||||
</image>
|
||||
<view class="type5-box x-bc">
|
||||
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
||||
style="border-bottom:1rpx solid #f6f6f6"></image>
|
||||
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 模板7-->
|
||||
<view class="type6 y-f" v-if="detail.style == 7">
|
||||
<view class="x-f type6-box1">
|
||||
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||
mode="aspectFill"></image>
|
||||
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="x-f type6-box2">
|
||||
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
||||
mode="aspectFill"></image>
|
||||
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image"
|
||||
mode="aspectFill"></image>
|
||||
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
detail: {
|
||||
"list": [{
|
||||
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/0669a6adec3f35d45ec66a082e03774f.png",
|
||||
"name": "",
|
||||
"path": "\/pages\/app\/coupon\/list",
|
||||
"path_name": "优惠券-优惠劵中心",
|
||||
"path_type": 1
|
||||
}, {
|
||||
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/cddb5d90a4241f6235d16368534bc730.png",
|
||||
"name": "",
|
||||
"path": "\/pages\/activity\/groupon\/list",
|
||||
"path_name": "活动-今日必拼",
|
||||
"path_type": 1
|
||||
}, {
|
||||
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/e047d312fb5930de972ae288b9b3bae7.png",
|
||||
"name": "",
|
||||
"path": "\/pages\/app\/score\/list",
|
||||
"path_name": "应用-积分商城",
|
||||
"path_type": 1
|
||||
}],
|
||||
"name": "",
|
||||
"style": 3
|
||||
}
|
||||
};
|
||||
},
|
||||
props: {},
|
||||
computed: {},
|
||||
created() {},
|
||||
methods: {
|
||||
// 路由跳转
|
||||
jump(path) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
});
|
||||
this.$tools.routerTo(path);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.adv-box {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
image{
|
||||
width: 100%;
|
||||
}
|
||||
.type1 {
|
||||
.type1-img {
|
||||
flex: 1;
|
||||
height: 220rpx;
|
||||
|
||||
&:first-child {
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type2 {
|
||||
.type2-img1 {
|
||||
width: (710rpx/2);
|
||||
height: 340rpx;
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
}
|
||||
|
||||
.type2-box {
|
||||
flex: 1;
|
||||
height: 340rpx;
|
||||
width: (710rpx/2);
|
||||
|
||||
.type2-img2 {
|
||||
height: (340rpx/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type3 {
|
||||
.type3-box {
|
||||
width: (710rpx/2);
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
|
||||
.type3-img1 {
|
||||
flex: 1;
|
||||
height: (340rpx/2);
|
||||
|
||||
&:first-child {
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type3-img2 {
|
||||
flex: 1;
|
||||
height: 340rpx;
|
||||
width: (710rpx/2);
|
||||
}
|
||||
}
|
||||
|
||||
.type4 {
|
||||
.type4-box {
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
|
||||
.type4-img1 {
|
||||
flex: 1;
|
||||
height: (340rpx/2);
|
||||
|
||||
&:first-child {
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type4-img2 {
|
||||
flex: 1;
|
||||
height: (340rpx/2);
|
||||
width: 710rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.type5 {
|
||||
.type5-img1 {
|
||||
width: 710rpx;
|
||||
height: (340rpx/2);
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
}
|
||||
|
||||
.type5-box {
|
||||
flex: 1;
|
||||
height: (340rpx/2);
|
||||
width: 710rpx;
|
||||
|
||||
.type5-img2 {
|
||||
height: (340rpx/2);
|
||||
|
||||
&:first-child {
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type6 {
|
||||
.type6-box1 {
|
||||
.type6-img1 {
|
||||
width: (710rpx/2);
|
||||
height: (340rpx/2);
|
||||
|
||||
&:first-child {
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type6-box2 {
|
||||
border-top: 1rpx solid #f6f6f6;
|
||||
|
||||
.type6-img2 {
|
||||
width: (710rpx/3);
|
||||
height: (340rpx/2);
|
||||
border-right: 1rpx solid #f6f6f6;
|
||||
|
||||
&:last-child {
|
||||
border-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
// background-color: #ccc;
|
||||
}
|
||||
}
|
||||
</style>
|
197
components/sh-groupon.vue
Normal file
197
components/sh-groupon.vue
Normal file
@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<!-- 今日必拼 -->
|
||||
<view class="group-goods pa20 mx20 mb10">
|
||||
<view class="title-box x-bc" @tap="jump('/pages/activity/GoodsGroup/index')">
|
||||
<text class="title">超值拼团</text>
|
||||
<view class="group-people x-f">
|
||||
<text class="tip">更多</text>
|
||||
<text class="cuIcon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-box swiper-box x-f">
|
||||
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
|
||||
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
|
||||
<view class="goods-list-box x-f">
|
||||
<block v-for="mgoods in goods" :key="mgoods.id">
|
||||
<sh-activity-goods :detail="mgoods" class="goods-item">
|
||||
<!-- <block slot="titleText">立减¥8.5</block> -->
|
||||
</sh-activity-goods>
|
||||
</block>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="swiper-dots" v-if="goodsList.length > 1">
|
||||
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
|
||||
:key="index"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shActivityGoods from './sh-activity-goods.vue';
|
||||
export default {
|
||||
name: 'shGroupon',
|
||||
components: {
|
||||
shActivityGoods
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
goodsList: [],
|
||||
swiperCurrent: 0
|
||||
};
|
||||
},
|
||||
props: {
|
||||
detail: Array
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
watch: {
|
||||
detail(next) {
|
||||
this.goodsList = this.sortData(next, 4);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
this.swiperCurrent = e.detail.current;
|
||||
},
|
||||
// 数据分层
|
||||
sortData(oArr, length) {
|
||||
let arr = [];
|
||||
let minArr = [];
|
||||
oArr.forEach(c => {
|
||||
if (minArr.length === length) {
|
||||
minArr = [];
|
||||
}
|
||||
if (minArr.length === 0) {
|
||||
arr.push(minArr);
|
||||
}
|
||||
minArr.push(c);
|
||||
});
|
||||
|
||||
return arr;
|
||||
},
|
||||
jump(path, query) {
|
||||
this.$yrouter.push({
|
||||
path,
|
||||
query,
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.swiper-box,
|
||||
.carousel {
|
||||
width: 700rpx;
|
||||
height: 240upx;
|
||||
position: relative;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.carousel-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// padding: 0 28upx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.swiper-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// border-radius: 10upx;
|
||||
background: #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-dots {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 0rpx;
|
||||
z-index: 66;
|
||||
|
||||
.dot {
|
||||
width: 45rpx;
|
||||
height: 3rpx;
|
||||
background: #eee;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.dot-active {
|
||||
width: 45rpx;
|
||||
height: 3rpx;
|
||||
background: #a8700d;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 今日必拼+限时抢购
|
||||
.group-goods {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.title-box {
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.group-people {
|
||||
.time-box {
|
||||
font-size: 26rpx;
|
||||
color: #edbf62;
|
||||
|
||||
.count-text-box {
|
||||
width: 30rpx;
|
||||
height: 34rpx;
|
||||
background: #edbf62;
|
||||
text-align: center;
|
||||
line-height: 34rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 6rpx;
|
||||
color: rgba(#fff, 0.9);
|
||||
margin: 0 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.head-box {
|
||||
.head-img {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
background: #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 28rpx;
|
||||
padding-left: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.cuIcon-right {
|
||||
font-size: 30rpx;
|
||||
line-height: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-box {
|
||||
.goods-item {
|
||||
margin-right: 22rpx;
|
||||
|
||||
&:nth-child(4n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
|
||||
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
|
||||
export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static';
|
||||
|
@ -44,7 +44,7 @@ export default {
|
||||
}
|
||||
cookie.get("spread");
|
||||
// this.toLaunch();
|
||||
if (this.$deviceType == "app") {
|
||||
if (this.$deviceType == "app"||this.$deviceType == "h5") {
|
||||
// this.toLaunch();
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
@ -52,9 +52,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
login().finally(() => {
|
||||
// this.$yrouter.switchTab({
|
||||
// path: "/pages/home/index"
|
||||
// });
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="bargain">
|
||||
<view class="bargain on">
|
||||
<!-- 在header上加 on 为请求支援 -->
|
||||
<view :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
|
||||
<view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view>
|
||||
<view :class="[bargainPartake != userInfo.uid ? 'header bargain-box on' : 'header bargain-box']">
|
||||
<!-- <view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view> -->
|
||||
<!-- 帮助砍价、帮砍成功:-->
|
||||
<view class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
|
||||
<view class="pictrue">
|
||||
@ -13,17 +13,10 @@
|
||||
<text>邀请您帮忙砍价</text>
|
||||
</view>
|
||||
</view>
|
||||
<count-down
|
||||
:isDay="true"
|
||||
:tipText="'倒计时 '"
|
||||
:dayText="' 天 '"
|
||||
:hourText="' 时 '"
|
||||
:minuteText="' 分 '"
|
||||
:secondText="' 秒'"
|
||||
:datatime="datatime"
|
||||
></count-down>
|
||||
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '"
|
||||
:secondText="' 秒'" :datatime="datatime"></count-down>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="wrapper bargain-box">
|
||||
<view class="pictxt acea-row row-between-wrapper" @click="openAlone">
|
||||
<view class="pictrue">
|
||||
<image :src="bargain.image" />
|
||||
@ -45,10 +38,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-progress acea-row row-middle round margin-top">
|
||||
<view
|
||||
class="acea-row row-middle bg-red"
|
||||
:style="{ width: loading ? pricePercent + '%' : '' }"
|
||||
></view>
|
||||
<view class="acea-row row-middle bg-red" :style="{ width: loading ? pricePercent + '%' : '' }"></view>
|
||||
</view>
|
||||
<view class="balance acea-row row-between-wrapper">
|
||||
<view v-text="'已砍' + alreadyPrice + '元'"></view>
|
||||
@ -56,63 +46,39 @@
|
||||
<view v-else v-text="'还剩' + surplusPrice + '元'"></view>
|
||||
</view>
|
||||
<!-- 帮助砍价、帮砍成功:-->
|
||||
<view
|
||||
class="bargainSuccess"
|
||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
|
||||
>
|
||||
<view class="bargainSuccess" v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading">
|
||||
<span class="iconfont icon-xiaolian"></span>已成功帮助好友砍价
|
||||
</view>
|
||||
<!-- 砍价成功:-->
|
||||
<view
|
||||
class="bargainSuccess"
|
||||
v-if="
|
||||
<view class="bargainSuccess" v-if="
|
||||
surplusPrice === 0 &&
|
||||
bargainPartake === userInfo.uid &&
|
||||
userBargainStatus === 1 &&
|
||||
!helpListLoading
|
||||
"
|
||||
>
|
||||
">
|
||||
<span class="iconfont icon-xiaolian"></span>恭喜您砍价成功,快去支付吧~
|
||||
</view>
|
||||
<view
|
||||
v-if="userBargainStatus == 0 && bargainPartake === userInfo.uid"
|
||||
class="bargainBnt"
|
||||
@click="goParticipate"
|
||||
>立即参与砍价</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="goPoster"
|
||||
v-if="
|
||||
<view v-if="userBargainStatus == 0 && bargainPartake === userInfo.uid" class="bargainBnt" @click="goParticipate">
|
||||
立即参与砍价</view>
|
||||
<view class="bargainBnt" @click="goPoster" v-if="
|
||||
surplusPrice > 0 &&
|
||||
bargainPartake === userInfo.uid &&
|
||||
userBargainStatus === 1 &&
|
||||
!helpListLoading
|
||||
"
|
||||
>邀请好友帮砍价</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="getBargainHelp"
|
||||
v-else-if="
|
||||
">邀请好友帮砍价</view>
|
||||
<view class="bargainBnt" @click="getBargainHelp" v-else-if="
|
||||
bargainPartake != userInfo.uid &&
|
||||
userBargainStatus == 1 &&
|
||||
statusUser &&
|
||||
!helpListLoading
|
||||
"
|
||||
>帮好友砍一刀</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="getBargainStart"
|
||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
|
||||
>我也要参与</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="goPay"
|
||||
v-if="
|
||||
">帮好友砍一刀</view>
|
||||
<view class="bargainBnt" @click="getBargainStart"
|
||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading">我也要参与</view>
|
||||
<view class="bargainBnt" @click="goPay" v-if="
|
||||
surplusPrice === 0 &&
|
||||
bargainPartake === userInfo.uid &&
|
||||
userBargainStatus === 1
|
||||
"
|
||||
>立即支付</view>
|
||||
">立即支付</view>
|
||||
<view class="bargainBnt on" @click="goList">抢更多商品</view>
|
||||
<view class="tip">
|
||||
已有
|
||||
@ -121,7 +87,7 @@
|
||||
</view>
|
||||
<view class="lock"></view>
|
||||
</view>
|
||||
<view class="bargainGang">
|
||||
<view class="bargainGang bargain-box">
|
||||
<view class="title font-color-red acea-row row-center-wrapper">
|
||||
<view class="pictrue">
|
||||
<image src="@/static/images/left.png" />
|
||||
@ -132,11 +98,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, bargainHelpListIndex) in bargainHelpList"
|
||||
:key="bargainHelpListIndex"
|
||||
>
|
||||
<view class="item acea-row row-between-wrapper" v-for="(item, bargainHelpListIndex) in bargainHelpList"
|
||||
:key="bargainHelpListIndex">
|
||||
<view class="pictxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar" />
|
||||
@ -152,14 +115,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="load font-color-red"
|
||||
v-if="!helpListStatus && !helpListLoading"
|
||||
@click="getBargainHelpList"
|
||||
>点击加载更多</view>
|
||||
<view class="load font-color-red" v-if="!helpListStatus && !helpListLoading" @click="getBargainHelpList">点击加载更多
|
||||
</view>
|
||||
<view class="lock"></view>
|
||||
</view>
|
||||
<view class="goodsDetails">
|
||||
<view class="goodsDetails bargain-box">
|
||||
<view class="title font-color-red acea-row row-center-wrapper">
|
||||
<view class="pictrue">
|
||||
<image src="@/static/images/left.png" />
|
||||
@ -172,7 +132,7 @@
|
||||
<view class="conter" v-html="bargain.description"></view>
|
||||
<view class="lock"></view>
|
||||
</view>
|
||||
<view class="goodsDetails">
|
||||
<view class="goodsDetails bargain-box">
|
||||
<view class="title font-color-red acea-row row-center-wrapper">
|
||||
<view class="pictrue">
|
||||
<image src="@/static/images/left.png" />
|
||||
@ -184,7 +144,7 @@
|
||||
</view>
|
||||
<view class="conter" v-html="bargain.rule"></view>
|
||||
</view>
|
||||
<view class="bargainTip" :class="active === true ? 'on' : ''">
|
||||
<view class="bargainTip bargain-box" :class="active === true ? 'on' : ''">
|
||||
<!-- <view class="pictrue">
|
||||
<image src="@/static/images/bargainBg.jpg" />
|
||||
<view class="iconfont icon-guanbi" @click="close"></view>
|
||||
@ -203,8 +163,8 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CountDown from "@/components/CountDown";
|
||||
import {
|
||||
import CountDown from "@/components/CountDown";
|
||||
import {
|
||||
getBargainDetail,
|
||||
getBargainShare,
|
||||
getBargainStart,
|
||||
@ -213,21 +173,29 @@ import {
|
||||
getBargainHelpList,
|
||||
getBargainHelpCount,
|
||||
getBargainStartUser
|
||||
} from "@/api/activity";
|
||||
import { postCartAdd } from "@/api/store";
|
||||
import { mapGetters } from "vuex";
|
||||
import {} from "@/libs/wechat";
|
||||
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
||||
} from "@/api/activity";
|
||||
import {
|
||||
postCartAdd
|
||||
} from "@/api/store";
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {} from "@/libs/wechat";
|
||||
import {
|
||||
isWeixin,
|
||||
parseQuery,
|
||||
handleQrCode
|
||||
} from "@/utils/index";
|
||||
|
||||
const NAME = "DargainDetails";
|
||||
const NAME = "DargainDetails";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "DargainDetails",
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
data: function () {
|
||||
return {
|
||||
price: 0,
|
||||
bargainId: 0, //砍价编号
|
||||
@ -266,10 +234,10 @@ export default {
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
mounted: function() {
|
||||
mounted: function () {
|
||||
var that = this;
|
||||
that.mountedStart();
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
that.loading = true;
|
||||
}, 500);
|
||||
},
|
||||
@ -280,10 +248,12 @@ export default {
|
||||
else this.getBargainStartUser();
|
||||
this.getBargainHelpCount();
|
||||
},
|
||||
openAlone: function() {
|
||||
this.$yrouter.push({ path: "/detail/" + this.bargain.productId });
|
||||
openAlone: function () {
|
||||
this.$yrouter.push({
|
||||
path: "/detail/" + this.bargain.productId
|
||||
});
|
||||
},
|
||||
mountedStart: function() {
|
||||
mountedStart: function () {
|
||||
var that = this;
|
||||
let url = handleQrCode();
|
||||
if (url) {
|
||||
@ -316,7 +286,7 @@ export default {
|
||||
that.getBargainStartUser();
|
||||
}
|
||||
},
|
||||
goPay: function() {
|
||||
goPay: function () {
|
||||
var data = {};
|
||||
var that = this;
|
||||
data.productId = that.bargain.productId;
|
||||
@ -328,27 +298,31 @@ export default {
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: { id: res.data.cartId }
|
||||
query: {
|
||||
id: res.data.cartId
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
goPoster: function() {
|
||||
goPoster: function () {
|
||||
var that = this;
|
||||
that.getBargainShare(that.bargainId);
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/Poster/index",
|
||||
query: { id: that.bargainId, type: 2 }
|
||||
query: {
|
||||
id: that.bargainId,
|
||||
type: 2
|
||||
}
|
||||
});
|
||||
},
|
||||
goList: function() {
|
||||
goList: function () {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GoodsBargain/index"
|
||||
});
|
||||
@ -356,16 +330,18 @@ export default {
|
||||
//砍价分享
|
||||
//bargainId 0 获取 查看人数 分享人数 参与人数
|
||||
//bargainId 砍价产品编号 添加分享次数 获取 查看人数 分享人数 参与人数
|
||||
getBargainShare: function(bargainId) {
|
||||
getBargainShare: function (bargainId) {
|
||||
var that = this;
|
||||
getBargainShare({ bargainId: bargainId }).then(res => {
|
||||
getBargainShare({
|
||||
bargainId: bargainId
|
||||
}).then(res => {
|
||||
that.lookCount = res.data.lookCount;
|
||||
that.shareCount = res.data.shareCount;
|
||||
that.userCount = res.data.userCount;
|
||||
});
|
||||
},
|
||||
// 获取产品详情
|
||||
getBargainDetail: function() {
|
||||
getBargainDetail: function () {
|
||||
var that = this;
|
||||
getBargainDetail(that.bargainId)
|
||||
.then(res => {
|
||||
@ -386,9 +362,11 @@ export default {
|
||||
});
|
||||
},
|
||||
//开启砍价
|
||||
getBargainStart: function() {
|
||||
getBargainStart: function () {
|
||||
var that = this;
|
||||
getBargainStart({ bargainId: that.bargainId })
|
||||
getBargainStart({
|
||||
bargainId: that.bargainId
|
||||
})
|
||||
.then(() => {
|
||||
that.bargainPartake = that.userInfo.uid;
|
||||
that.getBargainHelp();
|
||||
@ -402,7 +380,7 @@ export default {
|
||||
});
|
||||
},
|
||||
//参与砍价
|
||||
getBargainHelp: function() {
|
||||
getBargainHelp: function () {
|
||||
var that = this;
|
||||
if (
|
||||
that.surplusPrice === 0 &&
|
||||
@ -446,7 +424,7 @@ export default {
|
||||
});
|
||||
},
|
||||
//获取砍掉的金额
|
||||
getBargainHelpPrice: function() {
|
||||
getBargainHelpPrice: function () {
|
||||
var that = this;
|
||||
getBargainHelpPrice({
|
||||
bargainId: that.bargainId,
|
||||
@ -473,7 +451,7 @@ export default {
|
||||
});
|
||||
},
|
||||
//砍价帮
|
||||
getBargainHelpList: function() {
|
||||
getBargainHelpList: function () {
|
||||
var that = this;
|
||||
if (that.helpListLoading === true) return;
|
||||
if (that.helpListStatus === true) return;
|
||||
@ -498,7 +476,7 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
getBargainHelpCountStart: function() {
|
||||
getBargainHelpCountStart: function () {
|
||||
var that = this;
|
||||
getBargainHelpCount({
|
||||
bargainId: that.bargainId,
|
||||
@ -510,7 +488,10 @@ export default {
|
||||
.catch(() => {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/DargainDetails/index",
|
||||
query: { id: that.bargainId, partake: that.userInfo.uid }
|
||||
query: {
|
||||
id: that.bargainId,
|
||||
partake: that.userInfo.uid
|
||||
}
|
||||
});
|
||||
// that.$router.push({
|
||||
// path:
|
||||
@ -521,7 +502,7 @@ export default {
|
||||
// });
|
||||
});
|
||||
},
|
||||
getBargainHelpCount: function() {
|
||||
getBargainHelpCount: function () {
|
||||
var that = this;
|
||||
getBargainHelpCount({
|
||||
bargainId: that.bargainId,
|
||||
@ -544,7 +525,7 @@ export default {
|
||||
// });
|
||||
});
|
||||
},
|
||||
getBargainStartUser: function() {
|
||||
getBargainStartUser: function () {
|
||||
var that = this;
|
||||
getBargainStartUser({
|
||||
bargainId: that.bargainId,
|
||||
@ -562,7 +543,7 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
close: function() {
|
||||
close: function () {
|
||||
this.active = false;
|
||||
}
|
||||
},
|
||||
@ -571,14 +552,43 @@ export default {
|
||||
path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page {
|
||||
background-color: #eb3729;
|
||||
}
|
||||
.bargainBnt_hui {
|
||||
.bargain {
|
||||
&.on {
|
||||
.bargain-box {
|
||||
background: #fff;
|
||||
width: auto;
|
||||
margin: 0 20rpx;
|
||||
border: 0;
|
||||
|
||||
}
|
||||
|
||||
.header {
|
||||
height: auto;
|
||||
text-align: left;
|
||||
.time{
|
||||
text-align: left;
|
||||
font-size: 24rpx;
|
||||
|
||||
margin: 0;
|
||||
padding:0;
|
||||
padding:20rpx;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f5f5f5 !important;
|
||||
}
|
||||
|
||||
.bargainBnt_hui {
|
||||
font-size: 0.3 * 100rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
@ -589,8 +599,9 @@ page {
|
||||
text-align: center;
|
||||
line-height: 0.8 * 100rpx;
|
||||
margin-top: 0.32 * 100rpx;
|
||||
}
|
||||
.bargain_view {
|
||||
}
|
||||
|
||||
.bargain_view {
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 0.48 * 100rpx;
|
||||
@ -603,8 +614,9 @@ page {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 0.48 * 100rpx;
|
||||
}
|
||||
.iconfonts {
|
||||
}
|
||||
|
||||
.iconfonts {
|
||||
font-size: 0.22 * 100rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -5,6 +5,9 @@
|
||||
</view>
|
||||
<scroll-view scroll-y="false" scroll-x="true">
|
||||
<view class="timeScroll">
|
||||
<div class="logoPic">
|
||||
<image src="https://wx.yixiang.co/h5/img/baokuan.6313c8c8.png">
|
||||
</div>
|
||||
<view v-for="(item, index) in timeList" :key="index">
|
||||
<view v-if="active==index" class="timeItem active" @click="setTime(index)">
|
||||
<view class="time">{{ item.time }}</view>
|
||||
@ -19,26 +22,15 @@
|
||||
</scroll-view>
|
||||
<view v-for="(item, index) in timeList" :key="index">
|
||||
<view v-if="active == index">
|
||||
<view class="countDown font-color-red acea-row row-center-wrapper">
|
||||
<!-- <view class="countDown font-color-red acea-row row-center-wrapper">
|
||||
<view v-if="item.status === 0" class="activity">活动已结束</view>
|
||||
<count-down
|
||||
:isDay="false"
|
||||
:tipText="'距结束仅剩 '"
|
||||
:dayText="false"
|
||||
:hourText="' : '"
|
||||
:minuteText="' : '"
|
||||
:secondText="false"
|
||||
:datatime="datatime"
|
||||
v-if="item.status === 1"
|
||||
></count-down>
|
||||
<count-down :isDay="false" :tipText="'距结束仅剩 '" :dayText="false" :hourText="' : '" :minuteText="' : '"
|
||||
:secondText="false" :datatime="datatime" v-if="item.status === 1"></count-down>
|
||||
<view v-if="item.status === 2" class="activity">活动即将开始</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="list">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(itemSeckill, indexSeckill) in seckillList"
|
||||
:key="indexSeckill"
|
||||
>
|
||||
<view class="item acea-row row-between-wrapper" v-for="(itemSeckill, indexSeckill) in seckillList"
|
||||
:key="indexSeckill">
|
||||
<view class="pictrue">
|
||||
<image :src="itemSeckill.image" />
|
||||
</view>
|
||||
@ -53,21 +45,14 @@
|
||||
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="grab bg-color-red"
|
||||
v-if="item.status === 1 && itemSeckill.stock > 0"
|
||||
@click="goDetail(itemSeckill.id)"
|
||||
>马上抢</view>
|
||||
<view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0"
|
||||
@click="goDetail(itemSeckill.id)">马上抢</view>
|
||||
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
||||
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
||||
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="noCommodity"
|
||||
style="background-color: #fff;"
|
||||
v-if="seckillList.length === 0 && page > 1"
|
||||
>
|
||||
<view class="noCommodity" style="background-color: #f5f5f5;" v-if="seckillList.length === 0 && page > 1">
|
||||
<view class="noPictrue">
|
||||
<image src="@/static/images/noGood.png" class="image" />
|
||||
</view>
|
||||
@ -77,18 +62,21 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getSeckillConfig, getSeckillList } from "@/api/activity";
|
||||
import CountDown from "@/components/CountDown";
|
||||
// import { Tab, Tabs } from "vant-weapp";
|
||||
import Loading from "@/components/Loading";
|
||||
import {
|
||||
getSeckillConfig,
|
||||
getSeckillList
|
||||
} from "@/api/activity";
|
||||
import CountDown from "@/components/CountDown";
|
||||
// import { Tab, Tabs } from "vant-weapp";
|
||||
import Loading from "@/components/Loading";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "GoodsSeckill",
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
data: function () {
|
||||
return {
|
||||
headerImg: "",
|
||||
timeList: [],
|
||||
@ -104,18 +92,18 @@ export default {
|
||||
title: []
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
mounted: function () {
|
||||
this.mountedStart();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loadingList && this.getSeckillList();
|
||||
},
|
||||
methods: {
|
||||
changeTime: function(index) {
|
||||
changeTime: function (index) {
|
||||
this.active = index;
|
||||
this.getSeckillList();
|
||||
},
|
||||
mountedStart: function() {
|
||||
mountedStart: function () {
|
||||
var that = this;
|
||||
uni.showLoading();
|
||||
getSeckillConfig().then(res => {
|
||||
@ -130,30 +118,25 @@ export default {
|
||||
attrs: {
|
||||
class: "timeItem"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
name: "div",
|
||||
attrs: {
|
||||
class: "time"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
type: "text",
|
||||
text: item.time
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "div",
|
||||
attrs: {
|
||||
class: "state"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
children: [{
|
||||
type: "text",
|
||||
text: item.state
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -161,13 +144,13 @@ export default {
|
||||
that.$set(that, "title", title);
|
||||
that.datatime = that.timeList[that.active].stop;
|
||||
that.getSeckillList();
|
||||
that.$nextTick(function() {
|
||||
that.$nextTick(function () {
|
||||
that.sticky = true;
|
||||
uni.hideLoading();
|
||||
});
|
||||
});
|
||||
},
|
||||
setTime: function(index) {
|
||||
setTime: function (index) {
|
||||
var that = this;
|
||||
that.page = 1;
|
||||
that.loadingList = false;
|
||||
@ -177,7 +160,7 @@ export default {
|
||||
this.seckillList = [];
|
||||
that.getSeckillList();
|
||||
},
|
||||
getSeckillList: function() {
|
||||
getSeckillList: function () {
|
||||
var that = this;
|
||||
if (that.loadingList) return;
|
||||
if (that.status) return;
|
||||
@ -192,7 +175,7 @@ export default {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
goDetail: function(id) {
|
||||
goDetail: function (id) {
|
||||
var that = this;
|
||||
var time = that.timeList[that.active].stop;
|
||||
this.$yrouter.push({
|
||||
@ -204,21 +187,49 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.timeScroll {
|
||||
.flash-sale {
|
||||
background: #f5f5f5!important;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.timeScroll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
}
|
||||
.list{
|
||||
padding: 0 20rpx;
|
||||
.item{
|
||||
padding: .25*100rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
height: auto;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
margin-bottom: .2*100rpx;
|
||||
border-radius: .2*100rpx;
|
||||
}
|
||||
}
|
||||
.logoPic {
|
||||
width: 75rpx;
|
||||
height: 70rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
|
||||
.timeItem {
|
||||
image {
|
||||
width: 75rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.timeItem {
|
||||
font-size: 0.22 * 100rpx;
|
||||
color: #282828;
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
padding: 0.11 * 100rpx 0;
|
||||
padding: 20rpx 0;
|
||||
background-color: none;
|
||||
|
||||
&.active {
|
||||
@ -227,7 +238,7 @@ export default {
|
||||
}
|
||||
|
||||
.state {
|
||||
background-color: #eb3729;
|
||||
background: linear-gradient(90deg,#00c17b,#00c17b);
|
||||
color: #fff;
|
||||
opacity: 1;
|
||||
border-radius: 30rpx;
|
||||
@ -237,25 +248,25 @@ export default {
|
||||
line-height: 0.37 * 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.timeItem .time {
|
||||
.timeItem .time {
|
||||
font-size: 0.32 * 100rpx;
|
||||
font-weight: bold;
|
||||
height: .5 * 100rpx;
|
||||
line-height: .5 * 100rpx;
|
||||
}
|
||||
|
||||
.timeItem .state {
|
||||
height: 0.37 * 100rpx;
|
||||
line-height: 0.37 * 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.timeItem .state {
|
||||
height: 0.37 * 100rpx;
|
||||
line-height: 0.37 * 100rpx;
|
||||
}
|
||||
|
||||
.activity {
|
||||
.activity {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.flash-sale .list .item .grab {
|
||||
.flash-sale .list .item .grab {
|
||||
background-color: #999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view v-if="!token">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view>
|
||||
<view class="getUserInfo">
|
||||
<text>您还未允许微信登录授权,请点击下方按钮允许微信授权登录。</text>
|
||||
<button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</button>
|
||||
<view style="height:20rpx"></view>
|
||||
<button @click="back">取消微信登录授权</button>
|
||||
<view v-if="!token" class="force-login-wrap">
|
||||
<image class="logo-bg" src="@/static/images/logo_bg.png" mode="aspectFill"></image>
|
||||
<view class="force-login__content y-f">
|
||||
<open-data class="user-avatar" type="userAvatarUrl"></open-data>
|
||||
<open-data class="user-name" type="userNickName"></open-data>
|
||||
<view class="login-notice">为了提供更优质的服务,需要获取您的头像昵称</view>
|
||||
<button class="cu-btn author-btn" @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看</button>
|
||||
<button class="cu-btn close-btn" @tap="back">暂不授权</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
@ -20,17 +21,26 @@
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations, mapActions } from "vuex";
|
||||
import { wxappAuth, getUser } from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import { login, authorize } from "@/utils";
|
||||
import {
|
||||
mapState,
|
||||
mapMutations,
|
||||
mapActions
|
||||
} from "vuex";
|
||||
import {
|
||||
wxappAuth,
|
||||
getUser
|
||||
} from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {
|
||||
login,
|
||||
authorize
|
||||
} from "@/utils";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
authorize: false,
|
||||
@ -79,7 +89,9 @@ export default {
|
||||
});
|
||||
login()
|
||||
.then((res) => {
|
||||
this.$yrouter.replace({ path: cookie.get("redirect") });
|
||||
this.$yrouter.replace({
|
||||
path: cookie.get("redirect")
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
@ -92,128 +104,89 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sp-cell {
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.getUserInfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 30px;
|
||||
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
.container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-bar {
|
||||
font-size: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
.force-login-wrap {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
border-top: 1px solid rgba(248, 248, 248, 1);
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
z-index: 11111;
|
||||
top: 0;
|
||||
background: linear-gradient(180deg, rgba(239, 196, 128, 1) 0%, rgba(248, 220, 165, 1) 25%, rgba(255, 255, 255, 1) 98%);
|
||||
|
||||
.tab-bar-item {
|
||||
flex: 1;
|
||||
height: 49px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
&.active {
|
||||
text {
|
||||
color: #ee7559;
|
||||
.logo-bg {
|
||||
width: 640rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.tab-bar-pic {
|
||||
display: none;
|
||||
background: #f9f9f9;
|
||||
.force-login__content {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
.user-avatar {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: rgba(132, 87, 8, 1);
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.login-notice {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: rgba(200, 150, 61, 1);
|
||||
line-height: 44rpx;
|
||||
width: 400rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 80rpx;
|
||||
}
|
||||
|
||||
.author-btn {
|
||||
width: 630rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
|
||||
box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
width: 630rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 30rpx;
|
||||
border-radius: 40rpx;
|
||||
border: 2rpx solid rgba(233, 180, 97, 1);
|
||||
background: none;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: rgba(233, 180, 97, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-bar-pic {
|
||||
display: block;
|
||||
background: #f9f9f9;
|
||||
|
||||
&.active {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-bar-pic {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background: #f9f9f9;
|
||||
|
||||
image {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-bar-pic-active {
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 10px;
|
||||
color: rgb(160, 160, 160);
|
||||
line-height: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-bar-bg {
|
||||
padding-top: 46px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view-item {
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view-item-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.getUserInfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 30px;
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
._van-dialog {
|
||||
z-index: 99999999999;
|
||||
}
|
||||
</style>
|
||||
|
@ -3,7 +3,8 @@
|
||||
<!-- 导航栏 -->
|
||||
<view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }">
|
||||
<view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">
|
||||
<view class="cu-bar fixed" :style="customStyle" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]">
|
||||
<view class="cu-bar fixed" :style="customStyle"
|
||||
:class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]">
|
||||
<view class="action">
|
||||
<text class="nav-title shopro-selector-rect">{{ info.name || '商城' }}</text>
|
||||
</view>
|
||||
@ -26,20 +27,25 @@
|
||||
<view class="banner-swiper-box mb10" v-if="banner.length>0">
|
||||
<canvas canvas-id="colorThief" class="hide-canvas"></canvas>
|
||||
<swiper class="banner-carousel shopro-selector-rect" circular @change="swiperChange" :autoplay="true">
|
||||
<swiper-item v-for="(item, index) in banner" :key="index" class="carousel-item " @tap="routerTo(item.path)">
|
||||
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load></image>
|
||||
<swiper-item v-for="(item, index) in banner" :key="index" class="carousel-item "
|
||||
@tap="routerTo(item.path)">
|
||||
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
|
||||
</image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="banner-swiper-dots">
|
||||
<text :class="swiperCurrent === index ? 'banner-dot-active' : 'banner-dot'" v-for="(dot, index) in banner.length"
|
||||
:key="index"></text>
|
||||
<text :class="swiperCurrent === index ? 'banner-dot-active' : 'banner-dot'"
|
||||
v-for="(dot, index) in banner.length" :key="index"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content_box">
|
||||
<Menu :list="menus"></Menu>
|
||||
|
||||
<Adv />
|
||||
<Groupon :detail="combinationList" />
|
||||
<PromotionGood :benefit="benefit"></PromotionGood>
|
||||
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose"></Coupon-window>
|
||||
</view>
|
||||
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose">
|
||||
</Coupon-window>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@ -54,7 +60,9 @@
|
||||
import PromotionGood from '@/components/PromotionGood';
|
||||
import CouponWindow from '@/components/CouponWindow';
|
||||
import Menu from '@/components/Menu';
|
||||
import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
|
||||
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
|
||||
import Adv from '@/components/sh-adv'
|
||||
import Groupon from '@/components/sh-groupon.vue'
|
||||
import {
|
||||
getHomeData,
|
||||
getShare
|
||||
@ -72,14 +80,16 @@
|
||||
components: {
|
||||
// swiper,
|
||||
// swiperSlide,
|
||||
uniNoticeBar,
|
||||
UniNoticeBar,
|
||||
GoodList,
|
||||
PromotionGood,
|
||||
CouponWindow,
|
||||
Menu,
|
||||
Adv,
|
||||
Groupon
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
data: function () {
|
||||
return {
|
||||
CustomBar: this.CustomBar,
|
||||
StatusBar: this.StatusBar,
|
||||
@ -94,7 +104,7 @@
|
||||
logoUrl: '',
|
||||
banner: [],
|
||||
menus: [],
|
||||
|
||||
combinationList: [],
|
||||
roll: [],
|
||||
activity: [],
|
||||
activityOne: {},
|
||||
@ -180,7 +190,7 @@
|
||||
},
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
onShow: function () {
|
||||
this.getLocation()
|
||||
let that = this;
|
||||
uni.showLoading({
|
||||
@ -198,6 +208,7 @@
|
||||
that.$set(that, 'lovely', res.data.lovely);
|
||||
that.$set(that, 'benefit', res.data.benefit);
|
||||
that.$set(that, 'couponList', res.data.couponList);
|
||||
that.$set(that, 'combinationList', res.data.combinationList);
|
||||
uni.hideLoading();
|
||||
that.setOpenShare();
|
||||
that.doColorThief()
|
||||
@ -236,7 +247,7 @@
|
||||
goGoodsPromotion() {
|
||||
this.$yrouter.push('/pages/shop/GoodsPromotion/index');
|
||||
},
|
||||
setOpenShare: function() {
|
||||
setOpenShare: function () {
|
||||
if (this.$deviceType == 'weixin') {
|
||||
getShare().then(res => {
|
||||
var data = res.data.data;
|
||||
@ -250,7 +261,7 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
startQr: function() {
|
||||
startQr: function () {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
let option = handleUrlParam(res.result)
|
||||
@ -307,9 +318,9 @@
|
||||
that.webviewId = ctx.webviewId;
|
||||
uni.getImageInfo({
|
||||
src: bannerItem.pic,
|
||||
success: function(image) {
|
||||
success: function (image) {
|
||||
ctx.drawImage(image.path, 0, 0, image.width, image.height);
|
||||
ctx.draw(true, function(e) {
|
||||
ctx.draw(true, function (e) {
|
||||
uni.canvasGetImageData({
|
||||
canvasId: 'colorThief',
|
||||
x: 0,
|
||||
@ -317,7 +328,8 @@
|
||||
width: parseInt(image.width),
|
||||
height: parseInt(image.height),
|
||||
success(res) {
|
||||
let bgcolor = colorThief(res.data).color().getHex();
|
||||
let bgcolor = colorThief(res.data).color()
|
||||
.getHex();
|
||||
|
||||
that.bgcolorAry[that.swiperCurrent] = bgcolor
|
||||
that.getbgcolor(bgcolor)
|
||||
@ -342,12 +354,16 @@
|
||||
this.bgcolor = e;
|
||||
},
|
||||
},
|
||||
created: async function() {
|
||||
created: async function () {
|
||||
await this.doColorThief();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.content_box {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.index {
|
||||
background-color: #fff;
|
||||
}
|
||||
@ -490,6 +506,4 @@
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
BIN
static/images/logo_bg.png
Normal file
BIN
static/images/logo_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.8 KiB |
BIN
static/images/title1.png
Normal file
BIN
static/images/title1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
510
uni.css
Normal file
510
uni.css
Normal file
@ -0,0 +1,510 @@
|
||||
@charset "UTF-8";
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/* ==================
|
||||
自定义变量
|
||||
==================== */
|
||||
/*盒子模型*/
|
||||
.mt2 {
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
|
||||
.mr2 {
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.mb2 {
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.ml2 {
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
|
||||
.mx2 {
|
||||
margin-left: 2rpx;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.my2 {
|
||||
margin-top: 2rpx;
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.ma2 {
|
||||
margin: 2rpx;
|
||||
}
|
||||
|
||||
.mt4 {
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.mr4 {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.mb4 {
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.ml4 {
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.mx4 {
|
||||
margin-left: 4rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.my4 {
|
||||
margin-top: 4rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.ma4 {
|
||||
margin: 4rpx;
|
||||
}
|
||||
|
||||
.mt8 {
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.mr8 {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.mb8 {
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.ml8 {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.mx8 {
|
||||
margin-left: 8rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.my8 {
|
||||
margin-top: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.ma8 {
|
||||
margin: 8rpx;
|
||||
}
|
||||
|
||||
.mt10 {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.mb10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.ml10 {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.mx10 {
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.my10 {
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.ma10 {
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.mr15 {
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.mb15 {
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.ml15 {
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.mx15 {
|
||||
margin-left: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.my15 {
|
||||
margin-top: 15rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.ma15 {
|
||||
margin: 15rpx;
|
||||
}
|
||||
|
||||
.mt20 {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.mr20 {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.mb20 {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ml20 {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.mx20 {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.my20 {
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ma20 {
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.mt24 {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.mr24 {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.mb24 {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.ml24 {
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.mx24 {
|
||||
margin-left: 24rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.my24 {
|
||||
margin-top: 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.ma24 {
|
||||
margin: 24rpx;
|
||||
}
|
||||
|
||||
.mt30 {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.mr30 {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.mb30 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.ml30 {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.mx30 {
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.my30 {
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.ma30 {
|
||||
margin: 30rpx;
|
||||
}
|
||||
|
||||
.pt2 {
|
||||
padding-top: 2rpx;
|
||||
}
|
||||
|
||||
.pr2 {
|
||||
padding-right: 2rpx;
|
||||
}
|
||||
|
||||
.pb2 {
|
||||
padding-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.pl2 {
|
||||
padding-left: 2rpx;
|
||||
}
|
||||
|
||||
.px2 {
|
||||
padding-left: 2rpx;
|
||||
padding-right: 2rpx;
|
||||
}
|
||||
|
||||
.py2 {
|
||||
padding-top: 2rpx;
|
||||
padding-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.pa2 {
|
||||
padding: 2rpx;
|
||||
}
|
||||
|
||||
.pt4 {
|
||||
padding-top: 4rpx;
|
||||
}
|
||||
|
||||
.pr4 {
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
|
||||
.pb4 {
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.pl4 {
|
||||
padding-left: 4rpx;
|
||||
}
|
||||
|
||||
.px4 {
|
||||
padding-left: 4rpx;
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
|
||||
.py4 {
|
||||
padding-top: 4rpx;
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.pa4 {
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
.pt8 {
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
|
||||
.pr8 {
|
||||
padding-right: 8rpx;
|
||||
}
|
||||
|
||||
.pb8 {
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.pl8 {
|
||||
padding-left: 8rpx;
|
||||
}
|
||||
|
||||
.px8 {
|
||||
padding-left: 8rpx;
|
||||
padding-right: 8rpx;
|
||||
}
|
||||
|
||||
.py8 {
|
||||
padding-top: 8rpx;
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.pa8 {
|
||||
padding: 8rpx;
|
||||
}
|
||||
|
||||
.pt10 {
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.pr10 {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.pb10 {
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.pl10 {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.px10 {
|
||||
padding-left: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.py10 {
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.pa10 {
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.pt15 {
|
||||
padding-top: 15rpx;
|
||||
}
|
||||
|
||||
.pr15 {
|
||||
padding-right: 15rpx;
|
||||
}
|
||||
|
||||
.pb15 {
|
||||
padding-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.pl15 {
|
||||
padding-left: 15rpx;
|
||||
}
|
||||
|
||||
.px15 {
|
||||
padding-left: 15rpx;
|
||||
padding-right: 15rpx;
|
||||
}
|
||||
|
||||
.py15 {
|
||||
padding-top: 15rpx;
|
||||
padding-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.pa15 {
|
||||
padding: 15rpx;
|
||||
}
|
||||
|
||||
.pt20 {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.pr20 {
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.pb20 {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.pl20 {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.px20 {
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.py20 {
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.pa20 {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.pt24 {
|
||||
padding-top: 24rpx;
|
||||
}
|
||||
|
||||
.pr24 {
|
||||
padding-right: 24rpx;
|
||||
}
|
||||
|
||||
.pb24 {
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.pl24 {
|
||||
padding-left: 24rpx;
|
||||
}
|
||||
|
||||
.px24 {
|
||||
padding-left: 24rpx;
|
||||
padding-right: 24rpx;
|
||||
}
|
||||
|
||||
.py24 {
|
||||
padding-top: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.pa24 {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.pt30 {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.pr30 {
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.pb30 {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.pl30 {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.px30 {
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.py30 {
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.pa30 {
|
||||
padding: 30rpx;
|
||||
}
|
||||
/*# sourceMappingURL=uni.css.map */
|
9
uni.css.map
Normal file
9
uni.css.map
Normal file
File diff suppressed because one or more lines are too long
1
uni.min.css
vendored
Normal file
1
uni.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.mt2{margin-top:2rpx}.mr2{margin-right:2rpx}.mb2{margin-bottom:2rpx}.ml2{margin-left:2rpx}.mx2{margin-left:2rpx;margin-right:2rpx}.my2{margin-top:2rpx;margin-bottom:2rpx}.ma2{margin:2rpx}.mt4{margin-top:4rpx}.mr4{margin-right:4rpx}.mb4{margin-bottom:4rpx}.ml4{margin-left:4rpx}.mx4{margin-left:4rpx;margin-right:4rpx}.my4{margin-top:4rpx;margin-bottom:4rpx}.ma4{margin:4rpx}.mt8{margin-top:8rpx}.mr8{margin-right:8rpx}.mb8{margin-bottom:8rpx}.ml8{margin-left:8rpx}.mx8{margin-left:8rpx;margin-right:8rpx}.my8{margin-top:8rpx;margin-bottom:8rpx}.ma8{margin:8rpx}.mt10{margin-top:10rpx}.mr10{margin-right:10rpx}.mb10{margin-bottom:10rpx}.ml10{margin-left:10rpx}.mx10{margin-left:10rpx;margin-right:10rpx}.my10{margin-top:10rpx;margin-bottom:10rpx}.ma10{margin:10rpx}.mt15{margin-top:15rpx}.mr15{margin-right:15rpx}.mb15{margin-bottom:15rpx}.ml15{margin-left:15rpx}.mx15{margin-left:15rpx;margin-right:15rpx}.my15{margin-top:15rpx;margin-bottom:15rpx}.ma15{margin:15rpx}.mt20{margin-top:20rpx}.mr20{margin-right:20rpx}.mb20{margin-bottom:20rpx}.ml20{margin-left:20rpx}.mx20{margin-left:20rpx;margin-right:20rpx}.my20{margin-top:20rpx;margin-bottom:20rpx}.ma20{margin:20rpx}.mt24{margin-top:24rpx}.mr24{margin-right:24rpx}.mb24{margin-bottom:24rpx}.ml24{margin-left:24rpx}.mx24{margin-left:24rpx;margin-right:24rpx}.my24{margin-top:24rpx;margin-bottom:24rpx}.ma24{margin:24rpx}.mt30{margin-top:30rpx}.mr30{margin-right:30rpx}.mb30{margin-bottom:30rpx}.ml30{margin-left:30rpx}.mx30{margin-left:30rpx;margin-right:30rpx}.my30{margin-top:30rpx;margin-bottom:30rpx}.ma30{margin:30rpx}.pt2{padding-top:2rpx}.pr2{padding-right:2rpx}.pb2{padding-bottom:2rpx}.pl2{padding-left:2rpx}.px2{padding-left:2rpx;padding-right:2rpx}.py2{padding-top:2rpx;padding-bottom:2rpx}.pa2{padding:2rpx}.pt4{padding-top:4rpx}.pr4{padding-right:4rpx}.pb4{padding-bottom:4rpx}.pl4{padding-left:4rpx}.px4{padding-left:4rpx;padding-right:4rpx}.py4{padding-top:4rpx;padding-bottom:4rpx}.pa4{padding:4rpx}.pt8{padding-top:8rpx}.pr8{padding-right:8rpx}.pb8{padding-bottom:8rpx}.pl8{padding-left:8rpx}.px8{padding-left:8rpx;padding-right:8rpx}.py8{padding-top:8rpx;padding-bottom:8rpx}.pa8{padding:8rpx}.pt10{padding-top:10rpx}.pr10{padding-right:10rpx}.pb10{padding-bottom:10rpx}.pl10{padding-left:10rpx}.px10{padding-left:10rpx;padding-right:10rpx}.py10{padding-top:10rpx;padding-bottom:10rpx}.pa10{padding:10rpx}.pt15{padding-top:15rpx}.pr15{padding-right:15rpx}.pb15{padding-bottom:15rpx}.pl15{padding-left:15rpx}.px15{padding-left:15rpx;padding-right:15rpx}.py15{padding-top:15rpx;padding-bottom:15rpx}.pa15{padding:15rpx}.pt20{padding-top:20rpx}.pr20{padding-right:20rpx}.pb20{padding-bottom:20rpx}.pl20{padding-left:20rpx}.px20{padding-left:20rpx;padding-right:20rpx}.py20{padding-top:20rpx;padding-bottom:20rpx}.pa20{padding:20rpx}.pt24{padding-top:24rpx}.pr24{padding-right:24rpx}.pb24{padding-bottom:24rpx}.pl24{padding-left:24rpx}.px24{padding-left:24rpx;padding-right:24rpx}.py24{padding-top:24rpx;padding-bottom:24rpx}.pa24{padding:24rpx}.pt30{padding-top:30rpx}.pr30{padding-right:30rpx}.pb30{padding-bottom:30rpx}.pl30{padding-left:30rpx}.px30{padding-left:30rpx;padding-right:30rpx}.py30{padding-top:30rpx;padding-bottom:30rpx}.pa30{padding:30rpx}
|
54
uni.scss
54
uni.scss
@ -74,3 +74,57 @@ $uni-color-subtitle: #555555; // 二级标题颜色
|
||||
$uni-font-size-subtitle:36upx;
|
||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||
$uni-font-size-paragraph:30upx;
|
||||
|
||||
|
||||
|
||||
/* ==================
|
||||
自定义变量
|
||||
==================== */
|
||||
$spaceTypes: (
|
||||
m: margin,
|
||||
p: padding
|
||||
);
|
||||
$spaceDirections: (
|
||||
t: top,
|
||||
r: right,
|
||||
b: bottom,
|
||||
l: left
|
||||
);
|
||||
$spaceSizes: (
|
||||
2: 2rpx,
|
||||
4: 4rpx,
|
||||
8: 8rpx,
|
||||
10: 10rpx,
|
||||
15: 15rpx,
|
||||
20: 20rpx,
|
||||
24: 24rpx,
|
||||
30: 30rpx
|
||||
);
|
||||
|
||||
|
||||
/*盒子模型*/
|
||||
@each $typeKey, $type in $spaceTypes {
|
||||
@each $sizeKey, $size in $spaceSizes {
|
||||
// margin-top:10rpx
|
||||
@each $directionKey, $direction in $spaceDirections {
|
||||
.#{$typeKey}#{$directionKey}#{$sizeKey} {
|
||||
#{$type}-#{$direction}: $size;
|
||||
}
|
||||
}
|
||||
|
||||
// margin: 10rpx 0;
|
||||
.#{$typeKey}x#{$sizeKey} {
|
||||
#{$type}-left: $size;
|
||||
#{$type}-right: $size;
|
||||
}
|
||||
.#{$typeKey}y#{$sizeKey} {
|
||||
#{$type}-top: $size;
|
||||
#{$type}-bottom: $size;
|
||||
}
|
||||
|
||||
// margin: 10rpx ;
|
||||
.#{$typeKey}a#{$sizeKey} {
|
||||
#{$type}: $size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,10 @@ export function isType(arg, type) {
|
||||
}
|
||||
|
||||
export function isWeixin() {
|
||||
return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
|
||||
if(navigator&&navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1){
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export function parseQuery() {
|
||||
|
Reference in New Issue
Block a user