main
liudan 2 years ago
parent 2b8446074a
commit 2394404ef9
  1. 13
      components/shopro-goods-card/shopro-goods-card.vue
  2. 4
      env.js
  3. 2
      manifest.json
  4. 47
      pages/app/score/list.vue
  5. 12
      pages/index/category/one-catgory.vue
  6. 6
      pages/index/components/sh-goods-card.vue
  7. 4
      pages/index/components/sh-grid-swiper.vue
  8. 4
      pages/index/components/sh-hot-goods.vue
  9. 67
      pages/index/components/sh-seckill.vue
  10. 15
      pages/index/index.vue
  11. 74
      pages/index/index/home-head.vue
  12. 67
      pages/index/list.vue
  13. 24
      pages/order/confirm.vue
  14. 54
      pages/order/list.vue
  15. 3
      pages/user/address/edit.vue
  16. BIN
      static/images/30.png
  17. BIN
      static/images/bg.png
  18. BIN
      static/images/score.png
  19. 2
      uni.scss

@ -31,7 +31,8 @@
<view class="" v-if="!detail.is_sku"> <view class="" v-if="!detail.is_sku">
<button class="u-reset-button cart-btn u-flex u-col-center u-row-center" <button class="u-reset-button cart-btn u-flex u-col-center u-row-center"
v-if="!isCart(detail.id)" @tap.stop="addCart(detail.sku_price[0])"> v-if="!isCart(detail.id)" @tap.stop="addCart(detail.sku_price[0])">
<view class="u-iconfont uicon-shopping-cart-fill" style="color: #fff;"></view> <text style="font-size:30rpx;color:#ffffff">+</text>
<!-- <view class="u-iconfont uicon-shopping-cart-fill" style="color: #fff;"></view> -->
</button> </button>
<view class="num-step" @tap.stop v-else> <view class="num-step" @tap.stop v-else>
<u-number-box :value="checkCart[detail.id].num" :min="0" :step="1" :long-press="false" <u-number-box :value="checkCart[detail.id].num" :min="0" :step="1" :long-press="false"
@ -287,8 +288,8 @@
.title { .title {
width: 330rpx; width: 330rpx;
vertical-align: center; vertical-align: center;
font-size: 28rpx; font-size: 30rpx;
font-weight: bold; // font-weight: bold;
line-height: 40rpx; line-height: 40rpx;
color: #333333; color: #333333;
padding-top: 6rpx; padding-top: 6rpx;
@ -307,6 +308,8 @@
} }
.price-box { .price-box {
display: flex;
align-items: center;
.price { .price {
font-size: 30rpx; font-size: 30rpx;
color: #ff3000; color: #ff3000;
@ -323,6 +326,7 @@
font-weight: 400; font-weight: 400;
text-decoration: line-through; text-decoration: line-through;
color: #c4c4c4; color: #c4c4c4;
margin-left:10rpx;
} }
.sales-box { .sales-box {
@ -341,7 +345,8 @@
height: 54rpx; height: 54rpx;
border-radius: 50%; border-radius: 50%;
padding: 0; padding: 0;
background: linear-gradient(90deg, #17C161, #eecc89); // background: linear-gradient(90deg, #17C161, #eecc89);
background: #17C161;
} }
} }
} }

@ -1,12 +1,12 @@
export const BASE_URL = 'https://jf.tgjiaofuji.com' export const BASE_URL = 'https://shetuan.njrzwl.cn'
// 接口路径 // 接口路径
export const API_URL = `${BASE_URL}/addons/shopro/` export const API_URL = `${BASE_URL}/addons/shopro/`
// 全局网络图片地址变量,css背景图片地址变量在uni.scss中定义 // 全局网络图片地址变量,css背景图片地址变量在uni.scss中定义
export const IMG_URL = 'https://jf.tgjiaofuji.com' export const IMG_URL = 'https://shetuan.njrzwl.cn'
//高德地图开发者Web服务key,逆坐标解析必须 //高德地图开发者Web服务key,逆坐标解析必须
// export const MAP_KEY = '3c01d0f0e3a43db3208c27ac0d0e8686' // export const MAP_KEY = '3c01d0f0e3a43db3208c27ac0d0e8686'

@ -163,7 +163,7 @@
}, },
"quickapp" : {}, "quickapp" : {},
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx7240e854df6e67f7", "appid" : "wx651082f690c13ab8",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : true, "es6" : true,

