初始项目

This commit is contained in:
liupopo
2023-02-11 12:55:02 +08:00
parent 1748bda84a
commit 0b89e36064
3363 changed files with 506201 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,561 @@
<template>
<view class="content">
<!-- 顶部搜索 -->
<view class="getPosition">
<image src="/static/position.png" @click="openMap()" style="width: 50upx;height: 50upx;" mode=""></image>
<text @click="toAddressList()" >{{ addressData.province }}-{{ addressData.city }}-{{ addressData.region }}</text>
</view>
<!-- 头部 -->
<view class="title-box">
<view @click="scanCode()" class="scan"><image src="http://rs.eonfox.cc/clzy/static/scan-ico.png" mode="" style="width:40upx; height:40upx; "></image></view>
<view class="input-box" @click="openSearch">
<view style="float: left;">
<image src="/static/search.png" mode="" style="width:40upx; height:40upx; margin-left: 10upx; margin-right: 10upx; margin-top: 10upx; "></image>
</view>
<view style=" float:left; height:100%;"><input type="text" value="" placeholder="输入关键字搜索" class="input" /></view>
</view>
</view>
<view class="topTitle">
<image src="http://rs.eonfox.cc/clzy/static/star-ico.png" mode="" style="width:68upx;height:68upx;float:left;margin-right: -10upx;"></image>
<text class="topText">全部商家</text>
</view>
<view class="checkGroup">
<radio-group>
<label class="radio" v-for="(item,index) in disType" :key='index'><radio value="r1" class="radio" @click="gain(item.id)"/>{{item.name}}</label>
</radio-group>
</view>
<view class="classification">
<view class="allClassification typeList" @click="gosort">
<uni-icon type="bars" size="22" class="bars" color="8e8e8e"></uni-icon>
<text>全部分类</text>
</view>
<view class="city typeList" @click="load">
<uni-icon type="refreshempty" size="25" color="8e8e8e"></uni-icon>
<text>加载全部</text>
</view>
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="shop-box" style="margin-top: 80upx;">
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="shop-box">
<!-- #endif -->
<view v-if="!storeList" style="text-align: center; color:#5C5C5C; font-size: 30upx;">暂无商家记录</view>
<view class="shop" v-for="(item, index) in storeList" @click="gobrand" :data-Businessid="item.id" :key="index">
<image :src="item.logo" mode="" class="image" width="100%" height="100%"></image>
<view class="shopText">
<text class="name">{{ item.name }}</text>
<view class="evaluate">
<uni-icon type="star-filled" size="15" class="star-filled" color="8e8e8e"></uni-icon>
<uni-icon type="star-filled" size="15" class="star-filled" color="8e8e8e"></uni-icon>
<uni-icon type="star-filled" size="15" class="star-filled" color="8e8e8e"></uni-icon>
<uni-icon type="star-filled" size="15" class="star-filled" color="8e8e8e"></uni-icon>
<uni-icon type="star-filled" size="15" class="star-filled" color="8e8e8e"></uni-icon>
<text class="garde" style="margin-right:10upx; color:#666666; ">收藏 {{ item.collect }}</text>
</view>
<view class="bottomInformation">
<text v-if="item.addressDetail" class="crux" style="margin-top: 30upx; color:#666666; overflow: hidden; display: inline-block; height: 40upx; text-overflow:ellipsis;">
{{ item.addressDetail }}
</text>
<text v-else class="crux" style="margin-top: 30upx; color:#666666; overflow: hidden; display: inline-block; height: 40upx; text-overflow:ellipsis;">
{{ item.addressProvince }}-{{ item.addressCity }}
</text>
<text class="distance" style=" color:#666666;">{{ item.distance.toFixed(4) }}</text>
</view>
</view>
</view>
<!--<uni-load-more :loadingType="loadingType" :contentText="contentrefresh"></uni-load-more>-->
</view>
<view class="mask" v-show="display" @click="Colse"></view>
<view class="sortBox" v-show="display">
<view class="sortBox-title">
<view>请选择商家类别</view>
<view @click="Colse"><uni-icon type="closeempty" size="30"></uni-icon></view>
</view>
<view class="sortBoxBox" v-for="(items, index1) in Parent" :key="index1">
<view class="sortRight">
<text v-for="(item, index2) in items.son" :key="index2" @click="sublevel(item.type_id)">{{ item.name }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniIcon from '@/components/uni-icon/uni-icon.vue';
import eonfox from '@/components/eonfox/eonfox.js';
import fns from '@/components/eonfox/fns.js';
import QQMapWX from '@/components/eonfox/qqmap-wx-jssdk.js';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import navBar from "@/components/zhouWei-navBar";
var qqmapsdk = new QQMapWX({
key: '5XABZ-AQ764-SMHUQ-DABAC-R7E4H-37FM2'
});
// #ifdef H5
let jweixin = require('jweixin-module');
// #endif
var ef = new eonfox();
export default {
components: {
mallplusCopyright,uniIcon
},
data() {
return {
sjnumber: [],
storeList: [],
name: '',
address: '',
page: 10,
merchant: [],
distance:20,
loadingType: 0,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
},
disType:[
{
id: 5,
name: "5km",
},
{
id: 10,
name: "10km",
},
{
id: 20,
name: "20km",
},
{
id: 40,
name: "40km",
},
],
Parent: [],
display: false,
addressData: {
longitude:0.0,
latitude:0.0,
}, //默认收货地址
addressId: '', //地址id
statusBarHeight: ''
};
},
components: {
uniIcon,
uniLoadMore,
navBar
},
onShow: function() {
(this.latitude = ''), (this.longitude = '');
this.load();
},
async onLoad(options) {
this.load();
},
onReachBottom() {
},
methods: {
openSearch(){
console.log('搜索')
},
Colse() {
this.display = !this.display;
},
toAddressList() {
var type = '1'; //不知道这个type有什么值取大一点
uni.navigateTo({
url: '../../pagesU/address/address?source=' + type
});
},
gobrand: function(e) {
console.log(e);
// return
var sjid = e.currentTarget.dataset.businessid;
console.log('目标', sjid);
uni.navigateTo({
url: '../../pagesC/store/businessDetails?id=' + sjid
+'&lon='+this.addressData.longitude
+'&lat='+this.addressData.latitude
// 参数的传递 newsid
});
},
gosort() {
this.display = !this.display;
},
openMap() {
var _this = this;
uni.chooseLocation({
success: function(res) {
console.log('res', res);
_this.addressData.longitude=res.longitude;
_this.addressData.latitude=res.latitude;
_this.addressId = 1 ;
_this.addressData.province = res.address ;
_this.addressData.name = res.name;
console.log('经度:' + res.longitude);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
_this.storeList = {};
}
});
},
async load() {
var that = this;
let params = {};
if(!that.addressId){
that.addressData = await Api.apiCall('get', Api.goods.getItemDefautl, params);
}
console.log(that.addressData);
if(that.addressData.longitude){
params = { geohash: that.addressData.latitude+','+ that.addressData.longitude, pageSize: that.page,distance:this.distance };
console.log(params);
let list = await Api.apiCall('get', Api.index.nearStoreList, params);
that.storeList = list;
}
console.log('that.addressId' + that.addressId);
},
gain(id){
this.distance=id ;
this.load();
},
//点击查询商家分类
sublevel(id) {
var that = this;
that.display = !that.display;
ef.submit({
request: {
s: ['MERCHANTLIST', [{ lon: that.longitude, lat: that.latitude, search: { type_id: id } }]] //子级
},
callback: function(data) {
var res = fns.checkError(data, 's', function(errno, error) {
fns.err(error);
});
that.sjnumber = data.data.s.data.data;
console.log('分类', data);
},
error: function(err) {
fns.err('加载失败', err, 1);
}
});
},
//二维码
scanCode() {
var _this = this;
uni.showToast({
// #ifdef APP-PLUS
title: '这是APP',
icon: 'none',
// #endif
// #ifdef H5
title: '这是H5',
icon: 'none',
// #endif
// #ifdef MP-WEIXIN
title: '这是小程序',
icon: 'none',
// #endif
success() {
setTimeout(function() {}, 1500);
}
});
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
if (res.result) {
var data = JSON.parse(res.result);
console.log('res:', data);
if (!data.errno) {
if (data.type != 'merchant_money_plus') {
uni.showToast({
title: '该二维码非收款二维码'
});
} else if (data.data.merchant_id) {
_this.merchant_id = data.data.merchant_id;
if (data.data && data.data.user_id) {
var user_id = data.data.user_id;
} else {
var user_id = '';
}
uni.navigateTo({
url: '../../pagesB/payUser/payUser?mch_id=' + data.data.merchant_id + '&user_id=' + data.data.user_id
});
} else {
uni.showToast({
title: '扫码失败',
icon: 'none'
});
}
} else {
uni.showToast({
title: data.error,
icon: 'none'
});
}
}
}
});
}
}
};
</script>
<style scoped lang="stylus" ref="stylesheet/stylus">
.content
width 100%
overflow hidden
.title-box
display flex
justify-content center // 水平居中
align-items center // 垂直居中
flex-direction row // 左到右
width 750upx
padding 0 20upx
height 100upx
.scan
width 40upx
height 40upx
.input-box
// margin-left 20upx
width 700upx
height 58upx
// border 1upx solid #d3d3d3
border-radius 50upx
.search
display inline-block
position absolute
top 0
left 0
.input
width 80%
display inline-block
font-size 28upx
text-align center
// text-align left
line-height 100%
height 100%
.chat
flex 1
.topTitle
width 100%
height 80upx
display flex
align-items center // 垂直居中
flex-direction row
padding 0 20upx
color #333
font-size 30upx
.topText{
margin-left 10upx
}
.leftBox
width 300upx
text-align right
.checkGroup{
padding-left 26upx
margin-bottom 10upx
font-size 30upx
.uni-label-pointer {
margin-right 16upx
}
}
.classification
height 80upx
display flex
align-items center
justify-content center // 垂直居中
flex-direction row
font-size 28upx
.typeList
text-align center
line-height 80upx
border 1px solid #d3d3d3
width 50%
height 100%
position relative
.typeList:before
content ""
position absolute
top 34upx
right 66upx
width: 0px;
height: 0px;
border-left: 12upx solid transparent;
border-right: 12upx solid transparent;
border-top: 12upx solid #bfbfbf;
.allClassification{
border-left 0
}
.city{
border-right 0
}
.place
font-size 30upx
height 100upx
text-align left
line-height 100upx
border-bottom 1px solid #d3d3d3
padding-left 20px
.shop-box, width 100%
height auto
.shop
height 200upx
border-bottom 1px solid #eee
display flex
align-items center
justify-content flex-start
flex-direction row
.image
width 160upx
height 160upx
margin-left 25upx
border-radius 50%
.shopText
width 500upx
height 220upx
margin-left 25upx
padding-top 25upx
.name
color #333
font-weight 600
font-size 30upx
width 100%
height 30px
.evaluate
font-size 20upx
margin-top 20upx
.bottomInformation
align-items center
justify-content space-between
flex-direction row
width 100%
color #333
font-size 28upx
.crux
width 240upx
display inline-block
.distance
width calc(100% - 250upx)
float right
text-align right
margin-top 30upx
.icoimg
width 48upx
height 48upx
</style>
<style>
.search-weixin-input {
font-size: 28upx;
background: #f5f5f5;
height: 60upx;
width: 90%;
border-radius: 50upx;
text-align: center;
}
.search-weixin {
background: #ffffff;
height: 80upx;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1upx solid #eeeeee;
position: fixed;
}
.sortBox {
position: fixed;
width: 650upx;
height: auto;
padding-top: 20upx;
padding-bottom: 40upx;
top: 25vh;
background-color: #ffffff;
margin-left: 50upx;
font-size: 28upx;
border: #e3e3e3 solid 3upx;
border-radius: 25upx;
z-index: 1000;
}
.sortBox-title {
width: 610upx;
padding: 20upx 20upx;
display: flex;
justify-content: space-between;
align-items: center;
}
.mask {
position: fixed;
top: 0;
left: 0;
z-index: 4;
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, 0.4);
}
.sortBoxBox {
width: 610upx;
padding: 20upx 20upx;
display: flex;
flex-wrap: wrap;
}
.sortRight {
width: auto;
padding-bottom: 20upx;
height: auto;
}
.sortRight text {
padding: 10upx;
border: #cccccc solid 1upx;
border-radius: 10upx;
color: #dd524d;
margin-left: 20upx;
float: left;
margin-bottom: 10upx;
}
.getPosition {
height: 100upx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32upx;
background-color: #fff;
}
.getPosition-weixin {
height: 90upx;
position: fixed;
z-index: 99;
width: 100%;
}
.getPosition-top {
width: 100%;
position: fixed;
top: 0;
z-index: 99;
background: #ffffff;
}
</style>

