提交代码 排行榜 大品 购物车 订单 订单详情

dev
fanfan 1 year ago
parent c21e88f45e
commit 478be92ff3
  1. 46
      api/activity.js
  2. 17
      api/order.js
  3. 2
      api/order/comment.js
  4. 21
      api/user/vip.js
  5. 35
      pages.json
  6. 137
      pages/activity/charts.vue
  7. 202
      pages/activity/newGoods.vue
  8. 325
      pages/activity/newPeople.vue
  9. 381
      pages/activity/presale.vue
  10. 355
      pages/activity/ranking.vue
  11. 365
      pages/activity/seckill.vue
  12. 1065
      pages/cart/index.vue
  13. 4
      pages/index/index.vue
  14. 531
      pages/invoice/edit.vue
  15. 714
      pages/order/detail.vue
  16. 980
      pages/order/index.vue
  17. 523
      pages/order/index2.vue
  18. 754
      pages/order/refund/refund.vue
  19. 3
      pages/order/refund/refundDetail.vue
  20. 715
      pages/user/vip/goods.vue
  21. 28
      project.config.json
  22. 7
      project.private.config.json

@ -0,0 +1,46 @@
import request from '@/utils/request'
// api地址
const api = {
data: 'sharp.home/data',
list: 'sharp.goods/list',
getImage: 'goods/getCommonConfig',
getImage: 'goods/getCommonConfig',
getImage: 'goods/getCommonConfig',
chartsGoodsJing: 'goods/chartsGoodsJing',
chartsGoodsList: "goods/chartsGoodsList",
brandList: 'goods/brandList',
charts: "goods/charts"
}
// 新品
export const brandList = (data) => {
return request.get(api.brandList, data)
}
// 预售专区
export const list = () => {
return request.get(api.list, {}, {
load: false
})
}
// 秒杀活动首页
export const data = () => {
return request.get(api.data, {}, {
load: false
})
}
// 轮播
export const getImage = (data) => {
return request.get(api.getImage, data)
}
// 排行精选
export const chartsGoodsJing = (data) => {
return request.get(api.chartsGoodsJing, data)
}
// 排行精选商品
export const chartsGoodsList = (data) => {
return request.get(api.chartsGoodsList, data)
}
// 排行类
export const charts = (data) => {
return request.get(api.charts, data)
}

@ -9,9 +9,14 @@ const api = {
cancel: 'order/cancel',
extractQrcode: 'order/extractQrcode',
receipt: 'order/receipt',
pay: 'order/pay'
pay: 'order/pay',
del:'order/del',
orderfast:'order/orderfast'
}
// 催单
export function orderfast(param, option) {
return request.get(api.orderfast, param, option)
}
// 当前用户待处理的订单数量
export function todoCounts(param, option) {
return request.get(api.todoCounts, param, option)
@ -46,3 +51,11 @@ export function receipt(orderId, data) {
export function extractQrcode(orderId, param) {
return request.get(api.extractQrcode, { orderId, ...param })
}
// 核销二维码
export function del(orderId, param) {
return request.get(api.del, { orderId, ...param })
}
// // 删除订单
// export function delete(orderId, param) {
// return request.get(api.delete, { orderId, ...param })
// }

@ -3,7 +3,7 @@ import request from '@/utils/request'
// api地址
const api = {
list: 'order.comment/list',
submit: 'order.comment/submit'
submit: 'order.comment/submit',
}
// 待评价订单商品列表

@ -0,0 +1,21 @@
import request from '@/utils/request'
// api地址
const api = {
brandList: 'goods/brandList',
category: 'category/list',
getImage: 'goods/getCommonConfig',
}
// 大牌
export const brandList = (data) => {
return request.get(api.brandList, data)
}
// 分类
export const category = (data) => {
return request.get(api.category, data)
}
// 轮播
export const getImage = (data) => {
return request.get(api.getImage, data)
}

@ -786,6 +786,34 @@
"enablePullDownRefresh": false
}
},
{
"path": "charts",
"style": {
"navigationBarTitleText": "排行榜列表",
"enablePullDownRefresh": false
}
},
{
"path": "ranking",
"style": {
"navigationBarTitleText": "排行榜",
"enablePullDownRefresh": false
}
},
{
"path": "newGoods",
"style": {
"navigationBarTitleText": "新品首发",
"enablePullDownRefresh": false
}
},
{
"path": "seckill",
"style": {
"navigationBarTitleText": "限时抢购",
"enablePullDownRefresh": false
}
},
{
"path": "presaleRule",
"style": {
@ -819,7 +847,7 @@
}
]
},
},
{
"root": "pages/news1/",
"pages": [{
@ -902,5 +930,6 @@
"easycom": {
"autoscan": true,
"custom": {}
}
}
},
"sitemapLoaction": "sitemap.json"
}