@ -1,6 +1,18 @@
<!-- 积分商品列表 --> <!-- 积分商品列表 -->
<template> <template>
<view class="score-wrap"> <view class="score-wrap">
<view class="scoreInfo">
<image src="../../../static/images/score.png" mode="heightFix"></image>
<view class="scoreNum">
<view style="font-weight: bold;font-size:30rpx;margin-bottom:20rpx;">可用积分</view>
<view class="">{{ userInfo.score || '0' }}</view>
</view>
<view class="scoreInfo">
<view style="padding-left:0;">积分明细</view>
<view class="">|</view>
<view class="">兑换记录</view>
</view>
</view>
<view class="goods-wrap u-p-20 u-flex u-flex-wrap"> <view class="goods-wrap u-p-20 u-flex u-flex-wrap">
<view class="goods-item u-m-b-20" v-for="leftGoods in scoreList" :key="leftGoods.id"> <view class="goods-item u-m-b-20" v-for="leftGoods in scoreList" :key="leftGoods.id">
<shopro-goods-card <shopro-goods-card
@ -14,7 +26,7 @@
<image class="bean-img u-m-r-10" :src="$IMG_URL + '/imgs/score/score.png'" mode=""></image> <image class="bean-img u-m-r-10" :src="$IMG_URL + '/imgs/score/score.png'" mode=""></image>
{{ leftGoods.price }} {{ leftGoods.price }}
</view> </view>
<view class="sales-box u-m-10">已兑换{{ leftGoods.sales }}</view> <!-- <view class="sales-box u-m-10">已兑换{{ leftGoods.sales }}</view> -->
</view> </view>
</template> </template>
</shopro-goods-card> </shopro-goods-card>
@ -34,6 +46,7 @@
</template> </template>
<script> <script>
import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
export default { export default {
components: {}, components: {},
data() { data() {
@ -55,7 +68,9 @@ export default {
} }
}); });
}, },
computed: {}, computed: {
...mapGetters(['userInfo']),
},
methods: { methods: {
// //
getScoreShopsList() { getScoreShopsList() {
@ -102,4 +117,32 @@ export default {
} }
} }
} }
.scoreInfo{
height:366rpx;
position: relative;
color:#333333;
font-size:26rpx;
background-color: #ffffff;
&>image{
position:absolute;
right:0;bottom:0;
height:300rpx;
width:auto;
}
.scoreNum{
position:absolute;
top:20rpx;
left:20rpx;
}
.scoreInfo{
display: flex;
position: absolute;
bottom: 20rpx;
left: 20rpx;
height: auto;
&>view{
padding:20rpx;
}
}
}
</style> </style>

