修改拼团样式的问题,修改拼团进来显示已成功的问题

This commit is contained in:
Gaoxs
2020-09-17 19:37:34 +08:00
parent 4d9486b484
commit e53d9455bf
10 changed files with 205 additions and 161 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4488,29 +4488,63 @@ page {
position: relative; position: relative;
} }
.bargain .wrapper .pictxt { .bargain .goodsDetails .conter .bargain .wrapper .pictxt {
padding: 26rpx 0; padding: 26rpx 0;
} }
.bargain .bargain-box{
.bargain .bargain-box {
margin-bottom: 20rpx !important; margin-bottom: 20rpx !important;
} }
.bargain .wrapper .pictxt .pictrue {
width: 1.8*100rpx; .bargain .bargain-product .pictxt .pictrue {
height: 1.8*100rpx; width: 140rpx;
height: 140rpx;
position: relative; position: relative;
margin-right: 30rpx;
image {
width: 140rpx;
height: 140rpx;
}
}
.bargain .bargain-product .text {
flex: 1;
font-size: 26rpx;
}
.bargain .wrapper.on {
// padding-bottom: 0 !important;
}
.bargain .wrapper .time {
font-size: 28rpx;
color: #999;
text-align: center;
color: #eb3729 !important;
}
.bargain .user .pictxt .bargain-header {
display: flex;
align-items: center;
justify-content: center;
}
.bargain .user .pictxt .pictrue {
margin-right: 20rpx;
} }
.bargain .wrapper .pictxt .pictrue image { .bargain .user .pictxt .pictrue image {
width: 100%; width: 60rpx;
height: 100%; height: 60rpx;
border-radius: 0.06*100rpx; border-radius: 50%;
} }
.bargain .wrapper .pictxt .text { .bargain .user.on .pictxt .text {
width: 3.95*100rpx; font-size: 22rpx;
font-size: 0.28*100rpx; color: #999;
color: #282828; text-align: center;
} }
.bargain .wrapper .pictxt .text .money { .bargain .wrapper .pictxt .text .money {
@ -4596,7 +4630,7 @@ page {
.bargain .wrapper .lock, .bargain .wrapper .lock,
.bargain .bargainGang .lock, .bargain .bargainGang .lock,
.bargain .goodsDetails .lock { .bargain .goodsDetails .lock {
background-image: url('https://wx.yixiang.co/static/images/lock.png'); // background-image: url('https://wx.yixiang.co/static/images/lock.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 5.48*100rpx; width: 5.48*100rpx;
@ -4617,7 +4651,6 @@ page {
font-size: 0.32*100rpx; font-size: 0.32*100rpx;
font-weight: bold; font-weight: bold;
height: 0.8*100rpx; height: 0.8*100rpx;
margin-top: 0.3*100rpx;
} }
.bargain .bargainGang .title .pictrue, .bargain .bargainGang .title .pictrue,
@ -9315,3 +9348,14 @@ rich-text {
.container { .container {
height: 100%; height: 100%;
} }
.bargainGang.bargain-box,.goodsDetails.bargain-box{
padding-top:0 !important;
.content{
margin-top: 0;
}
}
.bargain .bargain-product.wrapper .cu-progress{
margin-top: 30rpx;
}

View File

@ -7,15 +7,12 @@
<text class="status-text">{{ liveStatus[detail.liveStatus].title }}</text> <text class="status-text">{{ liveStatus[detail.liveStatus].title }}</text>
</view> </view>
<view class="item-title" :style="{ width: wh + 'rpx' }">{{ detail.name }}</view> <view class="item-title" :style="{ width: wh + 'rpx' }">{{ detail.name }}</view>
<!-- <image v-if="detail.liveStatus == 101" class="like-img" src="http://Shop.7wpp.com/imgs/live/zan.gif" mode=""></image> -->
</view> </view>
<view class="live-bottom" :style="{ width: wh + 'rpx' }"> <view class="live-bottom" :style="{ width: wh + 'rpx' }">
<view class="live-info"> <view class="live-info">
<view class="info-box"> <view class="info-box">
<!-- <image class="info-avatar" :src="detail.anchor_img" mode=""></image> -->
<view class="info-name">{{ detail.anchorName }}</view> <view class="info-name">{{ detail.anchorName }}</view>
</view> </view>
<!-- <text class="views">15W观看</text> -->
</view> </view>
<slot name="liveGoods"> <slot name="liveGoods">
<view class="live-goods" v-if="detail.product.length"> <view class="live-goods" v-if="detail.product.length">

View File

@ -1,65 +1,70 @@
<template> <template>
<view> <view class="cu-custom" :style="[{height:CustomBar + 'px'}]">
<view class="cu-custom" :style="[{height:CustomBar + 'px'}]"> <view class="cu-bar fixed" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]">
<view class="cu-bar fixed" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]"> <view class="action" @tap="BackPage" v-if="isBack">
<view class="action" @tap="BackPage" v-if="isBack"> <text class="cuIcon-back"></text>
<text class="cuIcon-back"></text> <slot name="backText"></slot>
<slot name="backText"></slot> </view>
</view> <view class="content" :style="[{top:StatusBar + 'px'}]">
<view class="content" :style="[{top:StatusBar + 'px'}]"> <slot name="content"></slot>
<slot name="content"></slot> </view>
</view> <slot name="right"></slot>
<slot name="right"></slot> </view>
</view> </view>
</view> </template>
</view>
</template> <script>
export default {
<script> data() {
export default { return {
data() { StatusBar: this.StatusBar,
return { CustomBar: this.CustomBar
StatusBar: this.StatusBar, };
CustomBar: this.CustomBar },
}; name: 'cu-custom',
}, computed: {
name: 'cu-custom', style() {
computed: { var StatusBar = this.StatusBar;
style() { var CustomBar = this.CustomBar;
var StatusBar= this.StatusBar; var bgImage = this.bgImage;
var CustomBar= this.CustomBar; var style = `height:${CustomBar}px;padding-top:${StatusBar}px;background:${this.bgColor} ;`;
var bgImage = this.bgImage; if (this.bgImage) {
var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; style = `${style}background-image:url(${bgImage});`;
if (this.bgImage) { }
style = `${style}background-image:url(${bgImage});`; return style
} }
return style },
} props: {
}, bgColor: {
props: { type: String,
bgColor: { default: ''
type: String, },
default: '' isBack: {
}, type: [Boolean, String],
isBack: { default: false
type: [Boolean, String], },
default: false bgImage: {
}, type: String,
bgImage: { default: ''
type: String, },
default: '' },
}, methods: {
}, BackPage() {
methods: { uni.navigateBack({
BackPage() { delta: 1
uni.navigateBack({ });
delta: 1 }
}); }
} }
} </script>
}
</script> <style>
.fixed{
<style> position: fixed;
top:0;
</style> left:0;
right:0;
z-index: 99;
}
</style>

View File

@ -1,28 +1,28 @@
<template> <template>
<view class="bargain on"> <view class="bargain on">
<!-- 在header上加 on 为请求支援 --> <!-- 在header上加 on 为请求支援 -->
<view :class="[bargainPartake != userInfo.uid ? 'wrapper bargain-box on' : 'wrapper bargain-box']"> <view :class="[bargainPartake != userInfo.uid ? 'wrapper bargain-box on user' : 'wrapper bargain-box user']" v-if="bargainPartake != userInfo.uid">
<!-- <view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view> --> <!-- <view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view> -->
<!-- 帮助砍价、帮砍成功:--> <!-- 帮助砍价、帮砍成功:-->
<view class="pictxt acea-row row-center-wrapper " v-if="bargainPartake != userInfo.uid"> <view class="pictxt acea-row row-center-wrapper " >
<div class="bargain-header"> <div class="bargain-header">
<view class="pictrue"> <view class="pictrue">
<image :src="bargainUserInfo.avatar" /> <image :src="bargainUserInfo.avatar" />
</view> </view>
<view class="text"> <view class="text">
{{ bargainUserInfo.nickname }} {{ bargainUserInfo.nickname }}
<text>邀请您帮忙砍价</text> <text>邀请您帮忙砍价</text>
</view> </view>
</div> </div>
</view> </view>
</view> </view>
<view class="wrapper bargain-box"> <view class="wrapper bargain-box time on">
<div class="pictxt"> <div class="pictxt ">
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" <count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '"
:secondText="' 秒'" :datatime="datatime"></count-down> :secondText="' 秒'" :datatime="datatime"></count-down>
</div> </div>
</view> </view>
<view class="wrapper bargain-box"> <view class="wrapper bargain-box bargain-product">
<view class="pictxt acea-row row-between-wrapper" @click="openAlone"> <view class="pictxt acea-row row-between-wrapper" @click="openAlone">
<view class="pictrue"> <view class="pictrue">
<image :src="bargain.image" /> <image :src="bargain.image" />
@ -52,9 +52,9 @@
<view v-else v-text="'还剩' + surplusPrice + '元'"></view> <view v-else v-text="'还剩' + surplusPrice + '元'"></view>
</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>已成功帮助好友砍价 <span class="iconfont icon-xiaolian"></span>已成功帮助好友砍价
</view> </view> -->
<!-- 砍价成功:--> <!-- 砍价成功:-->
<view class="bargainSuccess" v-if=" <view class="bargainSuccess" v-if="
surplusPrice === 0 && surplusPrice === 0 &&
@ -285,7 +285,6 @@
console.log(this) console.log(this)
let url = handleQrCode(); let url = handleQrCode();
console.log(url) console.log(url)
debugger;
if (url) { if (url) {
that.bargainId = url.bargainId; that.bargainId = url.bargainId;
that.partake = url.uid; that.partake = url.uid;
@ -653,17 +652,4 @@
.iconfonts { .iconfonts {
font-size: 0.22 * 100rpx; font-size: 0.22 * 100rpx;
} }
</style>
.bargain .wrapper .pictxt {
.bargain-header {
image {
width: 100rpx;
height: 100rpx;
border-radius: 100rpx;
}
.text{
}
}
}
</style>

View File

@ -2,7 +2,7 @@
<view class="banner-swiper-box"> <view class="banner-swiper-box">
<canvas canvas-id="colorThief" class="hide-canvas"></canvas> <canvas canvas-id="colorThief" class="hide-canvas"></canvas>
<swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true"> <swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item" > <swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item">
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load> <image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
</image> </image>
</swiper-item> </swiper-item>
@ -41,6 +41,12 @@
let item = this.detail[this.swiperCurrent]; let item = this.detail[this.swiperCurrent];
// 获取轮播图颜色 // 获取轮播图颜色
let bgcolor = item.bgcolor; let bgcolor = item.bgcolor;
// #ifdef APP-PLUS
that.$set(item, 'bgcolor', '#c40414');
that.$emit('getbgcolor', '#c40414');
// #endif
// #ifndef APP-PLUS
// 颜色不存在 // 颜色不存在
if (bgcolor === '') { if (bgcolor === '') {
let ctx = uni.createCanvasContext('colorThief', that); let ctx = uni.createCanvasContext('colorThief', that);
@ -75,6 +81,8 @@
that.$set(item, 'bgcolor', bgcolor); that.$set(item, 'bgcolor', bgcolor);
that.$emit('getbgcolor', bgcolor); that.$emit('getbgcolor', bgcolor);
} }
// #endif
}, },
swiperChange(e) { swiperChange(e) {
this.swiperCurrent = e.detail.current; this.swiperCurrent = e.detail.current;

View File

@ -15,8 +15,6 @@
<text class="status-text">{{ liveStatus[live.liveStatus].title }}</text> <text class="status-text">{{ liveStatus[live.liveStatus].title }}</text>
</view> </view>
<view class="item-title">{{ live.name }}</view> <view class="item-title">{{ live.name }}</view>
<image v-if="live.liveStatus == 101" class="like-img" src="http://Shop.7wpp.com/imgs/live/zan.gif"
mode=""></image>
</view> </view>
</view> </view>
</view> </view>

View File

@ -1,26 +1,26 @@
<template> <template>
<view class="index"> <view class="index">
<!-- 导航栏 --> <!-- 导航栏 -->
<!-- <view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }">--> <!-- <view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }">-->
<!-- <view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">--> <!-- <view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">-->
<!-- <view class="cu-bar fixed" :style="customStyle" :class="[bgcolor]">--> <!-- <view class="cu-bar fixed" :style="customStyle" :class="[bgcolor]">-->
<!-- <view class="action">--> <!-- <view class="action">-->
<!-- <text class="nav-title Shop-selector-rect">{{ 'yshop商城' }}</text>--> <!-- <text class="nav-title Shop-selector-rect">{{ 'yshop商城' }}</text>-->
<!-- </view>--> <!-- </view>-->
<!-- <view class="content" :style="[{top:StatusBar + 'px'}]">--> <!-- <view class="content" :style="[{top:StatusBar + 'px'}]">-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }"> <view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }">
<cu-custom :isBack="true" > <cu-custom :isBack="true" :bgColor="bgcolor">
<block slot="backText"> <block slot="backText">
<text class="nav-title shopro-selector-rect">{{ 'YSHOP商城' }}</text> <text class="nav-title shopro-selector-rect">{{ 'YSHOP商城' }}</text>
</block> </block>
</cu-custom> </cu-custom>
</view> </view>
<view class="header header-search acea-row row-center-wrapper" :style="{ background: bgcolor }"> <view class="header header-search acea-row row-center-wrapper" :style="{ background: bgcolor }">
<view @click="goGoodSearch()" class="search acea-row row-middle"> <view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text> <text class="iconfont icon-xiazai5"></text>
@ -31,8 +31,7 @@
</view> </view>
</view> </view>
<Banner :detail="banner" v-if="banner.length>0" @getbgcolor="getbgcolor"></Banner> <Banner :detail="banner" v-if="banner.length>0" @getbgcolor="getbgcolor"></Banner>
<uni-notice-bar scrollable="true" @click="goRoll(singNew)" single="true" :speed="10" showIcon="true" <uni-notice-bar scrollable="true" @click="goRoll(singNew)" single="true" :speed="10" showIcon="true" :text="singNew.info"></uni-notice-bar>
:text="singNew.info"></uni-notice-bar>
<view class="content_box home_content_box"> <view class="content_box home_content_box">
<!-- 菜单 --> <!-- 菜单 -->
<Menu :list="menus"></Menu> <Menu :list="menus"></Menu>
@ -112,7 +111,7 @@
Live Live
}, },
props: {}, props: {},
data: function () { data: function() {
return { return {
CustomBar: this.CustomBar, CustomBar: this.CustomBar,
StatusBar: this.StatusBar, StatusBar: this.StatusBar,
@ -215,7 +214,7 @@
}, },
}, },
onShow: function () { onShow: function() {
this.getLocation() this.getLocation()
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -243,14 +242,14 @@
}, },
methods: { methods: {
...mapActions(["getLocation"]), ...mapActions(["getLocation"]),
onShareTimeline: function () { onShareTimeline: function() {
return { return {
title: this.miniHomeRemark, title: this.miniHomeRemark,
imageUrl: this.miniHomeImg, imageUrl: this.miniHomeImg,
path: "pages/home/index?spread=" + uni.getStorageSync("uid") path: "pages/home/index?spread=" + uni.getStorageSync("uid")
} }
}, },
onShareAppMessage: function () { onShareAppMessage: function() {
return { return {
title: this.miniHomeRemark, title: this.miniHomeRemark,
imageUrl: this.miniHomeImg, imageUrl: this.miniHomeImg,
@ -288,7 +287,7 @@
goGoodsPromotion() { goGoodsPromotion() {
this.$yrouter.push('/pages/shop/GoodsPromotion/index'); this.$yrouter.push('/pages/shop/GoodsPromotion/index');
}, },
setOpenShare: function () { setOpenShare: function() {
if (this.$deviceType == 'weixin') { if (this.$deviceType == 'weixin') {
getShare().then(res => { getShare().then(res => {
var data = res.data.data; var data = res.data.data;
@ -302,7 +301,7 @@
}) })
} }
}, },
startQr: function () { startQr: function() {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
let option = handleUrlParam(res.result) let option = handleUrlParam(res.result)
@ -351,7 +350,7 @@
this.bgcolor = e; this.bgcolor = e;
}, },
}, },
created: async function () { created: async function() {
// await this.doColorThief(); // await this.doColorThief();
}, },
}; };
@ -389,22 +388,22 @@
} }
} }
.head_box { .head_box {
width: 750rpx; width: 750rpx;
// background: #fff; // background: #fff;
transition: all linear 0.3s; transition: all linear 0.3s;
/deep/.cuIcon-back { /deep/.cuIcon-back {
display: none; display: none;
} }
.nav-title { .nav-title {
font-size: 38rpx; font-size: 38rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #fff; color: #fff;
} }
} }
.cu-bar.fixed { .cu-bar.fixed {
position: fixed; position: fixed;
@ -447,4 +446,12 @@
.home_content_box { .home_content_box {
margin-top: -10rpx; margin-top: -10rpx;
} }
</style>
.head_box {
}
.nav-title {
margin-left: 20rpx;
line-height: 40px;
}
</style>

View File

@ -78,7 +78,6 @@ function baseRequest(options) {
if (res.status !== 200) { if (res.status !== 200) {
return Promise.reject({ msg: "请求失败", res, data }); return Promise.reject({ msg: "请求失败", res, data });
} }
console.log(data.status)
if ([401, 403].indexOf(data.status) !== -1) { if ([401, 403].indexOf(data.status) !== -1) {
handleLoginFailure(); handleLoginFailure();
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true }); return Promise.reject({ msg: res.data.msg, res, data, toLogin: true });