View File

@@ -0,0 +1,581 @@
<template>
<view class="container">
<!-- 小程序头部兼容 -->
<!-- #ifdef MP -->
<view class="mp-search-box" @click="search()"><input class="ser-input" type="text" value="输入关键字搜索" /></view>
<!-- #endif -->
<!-- 头部轮播 -->
<view class="carousel-section">
<!-- 标题栏和状态栏占位符 -->
<view class="titleNview-placing"></view>
<!-- 背景色区域 -->
<view class="titleNview-background" :style="{ backgroundColor: titleNViewBackground }"></view>
<swiper class="carousel" circular @change="swiperChange">
<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="navToDetailPage({ title: '轮播广告' })">
<image :src="item.pic" />
</swiper-item>
</swiper>
<!-- 自定义swiper指示器 -->
<view class="swiper-dots">
<text class="num">{{ swiperCurrent + 1 }}</text>
<text class="sign">/</text>
<text class="num">{{ swiperLength }}</text>
</view>
</view>
<view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view>
<!-- 秒杀楼层 -->
<view class="seckill-section m-t" v-if="item1.flashSessionInfoList.length > 0" v-for="(item1, index1) in groupHotGoodsList" :key="index1">
<view class="s-header">
<image class="s-img" src="/static/temp/secskill-img.jpg" mode="widthFix"></image>
<text class="tip">{{ item1.flashName }}</text>
</view>
<view v-if="item2.productList.length > 0" v-for="(item2, index2) in item1.flashSessionInfoList" :key="index1">
<view class="s-header">
<text class="tip">{{ item2.startTime }}</text>
<text class="tip"></text>
<text class="tip">{{ item2.endTime }}</text>
</view>
<scroll-view class="floor-list" scroll-x>
<view class="scoll-wrapper">
<view v-for="(item4, index3) in item2.productList" :key="index3" class="floor-item" @click="navToDetailPage(item4)" >
<image :src="item4.productImg" mode="aspectFill" ></image>
<text class="title clamp">{{ item4.productName }}</text>
<text class="price clamp">秒杀价 {{ item4.flashPromotionPrice }}</text>
<text class="price clamp">原价 {{ item4.productPrice }}</text>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import { formatDate } from '@/common/date';
export default {
components: {
mallplusCopyright
},
data() {
return {
keyword: '',
titleNViewBackground: '',
swiperCurrent: 0,
swiperLength: 0,
carouselList: [],
hotProductList: [],
brandList: [], // 推荐品牌
homeFlashPromotion: [], // 当前秒杀场次
subjectList: [], //推荐专题
cat_list: [],
homeFlashPromotion: [],
groupHotGoodsList: [],
newProductList: []
};
},
onLoad() {
this.loadData();
},
methods: {
/**
* 请求静态数据只是为了代码不那么乱
* 分次请求未作整合
*/
async loadData() {
this.logining = true;
let params = {};
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeFlashPromotionList, params);
this.groupHotGoodsList = groupHotGoodsList;
let advertiseList = await Api.apiCall('get', Api.index.bannerList, params);
console.log(advertiseList);
this.carouselList = advertiseList || [];
this.swiperLength = this.carouselList.length;
this.logining = false;
},
//轮播图切换修改背景色
swiperChange(e) {
const index = e.detail.current;
this.swiperCurrent = index;
this.titleNViewBackground = this.carouselList[index].background;
},
navToTabPage(url) {
uni.navigateTo({
url: url
});
},
//详情页
navToDetailPage(id) {
console.log(id);
uni.navigateTo({
url: `../../pagesA/product/secskillDetail?id=${id}`
});
},
navToList() {
uni.navigateTo({
url: `../../pagesA/product/list`
});
}
},
search() {
uni.navigateTo({
url: '/pages/search/search'
});
},
// 标题栏input搜索框点击
onNavigationBarSearchInputClicked: async function(e) {
uni.navigateTo({
url: '/pages/search/search'
});
},
//点击导航栏 buttons 时触发
onNavigationBarButtonTap(e) {
const index = e.index;
if (index === 0) {
// this.$api.msg('点击了扫描');
} else if (index === 1) {
// #ifdef APP-PLUS
const pages = getCurrentPages();
const page = pages[pages.length - 1];
const currentWebview = page.$getAppWebview();
currentWebview.hideTitleNViewButtonRedDot({
index
});
// #endif
uni.navigateTo({
url: '../../pagesU/notice/notice'
});
}
}
};
</script>
<style lang="scss">
.mp-search-box {
position: absolute;
left: 0;
top: 30upx;
z-index: 9999;
width: 100%;
padding: 0 80upx;
.ser-input {
flex: 1;
height: 56upx;
line-height: 56upx;
text-align: center;
font-size: 28upx;
color: $font-color-base;
border-radius: 20px;
background: rgba(255, 255, 255, 0.6);
}
}
page {
.cate-section {
position: relative;
z-index: 5;
border-radius: 16upx 16upx 0 0;
margin-top: -20upx;
}
.carousel-section {
padding: 0;
.titleNview-placing {
padding-top: 0;
height: 0;
}
.carousel {
.carousel-item {
padding: 0;
}
}
.swiper-dots {
left: 45upx;
bottom: 40upx;
}
}
}
page {
background: #f5f5f5;
}
.m-t {
margin-top: 16upx;
}
/* 头部 轮播图 */
.carousel-section {
position: relative;
padding-top: 10px;
.titleNview-placing {
height: var(--status-bar-height);
padding-top: 44px;
box-sizing: content-box;
}
.titleNview-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 426upx;
transition: 0.4s;
}
}
.carousel {
width: 100%;
height: 350upx;
.carousel-item {
width: 100%;
height: 100%;
padding: 0 28upx;
overflow: hidden;
}
image {
width: 100%;
height: 100%;
border-radius: 10upx;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 60upx;
bottom: 15upx;
width: 72upx;
height: 36upx;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
background-size: 100% 100%;
.num {
width: 36upx;
height: 36upx;
border-radius: 50px;
font-size: 24upx;
color: #fff;
text-align: center;
line-height: 36upx;
}
.sign {
position: absolute;
top: 0;
left: 50%;
line-height: 36upx;
font-size: 12upx;
color: #fff;
transform: translateX(-50%);
}
}
/* 分类 */
.cate-section {
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
padding: 30upx 22upx;
background: #fff;
.cate-item {
display: flex;
flex-direction: column;
align-items: center;
font-size: $font-sm + 2upx;
color: $font-color-dark;
}
/* 原图标颜色太深,不想改图了,所以加了透明度 */
image {
width: 88upx;
height: 88upx;
margin-bottom: 14upx;
border-radius: 50%;
opacity: 0.7;
box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
}
}
.ad-1 {
width: 100%;
height: 210upx;
padding: 10upx 0;
background: #fff;
image {
width: 100%;
height: 100%;
}
}
/* 秒杀专区 */
.seckill-section {
padding: 4upx 30upx 24upx;
background: #fff;
.s-header {
display: flex;
align-items: center;
height: 92upx;
line-height: 1;
.s-img {
width: 140upx;
height: 30upx;
}
.tip {
font-size: $font-base;
color: $font-color-light;
margin: 0 20upx 0 40upx;
}
.timer {
display: inline-block;
width: 40upx;
height: 36upx;
text-align: center;
line-height: 36upx;
margin-right: 14upx;
font-size: $font-sm + 2upx;
color: #fff;
border-radius: 2px;
background: rgba(0, 0, 0, 0.8);
}
.icon-you {
font-size: $font-lg;
color: $font-color-light;
flex: 1;
text-align: right;
}
}
.floor-list {
white-space: nowrap;
}
.scoll-wrapper {
display: flex;
align-items: flex-start;
}
.floor-item {
width: 250upx;
margin-right: 20upx;
font-size: $font-sm + 2upx;
color: $font-color-dark;
line-height: 1.8;
image {
width: 250upx;
height: 250upx;
border-radius: 6upx;
}
.price {
color: $uni-color-primary;
}
}
}
.f-header {
display: flex;
align-items: center;
height: 140upx;
padding: 6upx 30upx 8upx;
background: #fff;
image {
flex-shrink: 0;
width: 80upx;
height: 80upx;
margin-right: 20upx;
}
.tit-box {
flex: 1;
display: flex;
flex-direction: column;
}
.tit {
font-size: $font-lg + 2upx;
color: #font-color-dark;
line-height: 1.3;
}
.tit2 {
font-size: $font-sm;
color: $font-color-light;
}
.icon-you {
font-size: $font-lg + 2upx;
color: $font-color-light;
}
}
/* 团购楼层 */
.group-section {
background: #fff;
.g-swiper {
height: 650upx;
padding-bottom: 30upx;
}
.g-swiper-item {
width: 100%;
padding: 0 30upx;
display: flex;
}
image {
width: 100%;
height: 460upx;
border-radius: 4px;
}
.g-item {
display: flex;
flex-direction: column;
overflow: hidden;
}
.left {
flex: 1.2;
margin-right: 24upx;
.t-box {
padding-top: 20upx;
}
}
.right {
flex: 0.8;
flex-direction: column-reverse;
.t-box {
padding-bottom: 20upx;
}
}
.t-box {
height: 160upx;
font-size: $font-base + 2upx;
color: $font-color-dark;
line-height: 1.6;
}
.price {
color: $uni-color-primary;
}
.m-price {
font-size: $font-sm + 2upx;
text-decoration: line-through;
color: $font-color-light;
margin-left: 8upx;
}
.pro-box {
display: flex;
align-items: center;
margin-top: 10upx;
font-size: $font-sm;
color: $font-base;
padding-right: 10upx;
}
.progress-box {
flex: 1;
border-radius: 10px;
overflow: hidden;
margin-right: 8upx;
}
}
/* 分类推荐楼层 */
.hot-floor {
width: 100%;
overflow: hidden;
margin-bottom: 20upx;
.floor-img-box {
width: 100%;
height: 320upx;
position: relative;
&:after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
}
}
.floor-img {
width: 100%;
height: 100%;
}
.floor-list {
white-space: nowrap;
padding: 20upx;
padding-right: 50upx;
border-radius: 6upx;
margin-top: -140upx;
margin-left: 30upx;
background: #fff;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 1;
}
.scoll-wrapper {
display: flex;
align-items: flex-start;
}
.floor-item {
width: 180upx;
margin-right: 20upx;
font-size: $font-sm + 2upx;
color: $font-color-dark;
line-height: 1.8;
image {
width: 180upx;
height: 180upx;
border-radius: 6upx;
}
.price {
color: $uni-color-primary;
}
}
.more {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
flex-shrink: 0;
width: 180upx;
height: 180upx;
border-radius: 6upx;
background: #f3f3f3;
font-size: $font-base;
color: $font-color-light;
text:first-child {
margin-bottom: 4upx;
}
}
}
/* 猜你喜欢 */
.guess-section {
display: flex;
flex-wrap: wrap;
padding: 0 30upx;
background: #fff;
.guess-item {
display: flex;
flex-direction: column;
width: 48%;
padding-bottom: 40upx;
&:nth-child(2n + 1) {
margin-right: 4%;
}
}
.image-wrapper {
width: 100%;
height: 330upx;
border-radius: 3px;
overflow: hidden;
image {
width: 100%;
height: 100%;
opacity: 1;
}
}
.title {
font-size: $font-lg;
color: $font-color-dark;
line-height: 80upx;
}
.price {
font-size: $font-lg;
color: $uni-color-primary;
line-height: 1;
}
}
</style>

