修改html标签为uni标签,修改rem单位为rpx,修改提示及确认为uniapi,修改登录模块为uni接口,修改css入口为APP.vue,增加app端样式支持

This commit is contained in:
gaoxs
2020-03-16 15:51:08 +08:00
parent fa289d66a8
commit 95845779db
422 changed files with 34024 additions and 32630 deletions

View File

@ -1,12 +1,12 @@
<template>
<div class="bargain-record" ref="container">
<div class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1">{{ item.title }}</div>
<view class="bargain-record" ref="container">
<view class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line1">{{ item.title }}</view>
<count-down
:is-day="true"
:tip-text="'倒计时 '"
@ -16,34 +16,34 @@
:second-text="' 秒'"
:datatime="item.datatime"
></count-down>
<div class="money font-color-red">
<view class="money font-color-red">
已砍至
<span class="symbol">¥</span>
<span class="num">{{ item.residuePrice }}</span>
</div>
</div>
</div>
<div class="bottom acea-row row-between-wrapper">
<div class="purple" v-if="item.status === 1">活动进行中</div>
<div class="success" v-else-if="item.status === 3">砍价成功</div>
<div class="end" v-else>活动已结束</div>
<div class="acea-row row-middle row-right">
<div
<text class="symbol">¥</text>
<text class="num">{{ item.residuePrice }}</text>
</view>
</view>
</view>
<view class="bottom acea-row row-between-wrapper">
<view class="purple" v-if="item.status === 1">活动进行中</view>
<view class="success" v-else-if="item.status === 3">砍价成功</view>
<view class="end" v-else>活动已结束</view>
<view class="acea-row row-middle row-right">
<view
class="bnt cancel"
v-if="item.status === 1"
@click="getBargainUserCancel(item.bargainId)"
>取消活动</div>
<div
>取消活动</view>
<view
class="bnt bg-color-red"
v-if="item.status === 1"
@click="goDetail(item.bargainId)"
>继续砍价</div>
<div class="bnt bg-color-red" v-else @click="goList">重开一个</div>
</div>
</div>
</div>
>继续砍价</view>
<view class="bnt bg-color-red" v-else @click="goList">重开一个</view>
</view>
</view>
</view>
<Loading :loaded="status" :loading="loadingList"></Loading>
</div>
</view>
</template>
<script>
import CountDown from "@/components/CountDown";

View File

