Commit 560ff6d7 by 杨北旺

Merge branch 'v1.0.0' of http://192.168.3.233:8090/saas/mini-program/zhwy into v1.0.0

2 parents 99465bf4 f9908fe0
Showing 34 changed files with 605 additions and 9 deletions
......@@ -59,7 +59,8 @@
{
"root": "packageIndex",
"pages": [
"pages/carLife/index"
"pages/carLife/index",
"pages/homeLife/index"
]
},
{
......
Component({
data: {},
properties: {
goodsItem: {
type: Object,
value: {}
}
},
methods: {}
})
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="goods-item">
<image class="goods-img" src="{{goodsItem.goodsUrl}}" />
<view class="goods-content-box">
<view class="goods-title-box">
<view class="goods-title-tips {{goodsItem.goodsStatus == 1 ? 'goods-title-tips-new': 'goods-title-tips-miao'}}">
{{goodsItem.goodsStatus == 1 ? '上新' : '秒杀'}}
</view>
<view class="goods-title-text">{{goodsItem.name}}</view>
</view>
<view class="goods-msg">{{goodsItem.view}}查看 | 售出{{goodsItem.sale}}</view>
<view class="goods-price-box">
<view class="goods-new-price-box">
<text class="goods-new-price-icon">¥</text>
<text class="goods-new-price-text">{{goodsItem.newPrice}}</text>
</view>
<view class="goods-old-price-box">¥{{goodsItem.oldPrice}}</view>
</view>
</view>
</view>
\ No newline at end of file
.goods-item {
background: #ffffff;
}
.goods-img {
width: 276rpx;
height: 280rpx;
border-radius: 8rpx 8rpx 0 0;
-webkit-border-radius: 8rpx 8rpx 0 0;
-moz-border-radius: 8rpx 8rpx 0 0;
-ms-border-radius: 8rpx 8rpx 0 0;
-o-border-radius: 8rpx 8rpx 0 0;
}
.goods-content-box {
padding: 20rpx;
}
.goods-title-box {
display: flex;
max-width: 236rpx;
}
.goods-title-tips {
width: 60rpx;
height: 28rpx;
border-radius: 4rpx;
font-weight: 400;
font-size: 20rpx;
color: #ffffff;
line-height: 28rpx;
text-align: center;
}
.goods-title-tips-new {
background: #70b2ff;
}
.goods-title-tips-miao {
background: #f94a36;
}
.goods-title-text {
font-weight: 500;
font-size: 26rpx;
color: #333333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.goods-msg {
font-weight: 400;
font-size: 20rpx;
color: #d79736;
margin-top: 8rpx;
}
.goods-price-box {
display: flex;
align-items: baseline;
margin-top: 12rpx;
}
.goods-new-price-box {
font-weight: 600;
color: #ec3c1f;
}
.goods-new-price-icon {
font-size: 24rpx;
}
.goods-new-price-text {
font-size: 40rpx;
}
.goods-old-price-box {
font-weight: 400;
font-size: 22rpx;
color: #999999;
text-decoration: line-through;
}
Component({
data: {},
properties: {
goodsList: {
type: Array,
value: []
}
},
methods: {}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"goods-item": "../GoodsItem/GoodsItem"
}
}
\ No newline at end of file
<view class="goods-swiper">
<scroll-view class="goods-list" enable-flex scroll-x>
<view class="cell" wx:for="{{goodsList}}" wx:key="index">
<goods-item goodsItem="{{item}}"></goods-item>
</view>
</scroll-view>
</view>
\ No newline at end of file
.goods-list {
height: 448rpx;
display: flex;
flex-direction: row;
box-sizing: border-box;
}
.goods-list .cell {
margin: 0 12rpx 0 0;
}
.goods-list .cell:last-child {
margin: 0;
}
\ No newline at end of file
Component({
data: {},
properties: {
title: String
},
methods: {}
})
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="title">
{{title}}
</view>
\ No newline at end of file
.title {
font-weight: 500;
font-size: 36rpx;
color: #333333;
position: relative;
}
.title::after {
content: "";
display: block;
width: 144rpx;
height: 12rpx;
background-image: linear-gradient(90deg, #61a5ff00 0%, #2699fd 100%);
border-radius: 6rpx;
position: absolute;
bottom: 4rpx;
}
Component({
data: {},
properties: {
menuList: {
type: Array,
value: []
}
},
methods: {}
})
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="menu-box">
<view class="menu-item-box" wx:for="{{menuList}}" wx:key="index">
<view class="menu-item">
<glsx-image webp src="home/menu_icon/{{item.iconUrl}}" class="menu-item-icon"></glsx-image>
<view class="menu-item-text">
{{item.name}}
</view>
</view>
</view>
</view>
\ No newline at end of file
.menu-box {
background: #ffffff;
border-radius: 8rpx;
display: flex;
flex-wrap: wrap;
/* justify-content: space-around; */
padding: 30rpx 34rpx 30rpx 36rpx;
}
.menu-item-box {
width: 128rpx;
height: 116rpx;
text-align: center;
margin-right: 36rpx;
}
.menu-item-box:nth-child(4n) {
margin-right: 0;
}
.menu-item-box:nth-child(n+5) {
margin-top: 32rpx;
}
.menu-item-icon {
width: 72rpx;
height: 72rpx;
}
.menu-item-text {
font-weight: 400;
font-size: 24rpx;
color: #282829;
text-align: center;
margin-top: 12rpx;
}
Component({
data: {},
properties: {},
methods: {}
})
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="saving-tips-box">
<view class="save-title-box">
<view class="bg-box"></view>
<view class="text">省钱攻略</view>
</view>
<view class="img-box">
<view class="img-item-box">
<glsx-image webp src="home/saving_1.png" class="saving-img"></glsx-image>
<view class="viewer">9520人浏览</view>
</view>
<view class="img-item-box">
<glsx-image webp src="home/saving_2.png" class="saving-img"></glsx-image>
<view class="viewer">9520人浏览</view>
</view>
</view>
</view>
\ No newline at end of file
.save-title-box {
position: relative;
}
.save-title-box .text {
position: absolute;
top: 14rpx;
font-size: 36rpx;
color: #000000;
font-weight: 500;
margin-left: 20rpx;
}
.bg-box {
width: 200rpx;
height: 60rpx;
background: #d6e8fe;
/* 宽高background-image: linear-gradient(180deg, #d6e8fe 0%, #f8f8f8 100%); */
/*颜色*/
border-radius: 16rpx 16rpx 0 0;
/*设置圆角*/
transform: perspective(48rpx) scale(1.1, 1.3) rotateX(5deg);
/*镜头距离元素表面的位置为8px,x轴为1.1倍y轴为1.3倍,绕x轴旋转5度*/
transform-origin: bottom left;
/*bottomleft=leftbottom=0100%中心点偏移量*/
}
.saving-img {
width: 690rpx;
height: 388rpx;
}
.img-box {
padding: 30rpx;
background-image: linear-gradient(180deg, #d6e8fe 0%, #f8f8f8 100%);
border-radius: 0 16rpx 0 0;
-webkit-border-radius: 0 16rpx 0 0;
-moz-border-radius: 0 16rpx 0 0;
-ms-border-radius: 0 16rpx 0 0;
-o-border-radius: 0 16rpx 0 0;
}
.img-item-box {
position: relative;
margin-bottom: 30rpx;
}
.viewer {
position: absolute;
top: 20rpx;
right: 28rpx;
width: 146rpx;
height: 36rpx;
opacity: 0.3;
background: #000000;
border-radius: 18rpx;
font-size: 24rpx;
color: #ffffff;
line-height: 36rpx;
padding: 0 4rpx;
text-align: center;
}
// packageIndex/pages/carLife/index.js
import {tripMenu,maintainCarMenu,goodsList} from '../constant/lifeConstant'
Page({
/**
* 页面的初始数据
*/
data: {
tripMenu,
maintainCarMenu,
goodsList
},
/**
......
{
"usingComponents": {}
"usingComponents": {
"main-title": "../../components/MainTitle/MainTitle",
"menu-box": "../../components/MenuBox/MenuBox",
"goods-swiper": "../../components/GoodsSwiper/GoodsSwiper"
},
"navigationBarTitleText": "车生活"
}
\ No newline at end of file
/* packageIndex/pages/carLife/index.wxss */
\ No newline at end of file
/* packageIndex/pages/carLife/index.wxss */
.carlife-box {
padding: 30rpx;
background: #f8f8f8;
.carlife-img {
width: 690rpx;
height: 268rpx;
}
.title-box {
margin: 30rpx 0 20rpx 0;
}
}
<!--packageIndex/pages/carLife/index.wxml-->
<text>packageIndex/pages/carLife/index.wxml</text>
<view class="carlife-box">
<glsx-image webp src="home/carlife_bg.png" class="carlife-img"></glsx-image>
<view class="title-box">
<main-title title="省心出行" ></main-title>
</view>
<menu-box menuList="{{tripMenu}}"></menu-box>
<view class="title-box">
<main-title title="养车服务"></main-title>
</view>
<menu-box menuList="{{maintainCarMenu}}"></menu-box>
<view class="title-box">
<main-title title="甄选车品"></main-title>
</view>
<goods-swiper goodsList="{{goodsList}}"></goods-swiper>
</view>
const recreationMenu = [
{
iconUrl: 'movie.png',
name: '猫眼电影',
iconTip: '19元起'
},
{
iconUrl: 'movie.png',
name: '酷狗音乐'
},
{
iconUrl: 'movie.png',
name: '爱奇艺'
},
{
iconUrl: 'movie.png',
name: 'Keep'
}
]
const foodMenu = [
{
iconUrl: 'movie.png',
name: '星巴克'
},
{
iconUrl: 'movie.png',
name: '瑞幸咖啡',
iconTip: '9.9元起'
},
{
iconUrl: 'movie.png',
name: '奈雪的茶'
},
{
iconUrl: 'movie.png',
name: '麦当劳',
iconTip: '新品'
}
]
const tripMenu = [
{
iconUrl: 'movie.png',
name: '滴滴出行',
iconTip: '10元券'
},
{
iconUrl: 'movie.png',
name: '高德打车'
},
{
iconUrl: 'movie.png',
name: '美团骑车'
},
{
iconUrl: 'movie.png',
name: '青桔单车',
iconTip: '3元券'
},
{
iconUrl: 'movie.png',
name: '哈罗单车'
},
{
iconUrl: 'movie.png',
name: '哈罗单车'
}
]
const maintainCarMenu = [
{
iconUrl: 'movie.png',
name: '道路救援',
iconTip: '免费'
},
{
iconUrl: 'movie.png',
name: '送油'
},
{
iconUrl: 'movie.png',
name: '搭电'
},
{
iconUrl: 'movie.png',
name: '换胎'
}
]
const goodsList = [
{
goodsUrl: 'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png',
goodsStatus: 1,
name: '360全景导航',
view: 9900,
sale: 1550,
newPrice: 129,
oldPrice: 169
},
{
goodsUrl: 'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png',
goodsStatus: 1,
name: '360全景导航导航导航导航',
view: 9900,
sale: 1550,
newPrice: 129,
oldPrice: 169
},
{
goodsUrl: 'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png',
goodsStatus: 1,
name: '360全景导航',
view: 9900,
sale: 1550,
newPrice: 129,
oldPrice: 169
},
{
goodsUrl: 'https://img01.glsx.com.cn/group1/M00/0F/3B/wKgFDWTclNCAdRMqAAHIp1r8d3w346.png',
goodsStatus: 1,
name: '360全景导航',
view: 9900,
sale: 1550,
newPrice: 129,
oldPrice: 169
}
]
export {
recreationMenu,
foodMenu,
tripMenu,
maintainCarMenu,
goodsList
}
\ No newline at end of file
// packageIndex/pages/carLife/index.js
import {recreationMenu,foodMenu} from '../constant/lifeConstant'
Page({
/**
* 页面的初始数据
*/
data: {
recreationMenu,
foodMenu
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"main-title": "../../components/MainTitle/MainTitle",
"menu-box": "../../components/MenuBox/MenuBox",
"money-saving-tips": "../../components/MoneySavingTips/MoneySavingTips"
},
"navigationBarTitleText": "家生活"
}
\ No newline at end of file
/* packageIndex/pages/homeLife/index.wxss */
.homelife-box {
padding: 30rpx;
background: #f8f8f8;
.homelife-img {
width: 690rpx;
height: 268rpx;
}
.title-box {
margin: 30rpx 0 20rpx 0;
}
}
\ No newline at end of file
<view class="homelife-box">
<glsx-image webp src="home/homelife_bg.png" class="homelife-img"></glsx-image>
<view class="title-box">
<main-title title="娱乐推荐"></main-title>
</view>
<menu-box menuList="{{recreationMenu}}"></menu-box>
<view class="title-box">
<main-title title="美食推荐"></main-title>
</view>
<menu-box menuList="{{foodMenu}}"></menu-box>
</view>
<money-saving-tips></money-saving-tips>
\ No newline at end of file
{
"usingComponents": {}
"usingComponents": {
}
}
\ No newline at end of file
{
"usingComponents": {
"money-saving-tips": "../../../packageIndex/components/MoneySavingTips/MoneySavingTips"
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
......
<view class=""></view>
\ No newline at end of file
<money-saving-tips></money-saving-tips>
\ No newline at end of file
/* pages/tab/select/index.wxss */
.strategy-box {
padding: 30rpx;
background: #F8F8F8;
.strategy-item {
width: 690rpx;
background: #ffffff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!