View File

@@ -0,0 +1,771 @@
<template>
<view class="container">
<view class="user-section">
<image class="bg" src="/static/user-bg.jpg"></image>
<view class="user-info-box">
<view class="member-top-c">
<template v-if="userDetailInfo && userDetailInfo.id">
<view class="" style="display: flex;align-items: center;">
<image class="portrait" mode="aspectFill" :src="userDetailInfo.icon" @click="toUserInfo"></image>
<view class="user-name" style="margin-left: 10upx;color: #FFFFFF;" @click="toUserInfo">{{ userDetailInfo.nickname || userDetailInfo.username }}</view>
<view v-if="userDetailInfo.storeId" class="vip-card-box1" @click="toNav('../../pagesC/seller/index')"><view class="b-btn">卖家中心</view></view>
</view>
</template>
<template v-else>
<!-- #ifdef H5 || APP-PLUS -->
<image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toLogin"></image>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toWeChatLogin"></image>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="portrait"></view>
<view><button class="login-btn" open-type="getAuthorize" @click="getALICode" hover-class="btn-hover">授权登录</button></view>
<!-- #endif -->
</template>
</view>
</view>
<view class="vip-card-box" @click="toNav('../../pagesU/user/applyMember')">
<image class="card-bg" src="/static/vip-card-bg.png" mode=""></image>
<view class="b-btn">立即升级</view>
<view class="tit" v-if="userDetailInfo">
<text class="yticon icon-iLinkapp-"></text>
{{ userDetailInfo.memberLevelName || '开通会员' }}
</view>
<text class="e-m">Mallplus</text>
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
</view>
</view>
<view
class="cover-container"
:style="[
{
transform: coverTransform,
transition: coverTransition
}
]"
@touchstart="coverTouchstart"
@touchmove="coverTouchmove"
@touchend="coverTouchend"
>
<image class="arc" src="/static/arc.png"></image>
<view class="tj-sction">
<view class="tj-item" @click="toNav('../../pagesU/user/deposit')">
<text class="num">{{ userDetailInfo.blance || 0 }}</text>
<text>余额</text>
</view>
<view class="tj-item" @click="toNav('../../pagesU/user/coupon')">
<text class="num">{{ couponList.length || 0 }}</text>
<text>优惠券</text>
</view>
<view class="tj-item" @click="toNav('/pages/integral/home/home')">
<text class="num">{{ userDetailInfo.integration || 0 }}</text>
<text>积分</text>
</view>
</view>
<!-- 订单 -->
<view class="order-section">
<view class="order-item" @click="navTo('/pages/order/order?status=0')" hover-class="common-hover" :hover-stay-time="50">
<text class="yticon icon-shouye"></text>
<text>全部订单</text>
</view>
<view class="order-item" @click="navTo('/pages/order/order?status=2')" hover-class="common-hover" :hover-stay-time="50">
<text class="yticon icon-daifukuan"></text>
<text>待付款</text>
</view>
<view class="order-item" @click="navTo('/pages/order/order?status=3')" hover-class="common-hover" :hover-stay-time="50">
<text class="yticon icon-yishouhuo"></text>
<text>待收货</text>
</view>
<view class="order-item" @click="navTo('../../pagesA/after_sale/list')" hover-class="common-hover" :hover-stay-time="50">
<text class="yticon icon-shouhoutuikuan"></text>
<text>退款/售后</text>
</view>
</view>
<!-- 浏览历史 -->
<view class="history-section icon">
<view class="sec-header" v-if="viewList && viewList.length > 0">
<text class="yticon icon-lishijilu"></text>
<text>浏览历史</text>
</view>
<scroll-view scroll-x class="h-list" v-if="viewList && viewList.length > 0">
<image v-for="(item, index) in viewList" :key="index" @click="navToDetailPage(item)" :src="item.pic" mode="aspectFill"></image>
</scroll-view>
<!--<list-cell icon="icon-iconfontweixin" iconColor="#e07472" title="我的钱包" tips="您的会员还有3天过期"></list-cell>-->
<list-cell icon="icon-dizhi" iconColor="#5fcda2" title="地址管理" @eventClick="navTo('../../pagesU/address/address')"></list-cell>
<list-cell icon="icon-tuandui" iconColor="#EE82EE" title="个人资料" @eventClick="navTo('../../pagesU/user/profile')"></list-cell>
<!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></list-cell>
<list-cell icon="icon-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>-->
<list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏" @eventClick="navTo('../../pagesU/user/collect')"></list-cell>
<list-cell
icon="icon-share cgtt"
iconColor="#0e68d7"
v-if="!userDetailInfo.storeId"
title="商户入驻"
@eventClick="navTo('../../pagesC/store/applyBusiness')"
></list-cell>
<list-cell
icon="icon-share cgtt"
iconColor="#0e68d7"
v-if="userDetailInfo.storeId"
title="商户主页"
@eventClick="navTo(`../../pagesC/store/businessDetails?id=${userDetailInfo.storeId}`)"
></list-cell>
<list-cell
icon="icon-shoucang_xuanzhongzhuangtai cgtt"
iconColor="#0e68d7"
v-if="!userDetailInfo.roomNums"
title="绑定社区"
@eventClick="navTo('../../pagesA/build/bindCommunity')"
></list-cell>
<list-cell
icon="icon-shoucang_xuanzhongzhuangtai cgtt"
iconColor="#0e68d7"
v-if="userDetailInfo.roomNums"
title="社区主页"
@eventClick="navTo('../../pagesA/build/community')"
></list-cell>
<list-cell
icon="icon-pinglun-copy"
iconColor="#0e68d7"
title="我的邀请码"
:tips="userDetailInfo.id + ''"
@eventClick="navTo('../../pagesU/user/invite')"
></list-cell>
<list-cell icon="icon-pinglun-copy" iconColor="#0e68d7" v-if="!userDetailInfo.invitecode" title="推荐邀请码" @eventClick="inputShowModal('invitecode')"></list-cell>
<list-cell icon="icon-shezhi1" iconColor="#e07472" title="系统设置" border="" @eventClick="navTo('/pages/set/set')"></list-cell>
<!-- <list-cell icon="icon-shezhi1" iconColor="#e07472" title="test" border="" @eventClick="navTo('/pages/search/test')"></list-cell> -->
</view>
</view>
<neil-modal :show="inputShow" @close="cancel" title="编辑" @cancel="cancel" @confirm="confirm">
<input v-model="inputContent" style="margin:20upx" placeholder="请输入..." />
</neil-modal>
<mallplusCopyright></mallplusCopyright>
</view>
</template>
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import listCell from '@/components/mix-list-cell';
import neilModal from '@/components/neil-modal.vue';
import { mapState, mapMutations } from 'vuex';
let startY = 0,
moveY = 0,
pageAtTop = true;
export default {
components: {
mallplusCopyright,
listCell,
neilModal
},
data() {
return {
inputShow: false,
feild: undefined,
inputContent: '',
coverTransform: 'translateY(0px)',
coverTransition: '0s',
moving: false,
userDetailInfo: {
blance: 0,
integration: 0
},
couponList: [],
viewList: []
};
},
async onLoad() {
this.getData();
},
async onShow() {
this.getData();
},
// #ifndef MP
onNavigationBarButtonTap(e) {
const index = e.index;
if (index === 0) {
this.navTo('/pages/set/set');
} else if (index === 1) {
// #ifdef APP-PLUS
const pages = getCurrentPages();
const page = pages[pages.length - 1];
const currentWebview = page.$getAppWebview();
currentWebview.hideTitleNViewButtonRedDot({
index
});
// #endif
uni.navigateTo({
url: '../../pagesU/notice/notice'
});
}
},
// #endif
computed: {
...mapState(['hasLogin', 'userInfo']),
// 获取店铺联系人手机号
kfmobile() {
return '13146587722' || 0;
}
},
methods: {
...mapMutations(['logout']),
inputShowModal(feild) {
this.feild = feild;
this.inputShow = true;
this.inputContent = '';
},
cancel() {
this.inputShow = false;
},
confirm() {
const that = this;
if (!that.inputContent) {
that.$api.msg('输入不能为空');
return;
}
let obj = { id: this.userDetailInfo.id };
obj[that.feild] = that.inputContent;
Api.apiCall('post', Api.member.updateMember, obj);
that.$api.msg('修改成功');
that.userInfos[that.feild] = that.inputContent;
},
async getData() {
this.getuserinfo();
this.getHistory();
},
// 获取用户信息
async getuserinfo() {
let params = {};
let data1 = await Api.apiCall('get', Api.index.userInfo, params);
if (!data1) {
this.userDetailInfo = {};
}
this.userDetailInfo = data1.member;
if (!data1.member) {
this.logout();
} else {
uni.setStorageSync('userInfos', data1.member);
console.log(this.userDetailInfo);
let couponList = data1.histories;
this.couponList = couponList;
}
},
// 获取浏览历史
async getHistory() {
if (this.hasLogin) {
let params = {};
let data = await Api.apiCall('get', Api.goods.viewList, params);
this.viewList = data.result;
}
},
toNav(url) {
uni.navigateTo({
url: url
});
},
toUserInfo() {
uni.navigateTo({
url: '../../pagesU/user/profile'
});
},
toWeChatLogin() {
uni.navigateTo({
url: '/pages/public/login'
});
},
//详情页
navToDetailPage(item) {
//测试数据没有写id用title代替
let id = item.id;
uni.navigateTo({
url: `../../pagesA/product/product?id=${id}`
});
},
/**
* 统一跳转接口,拦截未登录路由
* navigator标签现在默认没有转场动画所以用view
*/
navTo(url) {
if (!this.hasLogin) {
url = '/pages/public/login';
}
uni.navigateTo({
url: url
});
},
/**
* 会员卡下拉和回弹
* 1.关闭bounce避免ios端下拉冲突
* 2.由于touchmove事件的缺陷以前做小程序就遇到比如20跳到40h5反而好很多下拉的时候会有掉帧的感觉
* transition设置0.1秒延迟让css来过渡这段空窗期
* 3.回弹效果可修改曲线值来调整效果推荐一个好用的bezier生成工具 http://cubic-bezier.com/
*/
coverTouchstart(e) {
if (pageAtTop === false) {
return;
}
this.coverTransition = 'transform .1s linear';
startY = e.touches[0].clientY;
},
coverTouchmove(e) {
moveY = e.touches[0].clientY;
let moveDistance = moveY - startY;
if (moveDistance < 0) {
this.moving = false;
return;
}
this.moving = true;
if (moveDistance >= 80 && moveDistance < 100) {
moveDistance = 80;
}
if (moveDistance > 0 && moveDistance <= 80) {
this.coverTransform = `translateY(${moveDistance}px)`;
}
},
coverTouchend() {
if (this.moving === false) {
return;
}
this.moving = false;
this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
this.coverTransform = 'translateY(0px)';
},
getUserInfo(e) {
let _this = this;
//return false;
console.log('eeeee', e);
if (e.detail.errMsg == 'getUserInfo:fail auth deny') {
_this.$common.errorToShow('未授权');
} else {
var data = {
open_id: _this.open_id,
iv: e.detail.iv,
edata: e.detail.encryptedData,
signature: e.detail.signature
};
//有推荐码的话,带上
var invitecode = _this.$db.get('invitecode');
if (invitecode) {
data.invitecode = invitecode;
}
_this.toWxLogin(data);
}
},
getALICode() {
let that = this;
uni.login({
scopes: 'auth_user',
success: res => {
if (res.authCode) {
uni.getUserInfo({
provider: 'alipay',
success: function(infoRes) {
if (infoRes.errMsg == 'getUserInfo:ok') {
let user_info = {
nickname: infoRes.nickName,
avatar: infoRes.avatar
};
that.aLiLoginStep1(res.authCode, user_info);
}
},
fail: function(errorRes) {
this.$common.errorToShow('未取得用户昵称头像信息');
}
});
} else {
this.$common.errorToShow('未取得code');
}
},
fail: function(res) {
this.$common.errorToShow('用户授权失败my.login');
}
});
},
getWxCode(e) {
console.log('-------', e);
let that = this;
uni.login({
provider: 'weixin',
success: function(res) {
if (res.code) {
console.log(res.code);
that.wxLoginStep1(res.code);
} else {
this.$common.errorToShow('未取得code');
}
},
fail: function(res) {
this.$common.errorToShow('用户授权失败wx.login');
}
});
},
wxLoginStep1(code) {
var data = {
code: code
};
this.$api.login1(data, res => {
if (res.status) {
this.open_id = res.data;
this.getUserInfo();
} else {
this.$common.errorToShow(res.msg, function() {
uni.navigateBack({
delta: 1
});
});
}
});
},
aLiLoginStep1(code, user_info) {
let data = {
code: code,
user_info: user_info
};
this.$api.alilogin1(data, res => {
this.alipayNoLogin = false;
if (res.status) {
this.open_id = res.data.user_wx_id;
//判断是否返回了token如果没有就说明没有绑定账号跳转到绑定页面
if (!res.data.hasOwnProperty('token')) {
this.$common.redirectTo('/pages/public/index?user_wx_id=' + res.data.user_wx_id);
} else {
this.$db.set('userToken', res.data.token);
this.initData();
}
} else {
this.$common.errorToShow(res.msg);
}
});
},
toWxLogin(data) {
console.log('----------data---------', data);
let _this = this;
_this.$api.login2(data, function(res) {
if (res.status) {
//判断是否返回了token如果没有就说明没有绑定账号跳转到绑定页面
if (typeof res.data.token == 'undefined') {
uni.redirectTo({
url: '/pages/public/index?user_wx_id=' + res.data.user_wx_id
});
} else {
_this.$db.set('userToken', res.data.token);
_this.initData();
}
} else {
_this.$common.errorToShow('登录失败,请重试');
}
});
},
toLogin() {
uni.navigateTo({
url: '/pages/public/login'
});
}, //在线客服,只有手机号的,请自己替换为手机号
showChat() {
// #ifdef H5
let _this = this;
window._AIHECONG('ini', {
entId: this.config.ent_id,
button: false,
appearance: {
panelMobile: {
tone: '#FF7159',
sideMargin: 30,
ratio: 'part',
headHeight: 50
}
}
});
//传递客户信息
window._AIHECONG('customer', {
head: _this.userInfo.avatar,
名称: _this.userInfo.nickname,
手机: _this.userInfo.mobile
});
window._AIHECONG('showChat');
// #endif
// 拨打电话
// #ifdef APP-PLUS
if (this.kfmobile) {
uni.makePhoneCall({
phoneNumber: '' + this.kfmobile,
success: () => {
// console.log("成功拨打电话")
}
});
} else {
this.$common.errorToShow('商户未设置客服手机号');
}
// #endif
}
}
};
</script>
<style lang="scss">
@font-face {
font-family: cgtt;
font-weight: normal;
font-style: normal;
src: url('//at.alicdn.com/t/font_1475801_5innv59qqcr.ttf') format('truetype');
}
page {
background: #f3f3f3;
}
.cgtt {
font-family: 'cgtt' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-userShare:before {
content: '\c600';
}
.icon-userJoin:before {
content: '\c601';
}
%flex-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
%section {
display: flex;
justify-content: space-around;
align-content: center;
background: #fff;
border-radius: 10upx;
}
.user-section {
height: 520upx;
padding: 100upx 30upx 0;
position: relative;
.bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
filter: blur(1px);
// opacity: 0.7;
}
}
.user-info-box {
height: 180upx;
display: flex;
align-items: center;
position: relative;
z-index: 1;
.portrait {
width: 130upx;
height: 130upx;
border: 5upx solid #fff;
border-radius: 50%;
}
.username {
font-size: $font-lg + 6upx;
color: $font-color-dark;
margin-left: 20upx;
}
}
.login-btn {
color: #fff;
width: 180upx;
height: 50upx;
line-height: 50upx;
border-radius: 25upx;
background: #ff7159;
font-size: 12px;
}
.vip-card-box {
display: flex;
flex-direction: column;
color: #f7d680;
height: 240upx;
background: linear-gradient(left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
border-radius: 16upx 16upx 0 0;
overflow: hidden;
position: relative;
padding: 20upx 24upx;
.card-bg {
position: absolute;
top: 20upx;
right: 0;
width: 380upx;
height: 260upx;
}
.b-btn {
position: absolute;
right: 20upx;
top: 16upx;
width: 132upx;
height: 40upx;
text-align: center;
line-height: 40upx;
font-size: 22upx;
color: #36343c;
border-radius: 20px;
background: linear-gradient(left, #f9e6af, #ffd465);
z-index: 1;
}
.tit {
font-size: $font-base + 2upx;
color: #f7d680;
margin-bottom: 28upx;
.yticon {
color: #f6e5a3;
margin-right: 16upx;
}
}
.e-b {
font-size: $font-sm;
color: #d8cba9;
margin-top: 10upx;
}
}
.vip-card-box1 {
display: flex;
flex-direction: column;
color: #f7d680;
height: 60upx;
width: 160upx;
background: linear-gradient(left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
border-radius: 16upx 16upx 0 0;
overflow: hidden;
position: relative;
padding: 20upx 24upx;
.b-btn {
position: absolute;
right: 10upx;
top: 10upx;
width: 132upx;
height: 40upx;
text-align: center;
line-height: 40upx;
font-size: 22upx;
color: #36343c;
border-radius: 20px;
background: linear-gradient(left, #f9e6af, #ffd465);
z-index: 1;
}
.tit {
font-size: $font-base + 2upx;
color: #f7d680;
margin-bottom: 28upx;
.yticon {
color: #f6e5a3;
margin-right: 16upx;
}
}
.e-b {
font-size: $font-sm;
color: #d8cba9;
margin-top: 10upx;
}
}
.cover-container {
background: $page-color-base;
margin-top: -150upx;
padding: 0 20upx;
position: relative;
background: #f5f5f5;
padding-bottom: 20upx;
.arc {
position: absolute;
left: 0;
top: -34upx;
width: 100%;
height: 36upx;
}
}
.tj-sction {
@extend %section;
.tj-item {
@extend %flex-center;
flex-direction: column;
height: 140upx;
font-size: $font-sm;
color: #75787d;
}
.num {
font-size: $font-lg;
color: $font-color-dark;
margin-bottom: 8upx;
}
}
.order-section {
@extend %section;
padding: 28upx 0;
margin-top: 20upx;
.order-item {
@extend %flex-center;
width: 120upx;
height: 120upx;
border-radius: 10upx;
font-size: $font-sm;
color: $font-color-dark;
}
.yticon {
font-size: 48upx;
margin-bottom: 18upx;
color: #fa436a;
}
.icon-shouhoutuikuan {
font-size: 44upx;
}
}
.history-section {
padding: 30upx 0 0;
margin-top: 20upx;
background: #fff;
border-radius: 10upx;
.sec-header {
display: flex;
align-items: center;
font-size: $font-base;
color: $font-color-dark;
line-height: 40upx;
margin-left: 30upx;
.yticon {
font-size: 44upx;
color: #5eba8f;
margin-right: 16upx;
line-height: 40upx;
}
}
.h-list {
white-space: nowrap;
padding: 30upx 30upx 0;
image {
display: inline-block;
width: 160upx;
height: 160upx;
margin-right: 20upx;
border-radius: 10upx;
}
}
}
</style>