Browse Source

修改样式错误的问题

master
Gao xiaosong 4 years ago
parent
commit
15a6af63ac
  1. 32
      assets/css/style.css
  2. 38
      assets/css/style.less
  3. 4
      components/t-goods-item/t-goods-item.vue
  4. 73
      pages/Loading/index.vue
  5. 58
      pages/activity/GoodsGroup/index.vue
  6. 6
      pages/activity/GoodsSeckill/index.vue
  7. 2
      pages/activity/GroupDetails/index.vue
  8. 2
      pages/activity/SeckillDetails/index.vue
  9. 2
      pages/shop/GoodsCon/index.vue
  10. 2
      pages/shop/IntegralGoodsCon/index.vue
  11. 3
      utils/request.js

32
assets/css/style.css

@ -2423,13 +2423,35 @@ page {
margin-top: 20rpx;
}
.product-con .product-intro .title {
position: relative;
width: 50%;
margin: 1.5em auto;
line-height: 1.5em;
font-size: 30rpx;
color: #282828;
height: 86rpx;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.product-con .product-intro .title:after {
content: ' ';
position: absolute;
border-bottom: 0.5px solid #e5e5e5;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5);
width: 100%;
background-color: #fff;
text-align: center;
line-height: 86rpx;
top: 9px;
left: 0;
z-index: -1;
}
.product-con .product-intro .title text {
background: #f5f5f5;
padding: 0 20rpx;
}
.product-con .product-intro .conter {
width: 100%;

38
assets/css/style.less

@ -2656,13 +2656,39 @@ page {
}
.product-con .product-intro .title {
font-size: 0.3 * 100rpx;
color: #282828;
height: 0.86 * 100rpx;
// font-size: 0.3 * 100rpx;
// color: #282828;
// height: 0.86 * 100rpx;
// width: 100%;
// background-color: #fff;
// text-align: center;
// line-height: 0.86 * 100rpx;
position: relative;
width: 50%;
margin: 1.5em auto;
line-height: 1.5em;
font-size: 30rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
&:after {
content: ' ';
position: absolute;
border-bottom: 0.5px solid #e5e5e5;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
width: 100%;
background-color: #fff;
text-align: center;
line-height: 0.86 * 100rpx;
top: 9px;
left: 0;
z-index: -1;
}
text {
background: #f5f5f5;
padding: 0 20rpx;
}
}
.product-con .product-intro .conter {

4
components/t-goods-item/t-goods-item.vue

@ -23,10 +23,10 @@
<!-- <tui-button :width="status == 3 ? '146rpx' : '144rpx'" :height="status == 3 ? '60rpx' : '50rpx'" :size="status == 3 ? 26 : 24" :type="status == 1 ? 'gray' : 'danger'" :disabled="status == 1" :plain="status == 3">
{{ status | getBtnText(item.subscribe) }}
</tui-button> -->
<view class="grab bg-color-red" v-if="item.status === 1 && item.stock > 0" @click="goDetail()">马上抢</view>
<view class="grab bg-color-red" v-if="item.status === 0 && item.stock > 0" @click="goDetail()">马上抢</view>
<view class="grab" v-if="item.status === 1 && item.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 class="grab bg-color-red" v-if="item.status === 1">已结束</view>
</view>
</view>
</view>

73
pages/Loading/index.vue

@ -1,42 +1,29 @@
<template>
<view class="lottie-bg">
<view id="lottie">
<image src="../../static/images/live-logo.gif" rel="preload" mode="widthFix" style="width: 100%;" />
<image :src="`${$VUE_APP_RESOURCES_URL}/images/live-logo.gif`" rel="preload" mode="widthFix" style="width: 100%;" />
</view>
</view>
</template>
<script>
import {
mapState,
mapMutations,
mapActions
} from "vuex";
import { mapState, mapMutations, mapActions } from 'vuex'
//
// import request from "@//api/request";
import {
wxappAuth,
} from "@/api/user";
import dayjs from "dayjs";
import store from "@/store";
import cookie from "@/utils/store/cookie";
import {
parseQuery,
login,
handleQrCode,
getCurrentPageUrl,
handleUrlParam,
getCurrentPageUrlWithArgs
} from "@/utils";
import { wxappAuth } from '@/api/user'
import dayjs from 'dayjs'
import store from '@/store'
import cookie from '@/utils/store/cookie'
import { parseQuery, login, handleQrCode, getCurrentPageUrl, handleUrlParam, getCurrentPageUrlWithArgs } from '@/utils'
export default {
name: "Loading",
name: 'Loading',
data() {
return {};
return {}
},
onShow() {
console.log('getUser')
var url = handleQrCode();
var url = handleQrCode()
if (!url) {
url = handleUrlParam(getCurrentPageUrlWithArgs())
}
@ -44,49 +31,49 @@
console.log('判断是否是分销')
//
if (url) {
let urlSpread = parseInt(url.spread);
let urlSpread = parseInt(url.spread)
if (urlSpread) {
cookie.set("spread", urlSpread);
cookie.set('spread', urlSpread)
}
}
if (this.$deviceType == "app" || this.$deviceType == "weixinh5") {
if (this.$deviceType == 'app' || this.$deviceType == 'weixinh5') {
this.$yrouter.switchTab({
path: "/pages/home/index"
});
return;
path: '/pages/home/index',
})
return
}
if (this.$store.getters.token) {
// token
console.log('登录状态存在,直接进页面')
this.toLaunch();
return;
this.toLaunch()
return
}
console.log('进行登录操作')
login().finally(() => {
this.$yrouter.switchTab({
path: "/pages/home/index"
});
});
path: '/pages/home/index',
})
})
},
methods: {
...mapActions(["changeAuthorization", "setUserInfo", "getUser"]),
...mapActions(['changeAuthorization', 'setUserInfo', 'getUser']),
toLaunch() {
console.log("loading home");
this.changeAuthorization(false);
console.log('loading home')
this.changeAuthorization(false)
let redirect = cookie.get('redirect').replace(/\ /g, '')
if (redirect && redirect.indexOf('/pages') != -1) {
this.$yrouter.replace({
path: '/pages' + redirect.split('/pages')[1],
});
cookie.remove('redirect');
})
cookie.remove('redirect')
} else {
this.$yrouter.switchTab({
path: "/pages/home/index"
});
}
path: '/pages/home/index',
})
}
},
},
}
};
</script>
<style scoped lang="less">

