From 15a6af63ac96959dac3322a3a86764bb6c3175df Mon Sep 17 00:00:00 2001
From: Gao xiaosong <704041637@qq.com>
Date: Sun, 11 Apr 2021 19:09:59 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F=E9=94=99?=
=?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/css/style.css | 32 ++-
assets/css/style.less | 40 ++-
components/t-goods-item/t-goods-item.vue | 4 +-
pages/Loading/index.vue | 183 ++++++------
pages/activity/GoodsGroup/index.vue | 336 +++++++++++------------
pages/activity/GoodsSeckill/index.vue | 6 +-
pages/activity/GroupDetails/index.vue | 2 +-
pages/activity/SeckillDetails/index.vue | 2 +-
pages/shop/GoodsCon/index.vue | 2 +-
pages/shop/IntegralGoodsCon/index.vue | 62 ++---
utils/request.js | 3 +-
11 files changed, 349 insertions(+), 323 deletions(-)
diff --git a/assets/css/style.css b/assets/css/style.css
index 02dc390..691507d 100644
--- a/assets/css/style.css
+++ b/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%;
diff --git a/assets/css/style.less b/assets/css/style.less
index c75e481..c142a62 100644
--- a/assets/css/style.less
+++ b/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;
- width: 100%;
- background-color: #fff;
- text-align: center;
- line-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%;
+ top: 9px;
+ left: 0;
+ z-index: -1;
+ }
+ text {
+ background: #f5f5f5;
+ padding: 0 20rpx;
+ }
}
.product-con .product-intro .conter {
diff --git a/components/t-goods-item/t-goods-item.vue b/components/t-goods-item/t-goods-item.vue
index 24b3fcf..1543b89 100644
--- a/components/t-goods-item/t-goods-item.vue
+++ b/components/t-goods-item/t-goods-item.vue
@@ -23,10 +23,10 @@
- 马上抢
+ 马上抢
已售磬
即将开始
- 已结束
+ 已结束
diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue
index e3d6683..34aba0f 100644
--- a/pages/Loading/index.vue
+++ b/pages/Loading/index.vue
@@ -1,116 +1,103 @@
-
+
diff --git a/pages/activity/GoodsGroup/index.vue b/pages/activity/GoodsGroup/index.vue
index 190bde6..930b04e 100644
--- a/pages/activity/GoodsGroup/index.vue
+++ b/pages/activity/GoodsGroup/index.vue
@@ -2,15 +2,14 @@
-
+
爆款拼团
省钱省心限时拼
-
+
TOP{{ index + 1 }}
@@ -23,8 +22,7 @@
{{ groupon.people || 0 }}人团
-
+
@@ -36,197 +34,191 @@
diff --git a/pages/activity/GoodsSeckill/index.vue b/pages/activity/GoodsSeckill/index.vue
index 74ee02e..05583fb 100644
--- a/pages/activity/GoodsSeckill/index.vue
+++ b/pages/activity/GoodsSeckill/index.vue
@@ -35,9 +35,9 @@
-
- 距离{{ item.status == 2 ? '结束还剩' : '开始还有' }}
-
+
+ 距离{{ item.status == 1 ? '结束还剩' : '开始还有' }}
+
diff --git a/pages/activity/GroupDetails/index.vue b/pages/activity/GroupDetails/index.vue
index 504b3f2..35d473e 100644
--- a/pages/activity/GroupDetails/index.vue
+++ b/pages/activity/GroupDetails/index.vue
@@ -117,7 +117,7 @@
- 产品介绍
+ 产品介绍
diff --git a/pages/activity/SeckillDetails/index.vue b/pages/activity/SeckillDetails/index.vue
index 0720f27..8eba8d4 100644
--- a/pages/activity/SeckillDetails/index.vue
+++ b/pages/activity/SeckillDetails/index.vue
@@ -47,7 +47,7 @@
- 产品介绍
+ 产品介绍
diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue
index 9b8ef55..2838246 100644
--- a/pages/shop/GoodsCon/index.vue
+++ b/pages/shop/GoodsCon/index.vue
@@ -120,7 +120,7 @@
- 产品介绍
+ 产品介绍
diff --git a/pages/shop/IntegralGoodsCon/index.vue b/pages/shop/IntegralGoodsCon/index.vue
index 414f703..e8937c1 100644
--- a/pages/shop/IntegralGoodsCon/index.vue
+++ b/pages/shop/IntegralGoodsCon/index.vue
@@ -41,7 +41,7 @@
- 产品介绍
+ 产品介绍
@@ -96,7 +96,7 @@ export default {
StorePoster,
ShareInfo,
},
- data: function () {
+ data: function() {
return {
shareInfoStatus: false,
weixinStatus: false,
@@ -154,7 +154,7 @@ export default {
}
},
computed: mapGetters(['isLogin', 'location']),
- mounted: function () {
+ mounted: function() {
this.$store.commit('get_to', 'goodcon')
let url = handleQrCode()
if (!url) {
@@ -185,7 +185,7 @@ export default {
},
},
methods: {
- onShareAppMessage: function () {
+ onShareAppMessage: function() {
return {
title: this.storeInfo.storeName,
imageUrl: this.storeInfo.image,
@@ -235,7 +235,7 @@ export default {
},
})
},
- showChang: function (data) {
+ showChang: function(data) {
this.$yrouter.push({
path: '/pages/map/index',
query: data,
@@ -244,23 +244,23 @@ export default {
updateTitle() {
// document.title = this.storeInfo.storeName || this.$yroute.meta.title;
},
- setShareInfoStatus: function () {
+ setShareInfoStatus: function() {
this.shareInfoStatus = !this.shareInfoStatus
this.posters = false
},
- shareCode: function () {
+ shareCode: function() {
var that = this
getProductCode(that.id).then(res => {
that.posterData.code = res.data.code
that.listenerActionSheet()
})
},
- setPosterImageStatus: function () {
+ setPosterImageStatus: function() {
this.posterImageStatus = !this.posterImageStatus
this.posters = false
},
//产品详情接口;
- productCon: function () {
+ productCon: function() {
let that = this
let from = this.location
if (this.$deviceType == 'app') {
@@ -320,7 +320,7 @@ export default {
})
},
//默认选中属性;
- DefaultSelect: function () {
+ DefaultSelect: function() {
let productAttr = this.attr.productAttr
let value = []
for (let i = 0; i < productAttr.length; i++) {
@@ -362,7 +362,7 @@ export default {
}
},
//购物车;
- ChangeCartNum: function (changeValue) {
+ ChangeCartNum: function(changeValue) {
//changeValue:是否 加|减
//获取当前变动属性
let productSelect = this.productValue[this.attrValue]
@@ -395,29 +395,29 @@ export default {
}
},
//将父级向子集多次传送的函数合二为一;
- changeFun: function (opt) {
+ changeFun: function(opt) {
if (typeof opt !== 'object') opt = {}
let action = opt.action || ''
let value = opt.value === undefined ? '' : opt.value
this[action] && this[action](value)
},
//打开优惠券插件;
- couponTap: function () {
+ couponTap: function() {
let that = this
that.coupons()
that.coupon.coupon = true
},
- changecoupon: function (msg) {
+ changecoupon: function(msg) {
this.coupon.coupon = msg
this.coupons()
},
- currentcoupon: function (res) {
+ currentcoupon: function(res) {
let that = this
that.coupon.coupon = false
that.$set(that.coupon.list[res], 'is_use', true)
},
//可领取优惠券接口;
- coupons: function () {
+ coupons: function() {
let that = this,
q = {
page: 1,
@@ -429,18 +429,18 @@ export default {
})
},
//打开属性插件;
- selecAttrTap: function () {
+ selecAttrTap: function() {
this.attr.cartAttr = true
this.isOpen = true
},
- changeattr: function (msg) {
+ changeattr: function(msg) {
// 修改了规格
console.log(msg)
this.attr.cartAttr = msg
this.isOpen = false
},
//选择属性;
- ChangeAttr: function (res) {
+ ChangeAttr: function(res) {
// 修改了规格
let productSelect = this.productValue[res.value]
@@ -467,27 +467,27 @@ export default {
}
},
//收藏商品
- setCollect: function () {
+ setCollect: function() {
let that = this,
id = that.storeInfo.id,
category = 'collect'
if (that.storeInfo.userCollect) {
- getCollectDel(id, category).then(function () {
+ getCollectDel(id, category).then(function() {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
} else {
- getCollectAdd(id, category).then(function () {
+ getCollectAdd(id, category).then(function() {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
}
},
// 点击加入购物车按钮
- joinCart: function () {
+ joinCart: function() {
//0=加入购物车
this.goCat(0)
},
// 加入购物车;
- goCat: function (news) {
+ goCat: function(news) {
let that = this,
productSelect = that.productValue[this.attrValue]
//打开属性
@@ -516,7 +516,7 @@ export default {
uniqueId: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : '',
}
postCartAdd(q)
- .then(function (res) {
+ .then(function(res) {
console.log(res)
that.isOpen = false
that.attr.cartAttr = false
@@ -558,7 +558,7 @@ export default {
})
},
//获取购物车数量
- getCartCount: function (isAnima) {
+ getCartCount: function(isAnima) {
let that = this
const isLogin = that.isLogin
if (isLogin) {
@@ -569,7 +569,7 @@ export default {
//加入购物车后重置属性
if (isAnima) {
that.animated = true
- setTimeout(function () {
+ setTimeout(function() {
that.animated = false
}, 500)
}
@@ -577,20 +577,20 @@ export default {
}
},
//立即购买;
- tapBuy: function () {
+ tapBuy: function() {
// 1=直接购买
this.goCat(1)
},
- listenerActionSheet: function () {
+ listenerActionSheet: function() {
if (isWeixin() === true) {
this.weixinStatus = true
}
this.posters = true
},
- listenerActionClose: function () {
+ listenerActionClose: function() {
this.posters = false
},
- setOpenShare: function () {
+ setOpenShare: function() {
var data = this.storeInfo
var href = this.location.href
if (this.$deviceType == 'weixin') {
diff --git a/utils/request.js b/utils/request.js
index 323edef..b9db3d4 100644
--- a/utils/request.js
+++ b/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 })
}