order 7.25
This commit is contained in:
parent
94636380f1
commit
c931e87209
@ -260,13 +260,24 @@ export default {
|
||||
getStoreInfo({id}){
|
||||
return vm.$u.post('Store/getStoreInfo',{id})
|
||||
},
|
||||
// 评论标签+数量
|
||||
getEvaluateSpec({ id }) {
|
||||
return vm.$u.post('Specialci/getEvaluateSpec', {
|
||||
goods_id: id,
|
||||
})
|
||||
},
|
||||
// 获取商品评论
|
||||
getAllEvalue({ goods_id, page }) {
|
||||
getAllEvalue({ goods_id, page, type }) {
|
||||
return vm.$u.post('Specialci/getAllEvalue', {
|
||||
goods_id: goods_id,
|
||||
page: page,
|
||||
type: type,
|
||||
})
|
||||
},
|
||||
// 搜索发现列表
|
||||
searchwordlist() {
|
||||
return vm.$u.post('ShopSearch/searchwordlist')
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
<view class="content">
|
||||
<view class="text">{{ content.geval_content }}</view>
|
||||
</view>
|
||||
<view class="image-container">
|
||||
<image :src="src" v-for="(src, index) in content.geval_image" :key="index"></image>
|
||||
</view>
|
||||
<view class="reply" v-if="reply && content.geval_explain">
|
||||
<view class="title">掌柜回复:</view>
|
||||
<view class="content u-line-4">{{ content.geval_explain }}</view>
|
||||
@ -69,6 +72,18 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-container {
|
||||
margin: 20rpx 0;
|
||||
> image {
|
||||
width: 210rpx;
|
||||
height: 210rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
&:not(:nth-child(3n)) {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply {
|
||||
padding: 30rpx;
|
||||
background: rgba(240,238,238,1);
|
||||
|
@ -12,9 +12,11 @@
|
||||
<image :src="goods.goods_image"></image>
|
||||
<view class="goods-text">
|
||||
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
||||
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40">XL;红色条纹XL;红色条纹XL;红色条纹</view>
|
||||
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">距离结束:23:23:38</view>
|
||||
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥99.00,实付款¥99</view>
|
||||
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
|
||||
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
|
||||
</view>
|
||||
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间:{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view>
|
||||
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥{{ goods.goods_price }},实付款¥{{ goods.goods_pay_price }}</view>
|
||||
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
|
||||
<image src="@/pageE/static/mine/26.png"></image>
|
||||
<view>{{ order.add_time | date }}</view>
|
||||
@ -27,13 +29,14 @@
|
||||
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
|
||||
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
|
||||
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
|
||||
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
||||
<view class="payment" v-if="order.order_state == 10" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view>
|
||||
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
|
||||
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import common from '@/static/js/common.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -46,6 +49,14 @@ export default {
|
||||
created() {
|
||||
this.viewState();
|
||||
},
|
||||
filters: {
|
||||
// timeLine(timestamp) {
|
||||
// const timestamp = 0.5*60*60*1000;
|
||||
// const now = new Date().getTime();
|
||||
// let line = now - timestamp * 1000;
|
||||
// return common.getLineTime({ timestamp: line });
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
viewState() {
|
||||
let state;
|
||||
@ -92,6 +103,12 @@ export default {
|
||||
oid: this.order.order_id,
|
||||
});
|
||||
},
|
||||
payNow(pay_sn, order_amount) {
|
||||
this.$u.route('/pageC/cart/cashier', {
|
||||
pay_sn: pay_sn,
|
||||
price: order_amount,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -114,6 +131,7 @@ export default {
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 15rpx;
|
||||
background-color: aquamarine;
|
||||
}
|
||||
.store-name {
|
||||
font-size: 26rpx;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="comment">
|
||||
<view class="label-list">
|
||||
<view v-for="(label, index) in 5" :key="index" :class="{'active': current == index}" @click="current=index">{{ '全部(' + label * 389 + '}' }}</view>
|
||||
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + '}' }}</view>
|
||||
</view>
|
||||
<view class="comment-container">
|
||||
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
||||
@ -16,23 +16,44 @@ import comment from "@/components/comment/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
id: Number,
|
||||
current: '全部',
|
||||
page: 0,
|
||||
evalueList: [],
|
||||
evaluateSpec: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
comment
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getAllEvalue(option.id);
|
||||
this.id = option.id;
|
||||
// this.getAllEvalue();
|
||||
this.getEvaluateSpec();
|
||||
},
|
||||
watch: {
|
||||
current(value) {
|
||||
this.getAllEvalue(value);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAllEvalue(id) {
|
||||
this.$u.api.getAllEvalue({
|
||||
goods_id: id,
|
||||
page: this.page
|
||||
getEvaluateSpec() {
|
||||
this.$u.api.getEvaluateSpec({
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.evaluateSpec = res.data;
|
||||
this.getAllEvalue();
|
||||
}
|
||||
})
|
||||
},
|
||||
getAllEvalue(type) {
|
||||
let params = {
|
||||
goods_id: this.id,
|
||||
page: this.page,
|
||||
}
|
||||
if(type) Object.assign(params, { type: type });
|
||||
this.$u.api.getAllEvalue(params).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.evalueList = res.data;
|
||||
} else {
|
||||
|
@ -1,723 +0,0 @@
|
||||
<template>
|
||||
<view class="sdetails">
|
||||
<u-swiper :list="list" height="500" border-radius="0" mode="dot"></u-swiper>
|
||||
<view class="spike-view" v-if="type == 3">
|
||||
<view class="left">
|
||||
<view class="price">
|
||||
<view class="now-price">¥{{ groupbuyInfo.groupbuy_price }}</view>
|
||||
<view class="origin-price">¥{{ groupbuyInfo.goods_price }}</view>
|
||||
</view>
|
||||
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}件</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="title">秒杀倒计时</view>
|
||||
<view class="time">{{ spikeTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title u-line-2">
|
||||
<text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
|
||||
</view>
|
||||
<view class="pic">
|
||||
<text>¥{{ goodsInfo.goods_price }}</text>
|
||||
<s>¥{{ goodsInfo.goods_marketprice }}</s>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<!-- <navs :value="领券"></navs> -->
|
||||
<navs :value="'产品规格'"></navs>
|
||||
<!-- <navs :value="'产品颜色'"></navs> -->
|
||||
<!-- <navs :value="'选择尺码'"></navs> -->
|
||||
<!-- <navs v-for="(value, index) in goodsInfo.spec_name" :value="value" :key="index"></navs> -->
|
||||
<view class="comment">
|
||||
<view class="title">
|
||||
<view class="left">商品评价(1234)</view>
|
||||
<view class="right" @click="viewComment">
|
||||
<text>查看全部</text>
|
||||
<image src="/static/image/common/1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<comment :reply="false"></comment>
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="group-user" v-if="groupUser.length">
|
||||
<view class="top">
|
||||
<view class="title">{{ groupUser.length }}人正在拼团,可直接参与</view>
|
||||
<view class="view-more" @click="showGroupUser=true">
|
||||
<text>查看全部</text>
|
||||
<image src="/static/image/common/1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="left" @click="showGroupUser=true">
|
||||
<view class="avatar">
|
||||
<image v-for="(user, i) in user_suc" :src="user[0].member_avatar" :key="i"></image>
|
||||
</view>
|
||||
<view class="all" @click="showGroupUser=true">
|
||||
<text>查看全部</text>
|
||||
<image src="/static/image/common/1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="launch-user" @click="showGroupUser=true">
|
||||
<image :src="groupUser[0][0].member_avatar"></image>
|
||||
<text class="u-line-1">{{ groupUser[0][0].member_nickname }}</text>
|
||||
</view>
|
||||
<view class="involvement-user">
|
||||
<view class="item" v-for="(user, i) in groupUser.slice(1, 5)" :key="i" @click="showGroupUser=true">
|
||||
<image :src="user[0].member_avatar"></image>
|
||||
<text class="u-line-1">{{ user[0].member_nickname }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup v-model="showGroupUser" mode="center">
|
||||
<view class="launch-container">
|
||||
<view class="title u-line-1">正在拼团</view>
|
||||
<scroll-view class="launch-view">
|
||||
<view class="launch-user">
|
||||
<view class="item" v-for="(user, i) in groupUser" :src="user[0].member_avatar" :key="i" @click="involvemenGroup(user)">
|
||||
<image class="avatar" :src="user[0].member_avatar"></image>
|
||||
<view class="name u-line-1">{{ user[0].member_nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup v-model="showInvolvementUser" mode="center">
|
||||
<view class="involvement-container" v-if="involvemenGroupInfo.length">
|
||||
<view class="title u-line-1">参与{{ involvemenGroupInfo[0].member_nickname }}的拼团</view>
|
||||
<view class="involvement-view">
|
||||
<view class="item" v-for="(user, i) in involvemenGroupInfo" :key="i">
|
||||
<image class="avatar" :src="user.member_avatar"></image>
|
||||
<view class="name u-line-1">{{ user.member_nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="involvement-btn" @click="settlementOrder({ type: 'involvement' })">参与拼团</view>
|
||||
<image class="close" src="/static/image/common/17.png" @click="showInvolvementUser=false"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="xiangqing">
|
||||
<view class="heng"></view>
|
||||
<view class="title">商品详情</view>
|
||||
<view class="heng"></view>
|
||||
</view>
|
||||
<view class="rich">
|
||||
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
||||
</view>
|
||||
<tloos @buy="buy" @xuanze="xuanze" :id="goodsInfo.goods_commonid" :info="goodsInfo" :type="type" v-if="type"></tloos>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
/*
|
||||
* 详情是请求完存在 store 的,在这里从 store 取值
|
||||
**/
|
||||
import comment from "@/components/comment/index";
|
||||
import navs from "../components/sdetails/navs";
|
||||
import tloos from "../components/sdetails/tloos";
|
||||
export default {
|
||||
name: "sdetails",
|
||||
data() {
|
||||
return {
|
||||
list: [], // 轮播图列表
|
||||
goodsInfo: {},
|
||||
info: {},
|
||||
glist: [],
|
||||
id: 0, // 商品id
|
||||
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
groupUser: [], // 拼团用户
|
||||
user_suc: [], // 拼团成功用户
|
||||
avatarWidth: '',
|
||||
pintuan_id: '', // 拼团id
|
||||
showGroupUser: false, // 拼团
|
||||
showInvolvementUser: false, // 参团
|
||||
involvemenGroupInfo: [], // 参团的人
|
||||
groupbuyInfo: {}, // 秒杀详情
|
||||
spikeTime: '',
|
||||
timer: '', // 秒杀时间定时器
|
||||
}
|
||||
},
|
||||
components: {
|
||||
comment,
|
||||
navs,
|
||||
tloos,
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.id = this.$store.state.goods_id;
|
||||
this.type = this.$store.getters.getGoodsType;
|
||||
const info = this.$store.getters.getGoodsInfo;
|
||||
// 拼团商品
|
||||
if(this.type == 2) {
|
||||
this.user_suc = info.user_suc;
|
||||
this.groupUser = info.user;
|
||||
this.pintuan_id = info.pintuan_id;
|
||||
}
|
||||
// 秒杀商品
|
||||
if (this.type == 3) {
|
||||
this.groupbuyInfo = this.$store.state.groupbuyInfo;
|
||||
this.setSpikeTime();
|
||||
}
|
||||
// console.log(this.groupbuyInfo);
|
||||
this.goodsInfo = info.goods;
|
||||
// 设置轮播图
|
||||
let list = [];
|
||||
info.goods_image[0].forEach(item => {
|
||||
let temp = {
|
||||
image: item
|
||||
}
|
||||
list.push(temp);
|
||||
})
|
||||
this.list = list;
|
||||
this.setTitle();
|
||||
},
|
||||
spikeGoods() {
|
||||
this.settlementOrder()
|
||||
},
|
||||
setSpikeTime() {
|
||||
const time = this.groupbuyInfo.groupbuy_endtime;
|
||||
this.timer = setInterval(() => {
|
||||
let spikeTime = time * 1000 - new Date().getTime();
|
||||
// 计算天数
|
||||
const days = Math.floor(spikeTime/(24*3600*1000));
|
||||
//计算出小时数
|
||||
const leave1 = spikeTime % (24*3600*1000) // 计算天数后剩余的毫秒数
|
||||
let hours = Math.floor(leave1/(3600*1000));
|
||||
//计算相差分钟数
|
||||
const leave2 = leave1 % (3600*1000) // 计算小时数后剩余的毫秒数
|
||||
const minutes = Math.floor(leave2 / (60*1000))
|
||||
//计算相差秒数
|
||||
const leave3 = leave2 % (60*1000) // 计算分钟数后剩余的毫秒数
|
||||
const seconds = Math.round(leave3 / 1000)
|
||||
// 把天数算在小时里
|
||||
hours = days * 24 + hours;
|
||||
this.spikeTime = hours + ':' + minutes + ':' + seconds;
|
||||
// console.log(this.spikeTime);
|
||||
}, 1000)
|
||||
},
|
||||
buy(info) {
|
||||
if(info.type == 2){ // 加入购物车
|
||||
this.$u.api.addCart({
|
||||
goods_id: this.id,
|
||||
quantity: info.value,
|
||||
}).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: res.errCode == 0 ? 'success' : 'warning',
|
||||
})
|
||||
})
|
||||
} else if (info.type == 1) { // 支付
|
||||
this.settlementOrder({num: info.value});
|
||||
}
|
||||
},
|
||||
getGoodsDetails() {
|
||||
switch (this.type) {
|
||||
case 1:
|
||||
|
||||
break;
|
||||
case 2:
|
||||
|
||||
break;
|
||||
case 3:
|
||||
|
||||
break;
|
||||
case 4:
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
getGoodsDetails(id) {
|
||||
this.id = id;
|
||||
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
this.goodsInfo = res.data.goods;
|
||||
let list = [];
|
||||
res.data.goods_image[0].forEach(item => {
|
||||
let temp = {
|
||||
image: item
|
||||
}
|
||||
list.push(temp);
|
||||
})
|
||||
this.list = list;
|
||||
this.info = res.data.goods;
|
||||
this.glist = res.data.spec_list;
|
||||
// console.log(this.goodsInfo.mobile_body);
|
||||
}
|
||||
})
|
||||
this.$u.api.getGoodsDetails({ id: this.info.goods_id }).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
const goods = {
|
||||
goods: res.data,
|
||||
type: 1,
|
||||
}
|
||||
this.$store.commit('setGoodsDetails', goods);
|
||||
this.$store.commit('setGoodsId', this.info.goods_id);
|
||||
this.$u.route({
|
||||
url: 'pageB/sdetails/index',
|
||||
})
|
||||
// console.log(this.goodsInfo.mobile_body);
|
||||
}
|
||||
})
|
||||
},
|
||||
/*
|
||||
* @description 下单 订单步骤1:展示结算数据
|
||||
* @params {Number} type 拼团或者开团
|
||||
* @params {Number} num 数量
|
||||
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||
**/
|
||||
settlementOrder({type, num = 1, ifcart = 0} = {}) {
|
||||
let params = {
|
||||
ifcart: ifcart,
|
||||
cart_id: [this.goodsInfo.goods_id + '|' + num],
|
||||
}
|
||||
if(this.type == 2) {
|
||||
if(type == 'involvement') {
|
||||
Object.assign(params, {
|
||||
pintuan_id: this.pintuan_id,
|
||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id
|
||||
})
|
||||
} else {
|
||||
const userId = uni.getStorageSync('user_info').member.member_id;
|
||||
this.$store.commit('setGroupHeadId', userId);
|
||||
Object.assign(params, {
|
||||
pintuan_id: this.pintuan_id,
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$u.api.settlementOrder(params).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$store.commit('setOrderType', this.type);
|
||||
this.$store.commit('updateOrderInfo', res.data)
|
||||
this.$u.route({
|
||||
url: '/pageC/cart/ConfirmOrder'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 参团
|
||||
involvemenGroup(user) {
|
||||
this.involvemenGroupInfo = user;
|
||||
this.showGroupUser = false;
|
||||
this.showInvolvementUser = true;
|
||||
// console.log(this.involvemenGroupInfo);
|
||||
},
|
||||
xuanze(id){
|
||||
console.log(id)
|
||||
// this.getGoodsDetails(this.glist[id])
|
||||
},
|
||||
// 设置页面标题
|
||||
setTitle() {
|
||||
let title = '';
|
||||
switch (this.type) {
|
||||
case 1:
|
||||
title = '商品详情';
|
||||
break;
|
||||
case 2:
|
||||
title = '拼团商品详情';
|
||||
break;
|
||||
case 3:
|
||||
title = '秒杀商品详情';
|
||||
break;
|
||||
case 1:
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: title
|
||||
});
|
||||
},
|
||||
viewComment() {
|
||||
this.$u.route({
|
||||
url: 'pageB/comment/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.sdetails {
|
||||
padding-bottom: 98rpx;
|
||||
position: relative;
|
||||
background-color: #EEEBEE;
|
||||
.spike-view {
|
||||
position: absolute;
|
||||
top: 396rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 104rpx;
|
||||
background: rgba(255,120,15,1);
|
||||
opacity: 0.96;
|
||||
color:rgba(255,255,255,1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.left {
|
||||
height: 104rpx;
|
||||
flex: 1;
|
||||
padding-left: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.price {
|
||||
margin-bottom: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.now-price {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.origin-price {
|
||||
font-size: 26rpx;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
.num {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
height: 104rpx;
|
||||
width: 232rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&::before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
content: "";
|
||||
width: 2rpx;
|
||||
height: 104rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
}
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
.title {
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.info {
|
||||
background:rgba(255,255,255,1);
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.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;
|
||||
}
|
||||
}
|
||||
.pic{
|
||||
>text{
|
||||
font-size: 32rpx;
|
||||
color: #FF3131;
|
||||
}
|
||||
>s{
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
display: inline-block;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.comment {
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
padding: 30rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
.left {
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
.right {
|
||||
font-size: 24rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
> image {
|
||||
width: 8rpx;
|
||||
height: 16rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.hr {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
background-color: #ececec;
|
||||
}
|
||||
.group-user {
|
||||
padding: 30rpx;
|
||||
.top {
|
||||
margin-bottom: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
.view-more {
|
||||
font-size: 24rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
> image {
|
||||
margin-left: 10rpx;
|
||||
width: 8rpx;
|
||||
height: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
.left {
|
||||
margin-right: 40rpx;
|
||||
.avatar {
|
||||
width: 120rpx;
|
||||
height: 60rpx;
|
||||
margin-bottom: 16rpx;
|
||||
position: relative;
|
||||
@mixin avatar($left, $index) {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: $left;
|
||||
z-index: $index;
|
||||
}
|
||||
> image {
|
||||
&:first-child {
|
||||
background-color: aliceblue;
|
||||
@include avatar($left: 0rpx, $index: 7);
|
||||
}
|
||||
&:nth-child(2) {
|
||||
background-color: aquamarine;
|
||||
@include avatar($left: 30rpx, $index: 8);
|
||||
}
|
||||
&:nth-child(3) {
|
||||
background-color: antiquewhite;
|
||||
@include avatar($left: 60rpx, $index: 9);
|
||||
}
|
||||
}
|
||||
}
|
||||
.all {
|
||||
> image {
|
||||
margin-left: 10rpx;
|
||||
width: 8rpx;
|
||||
height: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
display: flex;
|
||||
image {
|
||||
background-color: aquamarine;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-bottom: 15rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.launch-user {
|
||||
margin-right: 40rpx;
|
||||
text-align: center;
|
||||
> text {
|
||||
width: 98rpx;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.involvement-user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.item {
|
||||
text-align: center;
|
||||
> text {
|
||||
display: block;
|
||||
width: 72rpx;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.launch-container {
|
||||
width: 558rpx;
|
||||
height: 655rpx;
|
||||
background: rgba(255,255,255,1);
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.title {
|
||||
text-align: center;
|
||||
padding: 40rpx 0;
|
||||
font-size: 32rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
position: relative;
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 558rpx;
|
||||
height: 2rpx;
|
||||
background: rgba(234,234,234,1);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.launch-view {
|
||||
height: 500rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 50rpx;
|
||||
.launch-user {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
.item {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
.avatar {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.name {
|
||||
font-size: 22rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
}
|
||||
&:not(:nth-child(3n)) {
|
||||
margin-right: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.close {
|
||||
position: absolute;
|
||||
width: 47rpx;
|
||||
height: 47rpx;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.involvement-container {
|
||||
width: 558rpx;
|
||||
height: 486rpx;
|
||||
background: rgba(255,255,255,1);
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.title {
|
||||
text-align: center;
|
||||
padding: 40rpx 0;
|
||||
font-size: 32rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
position: relative;
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 558rpx;
|
||||
height: 2rpx;
|
||||
background: rgba(234,234,234,1);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.involvement-view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 40rpx 0 70rpx;
|
||||
.item {
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
margin-right: 10rpx;
|
||||
.avatar {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.name {
|
||||
font-size: 22rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.involvement-btn {
|
||||
width: 400rpx;
|
||||
height: 88rpx;
|
||||
background: rgba(255,120,15,1);
|
||||
border-radius: 44rpx;
|
||||
font-size: 30rpx;
|
||||
color:rgba(255,255,255,1);
|
||||
text-align: center;
|
||||
line-height: 88rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.close {
|
||||
position: absolute;
|
||||
width: 47rpx;
|
||||
height: 47rpx;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.xiangqing{
|
||||
display: flex;
|
||||
height: 85rpx;
|
||||
background-color: #ececec;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.heng{
|
||||
width: 79rpx;
|
||||
height: 2rpx;
|
||||
background-color: #a9a9a9;
|
||||
|
||||
}
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
.title{
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
}
|
||||
.rich {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,19 +1,9 @@
|
||||
<template>
|
||||
<view class="search">
|
||||
<view class="sosuo">
|
||||
<image></image>
|
||||
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :action-style="{
|
||||
'font-size':'32rpx',
|
||||
'color':'#FF780F',
|
||||
'overflow':'unset'
|
||||
}"
|
||||
@search="search"
|
||||
></u-search>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="title">搜索发现</view>
|
||||
<view class="label">
|
||||
<text>这是标签</text>
|
||||
<text v-for="(label, index) in searchwordlist" :key="index" @click="search(label.word)">{{ label.word }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -23,17 +13,40 @@ export default {
|
||||
name:"search",
|
||||
data(){
|
||||
return{
|
||||
keyword:""
|
||||
keyword: "",
|
||||
searchwordlist: [],
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getWordList();
|
||||
},
|
||||
// 点击搜索按钮
|
||||
onNavigationBarButtonTap(e) {
|
||||
if(e.index == 0) this.search(this.keyword);
|
||||
},
|
||||
// 输入框文本变化
|
||||
onNavigationBarSearchInputChanged(e) {
|
||||
this.keyword = e.text;
|
||||
},
|
||||
// 点击键盘搜索按钮
|
||||
onNavigationBarSearchInputConfirmed(value) {
|
||||
this.search(this.keyword);
|
||||
},
|
||||
methods:{
|
||||
getWordList() {
|
||||
this.$u.api.searchwordlist().then(res => {
|
||||
this.searchwordlist = res.data;
|
||||
})
|
||||
},
|
||||
search(value){
|
||||
// console.log(value)
|
||||
// console.log(value)
|
||||
if(!value) this.$u.toast('搜索内容不可为空');
|
||||
this.$u.route({
|
||||
url:"/pageB/search/out",
|
||||
params:{
|
||||
value,
|
||||
type:"shop"
|
||||
url: "/pageB/search/out",
|
||||
params: {
|
||||
value: value,
|
||||
type: "shop",
|
||||
order: 'goods_salenum'
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -67,7 +80,8 @@ export default {
|
||||
}
|
||||
.label{
|
||||
display: flex;
|
||||
>text{
|
||||
flex-wrap: wrap;
|
||||
> text {
|
||||
margin-top: 20rpx;
|
||||
margin-right: 30rpx;
|
||||
font-size: 26rpx;
|
||||
|
@ -1,11 +1,7 @@
|
||||
<template>
|
||||
<view class="out">
|
||||
<view class="sosuo">
|
||||
<image></image>
|
||||
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :show-action="false"></u-search>
|
||||
</view>
|
||||
<u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
|
||||
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
|
||||
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
|
||||
<swiper-item>
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
<view style="padding-top:30rpx">
|
||||
@ -16,7 +12,7 @@
|
||||
<swiper-item>
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
<view class="list">
|
||||
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem>
|
||||
<!-- <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@ -31,14 +27,13 @@
|
||||
<view class="bottom bottomxz"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view data-type="hp" @click="sx(2)">好评</view>
|
||||
<view data-type="hp" @click="sx(2)">好评</view>
|
||||
</view>
|
||||
<swiper class="swiper" :current="swiperCurrent" @change="huadong">
|
||||
<swiper class="swiper" :current="swiperCurrent" @change="huadong">
|
||||
<swiper-item>
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
<view style="padding-top:30rpx">
|
||||
<shop v-for="(i,j) in shoplist[0]" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid" :image="i.goods_image"></shop>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@ -56,8 +51,6 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
@ -162,6 +155,11 @@ export default {
|
||||
shoplist:[]
|
||||
}
|
||||
},
|
||||
onLoad(o){
|
||||
this.type = o.type
|
||||
this.keyword = o.value
|
||||
this.search()
|
||||
},
|
||||
methods: {
|
||||
tabsChange(index) {
|
||||
this.swiperCurrent = index;
|
||||
@ -189,10 +187,5 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(o){
|
||||
this.type = o.type
|
||||
this.keyword = o.value
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
</script>
|
@ -117,6 +117,7 @@ export default {
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.getUserInfo();
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -71,7 +71,7 @@
|
||||
<view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
|
||||
<view class="payment" v-if="state == '6'">立即支付</view>
|
||||
<view class="payment" v-if="state == '6'" @click="payNow">立即支付</view>
|
||||
<view class="service" v-if="state == '7'">联系官方客服</view>
|
||||
<view class="submit" v-if="state == '7'">提交官方审核</view>
|
||||
</view>
|
||||
@ -186,6 +186,12 @@ export default {
|
||||
title: title
|
||||
});
|
||||
},
|
||||
payNow() {
|
||||
this.$u.route('/pageC/cart/cashier', {
|
||||
pay_sn: this.orderInfo.pay_sn,
|
||||
price: this.orderInfo.order_amount,
|
||||
});
|
||||
},
|
||||
toOtherPage(url) {
|
||||
this.$u.route('/pageE/order/' + url, {
|
||||
oid: this.orderInfo.order_id,
|
||||
|
51
pages.json
51
pages.json
@ -127,17 +127,55 @@
|
||||
{
|
||||
"path": "search/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"titleColor": "#333333",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [
|
||||
{
|
||||
"type":"none",
|
||||
"text":"搜索",
|
||||
"float":"right",
|
||||
"fontSize":"16",
|
||||
"color": "#FF780F"
|
||||
}
|
||||
],
|
||||
"searchInput": {
|
||||
"align": "left",
|
||||
"borderRadius": "15px",
|
||||
"placeholder": "搜索您需要的商品",
|
||||
"backgroundColor": "rgb(236,236,236)",
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "search/out",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"titleColor": "#333333",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [
|
||||
{
|
||||
"type":"none",
|
||||
"text":"搜索",
|
||||
"float":"right",
|
||||
"fontSize":"16",
|
||||
"color": "#FF780F"
|
||||
}
|
||||
],
|
||||
"searchInput": {
|
||||
"align": "left",
|
||||
"borderRadius": "15px",
|
||||
"placeholder": "搜索您需要的商品",
|
||||
"backgroundColor": "rgb(236,236,236)",
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -178,7 +216,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "cart/index",
|
||||
|
@ -43,5 +43,29 @@ const common = {
|
||||
});
|
||||
return promise;
|
||||
},
|
||||
/**
|
||||
* 将 php 时间戳转化为时分秒
|
||||
* @param { String } timestamp php 时间戳
|
||||
* @param { String } format 间隔符 默认 '26:14:25'
|
||||
* @return { String } 格式化时间
|
||||
*/
|
||||
getLineTime({ timestamp, format } = {}) {
|
||||
const days = Math.floor(timestamp / (24 * 3600 * 1000));
|
||||
//计算出小时数
|
||||
const leave1 = timestamp % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数
|
||||
let hours = Math.floor(leave1 / (3600 * 1000));
|
||||
//计算相差分钟数
|
||||
const leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
|
||||
const minutes = Math.floor(leave2 / (60 * 1000))
|
||||
//计算相差秒数
|
||||
const leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
|
||||
const seconds = Math.round(leave3 / 1000)
|
||||
// 把天数算在小时里
|
||||
hours = days * 24 + hours;
|
||||
let result;
|
||||
if(format) result = hours + format + minutes + format + seconds;
|
||||
else result = hours + ':' + minutes + ':' + seconds;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
export default common
|
Loading…
Reference in New Issue
Block a user