Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
@@ -35,6 +35,9 @@ export default {
|
||||
// this.getAllEvalue();
|
||||
this.getEvaluateSpec();
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||
},
|
||||
watch: {
|
||||
current(value) {
|
||||
this.page = 0;
|
||||
|
||||
@@ -2,10 +2,17 @@
|
||||
<u-popup v-model="show" mode="bottom" length="782" border-radius="20">
|
||||
<view class="top">
|
||||
<text>全部商品</text>
|
||||
<image></image>
|
||||
<u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon>
|
||||
</view>
|
||||
<scroll-view :scroll-y="true" style="padding:0 30rpx;height:692rpx">
|
||||
<sitem v-for="i in 10"></sitem>
|
||||
<scroll-view :scroll-y="true" class="scroll-box">
|
||||
<view v-for="(item,index) in cartList" :key="index" class="item">
|
||||
<image :src="item.goods_image" mode="aspectFill"></image>
|
||||
<view>
|
||||
<text class="title">{{ item.goods_advword }}</text>
|
||||
<text class="name">{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}</text>
|
||||
<text class="price">{{ item.goods_promotion_price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
</template>
|
||||
@@ -13,20 +20,24 @@
|
||||
import sitem from "./item"
|
||||
export default {
|
||||
name:'shoplist',
|
||||
props: ['list'],
|
||||
components:{
|
||||
sitem
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
show: true
|
||||
show: true,
|
||||
cartList: [],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggerList() {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
image{
|
||||
background-color: #0f0;
|
||||
}
|
||||
.top{
|
||||
height: 88rpx;
|
||||
width: 100%;
|
||||
@@ -39,9 +50,41 @@ image{
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
>image{
|
||||
width: 33rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
}
|
||||
.scroll-box {
|
||||
.item {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #ECECEC;
|
||||
& > image {
|
||||
flex-shrink: 0;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin-right: 14rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
& > view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
.title {
|
||||
}
|
||||
.name {
|
||||
width: 500rpx;
|
||||
height: 80rpx;
|
||||
font-size: 24rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
.price {
|
||||
color: #FF3131;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,51 +1,89 @@
|
||||
<template>
|
||||
<view class="shopone">
|
||||
<image></image>
|
||||
<view>
|
||||
<text>sadas</text>
|
||||
<text>dasadas</text>
|
||||
<text>dsadas</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-popup v-model="is_comment" mode="bottom" border-radius="10" height="700rpx">
|
||||
<view class="top">
|
||||
<text>评论</text>
|
||||
<u-icon name="arrow-down" color="#333" size="28" @click="close"></u-icon>
|
||||
</view>
|
||||
<scroll-view class="scroll-box" scroll-y="true" >
|
||||
<view></view>
|
||||
</scroll-view>
|
||||
<view class="editing">
|
||||
<input type="text" value="" />
|
||||
<text>发送</text>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
image{
|
||||
background-color: #0f0;
|
||||
}
|
||||
.shopone{
|
||||
width: 442rpx;
|
||||
height: 200rpx;
|
||||
background:rgba(0,0,0,0.4);
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
border-radius: 10rpx;
|
||||
>image{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
>view{
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
>text{
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
>text:first-child{
|
||||
font-size: 28rpx;
|
||||
|
||||
}
|
||||
>text:last-child{
|
||||
font-size: 28rpx;
|
||||
color: #FF3131;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
name:"shopone"
|
||||
name: "shopone",
|
||||
props: ['comment'],
|
||||
data() {
|
||||
return {
|
||||
is_comment: true
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.getComment(); // 获取评论
|
||||
},
|
||||
watch: {
|
||||
comment(newValue,old) {
|
||||
console.log(newValue,old);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
getComment() {
|
||||
this.$u.post("Specialci/getAllEvalue", {
|
||||
goods_id: goods_id,
|
||||
page: 1
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.is_comment = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.top {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 88rpx;
|
||||
background-color: #ECECEC;
|
||||
& > text {
|
||||
margin-right: 280rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.scroll-box {
|
||||
margin: 88rpx 0 100rpx 0;
|
||||
height: 100%;
|
||||
}
|
||||
.editing {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
background-color: #ECECEC;
|
||||
& > input {
|
||||
width: 80%;
|
||||
height: 60rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,30 +1,32 @@
|
||||
<template>
|
||||
<view class="userinfo">
|
||||
<view class="userhead">
|
||||
<image :src="list.member_avatar"></image>
|
||||
<text>+</text>
|
||||
<image :src="item.member_avatar"></image>
|
||||
<text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text>
|
||||
<u-icon v-else name="checkmark" color="#ffffff" :size="28" class="follow" @click="following(item.member_id)"></u-icon>
|
||||
</view>
|
||||
<view class="zan">
|
||||
<image></image>
|
||||
<text>{{list.like_num}}</text>
|
||||
<!-- 点赞 -->
|
||||
<view class="operat zan">
|
||||
<u-icon name="thumb-up-fill" :color=" is_like ? '#FF7807' : '#ffffff' " :size="50" @click="likeType(item.article_id)"></u-icon>
|
||||
<text>{{item.like_num}}</text>
|
||||
</view>
|
||||
<view class="shoucang">
|
||||
<image></image>
|
||||
<text>{{list.collect_num}}</text>
|
||||
<!-- 收藏 -->
|
||||
<view class="operat shoucang">
|
||||
<u-icon name="star-fill" :color=" is_collect ? '#FF7807' : '#ffffff' " :size="50" @click="collecting(item.article_id)"></u-icon>
|
||||
<text>{{item.collect_num}}</text>
|
||||
</view>
|
||||
<view class="pinglun">
|
||||
<image></image>
|
||||
<text>{{list.comment_num}}</text>
|
||||
<!-- 评论 -->
|
||||
<view class="operat pinglun">
|
||||
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
|
||||
<text>{{item.comment_num}}</text>
|
||||
</view>
|
||||
<view class="gouwu">
|
||||
<image></image>
|
||||
<!-- 购物车 -->
|
||||
<view class="operat gouwu">
|
||||
<u-icon name="shopping-cart-fill" :color=" is_cart ? '#FF7807' : '#ffffff' " :size="50" @click="carting()"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
image{
|
||||
background-color: #0f0;
|
||||
}
|
||||
.userinfo{
|
||||
width: 110rpx;
|
||||
height: 570rpx;
|
||||
@@ -32,53 +34,122 @@ image{
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
>view{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
>text{
|
||||
margin-top: 17rpx;
|
||||
}
|
||||
>image{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
>view:first-child{
|
||||
.userhead{
|
||||
position: relative;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
>image{
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #fff;
|
||||
|
||||
}
|
||||
>text{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
font-size: 36rpx;
|
||||
background-color: #FF780F;
|
||||
position: absolute;
|
||||
top: 75rpx;
|
||||
border-radius: 50%;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
}
|
||||
&>image{
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #fff;
|
||||
}
|
||||
.follow {
|
||||
position: absolute;
|
||||
top: 90rpx;
|
||||
left: 35%;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
font-size: 36rpx;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
background-color: #FF780F;
|
||||
}
|
||||
}
|
||||
.operat {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
& > text {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
name:'userinfo',
|
||||
props:['list','cart','comment'],
|
||||
data(){
|
||||
return {
|
||||
|
||||
is_follow: this.list.is_attention || false,
|
||||
is_like: this.list.is_like || false,
|
||||
is_collect: this.list.is_collect || false,
|
||||
is_content: false,
|
||||
is_cart: false,
|
||||
item: this.list || {}
|
||||
}
|
||||
},
|
||||
props:['list']
|
||||
watch: {
|
||||
list(newValue,old) {
|
||||
// console.log(newValue,old);
|
||||
this.item = newValue || {};
|
||||
this.is_follow = this.list.is_attention || false;
|
||||
this.is_like = this.list.is_like || false;
|
||||
this.is_collect = this.list.is_collect || false;
|
||||
},
|
||||
cart(newValue,old) {
|
||||
// console.log(newValue,old);
|
||||
this.is_cart = newValue;
|
||||
},
|
||||
comment(newValue,old) {
|
||||
console.log(newValue,old);
|
||||
this.is_content = newValue;
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
// 关注
|
||||
following(id) {
|
||||
this.is_follow = !this.is_follow;
|
||||
this.$u.api.attentionMember({member_id: id}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点赞
|
||||
likeType(id) {
|
||||
// console.log(id);
|
||||
this.is_like = !this.is_like;
|
||||
this.$u.post("article/articleLike",{article_id: id}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
// console.log(res);
|
||||
this.list.like_num = res.data.num;
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 收藏
|
||||
collecting(id) {
|
||||
this.is_collect = !this.is_collect;
|
||||
this.$u.post("article/articleCollect",{article_id: id}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
// console.log(res);
|
||||
this.list.collect_num = res.data.num;
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 评论
|
||||
editing() {
|
||||
this.is_content = !this.is_content;
|
||||
// console.log(this.is_content);
|
||||
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
|
||||
},
|
||||
// 购物车
|
||||
carting() {
|
||||
this.is_cart = !this.is_cart;
|
||||
// console.log(this.is_cart);
|
||||
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -20,10 +20,10 @@
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
<view >
|
||||
<videoItem v-for="item in 10"></videoItem>
|
||||
<videoItem v-for="item in 10" :key="index"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<videoItem v-for="item in 10"></videoItem>
|
||||
<videoItem v-for="item in 10" :key="index"></videoItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,10 +35,10 @@
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
<view >
|
||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
||||
<zhiboItem v-for="item in 10" :key="index"></zhiboItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
||||
<zhiboItem v-for="item in 10" :key="index"></zhiboItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,43 +1,85 @@
|
||||
<template>
|
||||
<view class="photo">
|
||||
<view class="status_bar"></view>
|
||||
<view class="back">
|
||||
<u-icon name="close" color="#999999" :size="30"></u-icon>
|
||||
<u-icon name="close" color="#999999" :size="30" @click="goBack"></u-icon>
|
||||
</view>
|
||||
<swiper class="swiper">
|
||||
<swiper-item>
|
||||
<image :src="list.article_pic"></image>
|
||||
<swiper class="swiper" circular autoplay @change="changeSwiper">
|
||||
<swiper-item v-for="(simg,sindex) in list.photo" :key="sindex">
|
||||
<image :src="simg.url" mode="aspectFill" @tap="viewImage" :data-url="simg.url"></image>
|
||||
</swiper-item>
|
||||
<!-- <swiper-item>
|
||||
<image></image>
|
||||
</swiper-item> -->
|
||||
|
||||
</swiper>
|
||||
<view class="bottom">
|
||||
<view class="item">
|
||||
<text>图片</text>
|
||||
<view v-for="(item,index) in 4" :key="index" :style="{'background-color':index == 2 ? '#fff' : '#ede8e8'}"></view>
|
||||
<view v-for="(item,index) in list.photo" :key="index" :style="{'background-color':index == swiper_id ? '#fff' : '#ede8e8'}"></view>
|
||||
</view>
|
||||
<view class="username">自己黑的哈万岁哦划u将</view>
|
||||
<view class="title">hasjdhajskhj</view>
|
||||
<view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
|
||||
<view class="username">{{ list.member_nickname }}</view>
|
||||
<view class="title">{{ list.article_title }}</view>
|
||||
<view class="info">{{ list.article_content }}</view>
|
||||
<view class="box">
|
||||
<view class="label" v-for="(label,id) in list.label" :key="id">{{ label.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<userinfo class="userinfo" :list="list"></userinfo>
|
||||
<shpoone class="shpoone"></shpoone>
|
||||
<shoplist></shoplist>
|
||||
<!-- 用户操作 -->
|
||||
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openCart"></userinfo>
|
||||
<!-- 评论 -->
|
||||
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
|
||||
<view class="top">
|
||||
<text>评论</text>
|
||||
<u-icon name="arrow-down" color="#333" size="28" @click="close"></u-icon>
|
||||
</view>
|
||||
<scroll-view class="scroll-box" scroll-y="true" >
|
||||
<view></view>
|
||||
</scroll-view>
|
||||
<view class="editing">
|
||||
<input type="text" value="" />
|
||||
<text>发送</text>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 购物车 -->
|
||||
<u-popup v-if="cart_len > 1" class="cart" v-model="cart_type" mode="bottom" length="782" border-radius="20">
|
||||
<view class="top">
|
||||
<text>全部商品</text>
|
||||
<u-icon name="close" color="#999999" :size="30" @click="cart_type = false"></u-icon>
|
||||
</view>
|
||||
<scroll-view :scroll-y="true" class="scroll-box">
|
||||
<view v-for="(item,index) in list.goods" :key="index" class="item" @click="gotoInfo(item.goods_id)">
|
||||
<image :src="item.goods_image" mode="aspectFill"></image>
|
||||
<view>
|
||||
<text class="title">{{ item.goods_advword }}</text>
|
||||
<text class="name">{{ item.goods_name }}</text>
|
||||
<text class="price">{{ item.goods_promotion_price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
<!-- 单个 -->
|
||||
<view class="good-one" v-else v-show="cart_type">
|
||||
<view class="box" v-for="(item,index) in list.goods" :key="index" @click="gotoInfo(item.goods_id)">
|
||||
<image :src="item.goods_image" mode=""></image>
|
||||
<view>
|
||||
<view class="title u-line-1">{{ item.goods_advword }}</view>
|
||||
<view class="content u-line-2">{{ item.goods_name }}</view>
|
||||
<view class="price">¥{{ item.goods_promotion_price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <shoplist :list="list.goods" v-show="list.goods.length > 1 && cart_type" @hideCart="hideCart"></shoplist> -->
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.photo{
|
||||
height: 100vh;
|
||||
background-color: #ececec;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ececec;
|
||||
.back{
|
||||
padding-top: 28rpx;
|
||||
padding-right: 31rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.swiper{
|
||||
width: 100%;
|
||||
width: 750rpx;
|
||||
height: 702rpx;
|
||||
margin-top: 102rpx;
|
||||
image{
|
||||
@@ -46,23 +88,18 @@
|
||||
}
|
||||
}
|
||||
.bottom{
|
||||
width: 100%;
|
||||
height: 270rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
margin-top: 150rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
background-color: #fff;
|
||||
.item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
background-color: #999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 10rpx;
|
||||
background-color: #999;
|
||||
>view{
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
@@ -71,68 +108,250 @@
|
||||
}
|
||||
}
|
||||
.username{
|
||||
margin: 20rpx 0;
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
margin-top: 20rpx;
|
||||
|
||||
}
|
||||
.title{
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-top: 23rpx;
|
||||
}
|
||||
.info{
|
||||
margin: 20rpx 0;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
line-height: 42rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.label {
|
||||
padding: 6rpx 10rpx;
|
||||
margin: 0 10rpx 10rpx 0;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
border-radius: 6rpx;
|
||||
background-color: #000000;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
.userinfo{
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-285rpx);
|
||||
right: 30rpx;
|
||||
}
|
||||
.shpoone{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
.pl {
|
||||
.top {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 88rpx;
|
||||
background-color: #ECECEC;
|
||||
& > text {
|
||||
margin-right: 280rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.scroll-box {
|
||||
margin: 88rpx 0 100rpx 0;
|
||||
height: 100%;
|
||||
}
|
||||
.editing {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
background-color: #ECECEC;
|
||||
& > input {
|
||||
width: 80%;
|
||||
height: 60rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cart {
|
||||
.top{
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 1rpx solid #ececec;
|
||||
background-color: #fff;
|
||||
>text{
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.scroll-box {
|
||||
margin-top: 88rpx;
|
||||
.item {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #ECECEC;
|
||||
& > image {
|
||||
flex-shrink: 0;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin-right: 14rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
& > view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
.title {
|
||||
}
|
||||
.name {
|
||||
width: 500rpx;
|
||||
height: 80rpx;
|
||||
font-size: 24rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
.price {
|
||||
color: #FF3131;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.good-one{
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
right: 139rpx;
|
||||
top: 54%;
|
||||
transform: translateY(100rpx);
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 440rpx;
|
||||
height: 200rpx;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
& > image {
|
||||
flex-shrink: 0;
|
||||
width: 160rpx;
|
||||
height: 100%;
|
||||
margin-right: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
& > view {
|
||||
width: 200rpx;
|
||||
}
|
||||
.title {}
|
||||
.content {
|
||||
height: 60rpx;
|
||||
margin: 10rpx 0;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.price {
|
||||
color: #FF3131;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import userinfo from "../components/userinfo/index"
|
||||
import shpoone from "../components/shpoone/index"
|
||||
import shoplist from "../components/shoplist/index"
|
||||
import userinfo from "../components/userinfo/index" // 点赞组件
|
||||
import contentBox from "../components/shpoone/index" // 评论
|
||||
// import shoplist from "../components/shoplist/index" // 商品列表
|
||||
|
||||
export default {
|
||||
name:"photo",
|
||||
onLoad(e) {
|
||||
console.log('dhdhdhdhd',e)
|
||||
},
|
||||
components:{
|
||||
userinfo,
|
||||
shpoone,
|
||||
shoplist
|
||||
userinfo
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
list:{}
|
||||
list:{},
|
||||
swiper_id: "",
|
||||
cart_type: false,
|
||||
is_comment: false,
|
||||
cartList: [],
|
||||
cart_len: 0,
|
||||
}
|
||||
},
|
||||
onLoad(o){
|
||||
this.id = o.id;
|
||||
this.articleInfo(this.id);
|
||||
},
|
||||
methods:{
|
||||
// 发现详情
|
||||
articleInfo(article_id){
|
||||
this.$u.api.articleInfo({article_id}).then((res)=>{
|
||||
console.log(res)
|
||||
this.list = res.data.info
|
||||
this.list = res.data.info;
|
||||
this.cart_len = res.data.info.goods.length;
|
||||
})
|
||||
}
|
||||
},
|
||||
// 改变swiper
|
||||
changeSwiper(e) {
|
||||
// console.log(e.detail.current);
|
||||
this.swiper_id = e.detail.current; // 储存swiper id
|
||||
},
|
||||
// 更改购物车状态
|
||||
openCart(data) {
|
||||
console.log(data);
|
||||
this.cart_type = data.cart;
|
||||
this.is_comment = data.comment;
|
||||
},
|
||||
hideCart(data) {
|
||||
// console.log(data);
|
||||
this.cart_type = data.cart;
|
||||
},
|
||||
close() {
|
||||
this.is_comment = false;
|
||||
},
|
||||
// 预览图片
|
||||
viewImage(e) {
|
||||
let arr = [];
|
||||
this.list.photo.forEach(item => {
|
||||
arr.push(item.url);
|
||||
})
|
||||
uni.previewImage({
|
||||
urls: arr,
|
||||
current: e.currentTarget.dataset.url,
|
||||
})
|
||||
},
|
||||
// 跳转到商品
|
||||
gotoInfo(id) {
|
||||
console.log(id);
|
||||
uni.navigateTo({
|
||||
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(o){
|
||||
this.id = o.id
|
||||
this.articleInfo(this.id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -19,7 +19,8 @@
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title u-line-2">
|
||||
<text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
|
||||
<text class="store-name">{{ goodsInfo.store_name }}</text>
|
||||
<text class="goods-name">{{ goodsInfo.goods_name }}</text>
|
||||
</view>
|
||||
<view class="pic">
|
||||
<text>¥{{ goodsInfo.goods_price }}</text>
|
||||
@@ -40,7 +41,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
|
||||
<view class="comment-none">暂无评价</view>
|
||||
<view class="comment-none" v-else>暂无评价</view>
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="group-user" v-if="groupUser.length">
|
||||
@@ -227,6 +228,9 @@ export default {
|
||||
this.showGroupUser = false;
|
||||
this.showInvolvementUser = false;
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
@@ -379,7 +383,7 @@ export default {
|
||||
},
|
||||
/*
|
||||
* @description 下单 订单步骤1:展示结算数据
|
||||
* @params {Number} type 拼团或者开团
|
||||
* @params {Number} type involvement 拼团或者 默认开团
|
||||
* @params {Number} num 数量
|
||||
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||
**/
|
||||
@@ -553,15 +557,20 @@ export default {
|
||||
.title{
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 30rpx;
|
||||
>text{
|
||||
padding: 13rpx;
|
||||
font-size: 24rpx;
|
||||
color:#fff;
|
||||
margin-right: 13rpx;
|
||||
background-color: #FF780F;
|
||||
display: inline-block;
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
.store-name {
|
||||
display: inline-block;
|
||||
padding: 8rpx 10rpx;
|
||||
margin: 0 10rpx 4rpx 0;
|
||||
vertical-align: middle;
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
border-radius: 30rpx;
|
||||
background-color: #FF780F;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.goods-name {
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.pic{
|
||||
>text{
|
||||
|
||||
@@ -40,7 +40,10 @@ export default {
|
||||
},
|
||||
search(value){
|
||||
// console.log(value)
|
||||
if(!value) this.$u.toast('搜索内容不可为空');
|
||||
if(!value) {
|
||||
this.$u.toast('搜索内容不可为空');
|
||||
return false;
|
||||
}
|
||||
this.$u.route({
|
||||
url: "/pageB/search/out",
|
||||
params: {
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
if(!this.$u.test.mobile(this.phone)) {
|
||||
this.$u.toast('请填写正确的新手机号');
|
||||
this.$u.toast('请正确填写手机号');
|
||||
return false;
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.address)) {
|
||||
@@ -116,6 +116,10 @@ export default {
|
||||
this.$u.toast('预约时间错误');
|
||||
return false;
|
||||
}
|
||||
if(this.number > this.goodsInfo.goods_storage) {
|
||||
this.$u.toast('库存不足');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
chooseDate(e) {
|
||||
@@ -134,9 +138,17 @@ export default {
|
||||
store_id: this.store.store_id,
|
||||
appointment_time: new Date(this.time),
|
||||
}).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if (res.errCode == 0) {
|
||||
// this.$u.route({ type: 'navigateBack' });
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
back: true,
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user