Browse Source

优化

master
ltlzx 3 years ago
parent
commit
741ac42816
  1. 10
      pages.json
  2. 81
      pages/account/index.vue
  3. 2
      pages/account/message.vue
  4. 43
      pages/account/myOrders.vue
  5. 2
      pages/account/myReview.vue
  6. 14
      pages/category/index.vue
  7. 8
      pages/category/productList.vue
  8. 39
      pages/index/flashSale.vue
  9. 15
      pages/index/index.vue
  10. 67
      pages/index/search.vue
  11. 56
      pages/order/details.vue
  12. 97
      pages/productDetails/goodsReview.vue
  13. 48
      pages/productDetails/index.vue
  14. 7
      pages/productDetails/review.vue
  15. 23
      pages/shippingCart/index.vue

10
pages.json

@ -186,8 +186,7 @@
{
"path": "pages/shippingCart/index",
"style": {
"titleNView":false,
"enablePullDownRefresh":true
"titleNView":false
}
},
{
@ -196,6 +195,13 @@
"titleNView":false
}
},
{
"path": "pages/productDetails/goodsReview",
"style": {
"navigationBarTitleText":"Review",
"navigationBarBackgroundColor":"#FFFFFF"
}
},
{
"path": "pages/account/myReview",
"style": {

81
pages/account/index.vue

@ -99,34 +99,77 @@
</view>
<image src="../../static/img/mine_banner.png" class="mine_banner" mode=""></image>
<view class="order_title">Recommend</view>
<scroll-view class="spike1" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom1">
<view class="spike1_item_text">Adidas Yeezy Boost 350 DazzlingBlue Black</view>
<text class="spike1_item_text1">US$314.00</text>
<template v-if="catList.length!=0">
<view class="order_title">Recommend</view>
<scroll-view class="spike1" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in catList" :key="index" @click="goDetails(item.id)">
<view class="spike1_item_img">
<image :src="item.thumb" mode=""></image>
</view>
<view class="spike1_item_bottom1">
<view class="spike1_item_text">{{item.name}}</view>
<text class="spike1_item_text1">US${{item.is_promote==0? item.shop_price :item.promote_price}}</text>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</template>
</view>
</view>
</template>
<script>
import {defaultRequest2} from '../../api/index.js'
import {defaultRequest,defaultRequest2,defaultRequest4} from '../../api/index.js'
export default {
data() {
return {
user_info:{
isLogin:false,
}
},
//
catQuery:{
_action:'getgoods',
page_index:1,
page_size:30,
type:'best'
},
catList:[]
}
},
methods:{
goDetails(id){
uni.navigateTo({
url:'/pages/productDetails/index?goods_id='+id
})
},
//
getCatList(type){
defaultRequest4(this.catQuery).then(res=>{
console.info(res)
if(res.error==0){
if(res.data){
this.catList=res.data
}
}
})
},
//
getIndex(){
let data={_action:'getpagedata',pagecode:'006-PERSONALCENTERPAGE'}
defaultRequest(data).then(res=>{
console.info(res)
if(res.error==0){
// this.indexDate=res.data
// res.data.zones.map(item=>{
// if(item.zone_code=='ICON'){
// item.content=''
// this.info.push(item)
// }
// })
}
})
},
getUserInfo(){
let data={_action:'getinfo'}
defaultRequest2(data).then(res=>{
@ -146,6 +189,8 @@
if(this.user_info){
this.getUserInfo()
}
// this.getIndex()
this.getCatList()
}
}
@ -262,14 +307,18 @@
.spike1_item_img{
width: 286.67rpx;
height: 286.67rpx;
background-color: #999999;
image{
width: 100%;
height: 100%;
}
}
.spike1_item_bottom{
padding-left: 9.33rpx;
margin-top: 22.67rpx;
.spike1_item_text{
width: 100%;
color: #9D9D9D;
font-size: 21.33rpx;
text-decoration: line-through;
@ -291,6 +340,10 @@
font-weight: 400;
margin-bottom: 20.67rpx;
white-space: break-spaces;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
}

2
pages/account/message.vue

@ -1,7 +1,7 @@
<template>
<view>
<uni-nav-bar left-icon="left" :statusBar="true" title="Message"
color="#000000" rightIcon="info" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
color="#000000" rightIcon="info" @clickLeft="back" :border="false"/>
<view class="body">
<view class="msg_item" v-for="(item,index) in list" :key="index">

43
pages/account/myOrders.vue

@ -29,7 +29,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -82,6 +82,7 @@
</template>
<!-- 已完成订单 -->
<template v-if="item.pay_status_code==2 && item.shipping_status_code==2">
<button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button>
<button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
<button class="pay" @click.stop="goComment(item)" v-if="item.comment_status_code==0">COMMENT</button>
</template>
@ -105,7 +106,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -164,7 +165,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -213,7 +214,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -266,7 +267,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -299,6 +300,7 @@
</template>
<view class="good_price">total:US${{item.total_fee_o}}</view>
<view class="order_button">
<button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button>
<button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
<button class="pay" @click.stop="goComment(item)" v-if="item.comment_status_code==0">COMMENT</button>
</view>
@ -319,7 +321,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -371,7 +373,7 @@
</view>
<view class="order_content">
<template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
@ -414,7 +416,9 @@
<view class="order1">
<image src="../../static/img/order_nodate.png" mode=""></image>
<text>You made no order yet!</text>
<button>Continue shopping</button>
<navigator url="/pages/category/index" open-type="switchTab">
<button>Continue shopping</button>
</navigator>
</view>
</template>
</view>
@ -473,7 +477,7 @@
<image src="../../static/img/close1.png" mode="" @click="isShow=false"></image>
</view>
<view class="order_popup_commodity" >
<view class="good_info" v-for="(item,index) in goods_list " :key="index">
<view class="good_info" v-for="(item,index) in goods_list " :key="index" @click.stop="goGoodsDetails(item.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item.goods_img" mode=""></image>
@ -534,6 +538,12 @@
}
},
methods:{
//
goGoodsDetails(id){
uni.navigateTo({
url:'/pages/productDetails/index?goods_id='+id
})
},
//
goComment(item){
uni.navigateTo({
@ -555,15 +565,15 @@
goDetails(item,id){
let index
if(item.pay_status_code==0 && item.order_status_code==0){
index=3
index=0
}else if(item.order_status_code==2){
index=1
index=4
}else if(item.pay_status_code==2 && item.shipping_status_code==0){
index=0
index=1
}else if(item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4){
index=4
}else if(item.pay_status_code==2 && item.shipping_status_code==2){
index=2
}else if(item.pay_status_code==2 && item.shipping_status_code==2){
index=3
}else if(item.order_status_code==4){
// 退
index=5
@ -650,6 +660,11 @@
console.info(res)
if(res.error==0){
this.orderList=res.data
if(this.orderList.length==0){
this.isList=false
}else{
this.isList=true
}
}
})
},

2
pages/account/myReview.vue

@ -48,7 +48,7 @@
},
onLoad(e) {
this.query.goods_id=e.goods_id
this.getList()
// this.getList()
}
}
</script>

14
pages/category/index.vue

@ -11,10 +11,14 @@
</view>
</navigator>
<view class="navigation_title_right">
<image src="../../static/img/like.png" mode=""></image>
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
<navigator url="/pages/account/wishlist">
<image src="../../static/img/like.png" mode=""></image>
</navigator>
<navigator url="/pages/shippingCart/index" open-type="switchTab">
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
</navigator>
</view>
</view>
@ -136,7 +140,7 @@
width: 44rpx;
height: 44rpx;
}
>image:first-child{
>uni-navigator:first-child{
margin-right: 32.67rpx;
}
}

8
pages/category/productList.vue

@ -10,9 +10,11 @@
</block>
<block slot="right">
<view class="nav_right">
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
<navigator url="/pages/shippingCart/index" open-type="switchTab">
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
</navigator>
</view>
</block>
</uni-nav-bar>

39
pages/index/flashSale.vue

@ -6,7 +6,8 @@
<view class="body">
<view class="countDown">
<text>Ends in</text>
<uni-countdown :showDay="false" :hour="23" :minute="0" :second="0" color="#FFFFFF" background-color="#1B1B1B" class="countDown_assembly" />
<uni-countdown :showDay="false" :hour="curEndTime |hours" :minute="curEndTime|minutes" :second="curEndTime|seconds"
color="#FFFFFF" background-color="#1B1B1B" class="countDown_assembly" />
</view>
<view class="tips">
Chic selects commodities from time to time to carry
@ -15,7 +16,7 @@
<view class="tips1">The quantity of special price commodities is limited and will be sold out</view>
<view class="recommend">
<view class="recommend_content">
<view class="recommend_content_item" v-for="(item,index) in list " :key="index">
<view class="recommend_content_item" v-for="(item,index) in list " :key="index" @click="goDetails(item.id)">
<view class="recommend_content_item_image">
<image :src="item.goods_img" mode=""></image>
</view>
@ -43,7 +44,41 @@
list:[]
}
},
computed:{
//
curEndTime(){
const endtime = new Date(new Date().setHours(23,59,59,999)).getTime()
//
const nowtime=(new Date()).getTime();
var date3 = nowtime - endtime; //
date3 = Math.abs(date3)
return date3;
}
},
filters:{
hours (timestamp){
var leave1=timestamp%(24*3600*1000) //
var hours=Math.floor(leave1/(3600*1000))
return hours
},
minutes(timestamp){
var leave2=(timestamp%(24*3600*1000))%(3600*1000) //
var minutes=Math.floor(leave2/(60*1000))
return minutes
},
seconds(timestamp){
var leave3=((timestamp%(24*3600*1000))%(3600*1000))%(60*1000) //
var seconds=Math.round(leave3/1000)
return seconds
}
},
methods:{
goDetails(id){
uni.navigateTo({
url:"../productDetails/index?goods_id="+id
})
},
getList(){
let data ={_action:'getseckillgoods',gid:'213'}
defaultRequest(data).then(res=>{

15
pages/index/index.vue

@ -17,10 +17,15 @@
</template>
<view class="navigation_title_right">
<image src="../../static/img/like.png" mode=""></image>
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
<navigator url="/pages/account/wishlist">
<image src="../../static/img/like.png" mode=""></image>
</navigator>
<navigator url="/pages/shippingCart/index" open-type="switchTab">
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
</navigator>
</view>
</view>
<navigator url="/pages/index/search">
@ -437,7 +442,7 @@
display: flex;
align-items: center;
>image:first-child{
>uni-navigator:first-child{
margin-right: 32.67rpx;
}
}

67
pages/index/search.vue

@ -22,16 +22,18 @@
<view class="history_title">
<text>Figured youd want it</text>
</view>
<view class="history_lable">
<!-- <view class="history_lable">
<view class="lable_item">Gold Necklaces</view>
<view class="lable_item">Push Up Swimsuit</view>
</view>
</view> -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<view class="spike1_item" v-for="(item,index) in catList" :key="index" @click="goDetails(item.id)">
<view class="spike1_item_img">
<image :src="item.thumb" mode=""></image>
</view>
<view class="spike1_item_bottom">
<text>US$314.00</text>
<view class="spike1_item_text">US$12.5</view>
<text>US${{item.is_promote==0? item.shop_price :item.promote_price}}</text>
<view class="spike1_item_text">US${{ item.shop_price }}</view>
</view>
</view>
</scroll-view>
@ -41,20 +43,64 @@
</template>
<script>
import {defaultRequest} from '../../api/index.js'
import {defaultRequest,defaultRequest4} from '../../api/index.js'
export default {
data() {
return {
searchValue:''
searchValue:'',
//
catQuery:{
_action:'getgoods',
page_index:1,
page_size:30,
type:'best'
},
catList:[]
}
},
methods:{
goDetails(id){
uni.navigateTo({
url:'/pages/productDetails/index?goods_id='+id
})
},
//
getCatList(type){
defaultRequest4(this.catQuery).then(res=>{
console.info(res)
if(res.error==0){
if(res.data){
this.catList=res.data
}
}
})
},
//
getIndex(){
let data={_action:'getpagedata',pagecode:'SEARCHHOT'}
defaultRequest(data).then(res=>{
console.info(res)
if(res.error==0){
// this.indexDate=res.data
// res.data.zones.map(item=>{
// if(item.zone_code=='ICON'){
// item.content=''
// this.info.push(item)
// }
// })
}
})
},
search(){
if(this.searchValue=='')return
uni.navigateTo({
url:'../category/productList?keyword='+this.searchValue+'&type=1'
})
}
},
onLoad() {
// this.getIndex()
this.getCatList()
}
}
</script>
@ -131,8 +177,11 @@
.spike1_item_img{
width: 200rpx;
height: 200rpx;
background-color: #999999;
image{
width: 100%;
height: 100%;
}
}
.spike1_item_bottom{
padding-left: 9.33rpx;

56
pages/order/details.vue

@ -1,7 +1,7 @@
<template>
<view class="body">
<view class="details_title">
<view class="shipped" v-if="details_index==0">
<view class="shipped" v-if="details_index==1">
<view class="shipped_left">
<image src="../../static/img/order_shipped.png" mode=""></image>
</view>
@ -11,7 +11,7 @@
</view>
</view>
<view class="cancelled" v-if="details_index==1">
<view class="cancelled" v-if="details_index==4">
<view class="cancelled_left">
<image src="../../static/img/close2.png" mode=""></image>
<view class="cancelled_left_info">
@ -22,7 +22,7 @@
</view>
<view class="cancelled completed" v-if="details_index==2">
<view class="cancelled completed" v-if="details_index==3" @click="goLogistics">
<view class="cancelled_left">
<image src="../../static/img/completed.png" mode=""></image>
<view class="cancelled_left_info">
@ -35,7 +35,7 @@
</view>
</view>
<view class="cancelled toPaid" v-if="details_index==3">
<view class="cancelled toPaid" v-if="details_index==0">
<view class="cancelled_left">
<view >
<text class="shipped_right_text">Waiting for payment</text>
@ -48,7 +48,7 @@
</view>
</view>
<view class="cancelled transit" @click="goLogistics" v-if="details_index==4">
<view class="cancelled transit" @click="goLogistics" v-if="details_index==2">
<view class="cancelled_left" >
<image src="../../static/img/transit.png" mode=""></image>
<view class="cancelled_left_info">
@ -80,7 +80,7 @@
</view>
<view class="order_popup_commodity">
<view class="good_info" v-for="(item,index) in goods_list " :key="index">
<view class="good_info" v-for="(item,index) in goods_list " :key="index" @click="goDetails(item.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item.goods_thumb" mode=""></image>
@ -96,7 +96,7 @@
</view>
<view class="info_price">
<text>US${{item.subtotal}}</text>
<button v-if="details_index!=3 && details_index!=1">RREFUND</button>
<button v-if="details_index!=0 && details_index!=4">RREFUND</button>
</view>
</view>
</view>
@ -109,7 +109,7 @@
<view class="summary_item">
<view>
Subtotal
<text :class="details_index==4?'summary_item_text1':'summary_item_text'">Tax included</text>
<text :class="details_index==2?'summary_item_text1':'summary_item_text'">Tax included</text>
</view>
<view class="summary_item_right">US${{goodsDate.goods_amount}}</view>
</view>
@ -125,7 +125,7 @@
<view>Order total</view>
<view>US${{goodsDate.order_amount}}</view>
</view>
<view class="summary_tips" v-if="details_index==3">
<view class="summary_tips" v-if="details_index==0">
<image src="../../static/img/gantan1.png" mode=""></image>
<text>Reward 10 points</text>
</view>
@ -148,36 +148,36 @@
<view>Order Time</view>
<view class="summary_item_right">{{goodsDate.formated_add_time}}</view>
</view>
<view class="summary_item" v-if="details_index!=3 && goodsDate.formated_pay_time">
<view class="summary_item" v-if="details_index!=0 && goodsDate.formated_pay_time">
<view>Payment time</view>
<view class="summary_item_right">{{goodsDate.formated_pay_time}}</view>
</view>
<view class="summary_item" v-if="details_index==4">
<view class="summary_item" v-if="details_index==2">
<view>Delivery time</view>
<view class="summary_item_right">{{goodsDate.formated_shipping_time}}</view>
</view>
<!-- 完成时间 -->
<view class="summary_item" v-if="details_index==2">
<view class="summary_item" v-if="details_index==3">
<view>Completion time</view>
<view class="summary_item_right"></view>
</view>
<!-- 取消时间 -->
<view class="summary_item" v-if="details_index==1">
<view class="summary_item" v-if="details_index==4">
<view>Cancel time</view>
<view class="summary_item_right"></view>
</view>
</view>
<view class="details_footer" v-if="details_index!=0">
<button class="white" v-if="details_index==2 || details_index==4" @click="goLogistics">LOGISTICS</button>
<button class="white" v-if="details_index==1 || details_index==2" @click.stop="openTips(1)">DELETE ORDER</button>
<button class="black" v-if="details_index==2 && goodsDate.comment_status_code==0" @click="goComment()">COMMENT</button>
<view class="details_footer" v-if="details_index!=1">
<button class="white" v-if="details_index==4 || details_index==2 || details_index==3" @click="goLogistics">LOGISTICS</button>
<button class="white" v-if="details_index==4 || details_index==3" @click.stop="openTips(1)">DELETE ORDER</button>
<button class="black" v-if="details_index==3 && goodsDate.comment_status_code==0" @click="goComment()">COMMENT</button>
<button class="white" v-if="details_index==3 " @click.stop="openTips(0)">CANCEL ORDER</button>
<button class="black" v-if="details_index==3" @click="isPay=true">PAY NOW</button>
<button class="white" v-if="details_index==0 " @click.stop="openTips(0)">CANCEL ORDER</button>
<button class="black" v-if="details_index==0" @click="isPay=true">PAY NOW</button>
<button class="black" v-if="details_index==4" @click.stop="openTips(2)">CONFIRM RECEIPT</button>
<button class="black" v-if="details_index==2" @click.stop="openTips(2)">CONFIRM RECEIPT</button>
</view>
<!-- 支付 -->
@ -238,7 +238,8 @@
export default {
data() {
return {
// 0 1 2 3 4
// 0 1 2 3 4 ()
// 0 1 2 3 4
details_index:4,
query:{
_action:'getorder',
@ -267,6 +268,12 @@
}
},
methods:{
//
goDetails(id){
uni.navigateTo({
url:'/pages/productDetails/index?goods_id='+id
})
},
//
goComment(){
let data=this.goodsDate
@ -299,6 +306,13 @@
defaultRequest2(this.cancelQuery).then(res=>{
console.info(res)
if(res.error==0){
if(this.tipsType==0){
this.details_index=4
}else if(this.tipsType==1){
uni.navigateBack()
}else{
this.details_index=3
}
this.getList()
}
})

97
pages/productDetails/goodsReview.vue

@ -0,0 +1,97 @@
<template>
<view class="body">
<template v-if="list.length!=0">
<view class="reviews_item" v-for="(item,index) in list" :key="index">
<view class="reviews_item_title">
<view class="reviews_title_user">
<text>{{item.user_name}}</text>
<uni-rate size="18" :disabled="true" disabledColor="red" :value="item.comment_rank" active-color="red" :is-fill="false"/>
</view>
<view class="reviews_title_time">{{item.add_time}}</view>
</view>
<view class="reviews_item_color">{{item.commentlabels}}</view>
<view class="reviews_item_content">{{item.content}}</view>
<!-- <view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item,index) in 3" :key="index"></view>
</view> -->
</view>
</template>
<view class="noreview" v-else>No comment for the time being</view>
<!-- <view class="mask" v-show="isShwo" @click="isShwo=false"></view> -->
</view>
</template>
<script>
import {defaultRequest,defaultRequest2} from '../../api/index.js'
export default {
data() {
return {
isShwo:false,
query:{
_action:'getgoodscomment',
goods_id:'',
page_index:1,
page_size:10,
commentlabel:''
},
list:[]
}
},
methods:{
getList(){
defaultRequest(this.query).then(res=>{
console.info(res)
if(res.error==0){
if(res.data)this.list=res.data
}
})
}
},
onLoad(e) {
this.query.goods_id=e.goods_id
this.getList()
}
}
</script>
<style>
page{
border-top: 14.67rpx #F6F5FA solid;
}
</style>
<style lang="scss" scoped>
.body{
padding: 0 32rpx;
}
.noreview{
text-align: center;
margin-top: 100rpx;
color: #767575;
}
.more{
text-align: right;
position: relative;
// margin-top: 20rpx;
image{
width: 24rpx;
height: 6.67rpx;
}
.more_delete{
background-image: url(@/static/img/more_bf.png);
background-size: 100% 100%;
width: 102.67rpx;
height: 67.33rpx;
position: absolute;
right: 0;
bottom: 20rpx;
line-height: 50rpx;
text-align: center;
font-size: 24rpx;
z-index: 999;
}
}
.mask{
background-color: white;
opacity: 0;
}
</style>

48
pages/productDetails/index.vue

@ -10,9 +10,11 @@
</view>
<block slot="right">
<view class="nav_right">
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
<navigator url="/pages/shippingCart/index" open-type="switchTab">
<uni-badge :text="5" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
</uni-badge>
</navigator>
</view>
</block>
</uni-nav-bar>
@ -53,7 +55,8 @@
</view>
<view class="special_right">
<text>End in</text>
<uni-countdown :showDay="false" :hour="23" :minute="0" :second="0" splitorColor="#FFFFFF" color="#FFFFFF" background-color="#B22234" class="countdown" />
<uni-countdown :showDay="false" :hour="curEndTime |hours" :minute="curEndTime|minutes" :second="curEndTime|seconds"
splitorColor="#FFFFFF" color="#FFFFFF" background-color="#B22234" class="countdown" />
<image src="../../static/img/right2.png" mode=""></image>
</view>
</view>
@ -193,15 +196,15 @@
<view class="reviews_item_title">
<view class="reviews_title_user">
<text>{{item.user_name}}</text>
<uni-rate size="18" :disabled="true" disabledColor="red" :value="4" active-color="red" :is-fill="false"/>
<uni-rate size="18" :disabled="true" disabledColor="red" :value="item.comment_rank" active-color="red" :is-fill="false"/>
</view>
<view class="reviews_title_time">{{item.add_time}}</view>
</view>
<view class="reviews_item_color">{{item.commentlabels}}</view>
<view class="reviews_item_content">{{item.content}}</view>
<view class="reviews_item_image">
<!-- <view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item,index) in 2" :key="index"></view>
</view>
</view> -->
</view>
</template>
</view>
@ -381,11 +384,40 @@
}
}
},
computed:{
//
curEndTime(){
const endtime = new Date(new Date().setHours(23,59,59,999)).getTime()
//
const nowtime=(new Date()).getTime();
var date3 = nowtime - endtime; //
date3 = Math.abs(date3)
return date3;
}
},
filters:{
hours (timestamp){
var leave1=timestamp%(24*3600*1000) //
var hours=Math.floor(leave1/(3600*1000))
return hours
},
minutes(timestamp){
var leave2=(timestamp%(24*3600*1000))%(3600*1000) //
var minutes=Math.floor(leave2/(60*1000))
return minutes
},
seconds(timestamp){
var leave3=((timestamp%(24*3600*1000))%(3600*1000))%(60*1000) //
var seconds=Math.round(leave3/1000)
return seconds
}
},
methods:{
//
goReview(){
uni.navigateTo({
url:'../account/myReview?goods_id='+this.query.goods_id
url:'./goodsReview?goods_id='+this.query.goods_id
})
},
//

7
pages/productDetails/review.vue

@ -12,7 +12,7 @@
<view class="good_info" >
<view class="good_info_left ">
<view class="good_info_image">
<image :src="item.goods_img" mode=""></image>
<image :src="item.goods_thumb || item.goods_img" mode=""></image>
</view>
<view class="left_info">
<view class="info_name">{{item.goods_name}}</view>
@ -92,7 +92,8 @@
if(this.reviewType==0){
this.commentordergoods()
}else{
data=this.query1
// data=this.query1
this.commentordergoods1()
}
console.info(data)
},
@ -112,7 +113,7 @@
})
},
//
commentordergoods(){
commentordergoods1(){
defaultRequest2(this.query1,'comments').then(res=>{
console.info(res)
if(res.error==0){

23
pages/shippingCart/index.vue

@ -47,7 +47,7 @@
</view>
</view>
<view class="cart">
<!-- <view class="cart">
<view class="cart_content">
<view class="good_info" v-for="(item,index) in 3 " :key="index">
<image src="../../static/img/select.png" mode="" class="cart_select"></image>
@ -74,7 +74,7 @@
</view>
</view>
</view>
</view> -->
</template>
@ -128,7 +128,8 @@
catQuery:{
_action:'getgoods',
page_index:1,
page_size:10
page_size:30,
type:'best'
},
catList:[],
isReachBottom:true,
@ -307,14 +308,14 @@
uni.showTabBar()
},
//
onReachBottom(){
if(!this.isReachBottom)return
this.catQuery.page_index++
this.getCatList(1)
},
onPullDownRefresh(){
uni.stopPullDownRefresh()
}
// onReachBottom(){
// if(!this.isReachBottom)return
// this.catQuery.page_index++
// this.getCatList(1)
// },
// onPullDownRefresh(){
// uni.stopPullDownRefresh()
// }
}
</script>

Loading…
Cancel
Save