@ -1,18 +1,18 @@
<template>
<div class="bargain">
<view class="bargain">
<!-- 在header上加 on 为请求支援 -->
<div :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
<div class="people">{{ lookCount }}人查看 {{ shareCount }}人分享 {{ userCount }}人参与</div>
<view :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
<view class="people">{{ lookCount }}人查看 {{ shareCount }}人分享 {{ userCount }}人参与</view>
<!-- 帮助砍价帮砍成功-->
<div class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
<div class="pictrue">
<img :src="bargainUserInfo.avatar" />
</div>
<div class="text">
<view class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
<view class="pictrue">
<image :src="bargainUserInfo.avatar" />
</view>
<view class="text">
{{ bargainUserInfo.nickname }}
<span>邀请您帮忙砍价</span>
</div>
</div>
<text>邀请您帮忙砍价</text>
</view>
</view>
<count-down
:is-day="true"
:tip-text="'倒计时 '"
@ -22,143 +22,142 @@
:second-text="' '"
:datatime="datatime"
></count-down>
</div>
<div class="wrapper">
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="bargain.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line2" v-text="bargain.title"></div>
<div class="money font-color-red">
</view>
<view class="wrapper">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="bargain.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line2" v-text="bargain.title"></view>
<view class="money font-color-red">
已砍至:
<span class="num" v-text="price"></span>
</div>
<div class="acea-row row-middle">
<div class="successNum" v-text="'原价' + bargain.price"></div>
<div class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></div>
</div>
</div>
</div>
<div class="cu-progress acea-row row-middle round margin-top">
<div
<text class="num" v-text="price"></text>
</view>
<view class="acea-row row-middle">
<view class="successNum" v-text="'原价' + bargain.price"></view>
<view class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></view>
</view>
</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 + '%' : '' }"
></div>
</div>
<div class="balance acea-row row-between-wrapper">
<div v-text="'已砍' + alreadyPrice + '元'"></div>
<div v-if="surplusPrice === 0">砍价成功</div>
<div v-else v-text="'还剩' + surplusPrice + '元'"></div>
</div>
></view>
</view>
<view class="balance acea-row row-between-wrapper">
<view v-text="'已砍' + alreadyPrice + '元'"></view>
<view v-if="surplusPrice === 0">砍价成功</view>
<view v-else v-text="'还剩' + surplusPrice + '元'"></view>
</view>
<!-- 帮助砍价帮砍成功-->
<!--<div class='bargainSuccess'><span class='iconfont icon-xiaolian'></span>已成功帮助好友砍价</div>-->
<div class="bargainBnts">
<div
<!--<view class='bargainSuccess'><text class='iconfont icon-xiaolian'></text>已成功帮助好友砍价</view>-->
<view class="bargainBnts">
<view
class="bargainBnt"
@click="goPoster"
v-if="bargainPartake === userInfo.uid && surplusPrice > 0"
>邀请好友帮砍价</div>
<div
>邀请好友帮砍价</view>
<view
class="bargainBnt"
@click="getBargainHelp"
v-else-if="bargainPartake != userInfo.uid"
>帮好友砍一刀</div>
<div class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</div>
<div
>帮好友砍一刀</view>
<view class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</view>
<view
class="bargainBnt"
@click="goPay"
v-if="surplusPrice === 0 && bargainPartake === userInfo.uid && userBargainStatus === 1"
>立即支付</div>
<div class="bargainBnt on" @click="goList">抢更多商品</div>
</div>
<div class="tip">
>立即支付</view>
<view class="bargainBnt on" @click="goList">抢更多商品</view>
</view>
<view class="tip">
已有
<span class="font-color-red" v-text="helpCount"></span>
位好友成功帮您砍价
</div>
<div class="lock"></div>
</div>
<div class="bargainGang">
<div class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
<div class="titleCon">砍价帮</div>
<div class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
</div>
<div class="list">
<div
<text class="font-color-red" v-text="helpCount"></text>位好友成功帮您砍价
</view>
<view class="lock"></view>
</view>
<view class="bargainGang">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
<view class="titleCon">砍价帮</view>
<view class="pictrue on">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
</view>
<view class="list">
<view
class="item acea-row row-between-wrapper"
v-for="(item, bargainHelpListIndex) in bargainHelpList"
:key="bargainHelpListIndex"
>
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.avatar" />
</div>
<div class="text">
<div class="name line1" v-text="item.nickname"></div>
<div class="line1" v-text="item.add_time"></div>
</div>
</div>
<div class="money font-color-red">
<span class="iconfont icon-kanjia"></span>
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.avatar" />
</view>
<view class="text">
<view class="name line1" v-text="item.nickname"></view>
<view class="line1" v-text="item.add_time"></view>
</view>
</view>
<view class="money font-color-red">
<text class="iconfont icon-kanjia"></text>
砍掉{{ item.price }}
</div>
</div>
</div>
<div
</view>
</view>
</view>
<view
class="load font-color-red"
v-if="!helpListStatus && !helpListLoading"
@click="getBargainHelpList"
>点击加载更多</div>
<div class="lock"></div>
</div>
<div class="goodsDetails">
<div class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
<div class="titleCon">商品详情</div>
<div class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
</div>
<div class="conter" v-html="bargain.description"></div>
<div class="lock"></div>
</div>
<div class="goodsDetails">
<div class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
<div class="titleCon">活动规则</div>
<div class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
</div>
<div class="conter" v-html="bargain.rule"></div>
</div>
<div class="bargainTip" :class="active === true ? 'on' : ''">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/bargainBg.jpg'" />
<div class="iconfont icon-guanbi" @click="close"></div>
</div>
<div class="cutOff" v-if="bargainPartake === userInfo.uid">
>点击加载更多</view>
<view class="lock"></view>
</view>
<view class="goodsDetails">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
<view class="titleCon">商品详情</view>
<view class="pictrue on">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
</view>
<view class="conter" v-html="bargain.description"></view>
<view class="lock"></view>
</view>
<view class="goodsDetails">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
<view class="titleCon">活动规则</view>
<view class="pictrue on">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
</view>
<view class="conter" v-html="bargain.rule"></view>
</view>
<view class="bargainTip" :class="active === true ? 'on' : ''">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/bargainBg.jpg'" />
<view class="iconfont icon-guanbi" @click="close"></view>
</view>
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
您已砍掉
<span class="font-color-red" v-text="bargainHelpPrice"></span>听说分享次数越多砍价成功的机会越大哦
</div>
<div class="cutOff on" v-else>
<div class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></div>您也可以砍价低价拿哦快去挑选心仪的商品吧~
</div>
<div class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</div>
<div class="tipBnt" @click="getBargainStart" v-else>我也要参与</div>
</div>
<div class="mask" @touchmove.prevent :hidden="active === false" @click="close"></div>
</div>
<text class="font-color-red" v-text="bargainHelpPrice"></text>听说分享次数越多砍价成功的机会越大哦
</view>
<view class="cutOff on" v-else>
<view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>您也可以砍价低价拿哦快去挑选心仪的商品吧~
</view>
<view class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</view>
<view class="tipBnt" @click="getBargainStart" v-else>我也要参与</view>
</view>
<view class="mask" @touchmove.prevent :hidden="active === false" @click="close"></view>
</view>
</template>
<script>
import CountDown from "@/components/CountDown";
@ -279,7 +278,11 @@ export default {
});
})
.catch(err => {
this.$dialog.error(err.msg || err.response.data.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
goPoster: function() {
@ -364,7 +367,12 @@ export default {
res.data.status === "SUCCESSFUL" &&
that.bargainPartake !== that.userInfo.uid
) {
return that.$dialog.toast({ mes: "您已经砍过了" });
uni.showToast({
title: "您已经砍过了",
icon: "none",
duration: 2000
});
return;
}
that.helpListStatus = false;
that.page = 1;
@ -492,9 +500,7 @@ export default {
},
onShareAppMessage() {
return {
path: `/pages/activity/DargainDetails/index/?id=${
this.$yroute.query.id
}&partake=${this.userInfo.uid}`
path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`
};
}
};

View File

@ -1,40 +1,40 @@
<template>
<div class="bargain-list">
<!-- <div class="header">
<img :src="$VUE_APP_RESOURCES_URL+'/images/cut-bg.png'" alt="">
</div>-->
<div class="list" v-if="bargainLis.length > 0">
<div
<view class="bargain-list">
<!-- <view class="header">
<image :src="$VUE_APP_RESOURCES_URL+'/images/cut-bg.png'" alt="">
</view>-->
<view class="list" v-if="bargainLis.length > 0">
<view
class="item acea-row row-between-wrapper"
v-for="(item, bargainLisIndex) in bargainLis"
:key="bargainLisIndex"
>
<div class="pictrue">
<img :src="item.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1" v-text="item.title"></div>
<div class="num">
<span class="iconfont icon-pintuan"></span>
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line1" v-text="item.title"></view>
<view class="num">
<text class="iconfont icon-pintuan"></text>
{{ item.people }}人正在参与
</div>
<div class="money font-color-red">
</view>
<view class="money font-color-red">
可砍至:
<span class="price">{{item.minPrice}}</span>
</div>
</div>
<div class="cutBnt bg-color-red" @click="goDetail(item.id)">
<span class="iconfont icon-kanjia"></span>参与砍价
</div>
</div>
<div class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</div>
</div>
<div class="noCommodity" style="background-color: #fff;" v-if="bargainLis.length === 0">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div>
</div>
</div>
<text class="price">{{item.minPrice}}</text>
</view>
</view>
<view class="cutBnt bg-color-red" @click="goDetail(item.id)">
<text class="iconfont icon-kanjia"></text>参与砍价
</view>
</view>
<view class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</view>
</view>
<view class="noCommodity" style="background-color: #fff;" v-if="bargainLis.length === 0">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getBargainList } from "@/api/activity";

View File

@ -1,47 +1,47 @@
<template>
<div class="group-list" ref="container">
<!-- <div class="header">
<img :src="$VUE_APP_RESOURCES_URL+'/images/group.png'" class="image" />
</div>-->
<div class="list" v-if="combinationList.length>0">
<div
<view class="group-list" ref="container">
<!-- <view class="header">
<image :src="$VUE_APP_RESOURCES_URL+'/images/group.png'" class="image" />
</view>-->
<view class="list" v-if="combinationList.length>0">
<view
class="item acea-row row-between-wrapper"
v-for="(item, combinationListIndex) in combinationList"
:key="combinationListIndex"
@click="link(item.id)"
>
<div class="pictrue">
<img :src="item.image" />
</div>
<div class="text">
<div class="line1" v-text="item.title"></div>
<div class="acea-row">
<div class="team acea-row row-middle cart-color">
<div class="iconfont icon-pintuan"></div>
<div class="num" v-text="item.people + '人团'"></div>
</div>
</div>
<div class="bottom acea-row row-between-wrapper">
<div class="money">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="line1" v-text="item.title"></view>
<view class="acea-row">
<view class="team acea-row row-middle cart-color">
<view class="iconfont icon-pintuan"></view>
<view class="num" v-text="item.people + '人团'"></view>
</view>
</view>
<view class="bottom acea-row row-between-wrapper">
<view class="money">
<span class="num" v-text="item.price"></span>
<span class="y-money" v-text="'¥' + item.productPrice"></span>
</div>
<div class="groupBnt bg-color-red">
<text class="num" v-text="item.price"></text>
<text class="y-money" v-text="'¥' + item.productPrice"></text>
</view>
<view class="groupBnt bg-color-red">
去拼团
<span class="iconfont icon-jiantou"></span>
</div>
</div>
</div>
</div>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
</view>
<Loading :loaded="status" :loading="loadingList"></Loading>
</div>
<div class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div>
</div>
</div>
</view>
<view class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getCombinationList } from "@/api/activity";

View File

@ -1,8 +1,8 @@
<template>
<div class="flash-sale" ref="container">
<div class="header" v-if="headerImg">
<img :src="headerImg" />
</div>
<view class="flash-sale" ref="container">
<view class="header" v-if="headerImg">
<image :src="headerImg" />
</view>
<vant-tabs
:active="active"
@change="setTime"
@ -17,12 +17,12 @@
v-for="(item, index) in timeList"
:key="index"
>
<div slot="title" class="timeItem">
<div class="time">{{ item.time }}</div>
<div class="state">{{ item.state }}</div>
</div>
<div class="countDown font-color-red acea-row row-center-wrapper">
<div v-if="item.status === 0" class="activity">活动已结束</div>
<view slot="title" class="timeItem">
<view class="time">{{ item.time }}</view>
<view class="state">{{ item.state }}</view>
</view>
<view class="countDown font-color-red acea-row row-center-wrapper">
<view v-if="item.status === 0" class="activity">活动已结束</view>
<count-down
:is-day="false"
:tip-text="'距结束仅剩 '"
@ -33,50 +33,50 @@
:datatime="datatime"
v-if="item.status === 1"
></count-down>
<div v-if="item.status === 2" class="activity">活动即将开始</div>
</div>
<div class="list">
<div
<view v-if="item.status === 2" class="activity">活动即将开始</view>
</view>
<view class="list">
<view
class="item acea-row row-between-wrapper"
v-for="(itemSeckill, indexSeckill) in seckillList"
:key="indexSeckill"
>
<div class="pictrue">
<img :src="itemSeckill.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1" v-text="itemSeckill.title"></div>
<div class="money">
<view class="pictrue">
<image :src="itemSeckill.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line1" v-text="itemSeckill.title"></view>
<view class="money">
限时价
<span class="num font-color-red" v-text="'¥' + itemSeckill.price"></span>
</div>
<div class="progress cart-color">
<div class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></div>
<div class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></div>
</div>
</div>
<div
<text class="num font-color-red" v-text="'¥' + itemSeckill.price"></text>
</view>
<view class="progress cart-color">
<view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view>
<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)"
>马上抢</div>
<div class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</div>
<div class="grab bg-color-red" v-if="item.status === 2">即将开始</div>
<div class="grab bg-color-red" v-if="item.status === 0">已结束</div>
</div>
</div>
<div
>马上抢</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"
>
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div>
</div>
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</view>
</view>
</vant-tab>
</vant-tabs>
</div>
</view>
</template>
<script>
import { getSeckillConfig, getSeckillList } from "@/api/activity";

View File

@ -1,53 +1,54 @@
<template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<div class="wrapper">
<div class="share acea-row row-between row-bottom">
<div class="money font-color-red">
<view class="wrapper">
<view class="share acea-row row-between row-bottom">
<view class="money font-color-red">
<span class="num" v-text="storeInfo.price"></span>
<span class="y-money" v-text="'¥' + storeInfo.productPrice"></span>
</div>
</div>
<div class="introduce" v-text="storeInfo.title"></div>
<div class="label acea-row row-between-wrapper">
<div v-text="'类型:' + storeInfo.people + '人团'"></div>
<div v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></div>
<div v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></div>
</div>
</div>
<div class="notice acea-row row-middle">
<div class="num font-color-red">
<span class="iconfont icon-laba"></span>
<text class="num" v-text="storeInfo.price"></text>
<text class="y-money" v-text="'¥' + storeInfo.productPrice"></text>
</view>
</view>
<view class="introduce" v-text="storeInfo.title"></view>
<view class="label acea-row row-between-wrapper">
<view v-text="'类型:' + storeInfo.people + '人团'"></view>
<view v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></view>
<view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view>
</view>
</view>
<view class="notice acea-row row-middle">
<view class="num font-color-red">
<text class="iconfont icon-laba"></text>
已拼{{ storeInfo.sales
}}{{ storeInfo.unitName }}
<span class="line">|</span>
</div>
<div class="swiper-no-swiping swiper">
<text class="line">|</text>
</view>
<view class="swiper-no-swiping swiper">
<swiper class="swiper-wrapper" :options="swiperTip" :autoplay="true" :interval="3000">
<block v-for="(item, itemNewIndex) in itemNew" :key="itemNewIndex">
<swiper-item>
<div class="line1">{{ item }}</div>
<view class="line1">{{ item }}</view>
</swiper-item>
</block>
</swiper>
</div>
</div>
<div class="assemble">
<div v-for="(item, groupListindex) in groupList" :key="groupListindex">
<div class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.avatar" class="image" />
</div>
<div class="text line1" v-text="item.nickname"></div>
</div>
<div class="right acea-row row-middle">
<div>
<div class="lack">
还差
<span class="font-color-red" v-text="item.count"></span>人成团
</div>
</view>
</view>
<view class="assemble">
<view v-for="(item, groupListindex) in groupList" :key="groupListindex">
<view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.avatar" class="image" />
</view>
<view class="text line1" v-text="item.nickname"></view>
</view>
<view class="right acea-row row-middle">
<view>
<view class="lack">
<text>还差</text>
<text class="font-color-red" v-text="item.count"></text>
<text>人成团</text>
</view>
<count-down
:is-day="false"
:tip-text="'剩余 '"
@ -57,69 +58,69 @@
:second-text="''"
:datatime="item.stopTime"
></count-down>
</div>
<div class="spellBnt" @click="groupRule(item.id)">
</view>
<view class="spellBnt" @click="groupRule(item.id)">
去拼单
<span class="iconfont icon-jiantou"></span>
</div>
</div>
</div>
</div>
<div class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
</view>
<view class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
查看更多
<span class="iconfont icon-xiangxia"></span>
</div>
</div>
<div class="playWay">
<div class="title acea-row row-between-wrapper">
<div>拼团玩法</div>
</div>
<div class="way acea-row row-middle">
<div class="item">
<span class="num">①</span>开团/参团
</div>
<div class="iconfont icon-arrow"></div>
<div class="item">
<span class="num">②</span>邀请好友
</div>
<div class="iconfont icon-arrow"></div>
<div class="item">
<div>
<span class="num">③</span>满员发货
</div>
</div>
</div>
</div>
<div class="userEvaluation">
<div class="title acea-row row-between-wrapper">
<div v-text="'用户评价(' + replyCount + ')'"></div>
<div class="praise" @click="goReply">
<span class="font-color-red" v-text="replyChance + '%'"></span>好评率
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<text class="iconfont icon-xiangxia"></text>
</view>
</view>
<view class="playWay">
<view class="title acea-row row-between-wrapper">
<view>拼团玩法</view>
</view>
<view class="way acea-row row-middle">
<view class="item">
<text class="num">①</text>开团/参团
</view>
<view class="iconfont icon-arrow"></view>
<view class="item">
<text class="num">②</text>邀请好友
</view>
<view class="iconfont icon-arrow"></view>
<view class="item">
<view>
<text class="num">③</text>满员发货
</view>
</view>
</view>
</view>
<view class="userEvaluation">
<view class="title acea-row row-between-wrapper">
<view v-text="'用户评价(' + replyCount + ')'"></view>
<view class="praise" @click="goReply">
<text class="font-color-red" v-text="replyChance + '%'"></text>好评率
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<UserEvaluation :reply="reply"></UserEvaluation>
</div>
<div class="product-intro">
<div class="title">产品介绍</div>
<div class="conter" v-html="storeInfo.description"></div>
</div>
<div style="height:100rpx;"></div>
<div class="footer-group acea-row row-between-wrapper">
<div class="customerSer acea-row row-center-wrapper row-column">
<div class="iconfont icon-kefu"></div>
<div>客服</div>
</div>
<div class="bnt bg-color-violet" @click="openAlone">单独购买</div>
<div class="bnt bg-color-red" @click="openTeam">立即开团</div>
</div>
</view>
<view class="product-intro">
<view class="title">产品介绍</view>
<view class="conter" v-html="storeInfo.description"></view>
</view>
<view style="height:100rpx;"></view>
<view class="footer-group acea-row row-between-wrapper">
<view class="customerSer acea-row row-center-wrapper row-column">
<view class="iconfont icon-kefu"></view>
<view>客服</view>
</view>
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
<view class="bnt bg-color-red" @click="openTeam">立即开团</view>
</view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster
v-on:setPosterImageStatus="setPosterImageStatus"
:posterImageStatus="posterImageStatus"
:posterData="posterData"
></StorePoster>
</div>
</view>
</template>
<style scoped>
.noscroll {
@ -285,7 +286,11 @@ export default {
var that = this;
that.attr.productSelect.cart_num = 1;
that.cartNum = 1;
that.$dialog.message("每人每次限购1" + that.storeInfo.unitName);
uni.showToast({
title: "每人每次限购1" + that.storeInfo.unitName,
icon: "none",
duration: 2000
});
},
setProductSelect: function() {
var that = this;
@ -316,7 +321,11 @@ export default {
});
})
.catch(err => {
this.$dialog.error(err.msg||err.response.data.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}

View File

@ -1,224 +1,220 @@
<template>
<div class="group-con">
<div class="header acea-row row-between-wrapper">
<div class="pictrue">
<img :src="storeCombination.image" />
</div>
<div class="text">
<div class="line1" v-text="storeCombination.title"></div>
<div class="money">
<span class="num" v-text="storeCombination.price"></span>
<span class="team cart-color" v-text="storeCombination.people + '人拼'"></span>
</div>
</div>
<div v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></div>
<div v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></div>
</div>
<div class="wrapper">
<div class="title acea-row row-center-wrapper">
<div class="line"></div>
<div class="name acea-row row-center-wrapper">
剩余
<count-down
:is-day="false"
:tip-text="''"
:day-text="''"
:hour-text="' : '"
:minute-text="' : '"
:second-text="''"
:datatime="pinkT.stopTime"
></count-down>结束
</div>
<div class="line"></div>
</div>
<div class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</div>
<div class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</div>
<div class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</div>
<div
class="list acea-row row-middle"
:class="[
pinkBool === 1 || pinkBool === -1 ? 'result' : '',
iShidden ? 'on' : ''
]"
>
<div class="pictrue">
<img :src="pinkT.avatar" />
</div>
<div class="acea-row row-middle" v-if="pinkAll.length > 0">
<div class="pictrue" v-for="(item, pinkAllIndex) in pinkAll" :key="pinkAllIndex">
<img :src="item.avatar" />
</div>
</div>
<div class="pictrue" v-for="countIndex in count" :key="countIndex">
<img class="img-none" :src="$VUE_APP_RESOURCES_URL+'/images/vacancy.png'" />
</div>
</div>
<div
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9"
class="lookAll acea-row row-center-wrapper"
@click="lookAll"
>
{{ iShidden ? "收起" : "查看全部" }}
<span
class="iconfont"
:class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"
></span>
</div>
<div
class="teamBnt bg-color-red"
v-if="userBool === 1 && isOk == 0 && pinkBool === 0"
@click="goPoster"
>邀请好友参团</div>
<div
class="teamBnt bg-color-red"
v-else-if="userBool === 0 && pinkBool === 0 && count > 0"
@click="pay"
>我要参团</div>
<div
class="teamBnt bg-color-red"
v-if="pinkBool === 1 || pinkBool === -1"
@click="goDetail(storeCombination.id)"
>再次开团</div>
<div class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
<span class="iconfont icon-guanbi3"></span>取消开团
</div>
<div class="lookOrder" v-if="pinkBool === 1" @click="goOrder">
查看订单信息
<span class="iconfont icon-xiangyou"></span>
</div>
</div>
</div>
<view class="group-con">
<view class="header acea-row row-between-wrapper">
<view class="pictrue">
<image :src="storeCombination.image" />
</view>
<view class="text">
<view class="line1" v-text="storeCombination.title"></view>
<view class="money">
<text>¥</text>
<text class="num" v-text="storeCombination.price"></text>
<text class="team cart-color" v-text="storeCombination.people + '人拼'"></text>
</view>
</view>
<view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view>
<view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view>
</view>
<view class="wrapper">
<view class="title acea-row row-center-wrapper">
<view class="line"></view>
<view class="name acea-row row-center-wrapper">
<text>剩余</text>
<count-down :is-day="false" :tip-text="''" :day-text="''" :hour-text="' : '" :minute-text="' : '" :second-text="''"
:datatime="pinkT.stopTime"></count-down>
<text>结束</text>
</view>
<view class="line"></view>
</view>
<text class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</text>
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text>
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text>
<view class="list acea-row row-middle" :class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']">
<view class="pictrue">
<image :src="pinkT.avatar" />
</view>
<view class="acea-row row-middle" v-if="pinkAll.length > 0">
<view class="pictrue" v-for="(item, pinkAllIndex) in pinkAll" :key="pinkAllIndex">
<image :src="item.avatar" />
</view>
</view>
<view class="pictrue" v-for="countIndex in count" :key="countIndex">
<image class="img-none" :src="$VUE_APP_RESOURCES_URL+'/images/vacancy.png'" />
</view>
</view>
<view v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper" @click="lookAll">
{{ iShidden ? "收起" : "查看全部" }}
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
</view>
<view class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0" @click="goPoster">邀请好友参团</view>
<view class="teamBnt bg-color-red" v-else-if="userBool === 0 && pinkBool === 0 && count > 0" @click="pay">我要参团</view>
<view class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1" @click="goDetail(storeCombination.id)">再次开团</view>
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
<text class="iconfont icon-guanbi3"></text>
<text>取消开团</text>
</view>
<view class="lookOrder" v-if="pinkBool === 1" @click="goOrder">
<text>查看订单信息</text>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
</view>
</template>
<script>
import CountDown from "@/components/CountDown";
import { getCombinationPink, getCombinationRemove } from "@/api/activity";
import { postCartAdd } from "@/api/store";
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
import CountDown from "@/components/CountDown";
import {
getCombinationPink,
getCombinationRemove
} from "@/api/activity";
import {
postCartAdd
} from "@/api/store";
import {
isWeixin,
parseQuery,
handleQrCode
} from "@/utils/index";
const NAME = "GroupRule";
export default {
name: NAME,
components: {
CountDown
},
props: {},
data: function() {
return {
currentPinkOrder: "", //当前拼团订单
isOk: 0, //判断拼团是否完成
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功
userBool: 0, //判断当前用户是否在团内|0=未在,1=在
pinkAll: [], //团员
pinkT: [], //团长信息
storeCombination: [], //拼团产品
pinkId: 0,
count: 0, //拼团剩余人数
iShidden: false
};
},
watch: {
$yroute(n) {
var that = this;
if (n.name === NAME) {
that.pinkId = that.$yroute.query.id;
that.getCombinationPink();
}
}
},
mounted: function() {
var that = this;
let url = handleQrCode();
if (url) {
that.pinkId = url.pinkId;
} else {
that.pinkId = that.$yroute.query.id;
}
that.getCombinationPink();
},
methods: {
pay: function() {
var that = this;
var data = {};
data.productId = that.storeCombination.productId;
data.cartNum = that.pinkT.totalNum;
data.uniqueId = "";
data.combinationId = that.storeCombination.id;
data.new = 1;
postCartAdd(data)
.then(res => {
that.$yrouter.push({
path: "/pages/order/OrderSubmission/index",
query: { id: res.data.cartId, pinkid: that.pinkId }
});
})
.catch(err => {
this.$dialog.error(err.msg||err.response.data.msg);
});
},
goPoster: function() {
var that = this;
this.$yrouter.push({
path: "/pages/activity/Poster/index",
query: { id: that.pinkId, type: 1 }
});
},
goOrder: function() {
var that = this;
this.$yrouter.push({
path: "/pages/order/OrderDetails/index",
query: { id: that.currentPinkOrder }
});
},
//拼团列表
goList: function() {
this.$yrouter.push({
path: "/pages/activity/GoodsGroup/index"
});
},
//拼团详情
goDetail: function(id) {
this.$yrouter.push({
path: "/pages/activity/GroupDetails/index",
query: { id }
});
},
//拼团信息
getCombinationPink: function() {
var that = this;
getCombinationPink(that.pinkId).then(res => {
that.$set(that, "storeCombination", res.data.storeCombination);
that.$set(that, "pinkT", res.data.pinkT);
that.$set(that, "pinkAll", res.data.pinkAll);
that.$set(that, "count", res.data.count);
that.$set(that, "userBool", res.data.userBool);
that.$set(that, "pinkBool", res.data.pinkBool);
that.$set(that, "isOk", res.data.isOk);
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
});
},
//拼团取消
getCombinationRemove: function() {
var that = this;
getCombinationRemove({ id: that.pinkId, cid: that.storeCombination.id })
.then(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
lookAll: function() {
this.iShidden = !this.iShidden;
}
}
};
</script>
const NAME = "GroupRule";
export default {
name: NAME,
components: {
CountDown
},
props: {},
data: function() {
return {
currentPinkOrder: "", //当前拼团订单
isOk: 0, //判断拼团是否完成
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功
userBool: 0, //判断当前用户是否在团内|0=未在,1=在
pinkAll: [], //团员
pinkT: [], //团长信息
storeCombination: [], //拼团产品
pinkId: 0,
count: 0, //拼团剩余人数
iShidden: false
};
},
watch: {
$yroute(n) {
var that = this;
if (n.name === NAME) {
that.pinkId = that.$yroute.query.id;
that.getCombinationPink();
}
}
},
mounted: function() {
var that = this;
let url = handleQrCode();
if (url) {
that.pinkId = url.pinkId;
} else {
that.pinkId = that.$yroute.query.id;
}
that.getCombinationPink();
},
methods: {
pay: function() {
var that = this;
var data = {};
data.productId = that.storeCombination.productId;
data.cartNum = that.pinkT.totalNum;
data.uniqueId = "";
data.combinationId = that.storeCombination.id;
data.new = 1;
postCartAdd(data)
.then(res => {
that.$yrouter.push({
path: "/pages/order/OrderSubmission/index",
query: {
id: res.data.cartId,
pinkid: that.pinkId
}
});
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
},
goPoster: function() {
var that = this;
this.$yrouter.push({
path: "/pages/activity/Poster/index",
query: {
id: that.pinkId,
type: 1
}
});
},
goOrder: function() {
var that = this;
this.$yrouter.push({
path: "/pages/order/OrderDetails/index",
query: {
id: that.currentPinkOrder
}
});
},
//拼团列表
goList: function() {
this.$yrouter.push({
path: "/pages/activity/GoodsGroup/index"
});
},
//拼团详情
goDetail: function(id) {
this.$yrouter.push({
path: "/pages/activity/GroupDetails/index",
query: {
id
}
});
},
//拼团信息
getCombinationPink: function() {
var that = this;
getCombinationPink(that.pinkId).then(res => {
that.$set(that, "storeCombination", res.data.storeCombination);
that.$set(that, "pinkT", res.data.pinkT);
that.$set(that, "pinkAll", res.data.pinkAll);
that.$set(that, "count", res.data.count);
that.$set(that, "userBool", res.data.userBool);
that.$set(that, "pinkBool", res.data.pinkBool);
that.$set(that, "isOk", res.data.isOk);
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
});
},
//拼团取消
getCombinationRemove: function() {
var that = this;
getCombinationRemove({
id: that.pinkId,
cid: that.storeCombination.id
})
.then(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
lookAll: function() {
this.iShidden = !this.iShidden;
}
}
};
</script>

View File

@ -1,12 +1,12 @@
<template>
<div class="poster-poster" v-if="status === false">
<div class="tip">
<span class="iconfont icon-shuoming"></span>提示长按图片保存至手机相册
</div>
<div class="poster">
<img :src="image" mode="widthFix" show-menu-by-longpress />
</div>
</div>
<view class="poster-poster" v-if="status === false">
<view class="tip">
<text class="iconfont icon-shuoming"></text>提示长按图片保存至手机相册
</view>
<view class="poster">
<image :src="image" mode="widthFix" show-menu-by-longpress />
</view>
</view>
</template>
<style scoped>
.poster-poster {

View File

@ -1,15 +1,15 @@
<template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<div class="nav acea-row row-between-wrapper">
<div class="money">
<view class="nav acea-row row-between-wrapper">
<view class="money">
<span class="num" v-text="storeInfo.price"></span>
<span class="y-money" v-text="'¥' + storeInfo.price"></span>
</div>
<div class="acea-row row-middle">
<div class="times">
<div>距秒杀结束仅剩</div>
<text class="num" v-text="storeInfo.price"></text>
<text class="y-money" v-text="'¥' + storeInfo.price"></text>
</view>
<view class="acea-row row-middle">
<view class="times">
<view>距秒杀结束仅剩</view>
<count-down
:is-day="false"
:tip-text="''"
@ -19,42 +19,42 @@
:second-text="''"
:datatime="datatime"
></count-down>
</div>
<div class="iconfont icon-jiantou"></div>
</div>
</div>
<div class="wrapperRush">
<div class="introduce acea-row row-between">
<div class="infor" v-text="storeInfo.title"></div>
<div class="iconfont icon-fenxiang" @click="setPosterImageStatus"></div>
</div>
<div class="label acea-row row-middle">
<div class="stock" v-text="'库存:' + storeInfo.stock + '件'"></div>
<div v-text="'销量:' + storeInfo.sales + '件'"></div>
</div>
</div>
<div class="product-intro">
<div class="title">产品介绍</div>
<div class="conter" v-html="storeInfo.description"></div>
</div>
<div style="height:100rpx;"></div>
<div class="footerRush acea-row row-between-wrapper">
<div
</view>
<view class="iconfont icon-jiantou"></view>
</view>
</view>
<view class="wrapperRush">
<view class="introduce acea-row row-between">
<view class="infor" v-text="storeInfo.title"></view>
<view class="iconfont icon-fenxiang" @click="setPosterImageStatus"></view>
</view>
<view class="label acea-row row-middle">
<view class="stock" v-text="'库存:' + storeInfo.stock + '件'"></view>
<view v-text="'销量:' + storeInfo.sales + '件'"></view>
</view>
</view>
<view class="product-intro">
<view class="title">产品介绍</view>
<view class="conter" v-html="storeInfo.description"></view>
</view>
<view style="height:100rpx;"></view>
<view class="footerRush acea-row row-between-wrapper">
<view
class="customerSer acea-row row-center-wrapper row-column"
@click="routerGo()"
>
<div class="iconfont icon-kefu"></div>
<div>客服</div>
</div>
<div class="bnt bg-color-red" @click="tapBuy">立即购买</div>
</div>
<view class="iconfont icon-kefu"></view>
<view>客服</view>
</view>
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
</view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster
v-on:setPosterImageStatus="setPosterImageStatus"
:posterImageStatus="posterImageStatus"
:posterData="posterData"
></StorePoster>
</div>
</view>
</template>
<style scoped>
.noscroll {
@ -215,8 +215,11 @@ export default {
});
})
.catch(err => {
console.log(err);
this.$dialog.error(err.msg || err.response.data.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}