@ -1,43 +1,44 @@
<template>
<view class="newGoods">
<view>
<u-navbar title="排行榜" back-icon-color="#fff" :border-bottom="false" title-color="#fff" :background="background"></u-navbar>
<u-navbar title="排行榜" back-icon-color="#fff" :border-bottom="false" title-color="#fff"
:background="background"></u-navbar>
</view>
<view class="main">
<view class="main" :style="{backgroundImage:'url('+backgroundImg+')'}"
style="background-size: 100% 100%;padding-bottom: 20rpx;">
<view class="head">
<view class="ranking">
-好物排行榜-
</view>
<view class="headTitle">
手机热销榜
{{name}}热销榜
</view>
<view class="ques">
根据商品销量等级排序|每日更新
</view>
</view>
<view class="hb">
<view class="goodsList" v-for="(item,index) in 3" :key="index">
<view class="goodsList" v-for="(item,index) in jingList" :key="index">
<view class="goodsDetail">
<image src="../../static/rank/topOne.png" mode="" class="topOne"></image>
<image src="../../static/rank/topOne.png" mode="" v-if="index==0" class="topOne"></image>
<view class="goodsInfo">
<image src="/static/newGoods/goods.png" mode="" class="goodsImg"></image>
<image :src="item.goods_image" mode="" class="goodsImg"></image>
<view class="goodsName">
<view class="name">
Apple iphone 15(A3092)
支持移动联通电信5G双卡双待手机
{{item.goods_name}}
</view>
<view class="hot">
<text class="hotTitle">HOT</text>
<text class="zs">综合热卖指数9.8</text>
<text class="zs">综合热卖指数{{item.remaizhishu}}</text>
</view>
</view>
</view>
</view>
<view class="opera">
<view class="price">
<text>2399</text>
<text>{{item.goods_price_min}}</text>
</view>
<view class="look">
<view class="look" @click="goDetail(item.goods_id)">
去看看
<image src="/static/rank/right.png" mode="" class="right"></image>
</view>
@ -50,6 +51,7 @@
<script>
import img from "@/static/rank/top.png"
import * as Api from '@/api/activity'
export default {
data() {
return {
@ -58,25 +60,50 @@
backgroundSize: '100% auto',
},
chosed: 0,
menuList: [{
name: '精选',
value: 0
}, {
name: '手机通讯',
value: 1
}, {
name: '电脑',
value: 2
}, {
name: '家用电器',
value: 3
}, {
name: '美妆',
value: 4
},
]
backgroundImg: '',
jingList: [],
categoryId: '',
name:''
}
},
onLoad(op) {
console.log(op)
this.categoryId = op.categoryId;
this.name=op.name
},
onShow() {
this.getCarouselList()
},
methods: {
//
getCarouselList(category_id) {
const app = this;
Api.getImage({
type: 3
})
.then(result => {
app.backgroundImg = result.data.imgurl;
app.getListJingData(this.categoryId)
})
.finally(() => app.isLoading = false)
},
getListJingData(categoryId) {
let app = this;
let pamars = {
store_id: 10001,
categoryId: categoryId,
}
Api.chartsGoodsList(pamars)
.then(result => {
app.jingList = result.data.data;
})
.finally(() => app.isLoading = false)
},
goDetail(orderId) {
uni.navigateTo({
url: '/pages/goods/detail?orderId=' + orderId
})
},
}
}
</script>
@ -104,7 +131,6 @@
.head {
width: 100%;
height: 360rpx;
background-image: url('../../static/rank/head.png');
background-size: 100% 100%;
}
}
@ -140,7 +166,6 @@
width: 430rpx;
height: 112rpx;
padding-top: 18rpx;
background-image: url('../../static/rank/timeRank.png');
background-size: 100% 100%;
text-align: center;
font-size: 36rpx;
@ -179,6 +204,7 @@
background: #FCE5C6;
border-radius: 18rpx 18rpx 18rpx 18rpx;
margin-bottom: 42rpx;
.goodsDetail {
width: 700rpx;
height: 336rpx;
@ -187,24 +213,28 @@
border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1;
position: relative;
.topOne{
width:73rpx;
.topOne {
width: 73rpx;
height: 100rpx;
position: absolute;
left: 36rpx;
top: -8rpx;
}
.goodsInfo {
display: flex;
.goodsImg{
.goodsImg {
width: 224rpx;
height: 224rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
margin-right: 16rpx;
}
.goodsName{
.name{
.goodsName {
.name {
width: 396rpx;
height: 132rpx;
font-size: 32rpx;
@ -213,14 +243,16 @@
color: #0E0E0E;
line-height: 38rpx;
}
.hot{
.hot {
width: 336rpx;
height: 60rpx;
background: linear-gradient(90deg, #FCE5C6 0%, #FFFFFF 100%);
border-radius: 70rpx 70rpx 70rpx 70rpx;
opacity: 1;
margin-top: 16rpx;
.hotTitle{
.hotTitle {
margin-right: 8rpx;
width: 68rpx;
height: 42rpx;
@ -230,10 +262,11 @@
line-height: 60rpx;
margin-left: 8rpx;
background: -webkit-linear-gradient(180deg, #FFA621 0%, #F34A40 100%);
-webkit-text-fill-color:transparent;
-webkit-background-clip:text;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.zs{
.zs {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
@ -245,19 +278,23 @@
}
}
}
.opera{
.opera {
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
height: 104rpx;
.price{
.price {
margin-left: 20rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #301F14;
line-height: 44rpx;
text{
text {
font-size: 48rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
@ -265,7 +302,8 @@
line-height: 68rpx;
}
}
.look{
.look {
width: 202rpx;
height: 60rpx;
background: linear-gradient(180deg, #FF7E6A 0%, #FB322A 100%);
@ -274,14 +312,15 @@
margin-right: 22rpx;
text-align: center;
line-height: 60rpx;
.right{
.right {
width: 20rpx;
height: 18rpx;
margin-left:26rpx;
margin-left: 26rpx;
}
}
}
}
}
</style>
</style>

@ -1,30 +1,14 @@
<template>
<view class="newGoods">
<!-- <image src="/static/newGoods/newBack.png" mode="" class="bgImg"></image> -->
<view >
<u-navbar title="新品首发" back-icon-color="#fff" :border-bottom="false" title-color="#333" :background="background"></u-navbar>
<view>
<u-navbar title="新品首发" back-icon-color="#fff" :border-bottom="false" title-color="#333"
:background="background"></u-navbar>
</view>
<view class="firGoods">
<view class="topLine">
<view class="left">
<view class="goodsName">
nava 5z
</view>
<view class="goodsDesc">
影棚级人像
</view>
<view class="newTip">
新品驿站
</view>
</view>
<view class="right">
<!-- <image src="/static/newGoods/bg.png" mode="" class="bg"></image> -->
<image src="/static/newGoods/goods.png" mode="" class="goodsImg"></image>
</view>
</view>
<view class="firGoods" :style="{backgroundImage:'url('+backgroundImg+')'}" style="background-size: 100% 100%;">
</view>
<view class="goodsList">
<view class="goodsItem" v-for="(item,index) in 5" :key="index">
<view class="goodsItem" v-for="(item,index) in list" :key="index">
<view class="hotSell">
现货热卖
</view>
@ -33,31 +17,28 @@
<view class="goodsDetail">
<view class="infoLeft">
<view class="gName">
Neo9 Pro
{{item.goods_name}}
</view>
<view class="gd">
天机9300续航芯自研电竞芯19Q1
</view>
<view class="gp">
低价官网100
{{item.selling_point}}
</view>
</view>
<view class="infoRight">
<image src="/static/newGoods/goods.png" mode="" class="infoImg"></image>
<image :src="item.goods_image" mode="" class="infoImg"></image>
</view>
</view>
<view class="price">
<view class="lowPrice">
2399
{{item.goods_price_min}}
</view>
<view class="buyNow">
<view class="buyNow" @click="goDetails(item)">
立即购买
</view>
</view>
</view>
</view>
</view>
</view>
</view>
@ -65,23 +46,76 @@
<script>
import img from "@/static/member/head.png"
export default{
data(){
return{
import * as Api from '@/api/activity'
import {
getEmptyPaginateObj,
getMoreListData
} from '@/core/app'
export default {
data() {
return {
background: {
background: 'url('+ img+') center top no-repeat',
backgroundSize: '100% auto',
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100%',
},
backgroundImg: '',
list:[]
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getCarouselList()
this.getBrandList()
},
methods: {
//
getBrandList() {
const app = this;
let pamars = {
store_id: 10001,
page: 1,
is_brand: 0,
is_new: 1,
categoryId: 0,
order: ''
}
Api.brandList(pamars)
.then(result => {
app.list = result.data.data;
})
.finally(() => app.isLoading = false)
},
goDetails(goodsId) {
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + goodsId
})
},
//
getCarouselList() {
const app = this;
Api.getImage({
type: 1
})
.then(result => {
app.backgroundImg = result.data.imgurl
})
.finally(() => app.isLoading = false)
},
}
}
</script>
<style lang="scss" scoped>
.newGoods{
.newGoods {
width: 100%;
position:relative;
.bgImg{
position: relative;
.bgImg {
width: 100%;
height: 100%;
position: absolute;
@ -90,19 +124,23 @@
z-index: -10;
}
}
.firGoods{
.firGoods {
width: 100%;
height: 548rpx;
background-image: url('/static/newGoods/top.png');
background-size: 100% 100%;
padding-left: 30rpx;
padding-top: 44rpx;
.topLine{
.topLine {
display: flex;
justify-content: center;
.left{
.left {
margin-top: 132rpx;
.goodsName{
.goodsName {
height: 58rpx;
font-size: 42rpx;
font-family: PingFang SC, PingFang SC;
@ -110,7 +148,8 @@
color: #242424;
line-height: 58rpx;
}
.goodsDesc{
.goodsDesc {
width: 280rpx;
height: 78rpx;
font-size: 56rpx;
@ -119,7 +158,8 @@
color: #242424;
line-height: 78rpx;
}
.newTip{
.newTip {
width: 156rpx;
height: 56rpx;
background: #DA1646;
@ -133,22 +173,25 @@
line-height: 56rpx;
}
}
.right{
.right {
background-image: url('../../static/newGoods/bg.png');
background-repeat: no-repeat;
background-size:422rpx 102rpx ;
background-size: 422rpx 102rpx;
position: relative;
background-position: left bottom;
height: 500rpx;
.goodsImg{
.goodsImg {
width: 414rpx;
height: 414rpx;
box-shadow: 0rpx 12rpx 29rpx 0rpx rgba(0,0,0,0.25);
box-shadow: 0rpx 12rpx 29rpx 0rpx rgba(0, 0, 0, 0.25);
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
z-index: 99;
}
.bg{
.bg {
width: 422rpx;
height: 102rpx;
position: absolute;
@ -158,18 +201,20 @@
}
}
}
.goodsList{
.goodsList {
width: 100%;
padding: 26rpx 0 30rpx 26rpx;
background-image: url('/static/newGoods/bot.png');
background-repeat: no-repeat;
background-size: 100% 100%;
.goodsItem{
.goodsItem {
margin-bottom: 32rpx;
}
.item{
.item {
width: 700rpx;
height: 334rpx;
background: #FDE7D5;
@ -177,7 +222,8 @@
opacity: 1;
padding: 8rpx 10rpx 10rpx;
}
.hotSell{
.hotSell {
width: 226rpx;
height: 82rpx;
background: linear-gradient(180deg, #FDE7D5 0%, #FFDCC3 100%);
@ -192,21 +238,29 @@
top: 8rpx;
border-radius: 20rpx 20rpx 0 0;
}
.goodsInfo{
.goodsInfo {
width: 680rpx;
height: 316rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
opacity: 1;
padding-left: 28rpx;
.goodsDetail{
.goodsDetail {
display: flex;
justify-content: space-between;
width: 100%;
position: relative;
.infoLeft{
.gName{
// width: 180rpx;
.infoLeft {
.gName {
margin-bottom: 15rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
-webkit-line-clamp: 2;
max-width: 350rpx;
height: 56rpx;
font-size: 40rpx;
font-family: PingFang SC, PingFang SC;
@ -215,8 +269,13 @@
line-height: 56rpx;
margin-top: 32rpx;
}
.gd{
width: 362rpx;
.gd {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
-webkit-line-clamp: 2;
max-width: 350rpx;
height: 88rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
@ -224,7 +283,8 @@
color: #9F9F9F;
line-height: 38rpx;
}
.gp{
.gp {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
@ -233,26 +293,31 @@
line-height: 38rpx;
}
}
.infoRight{
.infoRight {
width: 290rpx;
height: 290rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
margin-left: 14rpx;
.infoImg{
.infoImg {
width: 290rpx;
height: 290rpx;
}
position: absolute;
top: -68rpx;
right: 0;
}
}
.price{
.price {
display: flex;
justify-content: flex-end;
margin-top: 14rpx;
.lowPrice{
.lowPrice {
height: 50rpx;
font-size: 36rpx;
font-family: PingFang SC, PingFang SC;
@ -261,7 +326,8 @@
line-height: 50rpx;
margin-right: 30rpx;
}
.buyNow{
.buyNow {
width: 174rpx;
height: 58rpx;
background: linear-gradient(180deg, #FC522C 0%, #FA2929 100%);
@ -278,4 +344,4 @@
}
}
}
</style>
</style>

@ -17,19 +17,20 @@
</view>
</scroll-view>
</view>
<view class="newpeople-bd">
<view class="newpeople-bd" :isLoading="isLoading">
<view class="a">
<u-tabs :list="list" bg-color="#fafafa" inactive-color="#3C3C3C" active-color="#FF3C43" :is-scroll="true" font-size="30" v-model="current" @change="change"></u-tabs>
<u-tabs :list="menuList" bg-color="#fafafa" inactive-color="#3C3C3C" active-color="#FF3C43"
:is-scroll="true" font-size="30" v-model="current" @change="onChosed"></u-tabs>
</view>
<view scroll-x class="b">
<view class="item" v-for="i in 10" :key="i" @click="tabFilter(0)">
<image src="@/static/home/phone.jpg"></image>
<view class="item" v-for="(item,index) in goodList" :key="i" @click="goDetail(item.goods_id)">
<image :src="item.goods_image"></image>
<view class="title">
<text>自营</text>iphone13 绿色 128GB
<text>自营</text>{{item.goods_name}}
</view>
<view class="price">
<view class="n"><text>7595</text>到手价</view>
<view class="o">7595</view>
<view class="n"><text>{{item.goods_price_min}}</text>到手价</view>
<view class="o">{{item.goods_price_min}}</view>
</view>
<view class="desc">
200+条评论 99%好评率
@ -45,132 +46,185 @@
<script>
import img from "@/static/news/newPeople-bg.png"
import * as Api from '@/api/activity'
export default {
data() {
return {
current: 1,
isLoading: true,
background: {
background: 'url('+ img+') center top no-repeat',
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100%',
},
list: [{
name: '精选好物'
}, {
name: '吹风机'
}, {
name: '空调'
}, {
name: '手机'
}, {
name: '洗衣机'
}, {
name: '冰箱'
}, {
name: '彩电'
}],
goodList:[],
menuList:[],
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
this.getListCharts()
},
methods: {
getListgoodData(categoryId) {
let app = this;
let pamars = {
store_id: 10001,
categoryId: categoryId,
}
Api.chartsGoodsList(pamars)
.then(result => {
app.goodList = result.data.data;
console.log(app.goodList)
})
.finally(() => app.isLoading = false)
},
onChosed(index) {
let app = this;
app.current = index;
app.getListgoodData(index!=0?app.menuList[index].category_id:'')
},
//
getListCharts() {
let app = this
app.menuList = []
let pamars = {
store_id: 10001
}
Api.charts(pamars)
.then(result => {
let obj = {
name: '精选好物'
}
result.data.unshift(obj)
app.menuList = result.data;
app.getListgoodData()
})
.finally(() => app.isLoading = false)
},
goDetail(orderId) {
uni.navigateTo({
url: '/pages/goods/detail?orderId='+orderId
})
},
}
}
</script>
<style lang="scss" scoped>
.newpeople{
background: url(@/static/news/newPeople-bg.png) center top no-repeat;
background-size: 100% auto;
overflow: hidden;
&-hd{
height: 200rpx;
}
&-gift{
width: 100%;
border-radius: 10rpx 10rpx 0 0;
background-color: #fff;
.newpeople {
background: url(@/static/news/newPeople-bg.png) center top no-repeat;
background-size: 100% auto;
overflow: hidden;
.a{
width: 100%;
image{
width: 380rpx;
height: 58rpx;
margin-left: 60rpx;
margin-top: 20rpx;
}
&-hd {
height: 200rpx;
}
.b{
padding: 20rpx;
&-gift {
width: 100%;
border-radius: 10rpx 10rpx 0 0;
background-color: #fff;
overflow: hidden;
white-space: nowrap;
.item{
width: 210rpx;
height: 266rpx;
position: relative;
margin-left: 30rpx;
display: inline-block;
text-align: center;
&:first-child{
margin-left: 0;
}
image{
width: 100%;
height: 100%;
.a {
width: 100%;
image {
width: 380rpx;
height: 58rpx;
margin-left: 60rpx;
margin-top: 20rpx;
}
.p{
width: 100%;
font-size: 42rpx;
color: #FF343B;
height: 80rpx;
position: absolute;
left: 0;
top: 50rpx;
z-index: 2;
text{
font-size: 52rpx;
}
.b {
padding: 20rpx;
overflow: hidden;
white-space: nowrap;
.item {
width: 210rpx;
height: 266rpx;
position: relative;
margin-left: 30rpx;
display: inline-block;
text-align: center;
&:first-child {
margin-left: 0;
}
}
.l{
width: 100%;
font-size: 24rpx;
font-weight: 500;
color: #8C4D00;
height: 50rpx;
position: absolute;
left: 0;
top: 120rpx;
z-index: 2;
text{
font-size: 52rpx;
image {
width: 100%;
height: 100%;
}
}
.btn{
width: 100%;
font-size: 24rpx;
font-weight: 500;
color: #8C4D00;
height: 50rpx;
position: absolute;
left: 0;
bottom: 2rpx;
z-index: 2;
text{
font-size: 52rpx;
.p {
width: 100%;
font-size: 42rpx;
color: #FF343B;
height: 80rpx;
position: absolute;
left: 0;
top: 50rpx;
z-index: 2;
text {
font-size: 52rpx;
}
}
.l {
width: 100%;
font-size: 24rpx;
font-weight: 500;
color: #8C4D00;
height: 50rpx;
position: absolute;
left: 0;
top: 120rpx;
z-index: 2;
text {
font-size: 52rpx;
}
}
.btn {
width: 100%;
font-size: 24rpx;
font-weight: 500;
color: #8C4D00;
height: 50rpx;
position: absolute;
left: 0;
bottom: 2rpx;
z-index: 2;
text {
font-size: 52rpx;
}
}
}
}
}
}
&-bd{
padding: 0 20rpx;
overflow: hidden;
.a{
padding: 10rpx 0;
overflow: hidden;
}
.b{
&-bd {
padding: 0 20rpx;
overflow: hidden;
.item{
.a {
padding: 10rpx 0;
overflow: hidden;
}
.b {
overflow: hidden;
.item {
width: 340rpx;
height: 436rpx;
background: #FFFFFF;
@ -182,16 +236,19 @@
float: left;
margin-left: 30rpx;
margin-bottom: 30rpx;
&:nth-child(2n+1){
&:nth-child(2n+1) {
margin-left: 0;
}
image{
image {
width: 275rpx;
height: 275rpx;
display: block;
margin: 0 auto;
}
.title{
.title {
padding: 10rpx 0;
line-height: 40rpx;
font-size: 24rpx;
@ -201,7 +258,8 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text{
text {
background-color: #F34A40;
font-size: 24rpx;
padding: 0 10rpx;
@ -215,27 +273,32 @@
display: inline-block;
}
}
.price{
.price {
display: flex;
align-items: center;
white-space: nowrap;
.n{
.n {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text{
text {
font-size: 29rpx;
}
}
.o{
.o {
font-size: 12px;
color: #949494;
text-decoration: line-through;
}
}
.desc{
.desc {
font-size: 10px;
font-weight: 400;
color: #949494;
@ -243,20 +306,22 @@
margin-top: 10rpx;
}
}
}
}
}
&-fd{
width: 132rpx;
height: 166rpx;
position: fixed;
right: 10rpx;
bottom: 10%;
z-index: 99;
image{
width: 100%;
height: 100%;
&-fd {
width: 132rpx;
height: 166rpx;
position: fixed;
right: 10rpx;
bottom: 10%;
z-index: 99;
image {
width: 100%;
height: 100%;
}
}
}
}
</style>
</style>

@ -1,195 +1,262 @@
<template>
<view class="presale">
<template>
<view class="presale">
<view class="presale-hd">
<view class="rule" @click="openPage()"></view>
</view>
</view>
<view class="presale-bd">
<view class="tab">
<u-tabs :list="list" :is-scroll="true" :show-bar="false" active-color="#FFFFFF" bg-color="rgba(255,255,255,0)" inactive-color="rgba(255,255,255,0.62)" v-model="current"></u-tabs>
<u-tabs :list="menuList" :is-scroll="true" :show-bar="false" active-color="#FFFFFF"
bg-color="rgba(255,255,255,0)" inactive-color="rgba(255,255,255,0.62)" v-model="current"
@change='onChosed'></u-tabs>
</view>
<view class="title">
<image src="/static/news/newPresale-1.png"></image>
正在进行中
<image src="/static/news/newPresale-1.png"></image>
</view>
<view class="list">
<view class="item" v-for="i in 10" :key="i">
<image class="pic" src="/static/home/phone.jpg"></image>
<view class="list" :isLoading="isLoading">
<view class="item" v-for="(item,index) in goodList" :key="index">
<image class="pic" :src="item.goods_image"></image>
<view class="info">
<view class="t">一加Ace 2pro超值砍价手机全网通双卡双待</view>
<view class="d"><u-count-down :timestamp="timestamp" format="HH:mm:ss"></u-count-down><text></text></view>
<view class="t">{{item.goods_name}}</view>
<view class="d">
<u-count-down :timestamp="timestamp" format="HH:mm:ss"></u-count-down><text></text>
</view>
<view class="p">
<image src="/static/news/newPresale-2.png"></image>
<view class="s">预约价¥4189</view>
<view class="s">预约价¥{{item.goods_price_min}}</view>
<view class="n" @click="goPre(i)">去预约</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import img from "@/static/news/newPeople-bg.png"
export default {
data() {
</view>
</view>
</template>
<script>
import img from "@/static/news/newPeople-bg.png"
import * as Api from '@/api/activity'
export default {
data() {
return {
timestamp: 24*3600*1000,
current: 0,
list: [{
name: '精选好物'
}, {
name: '吹风机'
}, {
name: '空调'
}, {
name: '手机'
}, {
name: '洗衣机'
}, {
name: '冰箱'
}, {
name: '彩电'
}],
}
},
methods: {
openPage() {
timestamp: 24 * 3600 * 1000,
current: 0,
isLoading: true,
goodList: [],
menuList: [],
list: [{
name: '精选好物'
}, {
name: '吹风机'
}, {
name: '空调'
}, {
name: '手机'
}, {
name: '洗衣机'
}, {
name: '冰箱'
}, {
name: '彩电'
}],
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
this.getListCharts()
},
methods: {
getListgoodData(categoryId) {
let app = this;
let pamars = {
store_id: 10001,
categoryId: categoryId,
}
Api.chartsGoodsList(pamars)
.then(result => {
app.goodList = result.data.data;
})
.finally(() => app.isLoading = false)
},
onChosed(index) {
let app = this;
app.current = index;
app.getListgoodData(index != 0 ? app.menuList[index].category_id : '')
},
//
getListCharts() {
let app = this
app.menuList = []
let pamars = {
store_id: 10001
}
Api.charts(pamars)
.then(result => {
let obj = {
name: '精选好物'
}
result.data.unshift(obj)
app.menuList = result.data;
app.getListgoodData('')
})
.finally(() => app.isLoading = false)
},
goDetail(orderId) {
uni.navigateTo({
url: "/pages/activity/presaleRule"
url: '/pages/goods/detail?orderId=' + orderId
})
},
goPre(i){
goDetailMore(categoryId, name) {
uni.navigateTo({
url: "/pages/goods/detail?isPre=true"
url: '/pages/activity/charts?categoryId=' + categoryId + '&name=' + name
})
},
}
}
</script>
<style lang="scss" scoped>
.presale{
background: #ff7b79 url(@/static/news/newPresale-bg.jpg) center top no-repeat;
background-size: 100% auto;
overflow: hidden;
min-height: 100vh;
&-hd{
position: relative;
height: 380rpx;
.rule{
width: 100rpx;
height: 60rpx;
position: absolute;
right: 0;
top: 74rpx;
z-index: 2;
}
}
&-bd{
width: 678rpx;
margin: 0 auto;
padding-bottom: 30rpx;
margin-top: 20rpx;
.title{
width: 100%;
border-radius: 12rpx 12rpx 0 0;
height: 78rpx;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
border: 2px solid #fff;
display: flex;
align-items: center;
justify-content: center;
image{
width: 32rpx;
height: 13rpx;
margin: 0 20rpx;
},
}
}
</script>
<style lang="scss" scoped>
.presale {
background: #ff7b79 url(@/static/news/newPresale-bg.jpg) center top no-repeat;
background-size: 100% auto;
overflow: hidden;
min-height: 100vh;
&-hd {
position: relative;
height: 380rpx;
.rule {
width: 100rpx;
height: 60rpx;
position: absolute;
right: 0;
top: 74rpx;
z-index: 2;
}
}
.list{
background-color: #fff;
border-radius: 0 0 12rpx 12rpx;
overflow: hidden;
.item{
padding: 45rpx 45rpx;
overflow: hidden;
border-top: 1px solid #F1F1F1;
&:first-child{
border-top-color: #fff;
}
&-bd {
width: 678rpx;
margin: 0 auto;
padding-bottom: 30rpx;
margin-top: 20rpx;
.title {
width: 100%;
border-radius: 12rpx 12rpx 0 0;
height: 78rpx;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
border: 2px solid #fff;
display: flex;
image{
width: 220rpx;
height: 220rpx;
margin-right: 10rpx;
align-items: center;
justify-content: center;
image {
width: 32rpx;
height: 13rpx;
margin: 0 20rpx;
}
.info{
flex: 1;
max-width: 400rpx;
.t{
height: 80rpx;
line-height: 40rpx;
font-size: 32rpx;
font-weight: 500;
color: #626262;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.list {
background-color: #fff;
border-radius: 0 0 12rpx 12rpx;
overflow: hidden;
.item {
padding: 45rpx 45rpx;
overflow: hidden;
border-top: 1px solid #F1F1F1;
&:first-child {
border-top-color: #fff;
}
.d{
display: flex;
align-items: center;
height: 60rpx;
font-size: 32rpx;
font-weight: 500;
color: #F94021;
text{
color: #9E9E9E;
margin-left: 10rpx;
}
display: flex;
image {
width: 220rpx;
height: 220rpx;
margin-right: 10rpx;
}
.p{
width: 396rpx;
height: 88rpx;
position: relative;
image{
width: 396rpx;
height: 88rpx;
.info {
flex: 1;
max-width: 400rpx;
.t {
height: 80rpx;
line-height: 40rpx;
font-size: 32rpx;
font-weight: 500;
color: #626262;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.s{
width: 240rpx;
line-height: 88rpx;
position: absolute;
text-align: center;
left: 0;
top: 0;
z-index: 2;
font-size: 32rpx;
font-weight: 500;
color: #FF584D;
.d {
display: flex;
align-items: center;
height: 60rpx;
font-size: 32rpx;
font-weight: 500;
color: #F94021;
text {
color: #9E9E9E;
margin-left: 10rpx;
}
}
.n{
width: 150rpx;
line-height: 88rpx;
text-align: center;
position: absolute;
right: 0;
top: 0;
z-index: 2;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
.p {
width: 396rpx;
height: 88rpx;
position: relative;
image {
width: 396rpx;
height: 88rpx;
}
.s {
width: 240rpx;
line-height: 88rpx;
position: absolute;
text-align: center;
left: 0;
top: 0;
z-index: 2;
font-size: 32rpx;
font-weight: 500;
color: #FF584D;
}
.n {
width: 150rpx;
line-height: 88rpx;
text-align: center;
position: absolute;
right: 0;
top: 0;
z-index: 2;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
}
}
}
}
}
}
}
}
</style>
</style>

@ -1,7 +1,9 @@
<template>
<view class="newGoods">
<view >
<u-navbar title="排行榜" back-icon-color="#fff" :border-bottom="false" title-color="#fff" :background="background"></u-navbar>
<view class="newGoods" :style="{backgroundImage:'url('+backgroundImg+')'}"
style="background-size: 100% 100%;padding-bottom: 20rpx;">
<view>
<u-navbar title="排行榜" back-icon-color="#fff" :border-bottom="false" title-color="#fff"
:background="background"></u-navbar>
</view>
<image src="/static/rank/rangkImg.png" mode="" class="bgImg"></image>
<view class="headTitle">
@ -12,35 +14,62 @@
</view>
<view class="menuList">
<scroll-view scroll-x="true" class="list">
<view class="menuItem" v-for="(item,index) in menuList" :key="index">
<view class="menuItem" v-for="(item,index) in menuList" :key="index" @click="onChosed(item,index)">
<view class="menuName">
{{item.name}}
</view>
<view class="line" v-if="chosed==item.value">
</view>
<view class="line" v-if="chosed==index"></view>
</view>
</scroll-view>
</view>
<view class="rankList" v-for="(s,k) in 4" :key="k">
<view class="firLine" @click="goDetail">
<view class="hotTitle">手机热销榜</view>
<view class="rankList" v-for="(item,index) in jingList" :key="index" v-if="chosed==0">
<view class="firLine" @click="goDetailMore(item.category_id,item.name)">
<view class="hotTitle">{{item.name}}热销榜</view>
<view class="opera">
<text>更多上榜好物</text>
<image src="../../static/order/left.png" mode="" class="more"></image>
</view>
</view>
<view class="goodsList">
<view class="goodsItem" v-for="(item,index) in 3" :key="index">
<view class="goodsItem" v-for="(item_1,index) in item.goods_list" :key="index" v-if="index < 3">
<image src="/static/rank/topOne.png" mode="" class="topOne" v-if="index==0"></image>
<image src="/static/rank/topTwo.png" mode="" class="topOne" v-if="index==1"></image>
<image src="/static/rank/topThree.png" mode="" class="topOne" v-if="index==2"></image>
<image src="/static/newGoods/goods.png" mode="" class="goodsImg"></image>
<image :src="item_1.goods_image" mode="" class="goodsImg"></image>
<view class="goodsName">
Neo9 Pro...
{{item_1.goods_name}}
</view>
<view class="goodsPrice">
2399
{{item_1.goods_price_min}}
</view>
</view>
</view>
</view>
<!-- 商品 -->
<view class="rankList" v-if="chosed>0" style="padding: 0;height: 440rpx;">
<view class="goodsList1" v-for="(item,index) in goodList" :key="index">
<view class="goodsDetail1">
<image src="../../static/rank/topOne.png" mode="" class="topOne1"></image>
<view class="goodsInfo1">
<image :src="item.goods_image" mode="" class="goodsImg1"></image>
<view class="goodsName1">
<view class="name1">
{{item.goods_name}}
</view>
<view class="hot1">
<text class="hotTitle1">HOT</text>
<text class="zs1">综合热卖指数{{item.remaizhishu}}</text>
</view>
</view>
</view>
</view>
<view class="opera1">
<view class="price1">
<text>{{item.goods_price_min}}</text>
</view>
<view class="look1" @click="goDetail(item.goods_id)">
去看看
<image src="/static/rank/right.png" mode="" class="right1"></image>
</view>
</view>
</view>
@ -50,39 +79,96 @@
<script>
import img from "@/static/rank/rank1.png"
import * as Api from '@/api/activity'
export default {
data() {
return {
background: {
background: 'url('+ img+') center top no-repeat',
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto',
},
chosed:0,
menuList:[
{
name:'精选',
value:0
},{
name:'手机通讯',
value:1
},{
name:'电脑',
value:2
},{
name:'家用电器',
value:3
},{
name:'美妆',
value:4
},
]
chosed: 0,
menuList: [],
backgroundImg: '',
jingList: [],
goodList: [],
}
},
methods:{
goDetail(){
onShow() {
this.getCarouselList()
this.getListCharts()
},
methods: {
//
getCarouselList(category_id) {
const app = this;
Api.getImage({
type: 3
})
.then(result => {
app.backgroundImg = result.data.imgurl;
if (app.chosed == 0) {
app.getListJingData()
} else {
app.getListgoodData(category_id)
}
})
.finally(() => app.isLoading = false)
},
getListJingData() {
let app = this;
let pamars = {
store_id: 10001,
}
Api.chartsGoodsJing(pamars)
.then(result => {
app.jingList = result.data;
})
.finally(() => app.isLoading = false)
},
getListgoodData(categoryId) {
let app = this;
let pamars = {
store_id: 10001,
categoryId: categoryId,
}
Api.chartsGoodsList(pamars)
.then(result => {
app.goodList = result.data.data;
})
.finally(() => app.isLoading = false)
},
onChosed(item, index) {
let app = this;
app.chosed = index;
app.getCarouselList(item.category_id)
},
//
getListCharts() {
let app = this
app.menuList = []
let pamars = {
store_id: 10001
}
Api.charts(pamars)
.then(result => {
let obj = {
name: '精品'
}
result.data.unshift(obj)
app.menuList = result.data;
app.getListJingData()
})
.finally(() => app.isLoading = false)
},
goDetail(orderId) {
uni.navigateTo({
url:'/pages/activity/charts'
url: '/pages/goods/detail?orderId='+orderId
})
},
goDetailMore(categoryId,name) {
uni.navigateTo({
url: '/pages/activity/charts?categoryId='+categoryId+'&name='+name
})
},
}
@ -93,7 +179,8 @@
.newGoods {
width: 100%;
position: relative;
min-height:100vh ;
min-height: 100vh;
.bgImg {
width: 100%;
height: 100%;
@ -103,6 +190,7 @@
z-index: -10;
}
}
.headTitle {
width: 100%;
text-align: center;
@ -130,17 +218,21 @@
right: 0;
margin: auto;
}
.menuList{
.menuList {
margin-top: 34rpx;
width: 100%;
padding-left: 50rpx;
.list{
.list {
white-space: nowrap;
}
.menuItem{
.menuItem {
display: inline-block;
margin-right: 62rpx;
.menuName{
.menuName {
height: 50rpx;
font-size: 36rpx;
@ -149,7 +241,8 @@
color: #FFFFFF;
line-height: 50rpx;
}
.line{
.line {
width: 70rpx;
height: 10rpx;
background: #FFE4C3;
@ -159,18 +252,21 @@
}
}
}
.rankList{
.rankList {
width: 702rpx;
height: 456rpx;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1;
margin: 28rpx 0 0 22rpx;
margin: 28rpx 0 0 24rpx;
padding: 32rpx;
.firLine{
.firLine {
display: flex;
justify-content: space-between;
.hotTitle{
.hotTitle {
height: 50rpx;
font-size: 36rpx;
font-family: PingFang SC, PingFang SC;
@ -178,10 +274,12 @@
color: #0E0E0E;
line-height: 50rpx;
}
.opera{
.opera {
display: flex;
align-items: center;
text{
text {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
@ -190,31 +288,37 @@
line-height: 44rpx;
margin-right: 18rpx;
}
.more{
.more {
width: 20rpx;
height: 20rpx;
}
}
}
.goodsList{
.goodsList {
display: flex;
margin-top: 86rpx;
margin-left: 18rpx;
justify-content: space-around;
.goodsItem{
.goodsItem {
position: relative;
.topOne{
.topOne {
width: 48rpx;
height: 66rpx;
position: absolute;
top:-38rpx;
top: -38rpx;
left: -28rpx;
}
.goodsImg{
.goodsImg {
width: 160rpx;
height: 160rpx;
}
.goodsName{
.goodsName {
width: 150rpx;
height: 40rpx;
font-size: 28rpx;
@ -223,8 +327,12 @@
color: #3F3F3F;
line-height: 40rpx;
margin: 8rpx 0 4rpx 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.goodsPrice{
.goodsPrice {
height: 50rpx;
font-size: 36rpx;
font-family: PingFang SC, PingFang SC;
@ -234,5 +342,134 @@
}
}
}
.goodsList1 {
width: 700rpx;
height: 440rpx;
background: #FCE5C6;
border-radius: 18rpx 18rpx 18rpx 18rpx;
margin-bottom: 42rpx;
.goodsDetail1 {
width: 700rpx;
height: 336rpx;
padding: 54rpx 0 0 52rpx;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1;
position: relative;
.topOne1 {
width: 73rpx;
height: 100rpx;
position: absolute;
left: 36rpx;
top: -8rpx;
}
.goodsInfo1 {
display: flex;
.goodsImg1 {
width: 224rpx;
height: 224rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
margin-right: 16rpx;
}
.goodsName1 {
.name1 {
width: 396rpx;
height: 132rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #0E0E0E;
line-height: 38rpx;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.hot1 {
width: 336rpx;
height: 60rpx;
background: linear-gradient(90deg, #FCE5C6 0%, #FFFFFF 100%);
border-radius: 70rpx 70rpx 70rpx 70rpx;
opacity: 1;
margin-top: 16rpx;
.hotTitle1 {
margin-right: 8rpx;
width: 68rpx;
height: 42rpx;
font-size: 32rpx;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
font-weight: 600;
line-height: 60rpx;
margin-left: 8rpx;
background: -webkit-linear-gradient(180deg, #FFA621 0%, #F34A40 100%);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.zs1 {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #9F6516;
line-height: 60rpx;
}
}
}
}
}
.opera1 {
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
height: 104rpx;
.price1 {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #301F14;
line-height: 44rpx;
text {
font-size: 48rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #301F14;
line-height: 68rpx;
}
}
.look1 {
width: 202rpx;
height: 60rpx;
background: linear-gradient(180deg, #FF7E6A 0%, #FB322A 100%);
border-radius: 70rpx 70rpx 70rpx 70rpx;
opacity: 1;
margin-right: 22rpx;
text-align: center;
line-height: 60rpx;
.right1 {
width: 20rpx;
height: 18rpx;
margin-left: 26rpx;
}
}
}
}
}
</style>
</style>

@ -1,61 +1,57 @@
<template>
<view class="seckill">
<view >
<u-navbar title="限时秒杀" back-icon-color="#fff" :border-bottom="false" title-color="#fff" :background="background"></u-navbar>
<view>
<u-navbar title="限时秒杀" back-icon-color="#fff" :border-bottom="false" title-color="#fff"
:background="background"></u-navbar>
</view>
<view class="title">
<view class="title" :style="{backgroundImage:'url('+backgroundImg+')'}" style="background-size: 100% 100%;">
<image src="/static/seckill/topHeader.png" mode="" class="bgImg"></image>
<view class="limitTitle">
<image src="/static/seckill/limit.png" mode="" class="img"></image>
</view>
<view class="time">
<view class="timeItem" v-for="(item,index) in 4" :key="index">
<view class="time" v-if="tabbar.length">
<view class="timeItem" v-for="(item,index) in tabbar" :key="index">
<view class="num">
10:00
{{item.active_time}}
</view>
<view class="desc">
疯抢中
{{item.sharp_modular_text}}
</view>
</view>
</view>
</view>
<view class="main">
<view class="over">
<view class="over" v-if="tabbar.length">
<view class="info">
距秒杀结束还剩
</view>
<view class="hou com">
08
</view>:
<view class="min com">
50
</view>:
<view class="sec com">
12
距秒杀<text
class="m-r-10">{{ tabbar[curTabIndex].status == ActiveStatusEnum.STATE_BEGIN.value ? '距结束' : '距开始' }}</text>还剩
<count-down style='display: inline-block;' :date="tabbar[curTabIndex].count_down_time"
separator="colon" theme="custom" />
</view>
</view>
<view class="goodsList">
<view class="goodItem" v-for="(item,index) in 3" :key="index" @click="goodsDetail(item)">
<view class="goodItem" v-for="(item,index) in goodsList" :key="index"
@click="handleTargetGoods(item.sharp_goods_id)">
<view class="itemImg">
<image src="/static/newGoods/goods.png" mode="" class="goodsImg"></image>
<image :src="item.goods_image" mode="" class="goodsImg"></image>
</view>
<view class="goodsInfo">
<view class="name">
Apple iphone 15(A3092)
{{item.goods_name}}
</view>
<view class="sellNum">
爆卖76
爆卖{{item.sales_actual}}
</view>
<view class="info">
<view class="price">
¥1849
¥{{item.original_price}}
</view>
<view class="delPrice">
<view class="delText">
直降32
直降{{item.original_price-item.seckill_price_min}}
</view>
</view>
<view class="update">
即将调整
@ -64,12 +60,12 @@
<view class="line">
<image src="/static/seckill/line.png" mode=""></image>
</view>
<view class="btn">
<view class="btn" v-if="tabbar.length">
<view class="killPrice">
秒杀价1149
秒杀价{{item.original_price}}
</view>
<view class="buyNow">
立即抢
{{ tabbar[curTabIndex].status == ActiveStatusEnum.STATE_BEGIN.value ? '马上抢' : '查看商品' }}
</view>
</view>
</view>
@ -80,36 +76,223 @@
</template>
<script>
import img from "@/static/seckill/topHeader.png"
export default{
data(){
return{
import img from "@/static/rank/rank1.png"
import WxofficialMixin from '@/core/mixins/wxofficial'
import CountDown from '@/components/countdown'
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins'
import {
hex2rgba
} from '@/utils/color'
import {
getEmptyPaginateObj,
getMoreListData
} from '@/core/app'
import {
ActiveStatusEnum
} from '@/common/enum/sharp'
import * as Api from '@/api/activity'
const pageSize = 15
export default {
components: {
CountDown
},
mixins: [MescrollMixin, WxofficialMixin],
data() {
return {
//
isLoading: true,
// tab
curTabIndex: 0,
//
upOption: {
//
auto: false,
// ; 10
page: {
size: pageSize
},
// 3
noMoreSize: 3,
},
//
ActiveStatusEnum,
//
tabbar: [],
//
goodsList: [],
background: {
background: 'url('+ img+') center top no-repeat',
backgroundSize: '100% auto',
},
backgroundImg:''
}
},
methods:{
goodsDetail(item){
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getCarouselList()
//
this.onRefreshPage()
//
this.setWxofficialShareData()
},
methods: {
//
getCarouselList() {
const app = this;
Api.getImage({
type: 2
})
.then(result => {
app.backgroundImg = result.data.imgurl
})
.finally(() => app.isLoading = false)
},
//
onRefreshPage() {
const app = this
return new Promise((resolve, reject) => {
Api.data()
.then(result => {
app.tabbar = result.data.tabbar;
app.goodsList = result.data.goodsList.data
app.curTabIndex = 0
if (!app.goodsList.data.length) {
app.mescroll.showEmpty()
}
resolve()
})
.catch(reject)
})
},
/**
* 获取商品列表
* @param {Number} pageNo 页码
*/
getListData(pageNo = 1) {
const app = this
const activeTimeId = app.getCurTabbarId()
return new Promise((resolve, reject) => {
Api.list(activeTimeId, {
page: pageNo
}, {
load: false
})
.then(result => {
//
const newList = result.data.list
app.goodsList = getMoreListData(newList, app.goodsList, pageNo)
resolve(newList)
})
.catch(reject)
})
},
//
downCallback() {
this.onRefreshPage()
.finally(() => this.mescroll.endSuccess())
},
/**
* 上拉加载的回调
* 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10
* @param {Object} page
*/
upCallback(page) {
const app = this
//
app.getListData(page.num)
.then(list => {
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
})
.catch(() => app.mescroll.endErr())
},
// ()
handleTab(index) {
const app = this
app.curTabIndex = index
//
app.goodsList = getEmptyPaginateObj()
app.mescroll.resetUpScroll()
},
//
getCurTabbar() {
return this.tabbar[this.curTabIndex]
},
// ID
getCurTabbarId() {
const curTabbar = this.getCurTabbar()
return curTabbar ? curTabbar.active_time_id : 0
},
//
handleTargetGoods(sharpGoodsId) {
uni.navigateTo({
url:'/pages/goods/detail'
url: '/pages/goods/detail?goodsId=' + sharpGoodsId
})
},
}
//
setWxofficialShareData() {
this.updateShareCardData({
title: '整点秒杀会场'
})
},
},
/**
* 分享当前页面
*/
onShareAppMessage() {
//
const params = this.$getShareUrlParams()
return {
title: '整点秒杀会场',
path: `/pages/sharp/index?${params}`
}
},
/**
* 分享到朋友圈
* 本接口为 Beta 版本暂只在 Android 平台支持详见分享到朋友圈 (Beta)
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
*/
onShareTimeline() {
//
const params = this.$getShareUrlParams()
return {
title: '整点秒杀会场',
path: `/pages/sharp/index?${params}`
}
},
}
</script>
<style lang="scss" scoped>
.seckill{
.seckill {
width: 100%;
height: 100%;
}
.title{
.title {
width: 100%;
height: 180rpx;
position: relative;
.bgImg{
.bgImg {
width: 100%;
height: 100%;
position: absolute;
@ -117,25 +300,29 @@
left: 0;
z-index: -1;
}
.limitTitle{
.limitTitle {
display: flex;
justify-content: center;
z-index: 20;
.img{
.img {
margin-top: 20rpx;
width: 302rpx;
height: 82rpx;
z-index: 20;
}
}
.time{
.time {
display: flex;
align-items: center;
width: 100%;
justify-content: space-around;
z-index: 30;
.timeItem{
.num{
.timeItem {
.num {
width: 102rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
@ -145,8 +332,9 @@
text-shadow: 0px 0px 11px #FB3A22;
text-align: center;
}
.desc{
width: 102rpx;
.desc {
width: 150rpx;
height: 36rpx;
background: #FFFFFF;
border-radius: 62rpx 62rpx 62rpx 62rpx;
@ -161,14 +349,16 @@
}
}
}
.main{
.main {
width: 100%;
height: 100%;
background: #F4F6FA;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
padding-top:34rpx ;
.over{
padding-top: 34rpx;
.over {
width: 100%;
display: flex;
justify-content: center;
@ -177,11 +367,13 @@
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3C3C3C;
.info{
.info {
line-height: 40rpx;
margin-right: 18rpx;
}
.com{
.com {
width: 54rpx;
height: 48rpx;
background: #252525;
@ -194,20 +386,25 @@
line-height: 48rpx;
text-align: center;
}
.hou{
.hou {
margin-right: 4rpx;
}
.min{
.min {
margin: 0 4rpx;
}
.sec{
.sec {
margin-left: 4rpx;
}
}
}
.goodsList{
.goodsList {
margin-top: 22rpx;
.goodItem{
.goodItem {
margin-left: 34rpx;
width: 686rpx;
height: 342rpx;
@ -217,26 +414,34 @@
display: flex;
padding: 48rpx 32rpx 36rpx 6rpx;
margin-bottom: 26rpx;
.itemImg{
.itemImg {
width: 258rpx;
height: 258rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
.goodsImg{
.goodsImg {
width: 100%;
height: 100%;
}
}
.goodsInfo{
.name{
.goodsInfo {
.name {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #0E0E0E;
line-height: 44rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 350rpx;
}
.sellNum{
.sellNum {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
@ -245,9 +450,11 @@
line-height: 44rpx;
margin-bottom: 8rpx;
}
.info{
.info {
display: flex;
.price{
.price {
height: 40rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
@ -255,7 +462,8 @@
color: #979797;
line-height: 40rpx;
}
.delPrice{
.delPrice {
width: 132rpx;
height: 48rpx;
font-size: 20rpx;
@ -265,14 +473,16 @@
line-height: 23rpx;
background-image: url('../../static/seckill/bottom.png');
background-size: 100% 100%;
margin:0 12rpx 0 14rpx;
.delText{
margin: 0 12rpx 0 14rpx;
.delText {
width: 132rpx;
text-align: center;
margin-top: 4rpx;
}
}
.update{
.update {
width: 112rpx;
height: 40rpx;
font-size: 28rpx;
@ -282,16 +492,19 @@
line-height: 40rpx;
}
}
.line{
.line {
width: 302rpx;
height: 30rpx;
margin-left:22rpx;
image{
margin-left: 22rpx;
image {
width: 100%;
height: 100%;
}
}
.btn{
.btn {
margin-top: 14rpx;
width: 390rpx;
height: 70rpx;
@ -303,14 +516,16 @@
justify-content: space-between;
background-image: url('../../static/seckill/btnBg.png');
background-size: 100% 100%;
.killPrice{
.killPrice {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FF423D;
margin-left: 26rpx;
}
.buyNow{
.buyNow {
width: 84rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
@ -322,4 +537,4 @@
}
}
}
</style>
</style>

File diff suppressed because it is too large Load Diff

@ -171,8 +171,8 @@
<view class="newImage" @click="goNews">
<image src="../../static/home/newImg.png" mode=""></image>
</view>
<view class="newRight" @click="goNewGoods">
<view class="newFirt">
<view class="newRight" >
<view class="newFirt" @click="goNewGoods">
<view class="starting">
新品首发
</view>

@ -6,7 +6,7 @@
</view>
<view class="b">
<view class="l">产品名称iPhone13</view>
<view class="r">订单编号23122-33890099<text>复制</text></view>
<view class="r">订单编号23122-33890099<text @click="handleCopy()">复制</text></view>
</view>
</view>
<view class="invoice-info">
@ -48,7 +48,7 @@
</view>
</view>
</view>
</view>
</view>
<view class="invoice-company" v-if="tabIndex == 2">
<view class="a">选填内容开户银行银行账号等
<text :class="toggleIndex?'on':''" @click="toggleItem()">{{toggleIndex?"收起":"展开"}}</text>
@ -79,11 +79,12 @@
</view>
</view>
</view>
</view>
</view>
<view class="invoice-fd">
申请发票
</view>
<u-modal v-model="show" :content="content" :show-cancel-button="true" :show-title="false" confirm-color="#F55349"></u-modal>
<u-modal v-model="show" :content="content" :show-cancel-button="true" :show-title="false"
confirm-color="#F55349"></u-modal>
</view>
</template>
@ -95,29 +96,54 @@
show: true,
toggleIndex: true,
index: -1,
array: ['增值税电子普通发票','普通发票'],
array: ['增值税电子普通发票', '普通发票'],
index1: -1,
array1: ['南京苏农科技有限公司','南京途牛科技有限公司'],
tabIndex: 2
array1: ['南京苏农科技有限公司', '南京途牛科技有限公司'],
tabIndex: 2,
pamres: {
orderId: '',
invoiceType: '',
invoiceUnit:1
},
};
},
onLoad(op) {
this.pamres.orderId = op.orderId
},
methods: {
//
handleCopy(value) {
const app = this
uni.setClipboardData({
data: value,
success: () => app.$toast('复制成功'),
fail: ({
errMsg
}) => app.$toast('复制失败 ' + errMsg)
})
},
//
handleInvoice() {
const app = this
},
onClose() {},
tabItem(i){
tabItem(i) {
this.tabIndex = i;
},
toggleItem(i){
toggleItem(i) {
this.toggleIndex = !this.toggleIndex;
this.pamres.invoiceUnit = this.toggleIndex
},
toDetail(i){
toDetail(i) {
uni.navigateTo({
url: "/pages/invoice/edit"
})
},
bindPickerChange(e){
this.index = e.detail.value
bindPickerChange(e) {
this.index = e.detail.value;
this.pamres.invoiceType = e.detail.value
},
bindPickerChange1(e){
bindPickerChange1(e) {
this.index1 = e.detail.value
}
}
@ -125,229 +151,244 @@
</script>
<style lang="scss" scoped>
.invoice{
&-goods{
padding: 0 20rpx 0 40rpx;
overflow: hidden;
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
.a{
width: 145rpx;
height: 135rpx;
margin-right: 20rpx;
image{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.b{
flex: 1;
.invoice {
&-goods {
padding: 0 20rpx 0 40rpx;
overflow: hidden;
.l{
white-space: nowrap;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #262626;
overflow: hidden;
}
.r{
font-size: 30rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
text{
display: block;
width: 104rpx;
line-height: 60rpx;
background: #FFFFFF;
border-radius: 4rpx;
text-align: center;
border: 1px solid #CACACA;
font-size: 28rpx;
color: #555;
}
}
}
}
&-info{
margin-top: 20rpx;
background-color: #fff;
overflow: hidden;
.a{
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx 20rpx 60rpx;
box-sizing: border-box;
border-bottom: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 500;
color: #262626;
text{
color: #006AFF;
padding-right: 40rpx;
position: relative;
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #006AFF;
border-left: 1px solid #006AFF;
position: absolute;
right: 0;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
.a {
width: 145rpx;
height: 135rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.b {
flex: 1;
overflow: hidden;
.l {
white-space: nowrap;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #262626;
overflow: hidden;
}
.r {
font-size: 30rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
text {
display: block;
width: 104rpx;
line-height: 60rpx;
background: #FFFFFF;
border-radius: 4rpx;
text-align: center;
border: 1px solid #CACACA;
font-size: 28rpx;
color: #555;
}
}
}
}
.b{
padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
&-info {
margin-top: 20rpx;
background-color: #fff;
overflow: hidden;
.item{
padding: 30rpx 0;
.a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx 20rpx 60rpx;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
border-bottom: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 500;
color: #262626;
overflow: hidden;
&:first-child{
border-top-color: #fff;
}
.l{
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
color: #262626;
text {
color: #006AFF;
padding-right: 40rpx;
position: relative;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #006AFF;
border-left: 1px solid #006AFF;
position: absolute;
right: 0;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
.r{
flex: 1;
}
.b {
padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
overflow: hidden;
.item {
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 400;
font-weight: 500;
color: #262626;
.li{
width: 150rpx;
height: 78rpx;
background: #F3F3F3;
border-radius: 8rpx;
text-align: center;
line-height: 78rpx;
overflow: hidden;
&:first-child {
border-top-color: #fff;
}
.l {
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #262626;
margin-right: 12rpx;
&-on{
background: #FDF4F4;
background: url(/static/invoice/select-active.png) center top no-repeat;
background-size: contain;
}
}
input {
flex: 1;
color: #656565;
}
picker{
.r {
flex: 1;
.tt{
width: 180rpx;
position: relative;
color: #4894FF;
text-align: right;
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #4894FF;
border-left: 1px solid #4894FF;
position: absolute;
right: -50rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #262626;
.li {
width: 150rpx;
height: 78rpx;
background: #F3F3F3;
border-radius: 8rpx;
text-align: center;
line-height: 78rpx;
font-size: 32rpx;
font-weight: 400;
color: #262626;
margin-right: 12rpx;
&-on {
background: #FDF4F4;
background: url(/static/invoice/select-active.png) center top no-repeat;
background-size: contain;
}
}
.lx{
width: 100%;
position: relative;
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #B8B8B8;
border-left: 1px solid #B8B8B8;
position: absolute;
right: 20rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
input {
flex: 1;
}
picker {
flex: 1;
.tt {
width: 180rpx;
position: relative;
color: #4894FF;
text-align: right;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #4894FF;
border-left: 1px solid #4894FF;
position: absolute;
right: -50rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
.lx {
width: 100%;
position: relative;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #B8B8B8;
border-left: 1px solid #B8B8B8;
position: absolute;
right: 20rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
}
}
}
}
}
}
&-fd{
width: 664rpx;
height: 104rpx;
background: #F55349;
border-radius: 8rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
&-company{
overflow: hidden;
.a{
padding: 35rpx 50rpx;
&-fd {
width: 664rpx;
height: 104rpx;
background: #F55349;
border-radius: 8rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
font-size: 32rpx;
font-weight: 400;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
color: #262626;
text{
width: 70rpx;
color: #888888;
margin-right: 30rpx;
position: relative;
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #888888;
border-left: 1px solid #888888;
position: absolute;
right: -30rpx;
top: 10rpx;
z-index: 1;
transform: rotate(225deg);
}
&.on{
&::after{
justify-content: center;
}
&-company {
overflow: hidden;
.a {
padding: 35rpx 50rpx;
font-size: 32rpx;
font-weight: 400;
display: flex;
align-items: center;
justify-content: space-between;
color: #262626;
text {
width: 70rpx;
color: #888888;
margin-right: 30rpx;
position: relative;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
@ -355,52 +396,72 @@
border-left: 1px solid #888888;
position: absolute;
right: -30rpx;
top: 20rpx;
top: 10rpx;
z-index: 1;
transform: rotate(45deg);
transform: rotate(225deg);
}
&.on {
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #888888;
border-left: 1px solid #888888;
position: absolute;
right: -30rpx;
top: 20rpx;
z-index: 1;
transform: rotate(45deg);
}
}
}
}
}
.b{
padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
background-color: #fff;
overflow: hidden;
.item{
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
.b {
padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 500;
color: #262626;
background-color: #fff;
overflow: hidden;
&:first-child{
border-top-color: #fff;
}
.l{
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
}
.r{
flex: 1;
.item {
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 400;
font-weight: 500;
color: #262626;
input {
overflow: hidden;
&:first-child {
border-top-color: #fff;
}
.l {
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
}
.r {
flex: 1;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #262626;
input {
flex: 1;
}
}
}
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,523 @@
<template>
<view class="container" :style="appThemeStyle">
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }" @down="downCallback" :up="upOption"
@up="upCallback">
<!-- tab栏 -->
<u-tabs :list="tabs" :is-scroll="false" :current="curTab" :active-color="appTheme.mainBg" :duration="0.2" @change="onChangeTab" />
<!-- 订单列表 -->
<view class="order-list">
<view class="order-item" v-for="(item, index) in list.data" :key="index">
<view class="item-top">
<view class="item-top-left">
<text class="order-time">{{ item.create_time }}</text>
</view>
<view class="item-top-right">
<text class="state-text" :style="{{(item.pay_status == PayStatusEnum.PENDING.value?'color:#05C669':'color:#FF2F2F')}}">{{ item.state_text }}</text>
</view>
</view>
<!-- 商品列表 -->
<view class="goods-list" @click="handleTargetDetail(item.order_id)">
<view class="goods-item" v-for="(goods, idx) in item.goods" :key="idx">
<!-- 商品图片 -->
<view class="goods-image">
<image class="image" :src="goods.goods_image" mode="scaleToFill"></image>
</view>
<!-- 商品信息 -->
<view class="goods-content">
<view class="goods-title"><text class="twoline-hide">{{ goods.goods_name }}</text></view>
<view class="goods-props clearfix">
<view class="goods-props-item" v-for="(props, idx) in goods.goods_props" :key="idx">
<text>{{ props.value.name }}</text>
</view>
</view>
</view>
<!-- 交易信息 -->
<view class="goods-trade">
<view class="goods-price">
<text class="unit"></text>
<text class="value">{{ goods.is_user_grade ? goods.grade_goods_price : goods.goods_price }}</text>
</view>
<view class="goods-num">
<text>×{{ goods.total_num }}</text>
</view>
</view>
</view>
</view>
<!-- 订单合计 -->
<view class="order-total">
<text>{{ item.total_num }}件商品总金额</text>
<text class="unit"></text>
<text class="money">{{ item.pay_price }}</text>
</view>
<!-- 订单操作 -->
<view v-if="item.order_status != OrderStatusEnum.CANCELLED.value" class="order-handle">
<view class="btn-group clearfix">
<!-- 未支付取消订单 -->
<block v-if="item.pay_status == PayStatusEnum.PENDING.value">
<view class="btn-item" @click="onCancel(item.order_id)">取消</view>
</block>
<!-- 已支付进行中的订单 -->
<block v-if="item.order_status != OrderStatusEnum.APPLY_CANCEL.value">
<block v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value">
<view class="btn-item" @click="onCancel(item.order_id)">申请取消</view>
</block>
<!-- 订单核销码 -->
<block v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_type == DeliveryTypeEnum.EXTRACT.value
&& item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value">
<view class="btn-item active" @click="onExtractQRCode(item.order_id)">
<text class="iconfont icon-qr-extract"></text>
<text class="m-l-10">核销码</text>
</view>
</block>
</block>
<!-- 已申请取消 -->
<view v-else class="f-28 col-8">取消申请中</view>
<!-- 未支付的订单 -->
<block v-if="item.pay_status == PayStatusEnum.PENDING.value">
<view class="btn-item active" @click="onPay(item.order_id)">去支付</view>
</block>
<!-- 确认收货 -->
<block v-if="item.delivery_status == DeliveryStatusEnum.DELIVERED.value && item.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value">
<view class="btn-item active" @click="onReceipt(item.order_id)">确认收货</view>
</block>
<!-- 订单评价 -->
<block v-if="item.order_status == OrderStatusEnum.COMPLETED.value && item.is_comment == 0">
<view class="btn-item" @click="handleTargetComment(item.order_id)">评价</view>
</block>
</view>
</view>
</view>
</view>
</mescroll-body>
<!-- 核销二维码弹窗 -->
<u-popup v-model="showQRCodePopup" mode="center" border-radius="26" :closeable="true">
<view class="qrcode-popup">
<view class="title">自提核销二维码</view>
<view class="pop-content">
<image v-if="qrcodeImage" class="image" :src="qrcodeImage"></image>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
DeliveryStatusEnum,
DeliveryTypeEnum,
OrderStatusEnum,
PayStatusEnum,
ReceiptStatusEnum
} from '@/common/enum/order'
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins'
import { getEmptyPaginateObj, getMoreListData } from '@/core/app'
import * as OrderApi from '@/api/order'
//
const pageSize = 15
// tab
const tabs = [{
name: `全部`,
value: 'all'
}, {
name: `待支付`,
value: 'payment'
}, {
name: `待发货`,
value: 'delivery'
}, {
name: `待收货`,
value: 'received'
}, {
name: `待评价`,
value: 'comment'
}]
export default {
mixins: [MescrollMixin],
data() {
return {
//
DeliveryStatusEnum,
DeliveryTypeEnum,
OrderStatusEnum,
PayStatusEnum,
ReceiptStatusEnum,
//
options: { dataType: 'all' },
// tab
tabs,
//
curTab: 0,
//
list: getEmptyPaginateObj(),
//
upOption: {
//
auto: true,
// ; 10
page: { size: pageSize },
// 4
noMoreSize: 4,
//
empty: {
tip: '亲,暂无订单记录'
}
},
// onShow
canReset: false,
//
showQRCodePopup: false,
// url ()
qrcodeImage: '',
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
//
this.initCurTab(options)
// :
uni.$on('syncRefresh', canReset => {
this.canReset = canReset
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.canReset && this.onRefreshList()
this.canReset = false
},
/**
* 生命周期函数--监听页面的卸载
*/
onUnload() {
//
uni.$off('syncRefresh')
},
methods: {
//
initCurTab(options) {
const app = this
if (options.dataType) {
const index = app.tabs.findIndex(item => item.value == options.dataType)
app.curTab = index > -1 ? index : 0
}
},
/**
* 上拉加载的回调 (页面初始化时也会执行一次)
* 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10
* @param {Object} page
*/
upCallback(page) {
const app = this
//
app.getOrderList(page.num)
.then(list => {
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
})
.catch(() => app.mescroll.endErr())
},
//
getOrderList(pageNo = 1) {
const app = this
return new Promise((resolve, reject) => {
OrderApi.list({ dataType: app.getTabValue(), page: pageNo }, { load: false })
.then(result => {
//
const newList = app.initList(result.data.list)
app.list.data = getMoreListData(newList, app.list, pageNo)
resolve(newList)
})
})
},
//
initList(newList) {
newList.data.forEach(item => {
item.total_num = 0
item.goods.forEach(goods => {
item.total_num += goods.total_num
})
})
return newList
},
//
getTabValue() {
return this.tabs[this.curTab].value
},
//
onChangeTab(index) {
const app = this
//
app.curTab = index
//
app.onRefreshList()
},
//
onRefreshList() {
this.list = getEmptyPaginateObj()
setTimeout(() => {
this.mescroll.resetUpScroll()
}, 120)
},
//
onCancel(orderId) {
const app = this
uni.showModal({
title: '友情提示',
content: '确认要取消该订单吗?',
success(o) {
if (o.confirm) {
OrderApi.cancel(orderId)
.then(result => {
//
app.$toast(result.message)
//
app.onRefreshList()
})
}
}
});
},
//
onReceipt(orderId) {
const app = this
uni.showModal({
title: '友情提示',
content: '确认收到商品了吗?',
success(o) {
if (o.confirm) {
OrderApi.receipt(orderId)
.then(result => {
//
app.$success(result.message)
//
app.onRefreshList()
})
}
}
});
},
//
onExtractQRCode(orderId) {
const app = this
OrderApi.extractQrcode(orderId, { channel: app.platform })
.then(result => {
app.qrcodeImage = result.data.qrcode
app.showQRCodePopup = true
})
},
//
onPay(orderId) {
this.$navTo('pages/checkout/cashier/index', { orderId })
},
//
handleTargetDetail(orderId) {
this.$navTo('pages/order/detail', { orderId })
},
//
handleTargetComment(orderId) {
this.$navTo('pages/order/comment/index', { orderId })
}
},
}
</script>
<style lang="scss" scoped>
//
.order-item {
margin: 20rpx auto 20rpx auto;
padding: 30rpx 30rpx;
width: 94%;
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
border-radius: 16rpx;
background: #fff;
}
//
.item-top {
display: flex;
justify-content: space-between;
font-size: 26rpx;
margin-bottom: 40rpx;
.order-time {
color: #777;
}
.state-text {
color: $main-bg;
}
}
//
.goods-list {
//
.goods-item {
display: flex;
margin-bottom: 40rpx;
//
.goods-image {
width: 180rpx;
height: 180rpx;
.image {
display: block;
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
//
.goods-content {
flex: 1;
padding-left: 16rpx;
padding-top: 16rpx;
.goods-title {
font-size: 26rpx;
max-height: 76rpx;
}
.goods-props {
margin-top: 14rpx;
height: 40rpx;
color: #ababab;
font-size: 24rpx;
overflow: hidden;
.goods-props-item {
display: inline-block;
margin-right: 14rpx;
padding: 4rpx 16rpx;
border-radius: 12rpx;
background-color: #F5F5F5;
width: auto;
}
}
}
//
.goods-trade {
padding-top: 16rpx;
width: 150rpx;
text-align: right;
color: $uni-text-color-grey;
font-size: 26rpx;
.goods-price {
vertical-align: bottom;
margin-bottom: 16rpx;
.unit {
margin-right: -2rpx;
font-size: 24rpx;
}
}
}
}
}
//
.order-total {
font-size: 26rpx;
vertical-align: bottom;
text-align: right;
height: 40rpx;
margin-bottom: 30rpx;
.unit {
margin-left: 8rpx;
margin-right: -2rpx;
font-size: 26rpx;
}
.money {
font-size: 28rpx;
}
}
//
.order-handle {
.btn-group {
.btn-item {
border-radius: 10rpx;
padding: 8rpx 20rpx;
margin-left: 15rpx;
font-size: 26rpx;
float: right;
color: #383838;
border: 1rpx solid #a8a8a8;
&:last-child {
margin-left: 0;
}
&.active {
color: $main-bg;
border: 1rpx solid $main-bg;
}
}
}
}
// -
.qrcode-popup {
padding: 36rpx 30rpx;
.title {
font-size: 30rpx;
margin-bottom: 26rpx;
font-weight: bold;
text-align: center;
}
.pop-content {
min-height: 260rpx;
padding: 0 10rpx;
.image {
display: block;
width: 510rpx;
height: 510rpx;
}
}
}
</style>

@ -2,50 +2,57 @@
<view class="invoice">
<view class="invoice-goods">
<view class="a">
<image src="/static/home/phone.jpg"></image>
<image :src="order.goods_image"></image>
</view>
<view class="b">
<view class="l">产品名称iPhone13</view>
<view class="r">配置套餐<text>x1</text></view>
<view class="l">{{order.goods_name}}</view>
<view class="r">配置套餐<text>x{{ order.total_num }}</text></view>
</view>
</view>
<view class="invoice-info">
<view class="b">
<view class="item">
<view class="l">申请类型</view>
<view class="l">申请类型</view>
<view class="r">
我要退款无需退货
{{((deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (receiptStatus == ReceiptStatusEnum.RECEIVED.value))?'我要退款(需退货)':'我要退款(无需退货)'}}
</view>
</view>
<view class="item">
<view class="l">收货状态</view>
<view class="r">
<picker :value="index" :range="array" @change="bindPickerChange">
<view class="lx" :class="index1==-1?'lx-on':''">{{index==-1?'请选择':array[index]}}</view>
<picker :range="array" @change="bindPickerChange">
<view class="lx" :class="logisticsIndex==-1?'lx-on':''">
{{logisticsIndex==-1?'请选择':array[logisticsIndex]}}
</view>
</picker>
</view>
</view>
<view class="item">
<view class="l">申请原因</view>
<view class="r">
<picker :value="index1" :range="array1" @change="bindPickerChange1">
<view class="lx" :class="index1==-1?'lx-on':''">{{index1==-1?'点击选择申请原因':array[index1]}}</view>
<picker :range="array1" @change="bindPickerChange1">
<view class="lx" :class="applyIndex==-1?'lx-on':''">
{{applyIndex==-1?'点击选择申请原因':array1[applyIndex]}}
</view>
</picker>
</view>
</view>
</view>
</view>
</view>
<view class="invoice-money">
<view class="a">申请金额</view>
<view class="b">
<view class="l">
<view class="money" v-if="toggleIndex">{{value}}</view>
<input type="number" :focus="true" v-model="value" v-else placeholder-class="box" placeholder="请输入金额" />
<input type="number" :focus="true" @blur="onValue" v-model="value" v-else placeholder-class="box"
placeholder="请输入金额" />
</view>
<view class="r" @click="toggleItem()">
<image src="@/static/news/icon-edit.png"></image>
修改金额</view>
修改金额
</view>
</view>
</view>
<view class="invoice-remark">
@ -54,10 +61,13 @@
<view class="r">您还可以输入{{value?(200-value.length):200}}</view>
</view>
<view class="b">
<u-input v-model="value" maxlength="200" type="textarea" :height="height" placeholder="请您详细填写申请说明" />
<u-input v-model="contentNotes" maxlength="200" type="textarea" :height="height"
placeholder="请您详细填写申请说明" />
</view>
<view class="c">
<u-upload :action="action" width="160" height="160" :file-list="fileList" :custom-btn="true" max-count="5">
<view class="c"
v-if="(deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (receiptStatus == ReceiptStatusEnum.RECEIVED.value)">
<u-upload :action="action" width="160" height="160" :file-list="fileList" :custom-btn="true"
max-count="5">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image>
@ -69,7 +79,7 @@
</view>
</view>
<view class="invoice-phone">
联系电话<input type="number" placeholder=""/>
联系电话<input type="number" placeholder="" v-model="phone" />
</view>
<view class="invoice-fd" @click="toDetail()">
提交申请
@ -78,358 +88,504 @@
</template>
<script>
import * as refundApi from '@/api/refund'
import * as OrderApi from '@/api/order'
import {
OrderTypeEnum,
DeliveryStatusEnum,
DeliveryTypeEnum,
OrderStatusEnum,
PayStatusEnum,
ReceiptStatusEnum
} from '@/common/enum/order'
import {
DeliveryMethodEnum
} from '@/common/enum/order/delivery'
export default {
data() {
return {
//
OrderTypeEnum,
DeliveryStatusEnum,
DeliveryTypeEnum,
OrderStatusEnum,
PayStatusEnum,
ReceiptStatusEnum,
DeliveryMethodEnum,
order: '',
orderId: '',
height: 150,
fileList: [
{
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg',
}
],
fileList: [{
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg',
}],
value: "1235",
content: "确认您的发票信息无误后再提交",
show: true,
toggleIndex: true,
index: -1,
array: ['已收到货','未收到货'],
index1: -1,
array1: ['不喜欢、效果不好','不想要了',"外观、型号、参数与描述不符",'货物与描述不符','商品有划痕或破损','配件、部件、屏幕问题','质量问题','收到商品少件(含少配件)','商品破损或污渍','商家发错货'],
tabIndex: 2
logisticsIndex: -1,
array: ['已收到货', '未收到货'],
applyIndex: -1,
array1: ['不喜欢、效果不好', '不想要了', "外观、型号、参数与描述不符", '货物与描述不符', '商品有划痕或破损', '配件、部件、屏幕问题', '质量问题', '收到商品少件(含少配件)',
'商品破损或污渍', '商家发错货'
],
receiveState: '',
applyState: '',
contentNotes: '',
deliveryStatus: '',
receiptStatus: '',
phone: ''
};
},
onLoad(op) {
this.deliveryStatus = op.deliveryStatus;
this.receiptStatus = op.receiptStatus;
this.orderId = op.orderId
this.order = JSON.parse(op.order);
this.value = this.order.is_user_grade ? this.order.grade_goods_price : this.order.goods_price;
},
methods: {
onClose() {},
tabItem(i){
this.tabIndex = i;
},
toggleItem(i){
this.toggleIndex = !this.toggleIndex;
onValue(e) {
if ((Number(e.detail.value) > Number(this.value)) == false) {
this.value = this.order.is_user_grade ? this.order.grade_goods_price : this.order.goods_price
uni.showToast({
title: '输入金额不能大于付款金额',
icon: 'none',
duration: 2000
})
return
} else {
this.value = e.detail.value
}
},
toDetail(i){
//
toDetail(canReset = false) {
const app = this
uni.navigateTo({
url: "/pages/order/refund/refundDetail"
})
if (app.logisticsIndex == -1) {
uni.showToast({
title: '请选择收货状态',
icon: 'none',
duration: 2000
})
return
}
if (app.applyIndex == -1) {
uni.showToast({
title: '请选择申请理由',
icon: 'none',
duration: 2000
})
return
}
if (!app.contentNotes) {
uni.showToast({
title: '请输入申请说明',
icon: 'none',
duration: 2000
})
return
}
app.isLoading = true;
let obj = {
type: (app.deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (app.receiptStatus ==
ReceiptStatusEnum.RECEIVED.value) ? 20 : 10,
content: app.contentNotes,
images: [],
phone: app.phone,
receiveState: app.receiveState,
applyState: app.applyState,
}
console.log(obj)
refundApi.apply(app.orderId, obj)
.then(result => {
console.log(result)
if (result.status == 200) {
uni.navigateTo({
url: "/pages/order/refund/refundDetail"
})
} else {
uni.showToast({
title: '申请失败',
icon: 'none',
duration: 2000
})
}
})
// :
canReset && uni.$emit('syncRefresh', true, true)
},
bindPickerChange(e){
this.index = e.detail.value
onClose() {},
toggleItem(i) {
this.toggleIndex = !this.toggleIndex;
},
bindPickerChange1(e){
this.index1 = e.detail.value
bindPickerChange(e) {
this.receiveState = this.array[e.detail.value]
this.logisticsIndex = e.detail.value
},
bindPickerChange1(e) {
this.applyIndex = e.detail.value;
this.applyState = this.array1[e.detail.value]
}
}
}
</script>
<style lang="scss" scoped>
.invoice{
&-goods{
padding: 0 20rpx 0 40rpx;
overflow: hidden;
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
.a{
width: 145rpx;
height: 135rpx;
margin-right: 20rpx;
image{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.b{
flex: 1;
.invoice {
&-goods {
padding: 0 20rpx 0 40rpx;
overflow: hidden;
.l{
white-space: nowrap;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #262626;
overflow: hidden;
}
.r{
font-size: 30rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
text{
display: block;
font-size: 28rpx;
color: #555;
}
}
}
}
&-info{
margin-top: 20rpx;
background-color: #fff;
overflow: hidden;
.a{
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx 20rpx 60rpx;
box-sizing: border-box;
border-bottom: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 500;
color: #262626;
text{
color: #006AFF;
padding-right: 40rpx;
position: relative;
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #006AFF;
border-left: 1px solid #006AFF;
position: absolute;
right: 0;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
.a {
width: 145rpx;
height: 135rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.b {
flex: 1;
overflow: hidden;
.l {
white-space: nowrap;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #262626;
overflow: hidden;
}
.r {
font-size: 30rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
text {
display: block;
font-size: 28rpx;
color: #555;
}
}
}
}
.b{
padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
&-info {
margin-top: 20rpx;
background-color: #fff;
overflow: hidden;
.item{
padding: 30rpx 0;
.a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx 20rpx 60rpx;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
border-bottom: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 500;
color: #262626;
overflow: hidden;
&:first-child{
border-top-color: #fff;
}
.l{
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
color: #262626;
text {
color: #006AFF;
padding-right: 40rpx;
position: relative;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #006AFF;
border-left: 1px solid #006AFF;
position: absolute;
right: 0;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
.r{
flex: 1;
}
.b {
padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
overflow: hidden;
.item {
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
font-size: 32rpx;
font-weight: 400;
font-weight: 500;
color: #262626;
.li{
width: 150rpx;
height: 78rpx;
background: #F3F3F3;
border-radius: 8rpx;
text-align: center;
line-height: 78rpx;
overflow: hidden;
&:first-child {
border-top-color: #fff;
}
.l {
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #262626;
margin-right: 12rpx;
&-on{
background: #FDF4F4;
background: url(/static/invoice/select-active.png) center top no-repeat;
background-size: contain;
}
color: #656565;
}
input {
flex: 1;
}
picker{
.r {
flex: 1;
.tt{
width: 180rpx;
position: relative;
color: #4894FF;
text-align: right;
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #4894FF;
border-left: 1px solid #4894FF;
position: absolute;
right: -50rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #262626;
.li {
width: 150rpx;
height: 78rpx;
background: #F3F3F3;
border-radius: 8rpx;
text-align: center;
line-height: 78rpx;
font-size: 32rpx;
font-weight: 400;
color: #262626;
margin-right: 12rpx;
&-on {
background: #FDF4F4;
background: url(/static/invoice/select-active.png) center top no-repeat;
background-size: contain;
}
}
.lx{
width: 100%;
position: relative;
&-on{
color: #B8B8B8;
input {
flex: 1;
}
picker {
flex: 1;
.tt {
width: 180rpx;
position: relative;
color: #4894FF;
text-align: right;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #4894FF;
border-left: 1px solid #4894FF;
position: absolute;
right: -50rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
&::after{
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #B8B8B8;
border-left: 1px solid #B8B8B8;
position: absolute;
right: 20rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
.lx {
width: 100%;
position: relative;
&-on {
color: #B8B8B8;
}
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #B8B8B8;
border-left: 1px solid #B8B8B8;
position: absolute;
right: 20rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
}
}
}
}
}
}
&-fd{
width: 664rpx;
height: 104rpx;
background: #F55349;
border-radius: 8rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
&-money{
width: 100%;
background: #FFFFFF;
margin-top: 20rpx;
padding: 26rpx 26rpx 26rpx 48rpx;
box-sizing: border-box;
overflow: hidden;
.a{
padding-bottom: 10rpx;
&-fd {
width: 664rpx;
height: 104rpx;
background: #F55349;
border-radius: 8rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
font-size: 32rpx;
font-weight: 400;
color: #838383;
}
.b{
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
.l{
font-size: 40rpx;
font-weight: 600;
color: #262626;
display: flex;
align-items: baseline;
input,.money{
width: 400rpx;
font-size: 52rpx;
color: #212121;
margin-left: 15rpx;
}
.box{
font-size: 26rpx;
color: #B8B8B8;
font-weight: normal;
}
}
.r{
font-size: 28rpx;
font-weight: 400;
color: #C2C2C2;
display: flex;
align-items: center;
image{
width: 36rpx;
height: 36rpx;
margin-right: 10rpx;
}
}
justify-content: center;
}
}
&-remark{
width: 100%;
background: #FFFFFF;
overflow: hidden;
margin-top: 20rpx;
padding: 26rpx 26rpx 26rpx 48rpx;
box-sizing: border-box;
.a{
display: flex;
align-items: center;
justify-content: space-between;
padding: 15rpx 0;
.l{
&-money {
width: 100%;
background: #FFFFFF;
margin-top: 20rpx;
padding: 26rpx 26rpx 26rpx 48rpx;
box-sizing: border-box;
overflow: hidden;
.a {
padding-bottom: 10rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
text{
}
.b {
display: flex;
align-items: center;
justify-content: space-between;
.l {
font-size: 40rpx;
font-weight: 600;
color: #262626;
display: flex;
align-items: baseline;
input,
.money {
width: 400rpx;
font-size: 52rpx;
color: #212121;
margin-left: 15rpx;
}
.box {
font-size: 26rpx;
color: #B8B8B8;
font-weight: normal;
}
}
.r {
font-size: 28rpx;
font-weight: 400;
color: #F55349;
color: #C2C2C2;
display: flex;
align-items: center;
image {
width: 36rpx;
height: 36rpx;
margin-right: 10rpx;
}
}
}
.r{
font-size: 24rpx;
font-weight: 400;
color: #A8A8A8;
}
}
.c{
padding-bottom: 20rpx;
&-remark {
width: 100%;
background: #FFFFFF;
overflow: hidden;
.slot-btn{
width: 80px;
height: 80px;
background: #FFFFFF;
border-radius: 10rpx;
border: 1px solid #C0C0C0;
text-align: center;
font-size: 24rpx;
font-weight: 500;
color: #D1D1D1;
image{
width: 50rpx;
height: 50rpx;
margin-top: 20rpx;
margin-top: 20rpx;
padding: 26rpx 26rpx 26rpx 48rpx;
box-sizing: border-box;
.a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15rpx 0;
.l {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
text {
font-size: 28rpx;
font-weight: 400;
color: #F55349;
}
}
.r {
font-size: 24rpx;
font-weight: 400;
color: #A8A8A8;
}
}
.c {
padding-bottom: 20rpx;
overflow: hidden;
.slot-btn {
width: 80px;
height: 80px;
background: #FFFFFF;
border-radius: 10rpx;
border: 1px solid #C0C0C0;
text-align: center;
font-size: 24rpx;
font-weight: 500;
color: #D1D1D1;
image {
width: 50rpx;
height: 50rpx;
margin-top: 20rpx;
}
}
}
}
}
&-phone{
overflow: hidden;
background-color: #fff;
padding: 30rpx 26rpx 30rpx 48rpx;
box-sizing: border-box;
margin-top: 20rpx;
font-size: 32rpx;
font-weight: 500;
color: #838383;
display: flex;
align-items: center;
justify-content: space-between;
input {
flex: 1;
margin-left: 20rpx;
&-phone {
overflow: hidden;
background-color: #fff;
padding: 30rpx 26rpx 30rpx 48rpx;
box-sizing: border-box;
margin-top: 20rpx;
font-size: 32rpx;
color: #212121;
font-weight: 500;
color: #838383;
display: flex;
align-items: center;
justify-content: space-between;
input {
flex: 1;
margin-left: 20rpx;
font-size: 32rpx;
color: #212121;
}
}
}
}
</style>

@ -75,7 +75,8 @@
</template>
<script>
import img from "@/static/news/refund-bg.png"
import img from "@/static/news/refund-bg.png"
import * as refundApi from '@/api/refund'
export default {
data() {
return {

@ -6,25 +6,19 @@
</view>
</u-navbar>
<view class="goods-hd">
<u-swiper :list="list" mode="none" height="400"></u-swiper>
<u-swiper :list="swiperList" mode="none" height="400"></u-swiper>
</view>
<scroll-view scroll-x class="goods-menu">
<view class="item" @click="tabItem1(i)" v-for="i in 10" :key="i" :class="tabIndex1==i?'item-on':''">
<image src="@/static/home/phone.jpg"></image>
<view class="p">手机</view>
<view class="item" @click="tabItem1(item,index)" v-for="(item,index) in categoryList" :key="index"
:class="tabIndex1==item?'item-on':''">
<image :src="item.image.external_url"></image>
<view class="p">{{item.name}}</view>
</view>
</scroll-view>
<view class="goods-bd">
<scroll-view scroll-y class="a">
<view class="item" @click="tabItem(0)" :class="tabIndex==0?'item-on':''">全部商品</view>
<view class="item" @click="tabItem(1)" :class="tabIndex==1?'item-on':''">TCL</view>
<view class="item" @click="tabItem(2)" :class="tabIndex==2?'item-on':''">创维</view>
<view class="item" @click="tabItem(3)" :class="tabIndex==3?'item-on':''">海尔</view>
<view class="item" @click="tabItem(4)" :class="tabIndex==4?'item-on':''">长虹</view>
<view class="item" @click="tabItem(5)" :class="tabIndex==5?'item-on':''">小米</view>
<view class="item" @click="tabItem(6)" :class="tabIndex==6?'item-on':''">东芝</view>
<view class="item" @click="tabItem(7)" :class="tabIndex==7?'item-on':''">华为</view>
<view class="item" @click="tabItem(8)" :class="tabIndex==8?'item-on':''">雷鸟</view>
<view class="item" v-for="(item,index) in categoryChildren" :key="index" @click="tabItem(index,item)"
:class="tabIndex==index?'item-on':''">{{item.name}}</view>
</scroll-view>
<view class="b">
<view class="t">
@ -34,54 +28,28 @@
<view class="item" @click="tabFilter(3)" :class="filterIndex==3?'item-on':''">综合</view>
</view>
<scroll-view scroll-y class="l">
<view class="item" v-for="i in 10" :key="i" @click="tabFilter(0)">
<image src="@/static/home/phone.jpg"></image>
<view class="item" v-for="(item,index) in list" :key="index" @click="goodsDetail(item.goods_id)"
:isLoading="isLoading">
<image :src="item.goods_image"></image>
<view class="title">
<text>自营</text>iphone13 绿色 128GB
<text>自营</text>{{item.goods_name}}
</view>
<view class="price">
<view class="n"><text>7595</text>到手价</view>
<view class="o">7595</view>
<view class="n"><text>{{item.goods_price_min}}</text>到手价</view>
<view class="o">{{item.line_price_min}}</view>
</view>
<view class="desc">
200+条评论 99%好评率
{{item.goods_sales}}+条评论 {{item.remaizhishu}}%好评率
</view>
</view>
</scroll-view>
</view>
</view>
<!-- -->
<u-popup v-model="isShow" width="548rpx" mode="center" :custom-style="backgroundBg">
<view class="goods-share">
<view class="l">
<view class="a">
<image src="https://cdn.uviewui.com/uview/swiper/1.jpg"></image>
</view>
<view class="b">
<view class="item" v-for="i in 2" :key="i" @click="goodsDetail(i)">
<image src="@/static/home/phone.jpg"></image>
<view class="title">
<text>自营</text>iphone13 绿色 128GB
</view>
<view class="price">
<view class="n"><text>7595</text></view>
</view>
<view class="desc">
200+条评论 99%好评率
</view>
</view>
</view>
<view class="c">
<image src="https://cdn.uviewui.com/uview/swiper/1.jpg"></image>
</view>
</view>
<view class="btn">保存到相册</view>
</view>
</u-popup>
</view>
</template>
<script>
import * as Api from '@/api/user/vip'
export default {
data() {
return {
@ -89,39 +57,103 @@
"background": "transparent",
"overflow": "auto"
},
isShow: true,
//
isLoading: true,
tabIndex1: 1,
tabIndex: 0,
filterIndex: 0,
keyword: "",
list: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
title: '身无彩凤双飞翼,心有灵犀一点通'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
}
],
categoryList: [],
category_id: 10001,
categoryChildren: [],
list: [],
swiperList: [],
orderSort: 1
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
this.getCarouselList()
this.getCategoryList()
},
methods: {
tabItem(index){
//
getCarouselList() {
const app = this;
Api.getImage({
type: 4
})
.then(result => {
app.swiperList = result.data.imgurl;
})
.finally(() => app.isLoading = false)
},
//
getCategoryList() {
const app = this;
Api.category()
.then(result => {
app.categoryList = result.data.list;
app.categoryChildren = result.data.list[0].children;
this.getBrandList(result.data.list[0].children.category_id)
})
.finally(() => app.isLoading = false)
},
//
getBrandList(categoryId) {
const app = this;
let pamars = {
store_id: 10001,
page: 1,
is_brand: 1,
is_new: 0,
categoryId: categoryId,
order: app.orderSort
}
Api.brandList(pamars)
.then(result => {
app.list = result.data.data;
})
.finally(() => app.isLoading = false)
},
tabItem(index, item) {
this.tabIndex = index;
this.getBrandList(item.category_id)
},
tabItem1(index){
tabItem1(item, index) {
this.tabIndex1 = index;
let app = this;
app.categoryChildren = [];
app.categoryChildren = item.children;
app.list = [];
this.getBrandList(item.children[0].category_id)
},
tabFilter(index){
tabFilter(index) {
this.filterIndex = index;
this.orderSort = ''
if (index == 0) {
this.orderSort = 1
this.orderSort = this.orderSort == 1 ? 2 : 1
}
if (index == 1) {
this.orderSort = 3
this.orderSort = this.orderSort == 1 ? 4 : 3
}
if (index == 3) {
this.orderSort = 5
this.orderSort = this.orderSort == 1 ? 6 : 5
}
if (index == 4) {
this.orderSort = 7;
this.orderSort = this.orderSort == 1 ? 8 : 7
}
this.getBrandList(app.categoryChildren[0].category_id)
},
goodsDetail(i){
goodsDetail(orderId) {
uni.navigateTo({
url:'/pages/goods/detail'
url: '/pages/goods/detail?orderId='+orderId
})
},
}
@ -129,302 +161,349 @@
</script>
<style lang="scss" scoped>
.goods{
.slot-wrap{
width: 400rpx;
margin-left: 60rpx;
}
&-hd{
width: 100%;
height: 400rpx;
image{
width: 100%;
height: 100%;
.goods {
.slot-wrap {
width: 400rpx;
margin-left: 60rpx;
}
}
&-menu{
height: 180rpx;
white-space: nowrap;
margin-top: 30rpx;
padding: 0 20rpx;
.item{
width: 150rpx;
height: 180rpx;
background: #FFFFFF;
display: inline-block;
padding: 16rpx;
box-sizing: border-box;
border: 1px solid #FFFFFF;
text-align: center;
margin-left: 12rpx;
border-radius: 8rpx;
image{
width: 112rpx;
height: 112rpx;
}
.p{
white-space: nowrap;
overflow: hidden;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
}
&-on{
border: 1px solid #F21A1C;
&-hd {
width: 100%;
height: 400rpx;
image {
width: 100%;
height: 100%;
}
}
}
&-bd{
padding: 30rpx 0 0;
display: flex;
height: calc(100vh - 700rpx);
box-sizing: border-box;
overflow: hidden;
.a{
width: 150rpx;
height: 100%;
.item{
padding: 20rpx 35rpx;
border-left: 3px solid #FFFFFF;
line-height: 50rpx;
text-align: center;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
&-menu {
height: 180rpx;
white-space: nowrap;
margin-top: 30rpx;
padding: 0 20rpx;
.item {
width: 150rpx;
height: 180rpx;
background: #FFFFFF;
display: inline-block;
padding: 16rpx;
box-sizing: border-box;
&-on{
background-color: #FFFFFF;
border-left-color: #F34A40;
border: 1px solid #FFFFFF;
text-align: center;
margin-left: 12rpx;
border-radius: 8rpx;
image {
width: 112rpx;
height: 112rpx;
}
.p {
white-space: nowrap;
overflow: hidden;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
}
&-on {
border: 1px solid #F21A1C;
}
}
}
.b{
width: 600rpx;
height: 100%;
background-color: #FFFFFF;
.t{
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
line-height: 100rpx;
.item{
flex: 1;
&-bd {
padding: 30rpx 0 0;
display: flex;
height: calc(100vh - 700rpx);
box-sizing: border-box;
overflow: hidden;
.a {
width: 150rpx;
height: 100%;
.item {
padding: 20rpx 35rpx;
border-left: 3px solid #FFFFFF;
line-height: 50rpx;
text-align: center;
&-on{
color: #F34A40;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
box-sizing: border-box;
&-on {
background-color: #FFFFFF;
border-left-color: #F34A40;
}
}
}
.l{
height: calc(100% - 120rpx);
box-sizing: border-box;
overflow: hidden;
.item{
width: 270rpx;
height: 389rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 15rpx;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 20rpx;
image{
width: 230rpx;
height: 230rpx;
display: block;
margin: 0 auto;
.b {
width: 600rpx;
height: 100%;
background-color: #FFFFFF;
.t {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #3F3F3F;
line-height: 100rpx;
.item-on {
color: #F21A1C;
}
.title{
padding: 10rpx 0;
line-height: 40rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text{
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
.item {
flex: 1;
text-align: center;
&-on {
color: #F34A40;
}
}
}
.l {
height: calc(100% - 120rpx);
box-sizing: border-box;
overflow: hidden;
.item {
width: 270rpx;
height: 389rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 15rpx;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 20rpx;
image {
width: 230rpx;
height: 230rpx;
display: block;
margin: 0 auto;
}
.title {
padding: 10rpx 0;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text {
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
}
}
}
.price{
display: flex;
align-items: center;
white-space: nowrap;
.n{
.price {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text{
font-size: 29rpx;
align-items: center;
white-space: nowrap;
.n {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text {
font-size: 29rpx;
}
}
.o {
font-size: 12px;
color: #949494;
text-decoration: line-through;
}
}
.o{
font-size: 12px;
.desc {
font-size: 10px;
font-weight: 400;
color: #949494;
text-decoration: line-through;
white-space: nowrap;
margin-top: 10rpx;
}
}
.desc{
font-size: 10px;
font-weight: 400;
color: #949494;
white-space: nowrap;
margin-top: 10rpx;
}
}
}
}
}
&-share{
width: 548rpx;
height: 810rpx;
overflow: hidden;
.l{
&-share {
width: 548rpx;
background: #FFFFFF;
margin: 0 auto;
height: 810rpx;
overflow: hidden;
position: relative;
.a{
width: 490rpx;
height: 243rpx;
.l {
width: 548rpx;
background: #FFFFFF;
margin: 0 auto;
padding-top: 24rpx;
image{
width: 100%;
height: 100%;
}
}
.b{
padding: 20rpx 20rpx;
overflow: hidden;
.item{
width: 220rpx;
height: 369rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 0;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 10rpx;
image{
width: 180rpx;
height: 180rpx;
display: block;
margin: 0 auto;
position: relative;
.a {
width: 490rpx;
height: 243rpx;
margin: 0 auto;
padding-top: 24rpx;
image {
width: 100%;
height: 100%;
}
.title{
}
.b {
padding: 20rpx 20rpx;
overflow: hidden;
.item {
width: 220rpx;
height: 369rpx;
background: #FFFFFF;
border-radius: 7rpx;
opacity: 1;
border: 1px solid #ECECEC;
padding: 10rpx 0;
line-height: 40rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text{
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
box-sizing: border-box;
float: left;
margin-left: 20rpx;
margin-bottom: 10rpx;
image {
width: 180rpx;
height: 180rpx;
display: block;
margin: 0 auto;
}
.title {
padding: 10rpx 0;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
color: #1E1E1E;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text {
background-color: #F34A40;
font-size: 20rpx;
padding: 0 10rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
border-radius: 4rpx;
font-weight: 400;
color: #FFFFFF;
margin-right: 5rpx;
display: inline-block;
}
}
}
.price{
display: flex;
align-items: center;
white-space: nowrap;
padding: 0 5rpx;
.n{
.price {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text{
font-size: 29rpx;
align-items: center;
white-space: nowrap;
padding: 0 5rpx;
.n {
display: flex;
align-items: baseline;
font-size: 11px;
font-weight: 500;
color: #F21A1C;
text {
font-size: 29rpx;
}
}
.o {
font-size: 12px;
color: #949494;
text-decoration: line-through;
}
}
.o{
font-size: 12px;
.desc {
padding: 0 5rpx;
font-size: 10px;
font-weight: 400;
color: #949494;
text-decoration: line-through;
white-space: nowrap;
margin-top: 10rpx;
overflow: hidden;
}
}
.desc{
padding: 0 5rpx;
font-size: 10px;
font-weight: 400;
color: #949494;
white-space: nowrap;
margin-top: 10rpx;overflow: hidden;
}
.c {
background-color: #F1F1F1;
height: 150rpx;
display: flex;
justify-content: flex-end;
align-items: center;
image {
width: 140rpx;
height: 122rpx;
margin-right: 30rpx;
}
}
}
.c{
background-color: #F1F1F1;
height: 150rpx;
display: flex;
justify-content: flex-end;
align-items: center;
image{
width: 140rpx;
height: 122rpx;
margin-right: 30rpx;
}
.btn {
width: 640rpx;
line-height: 80rpx;
text-align: center;
background: #F34A40;
position: fixed;
left: 50%;
margin-left: -320rpx;
top: 50%;
z-index: 2;
border-radius: 8rpx;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
margin-top: 450rpx;
}
}
.btn{
width: 640rpx;
line-height: 80rpx;
text-align: center;
background: #F34A40;
position: fixed;
left: 50%;
margin-left: -320rpx;
top: 50%;
z-index: 2;
border-radius: 8rpx;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
margin-top: 450rpx;
}
}
}
</style>
<style>
.goods .uni-scroll-view .uni-scroll-view{
overflow: auto!important;
}
</style>
.goods .uni-scroll-view .uni-scroll-view {
overflow: auto !important;
}
</style>

@ -0,0 +1,28 @@
{
"appid": "wxdcf7d5820d7530cd",
"compileType": "miniprogram",
"libVersion": "3.3.3",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": {},
"editorSetting": {
"tabIndent": "auto",
"tabSize": 4
}
}

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "yanzong_qianduan",
"setting": {
"compileHotReLoad": true
}
}
Loading…
Cancel
Save