58
pages/activity/GoodsGroup/index.vue

@ -2,15 +2,14 @@
<view class="page_box">
<view class="content_box">
<scroll-view class="scroll-box" scroll-y enable-back-to-top scroll-with-animation @scrolltolower="loadMore">
<view class="group-wrap">
<view class="group-wrap" :style="`background: url('${$VUE_APP_RESOURCES_URL}/images/index-bg.png') no-repeat;`">
<view class="group-head x-bc">
<text class="group-head__title">爆款拼团</text>
<text class="group-head__notice">省钱省心限时拼</text>
</view>
<view class="group-box">
<view class="goods-item" v-for="(groupon, index) in grouponList" :key="groupon.id">
<activity-card :cid="groupon.id" :title="groupon.title" :info="groupon.info" :img="groupon.image"
:price="groupon.price" :productPrice="groupon.productPrice">
<activity-card :cid="groupon.id" :title="groupon.title" :info="groupon.info" :img="groupon.image" :price="groupon.price" :productPrice="groupon.productPrice">
<block slot="tag">
<view class="tag" v-if="index < 3">TOP{{ index + 1 }}</view>
</block>
@ -23,8 +22,7 @@
<text class="group-num">{{ groupon.people || 0 }}人团</text>
</view>
</block>
<block slot="btn"><button class="cu-btn buy-btn"
@tap.stop="jump('/pages/activity/GroupDetails/index', { id: groupon.id })">马上拼</button></block>
<block slot="btn"><button class="cu-btn buy-btn" @tap.stop="jump('/pages/activity/GroupDetails/index', { id: groupon.id })">马上拼</button></block>
</activity-card>
</view>
</view>
@ -36,17 +34,14 @@
</template>
<script>
import activityCard from './children/activity-card.vue';
import Loading from "@/components/Loading";
import activityCard from './children/activity-card.vue'
import Loading from '@/components/Loading'
import {
getCombinationList
} from "@/api/activity";
import { getCombinationList } from '@/api/activity'
export default {
components: {
activityCard,
Loading
Loading,
},
data() {
return {
@ -54,18 +49,18 @@
img: '/static/imgs/empty/empty_goods.png',
tip: '还没有拼团商品噢,去首页看看吧~',
path: '/pages/index/index',
pathText: '去首页逛逛'
pathText: '去首页逛逛',
},
loaded: false,
loading: false,
lastPage: 0,
currentPage: 1,
limit: 10,
grouponList: []
};
grouponList: [],
}
},
onLoad() {
this.getGrouponList();
this.getGrouponList()
},
onPullDownRefresh() {},
computed: {},
@ -74,27 +69,25 @@
jump(path, parmas) {
this.$yrouter.push({
path: path,
query: parmas
});
query: parmas,
})
},
//
loadMore() {
},
loadMore() {},
//
getGrouponList() {
let that = this;
if (this.loading || this.loaded) return;
this.loading = true;
let that = this
if (this.loading || this.loaded) return
this.loading = true
getCombinationList({
page: that.currentPage,
limit: this.limit
limit: this.limit,
}).then(res => {
that.grouponList = that.grouponList.concat(res.data.storeCombinationQueryVos)
this.currentPage++;
this.loaded = res.data.storeCombinationQueryVos.length < this.limit;
this.loading = false;
});
this.currentPage++
this.loaded = res.data.storeCombinationQueryVos.length < this.limit
this.loading = false
})
// that.$api('goods.grouponList', {
// page: that.currentPage
@ -111,17 +104,16 @@
// }
// }
// });
}
},
},
onReachBottom() {
!this.loading && this.getGrouponList();
!this.loading && this.getGrouponList()
},
}
};
</script>
<style lang="scss">
.group-wrap {
background: url('https://h5.yixiang.co/images/index-bg.png') no-repeat;
background-size: 100% 374rpx;
}

