main
liudan 2 years ago
parent 6e205d1caa
commit e3ea0e28f4
  1. 14
      App.vue
  2. 2
      env.js
  3. 67
      pages.json
  4. 2
      pages/home/home.vue
  5. 14
      pages/index/cart.vue
  6. 15
      pages/index/category.vue
  7. 194
      pages/index/category/three-catgory.vue
  8. 2
      pages/index/user.vue
  9. 74
      pages/index/user/userinfo-card.vue
  10. 4
      uview-ui/theme.scss

@ -4,6 +4,11 @@
init
} from "@/shopro";
export default {
data(){
return{
}
},
onLaunch(options) {
init(options);
}
@ -12,4 +17,13 @@
<style lang="scss">
@import 'static/style/index.scss';
page{
background-color: #21222B;
}
.hometitle{
font-size: 34upx;
color: #FFFFFF;
margin-left:25upx;
}
</style>

@ -3,7 +3,7 @@
*/
// 接口根域名 https://demo.shopro.top
export const BASE_URL = 'https://demo.shopro.top'
export const BASE_URL = 'https://fx.njrenzhou.cn'
// 接口路径
export const API_URL = `${BASE_URL}/addons/shopro/`

@ -27,41 +27,24 @@
// }
// },
{
"path": "pages/home/home",
"aliasPath": "/", //h5aliasPath/
"path": "pages/index/user",
"style": {
"navigationBarTitleText": "首页",
"navigationBarTextStyle": "light",
"enablePullDownRefresh": false,
"navigationBarTitleText": "我的",
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
},
"meta": {
"auth": false, //
"async": true, //
"title": "首页", //
"group": "商城" //
}
},
{
"path": "pages/index/category",
"style": {
"navigationBarTitleText": "分类"
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
},
"meta": {
"auth": false,
"async": true,
"title": "分类",
"title": "我的",
"group": "商城"
}
},
{
"path": "pages/index/cart",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "购物车"
},
"meta": {
@ -72,20 +55,42 @@
}
},
{
"path": "pages/index/user",
"path": "pages/index/category",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
"navigationBarTitleText": "分类"
},
"meta": {
"auth": false,
"async": true,
"title": "我的",
"title": "分类",
"group": "商城"
}
},
{
"path": "pages/home/home",
"aliasPath": "/", //h5aliasPath/
"style": {
"navigationBarTitleText": "首页",
"navigationBarTextStyle": "light",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
},
"meta": {
"auth": false, //
"async": true, //
"title": "首页", //
"group": "商城" //
}
},
{
"path": "pages/index/view",
"name": "view",
@ -912,9 +917,9 @@
"backgroundColor": "#FFFFFF"
},
"tabBar": {
"color": "#333",
"selectedColor": "#a8700d",
"backgroundColor": "#ffffff",
"color": "#65676B",
"selectedColor": "#F0D2A0",
"backgroundColor": "#0F1014",
"borderStyle": "black",
"list": [
// {

@ -1,6 +1,6 @@
<template>
<view class="home">
<view class="hometitle" :style="{paddingTop:navBarTop + 'px',height:navBarHeight + 'px',lineHeight:navBarHeight + 'px'}">首页</view>
<view class="hometitle" :style="{paddingTop:navBarTop + 'px',height:navBarHeight + 'px',marginLeft:0,lineHeight:navBarHeight + 'px'}">首页</view>
<view class="swiper-box" :style="{marginTop:navBarHeight +10+ 'px'}">
<u-swiper :list="list" height="400" border-radius="20"></u-swiper>

@ -1,6 +1,7 @@
<!-- 购物车 -->
<template>
<view class="page_box">
<view class="hometitle" :style="{paddingTop:navBarTop + 'px',height:navBarHeight + 'px',lineHeight:navBarHeight + 'px'}">首页</view>
<!-- 总数 -->
<view class="head_box" v-show="!isEmpty">
<view class="tool-box u-flex u-row-between">
@ -13,7 +14,7 @@
</view>
</view>
<view class="content_box">
<view class="content_box" :style="{marginTop:navBarTop+10 + 'px',}">
<!-- 列表 -->
<u-checkbox-group @change="checkboxGroupChange" activeColor="#e9b461" v-if="!isEmpty">
<view class="collect-list u-flex u-row-left u-col-center" v-for="(g, index) in cartList" :key="index">
@ -80,7 +81,9 @@
data() {
return {
maxStep: 999,
isTool: false
isTool: false,
navBarTop:0,
navBarHeight:0
};
},
computed: {
@ -89,6 +92,13 @@
return !this.cartList.length;
}
},
onLoad() {
let statuBar = uni.getSystemInfoSync().statusBarHeight;
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.navBarTop = menuButtonInfo.top;
this.navBarHeight = menuButtonInfo.height;
},
onShow() {
this.isLogin && this.getCartList();
},

@ -1,6 +1,7 @@
<!-- 分类 -->
<template>
<view class="category-box">
<view class="hometitle" :style="{paddingTop:navBarTop + 'px',height:navBarHeight + 'px',lineHeight:navBarHeight + 'px'}">分类</view>
<!-- 三级分类 -->
<three-catgory :categoryStyleId="categoryStyleId" v-if="categoryType === 4"></three-catgory>
<!-- 二级分类 -->
@ -11,7 +12,7 @@
<takeout-catgory :categoryStyleId="categoryStyleId" v-if="categoryType === 1"></takeout-catgory>
<!-- 登录提示 -->
<shopro-auth-modal v-if="authType"></shopro-auth-modal>
<!-- <shopro-tabbar></shopro-tabbar> -->
<shopro-tabbar></shopro-tabbar>
</view>
</template>
@ -31,15 +32,23 @@ export default {
data() {
return {
categoryType: 0, //1:,2:3:4:
categoryStyleId: 0 //Id
categoryStyleId: 0, //Id
navBarTop:0,
navBarHeight:0
};
},
computed: {
...mapGetters(['authType'])
},
onLoad() {
this.getCategory();
let statuBar = uni.getSystemInfoSync().statusBarHeight;
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.navBarTop = menuButtonInfo.top;
this.navBarHeight = menuButtonInfo.height;
this.getCategory();
},
methods: {
/**
* 获取分类数据

@ -1,18 +1,21 @@
<template>
<view class="content_box">
<view class="content_box" :style="{marginTop: navBarHeight+'px'}">
<view class="u-flex u-col-center wrapper-box">
<view class="scroll-box" style="background-color: #F6F6F6;">
<scroll-view class="left u-flex-col u-col-center" enable-back-to-top scroll-y>
<view class="type-list u-ellipsis-1" :class="[{ 'list-active': listId == index }]" v-for="(item, index) in categoryData" :key="index" @tap="onType(index)">
<view class="line" :class="[{ 'line-active': listId == index }]"></view>
<view class="type-list u-ellipsis-1" :class="[{ 'list-active': listId == index }]" v-for="(item, index) in categoryData" :key="index" @tap="onType(index,item)">
<!-- <view class="line" :class="[{ 'line-active': listId == index }]"></view> -->
{{ item.name }}
</view>
<view class="hack-tabbar"></view>
</scroll-view>
</view>
<view style="height: 100%;width: 100%;">
<view style="height: 100%;width:calc(100% - 200upx);">
<view class="subtitle">
{{item.name}}
</view>
<scroll-view scroll-y class="scroll-box" enable-back-to-top scroll-with-animation>
<view class="right" v-if="categoryData.length">
<!-- <view class="right" v-if="categoryData.length">
<image class="type-img" v-if="categoryData[listId].image" :src="categoryData[listId].image" mode="aspectFill"></image>
<view class="item-list" v-for="(list, index1) in categoryData[listId].children" :key="index1">
@ -31,13 +34,40 @@
</view>
</view>
<!-- 缺省页 -->
<shopro-empty
v-show="!categoryData[listId].children.length"
:image="$IMG_URL + '/imgs/empty/empty_goods.png'"
tipText="暂无该商品,还有更多好货等着你噢~"
></shopro-empty>
<view class="hack-tabbar"></view>
</view> -->
<view class="shopList">
<view class="shopItem" v-for="(item,index) in shopList" :key="index">
<view class="shopImg">
<image :src="item.img" mode="widthFix"></image>
</view>
<view class="infoBox">
<view class="shopTitle">
<image src="/static/images/xinp.png" mode="widthFix"></image>
<text>{{item.title}}</text>
</view>
<view class="progress">
<u-line-progress active-color="#F0D2A0"
:show-percent="false" height="20"
style="flex:1"
inactive-color="#F6EEE6" :percent="70"></u-line-progress>
<text>已售{{item.num}}</text>
</view>
<view class="price">
<view class="priceInfo">
<text class="mainPrice">{{item.mainprice}}</text>
<text class="subPrice">{{item.subprice}}</text>
</view>
<view class="btn">去抢购</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
@ -52,7 +82,40 @@ export default {
data() {
return {
listId: 0,
categoryData: {}
categoryData: {},
navBarTop:0,
navBarHeight:0,
shopList:[
{
img:'/static/images/shopdesc.png',
title:'SK-II 熬夜肌肤“重启”秘籍 熬夜肌SK-II 熬夜肌肤“重启”秘籍 熬夜肌',
num:288,
mainprice:389.00,
subprice:999.00
},
{
img:'/static/images/shopdesc.png',
title:'SK-II 熬夜肌肤“重启”秘籍 熬夜肌SK-II 熬夜肌肤“重启”秘籍 熬夜肌',
num:288,
mainprice:389.00,
subprice:999.00
},
{
img:'/static/images/shopdesc.png',
title:'SK-II 熬夜肌肤“重启”秘籍 熬夜肌SK-II 熬夜肌肤“重启”秘籍 熬夜肌',
num:288,
mainprice:389.00,
subprice:999.00
},
{
img:'/static/images/shopdesc.png',
title:'SK-II 熬夜肌肤“重启”秘籍 熬夜肌SK-II 熬夜肌肤“重启”秘籍 熬夜肌',
num:288,
mainprice:389.00,
subprice:999.00
}
],
item:{}
};
},
computed: {},
@ -63,9 +126,15 @@ export default {
}
},
async created() {
let statuBar = uni.getSystemInfoSync().statusBarHeight;
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.navBarTop = menuButtonInfo.top;
this.navBarHeight = menuButtonInfo.height;
console.log('%c当前分类:三级分类', 'color:green;background:yellow');
await this.getCategory();
},
methods: {
getCategory() {
this.$http('category.detail', {
@ -73,10 +142,12 @@ export default {
}).then(res => {
if (res.code === 1) {
this.categoryData = res.data.children;
this.item = this.categoryData[0]
}
});
},
onType(id) {
onType(id,item) {
this.item=item
this.listId = id;
},
//
@ -100,7 +171,8 @@ export default {
display: flex;
flex-direction: column;
overflow: hidden;
height: 100%;
height: calc(100% - 88upx);
}
.wrapper-box {
@ -112,18 +184,18 @@ export default {
.scroll-box {
height: 100%;
flex: 1;
background: #fff;
background: #21222B;
}
.left {
width: 200upx;
height: 100%;
flex: 1;
background: #1A1A22;
.list-active {
background: #fff;
color: #333333 !important;
font-weight: bold !important;
background: #21222B;
color: #FFFFFF !important;
// font-weight: bold !important;
}
.line-active {
@ -134,11 +206,12 @@ export default {
height: 84upx;
position: relative;
width: 200rpx;
padding-left: 16rpx;
padding-left: 25rpx;
line-height: 84rpx;
font-size: 28upx;
font-weight: 400;
color: rgba(102, 102, 102, 1);
color:#808292;
// color: rgba(102, 102, 102, 1);
.line {
width: 10upx;
@ -206,4 +279,93 @@ export default {
}
}
}
.subtitle{
font-size: 30upx;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #FFFFFF;
margin:20upx;
}
.shopList{
padding-bottom: 35rpx;
.shopItem{
// height: 650px;
margin:0 22upx;
margin-bottom: 24upx;
background: #FFFFFF;
box-shadow: 0upx 6upx 16upx 0upx rgba(25,25,25,0.05);
border-radius: 20upx;
overflow: hidden;
.shopImg{
width:100%;
background: #D3D3D3;
box-shadow: 0upx 6upx 16upx 0upx rgba(25,25,25,0.05);
border-radius: 20upx 20upx 0upx 0upx;
image{
height:auto;
width:100%;
}
}
.infoBox{
margin-top: 20upx;
.shopTitle{
display: flex;
align-items: center;
image{
width:180upx;
height:auto
}
text{
font-size: 34upx;
color: #333333;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
margin-left: 22upx;
}
}
.progress{
display: flex;
align-items: center;
padding:0 20upx;
margin: 25upx 0;
text{
margin-left: 24upx;
font-size: 24upx;
color: #333333;
}
}
.price{
display: flex;
align-items: center;
justify-content: space-between;
padding:0 30upx;
margin-bottom: 30upx;
.mainPrice{
font-size: 34upx;
color: #111111;
font-weight: bold;
}
.subPrice{
font-size: 24upx;
text-decoration: line-through;
color: #C4BFBC;
margin-left:20upx;
}
.btn{
padding:20upx 45upx;
background: #111111;
border: 1px solid #EAEAEA;
border-radius: 33px;
font-size: 30upx;
color: #FFFFFF;
}
}
}
}
}
</style>

@ -4,7 +4,7 @@
<!-- 个人信息卡片 -->
<userinfo-card v-if="userHeadData && userHeadData.style" :scrollTop="scrollTop" :detail="userHeadData" @onShare="onShare"></userinfo-card>
<!-- 自定义模块 -->
<view v-for="(item, index) in userTemplate" :key="item.id">
<view v-for="(item, index) in userTemplate" :key="item.id" style="border:2px solid red;padding:0 25upx;">
<!-- 轮播 -->
<sh-banner
v-if="item.type === 'banner' && index !== 0"

@ -1,19 +1,19 @@
<template>
<view>
<view class="sh-userinfo-box">
<view class="head-wrap"
:style="{ background: detail.image ? `url(${detail.image}) no-repeat center / 100% 100%` : detail.color }">
<view class="head-wrap">
<!-- 标题栏 -->
<shopro-navbar backIconName="" backText="我的" :backTextStyle="{
<!-- <shopro-navbar backIconName="" backText="我的" :backTextStyle="{
color: '#fff',
fontSize: '40rpx',
fontWeight: '500'
}" :background="navBackground">
}" :background="navBackground"> -->
<view class="hometitle" :style="{paddingTop:navBarTop + 'px',height:navBarHeight + 'px',lineHeight:navBarHeight + 'px'}">个人中心</view>
<view slot="right" class="u-flex u-row-center u-col-center u-m-r-20" v-if="userOtherData.is_store"
@tap="goStore">
<button class="u-reset-button merchant-btn">切换商家版</button>
</view>
</shopro-navbar>
<!-- </shopro-navbar> -->
<view class="user-head u-flex u-row-between">
<view class="u-flex">
@ -49,9 +49,9 @@
</view>
</view>
</view>
<!-- 绑定手机 -->
<view class="notice-box u-flex u-row-between u-p-30"
v-if="userInfo.verification && !userInfo.verification.mobile" @tap="bindMobile">
<!-- 绑定手机 v-if="userInfo.verification && !userInfo.verification.mobile"-->
<view class="notice-box u-flex u-row-between"
@tap="bindMobile">
<view class="notice-detail">点击绑定手机号确保账户安全</view>
<button class="u-reset-button bindPhone">去绑定</button>
</view>
@ -89,10 +89,18 @@ export default {
isFixed: false,
navBackground: {
background: 'none'
}
},
navBarTop:0,
navBarHeight:0
};
},
mounted() { },
mounted() {
let statuBar = uni.getSystemInfoSync().statusBarHeight;
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.navBarTop = menuButtonInfo.top;
this.navBarHeight = menuButtonInfo.height;
},
props: {
detail: {},
scrollTop: {
@ -213,7 +221,7 @@ export default {
.sh-userinfo-box {
position: relative;
height: calc(var(--status-bar-height) + 300rpx);
height: calc(var(--status-bar-height) + 250rpx);
.head-wrap {
powidth: 100%;
@ -237,7 +245,7 @@ export default {
.info-box {
padding-left: 30rpx;
margin-top: 50upx;
.head-img-wrap {
position: relative;
@ -315,28 +323,36 @@ export default {
//
.notice-box {
width: 750rpx;
height: 70rpx;
background: rgba(253, 239, 216, 1);
padding: 0 35rpx;
// width: 750rpx;
// height: 70rpx;
background: #FFFFFF;
border-radius: 20upx;
padding: 15upx 25rpx;
margin:0 25upx;
margin-bottom:20upx;
.notice-detail {
font-size: 24rpx;
font-weight: 400;
color: rgba(204, 149, 59, 1);
font-size: 28upx;
font-family: PingFang SC;
font-weight: 500;
color: #21222B;
}
.bindPhone {
width: 135rpx;
line-height: 52rpx;
background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
border-radius: 26rpx;
padding: 0;
font-size: 26rpx;
width: 160upx;
height: 60upx;
background: #F0D2A0;
border-radius: 30upx;
font-size: 24upx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
color: #111111;
line-height: 60upx;
text-align: center;
}
}
</style>

@ -7,7 +7,9 @@ $u-content-color: #606266;
$u-tips-color: #909399;
$u-light-color: #c0c4cc;
$u-border-color: #e4e7ed;
$u-bg-color: #f3f4f6;
// $u-bg-color: #f3f4f6;
$u-bg-color: #21222B;
$u-type-primary: #2979ff;
$u-type-primary-light: #ecf5ff;

Loading…
Cancel
Save