@ -164,23 +164,23 @@ export default {
.list-active { .list-active {
background: #fff; background: #fff;
color: #333333 !important; color: #222222 !important;
font-weight: bold !important; // font-weight: bold !important;
} }
.line-active { .line-active {
background: #e6b873; // background: #e6b873;
} }
.type-list { .type-list {
height: 84upx; height: 120upx;
position: relative; position: relative;
width: 200rpx; width: 200rpx;
padding-left: 16rpx; padding-left: 16rpx;
line-height: 84rpx; line-height: 120rpx;
font-size: 28upx; font-size: 28upx;
font-weight: 400; font-weight: 400;
color: rgba(102, 102, 102, 1); color: #666666;
.line { .line {
width: 10upx; width: 10upx;

@ -317,13 +317,15 @@
height: 54rpx; height: 54rpx;
border-radius: 50%; border-radius: 50%;
padding: 0; padding: 0;
background: linear-gradient(90deg, #17C161, #eecc89); // background: linear-gradient(90deg, #17C161, #eecc89);
background-color: #17C161;
} }
.buy-btn { .buy-btn {
width: 120rpx; width: 120rpx;
line-height: 50rpx; line-height: 50rpx;
background: linear-gradient(90deg, #17C161, #eecc89); // background: linear-gradient(90deg, #17C161, #eecc89);
background-color: #17C161;
border-radius: 25rpx; border-radius: 25rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;

@ -30,7 +30,11 @@
<text :class="categoryCurrent === index ? 'category-dot-active' : 'category-dot'" v-for="(dot, index) in newList.length" :key="index"></text> <text :class="categoryCurrent === index ? 'category-dot-active' : 'category-dot'" v-for="(dot, index) in newList.length" :key="index"></text>
</view> </view>
</view> </view>
<view style="width:100%;">
<image src="/static/images/30.png" mode="widthFix" style="width:100%;height:auto"></image>
</view> </view>
</view>
</view> </view>
</template> </template>

@ -1,6 +1,10 @@
<template> <template>
<!-- 为你推荐 --> <!-- 为你推荐 -->
<view class="hot-goods u-m-b-10 u-p-x-16"> <view class="hot-goods u-m-b-10 u-p-x-16">
<view style="display:flex;justify-content: space-between;align-items: center;margin-left:-16rpx;padding: 37rpx 0;">
<text style="color: #2E2E2E;font-size:34rpx;font-weight: bold;border-left:12rpx solid #17C161;padding-left:34rpx;">精选热卖</text>
<text style="font-size: 24rpx;color: #999999;">查看更多>></text>
</view>
<view class="u-waterfall" v-if="goodsType === 1"> <view class="u-waterfall" v-if="goodsType === 1">
<view id="u-left-column" class="u-column"> <view id="u-left-column" class="u-column">
<view class="goods-item u-m-b-16 u-flex u-row-center u-col-center" v-for="leftGoods in leftList" :key="leftGoods.id"> <view class="goods-item u-m-b-16 u-flex u-row-center u-col-center" v-for="leftGoods in leftList" :key="leftGoods.id">

@ -5,7 +5,7 @@
<view class="title-box u-flex u-row-between u-p-y-20 seckill-title"> <view class="title-box u-flex u-row-between u-p-y-20 seckill-title">
<view class="u-flex u-col-center"> <view class="u-flex u-col-center">
<view class="title-text u-m-r-20 u-ellipsis-1">{{ detail.name }}</view> <view class="title-text u-m-r-20 u-ellipsis-1">{{ detail.name }}</view>
<u-count-down <!-- <u-count-down
class="count-down-demo" class="count-down-demo"
:timestamp="timestamp" :timestamp="timestamp"
separator-color="#ffbbbb " separator-color="#ffbbbb "
@ -14,21 +14,21 @@
color="#fff" color="#fff"
@end="seckillEnd" @end="seckillEnd"
autoplay autoplay
></u-count-down> ></u-count-down> -->
</view> </view>
<view class="more-box u-flex" @tap="$Router.push('/pages/activity/seckill/list')"> <view class="more-box u-flex" @tap="$Router.push('/pages/activity/seckill/list')">
<text class="more-text u-m-r-10">更多抢购</text> <text class="more-text u-m-r-10">更多>></text>
<text class="iconfont icon-youjiantou-tianchong more-icon"></text> <!-- <text class="iconfont icon-youjiantou-tianchong more-icon"></text> -->
</view> </view>
</view> </view>
<!-- 活动商品 --> <!-- 活动商品 -->
<!-- m --> <!-- m -->
<scroll-view v-if="seckillType === 1" class="scroll-box" scroll-x scroll-anchoring> <scroll-view v-if="seckillType === 1" class="scroll-box" scroll-x scroll-anchoring>
<view class="goods-box u-flex"> <view class="goods-box u-flex">
<view class="min-goods u-m-r-14" v-for="mgoods in goodsList" :key="mgoods.id" @tap="jump('/pages/goods/detail', { id: mgoods.id })"> <view class="min-goods" v-for="mgoods in goodsList" :key="mgoods.id" @tap="jump('/pages/goods/detail', { id: mgoods.id })">
<view class="img-box"><image class="img" :src="mgoods.image" mode=""></image></view> <view class="img-box"><image class="img" :src="mgoods.image" mode=""></image></view>
<view class="mgoods-card-bottom u-p-20"> <view class="mgoods-card-bottom">
<view class="goods-title u-m-b-10 u-ellipsis-1">{{ mgoods.title }}</view> <!-- <view class="goods-title u-m-b-10 u-ellipsis-1">{{ mgoods.title }}</view> -->
<view class="price-box font-OPPOSANS"> <view class="price-box font-OPPOSANS">
<view class="price u-m-b-10">{{ mgoods.price }}</view> <view class="price u-m-b-10">{{ mgoods.price }}</view>
<view class="original-price">{{ mgoods.original_price }}</view> <view class="original-price">{{ mgoods.original_price }}</view>
@ -149,7 +149,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.seckill-card { .seckill-card {
background: linear-gradient(#ffebec 20%, #fff 30%, #fff 100%); background: linear-gradient(0deg, #FFDDDD, #FFFFFF, #FFFFFF);
// background: linear-gradient(#ffebec 20%, #fff 30%, #fff 100%);
} }
.seckill-title { .seckill-title {
@ -159,57 +160,65 @@ export default {
} }
.activity-wrap { .activity-wrap {
background-color: #fff; background-color: #fff;
min-height: 300rpx; min-height: 291rpx;
margin: 0 24rpx;
border-radius: 20rpx;
margin-top:22rpx;
.title-box { .title-box {
.title-text { .title-text {
font-size: 32rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #2E2E2E;
} }
.more-box { .more-box {
.more-text { .more-text {
font-size: 22rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #333333; color: #2E2E2E;
} }
.more-icon { .more-icon {
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #2E2E2E;
} }
} }
} }
.scroll-box, .scroll-box,
.goods-box { .goods-box {
height: 380rpx; // height: 380rpx;
width: 100%; width: 100%;
// height: 200rpx;
height: 220rpx;
} }
} }
// //
.min-goods { .min-goods {
width: 220rpx; // width: 220rpx;
height: 380rpx; width: 160rpx;
background: #fff7f7; margin: 0 24rpx;
box-shadow: 0px 7rpx 7rpx 0px rgba(255, 80, 94, 0.32); // height: 380rpx;
border-radius: 10rpx; // background: #fff7f7;
// box-shadow: 0px 7rpx 7rpx 0px rgba(255, 80, 94, 0.32);
// border-radius: 10rpx;
.img-box { .img-box {
width: 220rpx; // width: 100rpx;
height: 220rpx; // height: 100rpx;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
border-radius: 10rpx 10rpx 0 0; border-radius: 10rpx 10rpx 0 0;
.img { .img {
width: 220rpx; width: 122rpx;
height: 220rpx; height: 123rpx;
background-color: #ccc; background-color: #ccc;
} }
} }
.mgoods-card-bottom { .mgoods-card-bottom {
height: 160rpx; // height: 160rpx;
background: url($IMG_URL+'/imgs/tag/seckill_goods_bg.png') no-repeat; // background: url($IMG_URL+'/imgs/tag/seckill_goods_bg.png') no-repeat;
background-position: bottom center; background-position: bottom center;
background-size: 100% 100%; background-size: 100% 100%;
text-align: center;
} }
.goods-title { .goods-title {
font-size: 26rpx; font-size: 26rpx;
@ -221,17 +230,17 @@ export default {
.price { .price {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: #ff0000; color: #FE1B26;
&::before { &::before {
content: '¥'; content: '¥';
font-size: 24rpx; font-size: 26rpx;
} }
} }
.original-price { .original-price {
font-size: 20rpx; font-size: 20rpx;
font-weight: 500; font-weight: 500;
text-decoration: line-through; text-decoration: line-through;
color: #c4c4c4; color: #999999;
} }
} }
} }

@ -23,6 +23,10 @@
:distance="storeInfo.distance_text" :distance="storeInfo.distance_text"
:list="headSwiperList" :list="headSwiperList"
></home-head> ></home-head>
<view style="margin:30rpx 24rpx 20rpx 24rpx;" class="notice">
<u-notice-bar :volume-icon="true" mode="vertical" :more-icon="true" :list="list"></u-notice-bar>
</view>
<!-- 自定义模块 --> <!-- 自定义模块 -->
<view class="template-box"> <view class="template-box">
<block v-for="(item, index) in homeTemplate" :key="item.id"> <block v-for="(item, index) in homeTemplate" :key="item.id">
@ -156,7 +160,8 @@ export default {
isConnected: true, // isConnected: true, //
showPrivacy: false, // showPrivacy: false, //
scrollTop: 0, scrollTop: 0,
spm: "" spm: "",
list:['快来领新人福利啦~']
}; };
}, },
computed: { computed: {
@ -278,4 +283,10 @@ export default {
}; };
</script> </script>
<style lang="scss"></style> <style lang="scss">
.notice{
/deep/.u-notice-bar{
border-radius:10rpx;
}
}
</style>

@ -1,36 +1,42 @@
<template> <template>
<!-- 首页标题栏轮播图整合插件 --> <!-- 首页标题栏轮播图整合插件 -->
<view class="banner-swiper-wrap u-m-b-10"> <view class="banner-swiper-wrap u-m-b-10">
<image src="/static/images/bg.png" mode="widthFix" style="width:100%;height:auto"></image>
<!-- 标题栏 --> <!-- 标题栏 -->
<view class="u-navbar u-navbar-fixed" :style="[navbarStyle]"> <view class="u-navbar u-navbar-fixed" :style="[navbarStyle]">
<view class="nav-bg" :style="[navBg]"></view> <view class="nav-bg" :style="[navBg]"></view>
<view class="u-status-bar" :style="{ height: statusBarHeight + 'px' }"></view> <view class="u-status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
<view class="u-navbar-inner" :style="[navbarInnerStyle]"> <view class="home_title" :style="[navTitleStyle, navTitleColor]">首页</view>
<view class="u-back-wrap" @tap=" <view class="u-navbar-inner">
jump('/pages/order/express/store-address2', { <view class="u-back-wrap" @tap="
lat: locationInfo.latitude, jump('/pages/order/express/store-address2', {
lng: locationInfo.longitude, lat: locationInfo.latitude,
storeId: storeInfo ? storeInfo.id : 0, lng: locationInfo.longitude,
}) storeId: storeInfo ? storeInfo.id : 0,
"> })
<view class="u-icon-wrap u-back-text u-line-1" :style="[navTitleStyle, navTitleColor]"> ">
<u-icon name="map-fill" size="40" :color="navTitleColor.color"></u-icon>{{ navTitle || '' }} <text>{{distance}}</text> <view class="u-back-text u-line-1" :style="[navTitleStyle, navTitleColor]">
<view style="display: flex;align-items: center;">
<u-icon name="map-fill" size="33" :color="navTitleColor.color"></u-icon>
<view style="font-size: 36rpx;margin-left:16rpx;">{{ navTitle || '' }}</view>
</view>
<view style="font-size: 26rpx;margin-top:18rpx;margin-left: 50rpx;">{{distance}}</view>
</view>
</view>
<view
hover-class="hover-search"
class="search-box u-flex u-row-center u-col-center u-m-r-30"
@tap="$Router.push('/pages/public/search')"
>
<view class="u-iconfont uicon-search" :style="[navTitleColor]"></view>
</view> </view>
</view> </view>
<view
hover-class="hover-search"
class="search-box u-flex u-row-center u-col-center u-m-r-30"
@tap="$Router.push('/pages/public/search')"
>
<view class="u-iconfont uicon-search" :style="[navTitleColor]"></view>
</view>
</view>
</view> </view>
<!-- 轮播组件 --> <!-- 轮播组件 -->
<swiper <swiper
class="screen-swiper square-dot" class="screen-swiper square-dot"
@change="onChange" @change="onChange"
style="height: 520rpx" style="height: 320rpx"
:indicator-dots="true" :indicator-dots="true"
:circular="true" :circular="true"
:autoplay="true" :autoplay="true"
@ -135,8 +141,8 @@ export default {
let style = {}; let style = {};
style.height = this.navbarHeight + 'px'; style.height = this.navbarHeight + 'px';
// #ifdef MP // #ifdef MP
let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left; // let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left;
style.marginRight = rightButtonWidth + 'px'; // style.marginRight = rightButtonWidth + 'px';
// #endif // #endif
return style; return style;
}, },
@ -217,7 +223,7 @@ export default {
} }
// //
.banner-swiper-wrap { .banner-swiper-wrap {
height: 520rpx; // height: 520rpx;
position: relative; position: relative;
z-index: 100; z-index: 100;
.search-box { .search-box {
@ -264,6 +270,7 @@ export default {
align-items: center; align-items: center;
position: relative; position: relative;
z-index: 990; z-index: 990;
margin-top: 38rpx;
} }
.u-back-wrap { .u-back-wrap {
@ -271,10 +278,31 @@ export default {
align-items: center; align-items: center;
flex: 1; flex: 1;
flex-grow: 0; flex-grow: 0;
padding: 14rpx 14rpx 14rpx 24rpx; // padding: 14rpx 14rpx 14rpx 24rpx;
padding:0 14rpx;
text{ text{
margin-left: 20rpx; margin-left: 20rpx;
font-size: 20rpx; font-size: 20rpx;
} }
} }
.home_title{
font-size: 36rpx;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #FFFFFF;
text-align: center;
margin-top: 14rpx;
position: relative;
z-index: 9999999;
}
.screen-swiper{
background: #E3E5E7;
border-radius: 20rpx;
overflow: hidden;
margin: 0 24rpx;
/* position: relative; */
/* top: -20px; */
margin-top: -240rpx;
min-height: 0;
}
</style> </style>

@ -23,15 +23,16 @@
<view class="goods-order" v-for="goods in order.item" :key="goods.id"> <view class="goods-order" v-for="goods in order.item" :key="goods.id">
<view class="order-content"> <view class="order-content">
<shopro-mini-card :title="goods.goods_title" :image="goods.goods_image"> <shopro-mini-card :title="goods.goods_title" :image="goods.goods_image">
<template #describe> <!-- <template #describe>
<view class="order-sku u-ellipsis-1"> <view class="order-sku u-ellipsis-1">
<text class="order-num">数量:{{ goods.goods_num || 0 }};</text> <text class="order-num">数量:{{ goods.goods_num || 0 }};</text>
{{ goods.goods_sku_text ? goods.goods_sku_text : '' }} {{ goods.goods_sku_text ? goods.goods_sku_text : '' }}
</view> </view>
</template> </template> -->
<template #cardBottom> <template #cardBottom>
<view class="order-price-box u-flex "> <view class="order-price-box u-flex " style="justify-content: space-between;">
<text class="order-price font-OPPOSANS">{{ goods.goods_price || 0 }}</text> <text class="order-price font-OPPOSANS">{{ goods.goods_price || 0 }}</text>
<text>x{{goods.goods_num}}</text>
<button class="u-reset-button status-btn" <button class="u-reset-button status-btn"
v-if="goods.status_name">{{ goods.status_name }}</button> v-if="goods.status_name">{{ goods.status_name }}</button>
</view> </view>
@ -45,7 +46,7 @@
<text class="all-unit"></text> <text class="all-unit"></text>
{{ order.discount_fee }} 运费 {{ order.discount_fee }} 运费
<text class="all-unit"></text> <text class="all-unit"></text>
{{ order.dispatch_amount }} {{ order.status <= 0 ? '需付款' : '实付款' }} {{ order.dispatch_amount }} {{ order.status <= 0 ? '合计金额' : '实付款' }}
<view class="all-money font-OPPOSANS">{{ order.total_fee }}</view> <view class="all-money font-OPPOSANS">{{ order.total_fee }}</view>
</view> </view>
@ -55,7 +56,7 @@
<button v-if="orderBtn === 'cancel'" @tap.stop="onCancel(order.id, orderIndex)" <button v-if="orderBtn === 'cancel'" @tap.stop="onCancel(order.id, orderIndex)"
class="u-reset-button obtn1">取消订单</button> class="u-reset-button obtn1">取消订单</button>
<button v-if="orderBtn === 'pay'" @tap.stop="onPay(order.id)" <button v-if="orderBtn === 'pay'" @tap.stop="onPay(order.id)"
class="u-reset-button obtn2">立即支付</button> class="u-reset-button obtn2">支付</button>
<button v-if="orderBtn === 'groupon'" <button v-if="orderBtn === 'groupon'"
@tap.stop="jump('/pages/activity/groupon/detail', { id: order.ext_arr.groupon_id })" @tap.stop="jump('/pages/activity/groupon/detail', { id: order.ext_arr.groupon_id })"
class="u-reset-button obtn2"> class="u-reset-button obtn2">
@ -82,8 +83,12 @@
</template> </template>
<script> <script>
import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
export default { export default {
components: {}, components: {},
computed: {
...mapGetters(['isLogin']),
},
data() { data() {
return { return {
isEmpty: false, isEmpty: false,
@ -94,19 +99,19 @@
orderList: [], orderList: [],
orderState: [{ orderState: [{
id: 0, id: 0,
title: '全部', title: '全部订单',
type: 'all' type: 'all'
}, },
{ {
id: 1, id: 1,
title: '待付', title: '待付',
type: 'nopay' type: 'nopay'
}, },
{ // {
id: 2, // id: 2,
title: '待发货', // title: '',
type: 'nosend' // type: 'nosend'
}, // },
{ {
id: 3, id: 3,
title: '待收货', title: '待收货',
@ -114,7 +119,7 @@
}, },
{ {
id: 4, id: 4,
title: '待评价', title: '已完成',
type: 'nocomment' type: 'nocomment'
} }
] ]
@ -127,7 +132,12 @@
this.orderList = []; this.orderList = [];
this.currentPage = 1; this.currentPage = 1;
this.lastPage = 1; this.lastPage = 1;
this.getOrderList(); if(this.isLogin){
this.getOrderList();
}else{
this.isEmpty = true
}
}, },
methods: { methods: {
jump(path, parmas) { jump(path, parmas) {
@ -162,6 +172,8 @@
that.lastPage = res.data.last_page; that.lastPage = res.data.last_page;
that.loadStatus = that.currentPage < res.data.last_page ? 'loadmore' : 'nomore'; that.loadStatus = that.currentPage < res.data.last_page ? 'loadmore' : 'nomore';
} }
}).catch((res)=>{
}); });
}, },
@ -265,20 +277,22 @@
} }
.line-active { .line-active {
background: rgba(230, 184, 115, 1); // background: rgba(230, 184, 115, 1);
background-color: #17C161;
} }
} }
} }
.order-list { .order-list {
background: #fff; background: #fff;
margin: 20rpx 0; margin: 20rpx 24rpx;
border-radius: 20rpx;
.order-bottom { .order-bottom {
padding-bottom: 20rpx; padding-bottom: 20rpx;
.btn-box { .btn-box {
justify-content: flex-end; justify-content: flex-end;
margin-top: 29rpx;
} }
.all-msg { .all-msg {
@ -296,10 +310,10 @@
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
color:#FE1B26;
&::before { &::before {
content: '¥'; content: '¥';
font-size: 20rpx; font-size: 18rpx;
} }
} }
} }
@ -320,7 +334,8 @@
.obtn2 { .obtn2 {
width: 160rpx; width: 160rpx;
line-height: 60rpx; line-height: 60rpx;
background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1)); background: #17C161;
// background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22); box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
border-radius: 30rpx; border-radius: 30rpx;
margin-right: 20rpx; margin-right: 20rpx;
@ -347,7 +362,7 @@
.order-head { .order-head {
padding: 0 25rpx; padding: 0 25rpx;
height: 77rpx; height: 77rpx;
border-bottom: 1rpx solid #dfdfdf; // border-bottom: 1rpx solid #dfdfdf;
.no { .no {
font-size: 26rpx; font-size: 26rpx;
@ -356,12 +371,12 @@
.state { .state {
font-size: 26rpx; font-size: 26rpx;
color: #a8700d; color: #17C161;
} }
} }
.goods-order { .goods-order {
border-bottom: 1px solid rgba(223, 223, 223, 0.5); // border-bottom: 1px solid rgba(223, 223, 223, 0.5);
padding: 20rpx 20rpx 0; padding: 20rpx 20rpx 0;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -384,11 +399,11 @@
.order-price-box { .order-price-box {
.status-btn { .status-btn {
height: 32rpx; height: 32rpx;
border: 1rpx solid rgba(207, 169, 114, 1); border: 1rpx solid #17C161;
border-radius: 15rpx; border-radius: 15rpx;
font-size: 20rpx; font-size: 20rpx;
font-weight: 400; font-weight: 400;
color: rgba(168, 112, 13, 1); color: #17C161;
padding: 0 10rpx; padding: 0 10rpx;
margin-left: 20rpx; margin-left: 20rpx;
background: rgba(233, 183, 102, 0.16); background: rgba(233, 183, 102, 0.16);
@ -398,7 +413,7 @@
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
color: rgba(51, 51, 51, 1); color:#FE1B26;
} }
} }
} }

@ -1678,7 +1678,7 @@ export default {
.add-address-box { .add-address-box {
min-height: 100rpx; min-height: 100rpx;
background: url($IMG_URL + "/imgs/order/order_address_line.png") no-repeat; // background: url($IMG_URL + "/imgs/order/order_address_line.png") no-repeat;
background-size: 100% auto; background-size: 100% auto;
background-position: bottom center; background-position: bottom center;
@ -1841,7 +1841,7 @@ export default {
z-index: 998; z-index: 998;
bottom: 0; bottom: 0;
padding-bottom: calc(env(safe-area-inset-bottom) / 2); padding-bottom: calc(env(safe-area-inset-bottom) / 2);
padding: 0 30rpx; padding: 0 0 0 30rpx;
.btn-hover { .btn-hover {
color: #fff; color: #fff;
@ -1862,16 +1862,18 @@ export default {
.sub-btn { .sub-btn {
width: 210rpx; width: 210rpx;
line-height: 70rpx; // line-height: 70rpx;
background: linear-gradient( // background: linear-gradient(
90deg, // 90deg,
rgba(233, 180, 97, 1), // rgba(233, 180, 97, 1),
rgba(238, 204, 137, 1) // rgba(238, 204, 137, 1)
); // );
box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22); background: #17C161;
border-radius: 50rpx; // box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
font-size: 28rpx; border-radius: 0px;
font-size: 30rpx;
color: #fff; color: #fff;
height:100%;
} }
} }

@ -23,15 +23,16 @@
<view class="goods-order" v-for="goods in order.item" :key="goods.id"> <view class="goods-order" v-for="goods in order.item" :key="goods.id">
<view class="order-content"> <view class="order-content">
<shopro-mini-card :title="goods.goods_title" :image="goods.goods_image"> <shopro-mini-card :title="goods.goods_title" :image="goods.goods_image">
<template #describe> <!-- <template #describe>
<view class="order-sku u-ellipsis-1"> <view class="order-sku u-ellipsis-1">
<text class="order-num">数量:{{ goods.goods_num || 0 }};</text> <text class="order-num">数量:{{ goods.goods_num || 0 }};</text>
{{ goods.goods_sku_text ? goods.goods_sku_text : '' }} {{ goods.goods_sku_text ? goods.goods_sku_text : '' }}
</view> </view>
</template> </template> -->
<template #cardBottom> <template #cardBottom>
<view class="order-price-box u-flex "> <view class="order-price-box u-flex " style="justify-content: space-between;">
<text class="order-price font-OPPOSANS">{{ goods.goods_price || 0 }}</text> <text class="order-price font-OPPOSANS">{{ goods.goods_price || 0 }}</text>
<text>x{{goods.goods_num}}</text>
<button class="u-reset-button status-btn" <button class="u-reset-button status-btn"
v-if="goods.status_name">{{ goods.status_name }}</button> v-if="goods.status_name">{{ goods.status_name }}</button>
</view> </view>
@ -45,7 +46,7 @@
<text class="all-unit"></text> <text class="all-unit"></text>
{{ order.discount_fee }} 运费 {{ order.discount_fee }} 运费
<text class="all-unit"></text> <text class="all-unit"></text>
{{ order.dispatch_amount }} {{ order.status <= 0 ? '需付款' : '实付款' }} {{ order.dispatch_amount }} {{ order.status <= 0 ? '合计金额' : '实付款' }}
<view class="all-money font-OPPOSANS">{{ order.total_fee }}</view> <view class="all-money font-OPPOSANS">{{ order.total_fee }}</view>
</view> </view>
@ -55,7 +56,7 @@
<button v-if="orderBtn === 'cancel'" @tap.stop="onCancel(order.id, orderIndex)" <button v-if="orderBtn === 'cancel'" @tap.stop="onCancel(order.id, orderIndex)"
class="u-reset-button obtn1">取消订单</button> class="u-reset-button obtn1">取消订单</button>
<button v-if="orderBtn === 'pay'" @tap.stop="onPay(order.id)" <button v-if="orderBtn === 'pay'" @tap.stop="onPay(order.id)"
class="u-reset-button obtn2">立即支付</button> class="u-reset-button obtn2">支付</button>
<button v-if="orderBtn === 'groupon'" <button v-if="orderBtn === 'groupon'"
@tap.stop="jump('/pages/activity/groupon/detail', { id: order.ext_arr.groupon_id })" @tap.stop="jump('/pages/activity/groupon/detail', { id: order.ext_arr.groupon_id })"
class="u-reset-button obtn2"> class="u-reset-button obtn2">
@ -94,19 +95,19 @@
orderList: [], orderList: [],
orderState: [{ orderState: [{
id: 0, id: 0,
title: '全部', title: '全部订单',
type: 'all' type: 'all'
}, },
{ {
id: 1, id: 1,
title: '待付', title: '待付',
type: 'nopay' type: 'nopay'
}, },
{ // {
id: 2, // id: 2,
title: '待发货', // title: '',
type: 'nosend' // type: 'nosend'
}, // },
{ {
id: 3, id: 3,
title: '待收货', title: '待收货',
@ -114,7 +115,7 @@
}, },
{ {
id: 4, id: 4,
title: '待评价', title: '已完成',
type: 'nocomment' type: 'nocomment'
} }
] ]
@ -265,20 +266,22 @@
} }
.line-active { .line-active {
background: rgba(230, 184, 115, 1); // background: rgba(230, 184, 115, 1);
background-color: #17C161;
} }
} }
} }
.order-list { .order-list {
background: #fff; background: #fff;
margin: 20rpx 0; margin: 20rpx 24rpx;
border-radius: 20rpx;
.order-bottom { .order-bottom {
padding-bottom: 20rpx; padding-bottom: 20rpx;
.btn-box { .btn-box {
justify-content: flex-end; justify-content: flex-end;
margin-top: 29rpx;
} }
.all-msg { .all-msg {
@ -296,10 +299,10 @@
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
color:#FE1B26;
&::before { &::before {
content: '¥'; content: '¥';
font-size: 20rpx; font-size: 18rpx;
} }
} }
} }
@ -320,7 +323,8 @@
.obtn2 { .obtn2 {
width: 160rpx; width: 160rpx;
line-height: 60rpx; line-height: 60rpx;
background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1)); background: #17C161;
// background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22); box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
border-radius: 30rpx; border-radius: 30rpx;
margin-right: 20rpx; margin-right: 20rpx;
@ -347,7 +351,7 @@
.order-head { .order-head {
padding: 0 25rpx; padding: 0 25rpx;
height: 77rpx; height: 77rpx;
border-bottom: 1rpx solid #dfdfdf; // border-bottom: 1rpx solid #dfdfdf;
.no { .no {
font-size: 26rpx; font-size: 26rpx;
@ -356,12 +360,12 @@
.state { .state {
font-size: 26rpx; font-size: 26rpx;
color: #a8700d; color: #17C161;
} }
} }
.goods-order { .goods-order {
border-bottom: 1px solid rgba(223, 223, 223, 0.5); // border-bottom: 1px solid rgba(223, 223, 223, 0.5);
padding: 20rpx 20rpx 0; padding: 20rpx 20rpx 0;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -384,11 +388,11 @@
.order-price-box { .order-price-box {
.status-btn { .status-btn {
height: 32rpx; height: 32rpx;
border: 1rpx solid rgba(207, 169, 114, 1); border: 1rpx solid #17C161;
border-radius: 15rpx; border-radius: 15rpx;
font-size: 20rpx; font-size: 20rpx;
font-weight: 400; font-weight: 400;
color: rgba(168, 112, 13, 1); color: #17C161;
padding: 0 10rpx; padding: 0 10rpx;
margin-left: 20rpx; margin-left: 20rpx;
background: rgba(233, 183, 102, 0.16); background: rgba(233, 183, 102, 0.16);
@ -398,7 +402,7 @@
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
color: rgba(51, 51, 51, 1); color:#FE1B26;
} }
} }
} }

@ -267,7 +267,8 @@ export default {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
background-color: #fff; background-color: #fff;
color: rgba(167, 111, 13, 1); // color: rgba(167, 111, 13, 1);
color:#17C161;
} }
// //

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -4,4 +4,4 @@
* uView自定义的css类名和scss变量均以"u-"开头不会造成冲突请放心使用 * uView自定义的css类名和scss变量均以"u-"开头不会造成冲突请放心使用
*/ */
@import 'uview-ui/theme.scss'; @import 'uview-ui/theme.scss';
$IMG_URL: 'https://jf.tgjiaofuji.com'; //css中背景图片变量js图片变量在env.js $IMG_URL: 'https://shetuan.njrzwl.cn'; //css中背景图片变量js图片变量在env.js

Loading…
Cancel
Save