6
pages/activity/GoodsSeckill/index.vue

@ -35,9 +35,9 @@
</view>
</tui-divider>
</view>
<view class="tui-countdown__box" v-if="item.status == 1">
<text>距离{{ item.status == 2 ? '结束还剩' : '开始还有' }}</text>
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="datatime / 1000"></count-down>
<view class="tui-countdown__box" v-if="item.status == 1 || item.status == 2">
<text>距离{{ item.status == 1 ? '结束还剩' : '开始还有' }}</text>
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="item.stop"></count-down>
</view>
</view>
</block>

2
pages/activity/GroupDetails/index.vue

@ -117,7 +117,7 @@
<!-- 产品介绍 -->
<view class="product-intro">
<view class="title">产品介绍</view>
<text class="title"><text>产品介绍</text></text>
<view class="conter" v-html="storeInfo.description"></view>
<!-- <view class="conter" v-html=""></view> -->
</view>

2
pages/activity/SeckillDetails/index.vue

@ -47,7 +47,7 @@
<view class="iconfont icon-jiantou"></view>
</view>
<view class="product-intro">
<view class="title">产品介绍</view>
<text class="title"><text>产品介绍</text></text>
<view class="conter" v-html="storeInfo.description"></view>
</view>

2
pages/shop/GoodsCon/index.vue

@ -120,7 +120,7 @@
<!-- 商品详情 -->
<view class="product-intro">
<text class="title">产品介绍</text>
<text class="title"><text>产品介绍</text></text>
<view class="conter" v-html="storeInfo.description"></view>
</view>

2
pages/shop/IntegralGoodsCon/index.vue

@ -41,7 +41,7 @@
<!-- 商品详情 -->
<view class="product-intro">
<text class="title">产品介绍</text>
<text class="title"><text>产品介绍</text></text>
<view class="conter" v-html="storeInfo.description"></view>
</view>

3
utils/request.js

@ -89,7 +89,6 @@ function baseRequest(options) {
})
.then(res => {
const data = res.data || {}
if (res.status !== 200) {
return Promise.reject({ msg: '请求失败', res, data })
}
@ -100,7 +99,7 @@ function baseRequest(options) {
} else if (data.status === 200) {
return Promise.resolve(data, res)
} else if (data.status == 5101) {
return Promise.resolve(data, res)
return Promise.reject({ msg: res.data.msg, res, data })
} else {
return Promise.reject({ msg: res.data.msg, res, data })
}

Loading…
Cancel
Save