master
lion 3 years ago
parent 138c7db7b4
commit 3006e82c7d

@ -3,11 +3,11 @@ export const appConfig = {
//appId:"wx3dc65ce9b588727a",//孕育咨询 //appId:"wx3dc65ce9b588727a",//孕育咨询
//baseUrl: 'http://yunyubang.localhost.com', //baseUrl: 'http://yunyubang.localhost.com',
baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦 // baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦
// baseUrl: 'https://yybtest.ali251.langye.net', baseUrl: 'https://yybtest.ali251.langye.net',
newBaseUrl: 'https://yunyubang.ali251.langye.net', // newBaseUrl: 'https://yunyubang.ali251.langye.net',
// newBaseUrl: 'http://yybtest.ali251.langye.net', newBaseUrl: 'http://yybtest.ali251.langye.net',
//baseUrl:'https://yybtest2021.langye.net',//孕育咨询 //baseUrl:'https://yybtest2021.langye.net',//孕育咨询
openidInfoKey: 'openid_info_yunyubang' openidInfoKey: 'openid_info_yunyubang'

@ -1,7 +1,7 @@
<template> <template>
<view :class="showPop?'noscroll content':'content'"> <view :class="showPop?'noscroll content':'content'">
<view class="detailTop"> <view class="detailTop">
<image class="banner" mode="scaleToFill" :src="info.poster"></image> <image class="banner" :src="info.poster"></image>
</view> </view>
<view class="toptitle"> <view class="toptitle">
<view class="h3">{{info.name}}</view> <view class="h3">{{info.name}}</view>
@ -46,12 +46,12 @@
<view class="infos"> <view class="infos">
<view class="name">{{info.merchant.username}}</view> <view class="name">{{info.merchant.username}}</view>
<view class="date-txt" v-if="false"> 09:00-18:00</view> <view class="date-txt" v-if="false"> 09:00-18:00</view>
<view class="txt" v-if="false">{{info.merchant.address}}</view> <view class="add_r starts" @click="">
<view class="add_r" @click="">
<text class="iconfont icon-dianhua"></text> <text class="iconfont icon-dianhua"></text>
<text @click="calltel"><text style="color:#bf617c">{{tel}}</text> <text @click="calltel"><text style="color:#bf617c">{{tel}}</text>
</text> </text>
</view> </view>
<view class="txt">{{info.merchant.address}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -1390,7 +1390,9 @@
margin-left: 24rpx; margin-left: 24rpx;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
view{
margin-bottom:10rpx
}
.name { .name {
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
@ -1404,12 +1406,13 @@
line-height: 20rpx; line-height: 20rpx;
.iconfont { .iconfont {
color: #FF578A; color: #333;
font-size: 20rpx; font-size: 22rpx;
display: inline-block; display: inline-block;
margin-right: 7rpx; margin-right: 7rpx;
height: 100%; height: 100%;
line-height: 20rpx; line-height: 20rpx;
vertical-align: middle;
} }
} }

@ -32,7 +32,7 @@
<block v-for="(item,index) in dataList"> <block v-for="(item,index) in dataList">
<view class="intro_column" @tap="gotoDetail" :data-id="item.id"> <view class="intro_column" @tap="gotoDetail" :data-id="item.id">
<view class="imgOuter"> <view class="imgOuter">
<image mode="aspectFill" :src="item.poster"></image> <image :src="item.poster"></image>
<view class="i_intro">{{item.product_type.name}}</view> <view class="i_intro">{{item.product_type.name}}</view>
</view> </view>
<view class="columnInfo"> <view class="columnInfo">

@ -383,8 +383,14 @@
distanceComputed() { distanceComputed() {
return function(dis) { return function(dis) {
if (dis) { if (dis) {
if (dis.indexOf('km') !== -1) { if (dis.indexOf('km') !== -1) {
return Number(dis.split('km')[0]).toFixed(1) + 'km' let dism = dis.split('km')[0]*1000
if(dism<1000){
return Number(dism).toFixed(1) + 'm'
}else{
return Number(dis.split('km')[0]).toFixed(1) + 'km'
}
} }
if (dis.indexOf('m') !== -1) { if (dis.indexOf('m') !== -1) {
return Number(dis.split('m')[0]).toFixed(1) + 'm' return Number(dis.split('m')[0]).toFixed(1) + 'm'
@ -404,7 +410,6 @@
this.init() this.init()
}) })
this.getStrategy(); this.getStrategy();
this.getParameter("area"); this.getParameter("area");
}, },

@ -389,7 +389,12 @@
return function(dis) { return function(dis) {
if (dis) { if (dis) {
if (dis.indexOf('km') !== -1) { if (dis.indexOf('km') !== -1) {
return Number(dis.split('km')[0]).toFixed(1) + 'km' let dism = dis.split('km')[0]*1000
if(dism<1000){
return Number(dism).toFixed(1) + 'm'
}else{
return Number(dis.split('km')[0]).toFixed(1) + 'km'
}
} }
if (dis.indexOf('m') !== -1) { if (dis.indexOf('m') !== -1) {
return Number(dis.split('m')[0]).toFixed(1) + 'm' return Number(dis.split('m')[0]).toFixed(1) + 'm'

@ -13,11 +13,11 @@
}, },
{ {
"path": "pages/active/active", "path": "pages/active/active",
"style": { "style": {
"navigationBarTitleText": "孕育邦", "navigationBarTitleText": "活动列表",
"navigationBarBackgroundColor": "#FF578A", "navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "black",
"navigationStyle": "custom"
} }
}, },
{ {

@ -0,0 +1,475 @@
<template>
<view class="content">
<view class="activeTop">
<view class="searchBox">
<view class="searchCol">
<view class="iconfont icon-search1"></view>
<input type="text" placeholder="请输入">
</view>
<view class="iconfont icon-w_location-"></view>
</view>
<view class="album_swiper">
<swiper :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-dots="true" indicator-active-color="rgba(255,255,255,0.5)" indicator-color="rgba(255,255,255,1)">
<swiper-item v-for="item in ads" :key="item.id">
<image :src="item.pic"></image>
</swiper-item>
</swiper>
</view>
</view>
<view class="menuBox">
<block v-for="item in indexNav" :key="item.id">
<view class="menuCol" @click="toAction(item)" data-id="-1">
<image :src="item.icon"></image>
<view>{{item.name}}</view>
</view>
</block>
</view>
<!--为您精选活动-->
<view class="introBox">
<view class="normal_tit">为您精选</view>
<view class="intro_row">
<view class="row_col" v-for="item in activityList.slice(0,2)" :key="item.id" @tap="gotoDetail(item.id)">
<view class="imgOuter">
<image mode="aspectFill" :src="item.active_playbill"></image>
<view class="date">{{item.end_at}}</view>
</view>
<view class="title">{{item.active_name}}</view>
<view class="subTit">{{item.address}}</view>
<view class="price">
<text class="font_red">{{ Number(item.money) > 0 ? `${item.money}` : '免费' }}</text>
{{`${item.total+item.start_member_sum}人参与`}}
</view>
</view>
</view>
</view>
<view class="termBox">
<view class="termOuter">
<view class="termCol cur">综合排序<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">距离最近<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">优质商户<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">筛选<text class="iconfont icon-filter"></text></view>
</view>
</view>
<!--为您推荐福利&&服务-->
<view class="introBox hasMenu">
<view class="normal_tit padding_20">为您推荐</view>
<view class="intro_column" v-for="item in activityList" :key="item.id" @tap="gotoDetail(item.id)">
<view class="imgOuter"><image mode="aspectFill" :src="item.active_playbill"></image><view class="i_intro">推荐</view></view>
<view class="columnInfo">
<view class="title">{{item.active_name}}</view>
<view class="tags">
<text v-for="(sub, subIdx) in item.active_tag" :key="subIdx">{{sub}}</text>
</view>
<view class="subInfo">{{item.start_date}}{{item.end_date}}</view>
<view class="subInfo">{{item.address}}</view>
<view class="price">
<text class="font_red" v-if="Number(item.money) > 0">{{item.money}}</text>
<text class="free" v-else></text>
<view class="shareMoney" v-if="Number(item.money) > 0">
<text>分享金</text>{{ Number(item.money) }}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {weixin, login} from '../../utils/weixin.js';
export default {
data() {
return {
indicatorDots: true,
autoplay: true,
interval: 4000,
activityList: [],
activitySelect:{
page:1,
page_size:5,
myself:0
},
indexNav: [],
serviceList: [],
ads: [],
page: 1,
}
},
onLoad() {
// login()
},
onShow() {
this.getAdS()
this.getActivityList()
this.getNav()
// this.getServiceList()
},
onReachBottom() {
this.getActivityList()
},
methods: {
toAction: function(item) {
console.log(item)
if (item.link) {
uni.redirectTo({
url: item.link
})
} else {
uni.showToast({
icon: "none",
title: "建设中"
})
}
},
async getNav(code) {
await weixin.request({
newUrl: true,
api: '/api/member/applet-menu-first/index',
data: {
page: 1,
page_size: 8,
sort_name: "sort_number",
sort_type: "asc"
},
utilSuccess: (res) => {
this.indexNav = res.data;
}
})
},
getActivityList() {
weixin.request({
api:"/api/member/active-list",
data:this.activitySelect,
utilSuccess:res => {
if(res.data.length > 0){
this.activitySelect.page ++
}else{
uni.showToast({
icon:'none',
title:"没有更多了"
})
}
if(this.activitySelect.page === 1){
this.activityList = res.data
}else{
this.activityList.push(...res.data)
}
console.log(res);
},
utilFail:err => {
console.log(err);
}
})
},
getServiceList() {
// weixin.request({
// api:"/api/member/active-list",
// data:{
// },
// utilSuccess:res => {
// console.log(res);
// },
// utilFail:err => {
// console.log(err);
// }
// })
},
getAdS() {
this.ads = []
weixin.request({
newUrl: true,
api: '/api/member/other/advertisement',
data: {
origin_system: 1
},
utilSuccess: (res) => {
res.map(item => {
if (item.type === 0) {
this.ads.push({
id: item.id,
pic: item.pic,
action: item.action
})
}
})
},
utilFail: (err) => {
console.log(err, 'err');
}
})
},
gotoDetail(id) {
uni.navigateTo({
url: `/pages/active/detail?id=${id}`
})
}
}
}
</script>
<style>
page {
background-color: #F6F6F6;
}
</style>
<style lang="scss" scoped>
.activeTop{
width:100%;
height:342rpx;
background: linear-gradient(180deg, #FF578A 0%, rgba(255, 87, 138, 0) 100%);
}
.searchBox{
padding:20rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.searchCol{
width: 600rpx;
height:72rpx;
background-color: #fff;
border-radius:36rpx;
position: relative;
line-height:72rpx;
padding:0 30rpx;
box-sizing: border-box;
}
.searchCol .iconfont{
color:#999;
font-size:25rpx;
}
.searchCol input{
position: absolute;
width:100%;
height:100%;
top:0;
left:0;
background: translate;
padding:0 70rpx;
box-sizing: border-box;
font-size:24rpx;
}
.icon-w_location-{
font-size:50rpx;
color:#fff;
}
.album_swiper{
width:690rpx;
height:220rpx;
border-radius:20rpx;
margin: 0 auto;
swiper{
height:calc(690rpx/3.13);
border-radius:20rpx;
image{
height:100%;
border-radius:20rpx;
}
}
}
.menuBox{
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: center;
width:690rpx;
margin:0 auto 10rpx auto;
box-sizing: border-box;
.menuCol{
width:25%;
text-align: center;
font-size:24rpx;
color:#333;
margin-top:34rpx;
image{
display: block;
width:94rpx;
height:94rpx;
margin: 0 auto 10rpx auto;
}
}
}
.introBox{
width:710rpx;
margin:20rpx auto 0 auto;
border-radius: 16rpx;
background: #fff;
padding:0 35rpx;
box-sizing: border-box;
}
.intro_row{
display: flex;
justify-content: space-between;
width:100%;
}
.row_col{
width:310rpx;
border-radius: 8rpx;
padding-bottom:20rpx;
.imgOuter{
width:310rpx;
height:230rpx;
position: relative;
image{
width:310rpx;
height:230rpx;
border-radius:8rpx 8rpx 0 0;
}
.date{
background-color: rgba(0,0,0,0.3);
font-size:20rpx;
color:#fff;
line-height:32rrpx;
padding:0 8rpx;
border-radius: 5rpx;
position: absolute;
left: 20rpx;
bottom:20rpx;
font-weight:500;
}
}
.title{
width:100%;
font-size:28rpx;
color:#333;
font-weight:500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top:20rpx;
}
.subTit{
width:100%;
font-size:22rpx;
color:#333;
font-weight:400;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top:10rpx;
}
.price{
margin-top:20rpx;
font-size:22rpx;
color:#999;
text{
font-size:32rpx;
font-weight:400;
padding-right:15rpx;
}
}
}
.introBox .intro_column:last-child{border-bottom:none;}
.intro_column{
display: flex;
justify-content: flex-start;
padding:20rpx 0;
border-bottom:2rpx solid #EAEAEA;
.imgOuter{
width: 260rpx;
height:210rpx;
position: relative;
image{width:260rpx;height:210rpx;border-radius:5rpx;}
.i_intro{position: absolute;top:0;left:0;width: 68rpx;height: 32rpx;background: #FF578A;border-radius: 5rpx 0px 18rpx 5rpx;font-size: 22rpx;font-weight: 400;color: #FFFFFF;line-height: 32rpx;text-align: center;}
}
.columnInfo{
width:360rpx;
margin-left:22rpx;
.title{
width:100%;
font-size:30rpx;
font-weight:bold;
color:#333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.tags text{
height: 28rpx;
background: rgba(255,177,62,0.1);
border-radius: 4rpx;
line-height:28rpx;
font-size:20rpx;
padding: 0 10rpx;
margin-right:10rpx;
color:#FF753E;
}
.subInfo{
width:100%;
font-size:24rpx;
color:#999;
font-weight:400;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top:5rpx;
.font_red{margin-left:10rpx;}
}
.price{
display: flex;
justify-content: flex-start;
align-items: center;
align-content: center;
margin-top:8rpx;
text{margin-right:10rpx;}
.shareMoney{
height: 28rpx;
border:2rpx solid #FF578A;
border-radius: 4rpx;
line-height:28rpx;
font-size:20rpx;
margin-right:10rpx;
padding-right:10rpx;
color:#FF578A;
display: flex;
flex-direction: flex-start;
text{background: #FF578A;color:#fff;padding: 0 10rpx;}
}
.free{
height: 28rpx;
background: #FF753E;
border-radius: 4rpx;
line-height:28rpx;
font-size:20rpx;
padding: 0 10rpx;
margin-right:10rpx;
color:#fff;
}
}
}
}
.termBox{
width: 750rpx;
height: 200rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 70%, rgba(255, 255, 255, 0) 100%);
border-radius: 40rpx 40rpx 0px 0px;
margin-top:20rpx;
.termOuter{
display: flex;
align-items: center;
align-content: center;
justify-content: flex-start;
.termCol{
width:27%;
text-align:center;
font-size: 28rpx;
font-weight: 400;
color: #333333;
padding-top:36rpx;
.iconfont{font-size: 24rpx;color: #666666;line-height:28rpx;margin-left:8rpx;}
}
.termCol.cur{
color:#FF578A;
.iconfont{color: #FF578A;}
}
.termCol:last-child{width:19%;}
}
}
.hasMenu{margin-top:-100rpx;}
</style>

@ -1,475 +1,527 @@
<template> <template>
<view class="content"> <view class="content">
<view class="activeTop"> <!--nav bar-->
<view class="searchBox"> <view class="navbar">
<view class="searchCol"> <view class="navbar-fixed">
<view class="iconfont icon-search1"></view> <!-- statusHeight 状态栏的高度 蓝色区块-->
<input type="text" placeholder="请输入"> <view class="statusHeight" :style="{ height: statusBarHeight + 'px' }"></view>
</view> <!-- navcontent tabbar导航栏高度 绿色区块-->
<view class="iconfont icon-w_location-"></view> <view class="navcontent" :style="{ height: navBarHeight + 'px' }">
</view> <view class="iconfont icon-arrow-left-bold" @click="toback"></view>
<view class="album_swiper"> <view class="input-view">
<swiper :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-dots="true" indicator-active-color="rgba(255,255,255,0.5)" indicator-color="rgba(255,255,255,1)"> <input confirm-type="search" v-model="keyword" class="nav-bar-input" type="text"
<swiper-item v-for="item in ads" :key="item.id"> placeholder="输入搜索关键词" @confirm="confirm">
<image :src="item.pic"></image>
</swiper-item>
</swiper>
</view>
</view>
<view class="menuBox">
<block v-for="item in indexNav" :key="item.id">
<view class="menuCol" @click="toAction(item)" data-id="-1">
<image :src="item.icon"></image>
<view>{{item.name}}</view>
</view>
</block>
</view>
<!--为您精选活动-->
<view class="introBox">
<view class="normal_tit">为您精选</view>
<view class="intro_row">
<view class="row_col" v-for="item in activityList.slice(0,2)" :key="item.id" @tap="gotoDetail(item.id)">
<view class="imgOuter">
<image mode="aspectFill" :src="item.active_playbill"></image>
<view class="date">{{item.end_at}}</view>
</view>
<view class="title">{{item.active_name}}</view>
<view class="subTit">{{item.address}}</view>
<view class="price">
<text class="font_red">{{ Number(item.money) > 0 ? `${item.money}` : '免费' }}</text>
{{`${item.total+item.start_member_sum}人参与`}}
</view> </view>
</view> </view>
</view> </view>
</view> <!-- 占位盒子 它的高度=状态栏高度+导航栏高度-->
<view class="termBox"> <view class="placeholder" :style="{ height: navBarHeight + statusBarHeight + 'px', background: 'red' }">
<view class="termOuter">
<view class="termCol cur">综合排序<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">距离最近<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">优质商户<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">筛选<text class="iconfont icon-filter"></text></view>
</view> </view>
</view> <view class="termBox">
<!--为您推荐福利&&服务--> <!-- <view class="termOuter">
<view class="introBox hasMenu"> <view class="termCol cur">综合排序<text class="iconfont icon-arrowbottom"></text></view>
<view class="normal_tit padding_20">为您推荐</view> <view class="termCol">距离最近<text class="iconfont icon-arrowbottom"></text></view>
<view class="intro_column" v-for="item in activityList" :key="item.id" @tap="gotoDetail(item.id)"> <view class="termCol">优质商户<text class="iconfont icon-arrowbottom"></text></view>
<view class="imgOuter"><image mode="aspectFill" :src="item.active_playbill"></image><view class="i_intro">推荐</view></view> <view class="termCol">筛选<text class="iconfont icon-filter"></text></view>
<view class="columnInfo"> </view> -->
<view class="title">{{item.active_name}}</view> </view>
<view class="tags"> <view class="shopContent">
<text v-for="(sub, subIdx) in item.active_tag" :key="subIdx">{{sub}}</text> <!--为您推荐-->
</view> <u-empty v-if="dataList.length==0" marginTop="250"></u-empty>
<view class="subInfo">{{item.start_date}}{{item.end_date}}</view> <view class="introBox hasMenu" v-if="dataList.length>0">
<view class="subInfo">{{item.address}}</view> <block v-for="(item,index) in dataList">
<view class="price"> <view class="intro_column" @tap="gotoDetail" :data-id="item.id">
<text class="font_red" v-if="Number(item.money) > 0">{{item.money}}</text> <view class="imgOuter">
<text class="free" v-else></text> <image :src="item.active_playbill"></image>
<view class="shareMoney" v-if="Number(item.money) > 0"> <!-- <view class="i_intro">{{item.product_type.name}}</view> -->
<text>分享金</text>{{ Number(item.money) }} </view>
<view class="columnInfo">
<view class="title">{{item.active_name}}</view>
<view class="discuss">
<view class="starBox">
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png">
</image>
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png">
</image>
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png">
</image>
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png">
</image>
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png">
</image>
</view>
</view>
<view class="subInfo">{{item.address}}</view>
<view class="menu">{{item.start_date}} {{item.end_date}}</view>
</view>
</view> </view>
</view> </block>
</view> </view>
</view> </view>
</view> </view>
<!--nav end-->
</view> </view>
</template> </template>
<script> <script>
import {weixin, login} from '../../utils/weixin.js'; import {
weixin
} from '@/utils/weixin.js';
export default { export default {
data() { data() {
return { return {
indicatorDots: true, statusBarHeight: 20, //20px
autoplay: true, menuBarHeight: 32, //
interval: 4000, navBarHeight: 44, //uniapp 44H5 44
activityList: [], keyword: "",
activitySelect:{ dataList: [],
page:1, currentPage: 1,
page_size:5, product_type_id: 0,
myself:0 isLoading: false
},
indexNav: [],
serviceList: [],
ads: [],
page: 1,
} }
}, },
onLoad() { onShareAppMessage() {
// login() var url = 'packages/packageBuy/pages/shopList/shopList';
console.log(url)
return {
title: "福利集合",
path: url
}
}, },
onShow() { onShareTimeline() {
this.getAdS() var url = 'packages/packageBuy/pages/shopList/shopList';
this.getActivityList() return {
this.getNav() title: "福利集合",
// this.getServiceList() path: url,
}
}, },
onReachBottom() { onReachBottom: function(e) {
this.getActivityList() if (!this.isLoading) {
console.log("onReachBottom", this.currentPage + 1)
this.loadPage(this.currentPage + 1);
}
}, },
methods: { onPullDownRefresh: function(e) {
toAction: function(item) { console.log("onPullDownRefresh", this.currentPage + 1)
console.log(item) if (!this.isLoading) {
if (item.link) { this.loadPage(this.currentPage + 1);
uni.redirectTo({ }
url: item.link },
}) onLoad(options) {
} else { // https://uniapp.dcloud.io/api/system/info
uni.showToast({ let res = uni.getSystemInfoSync();
icon: "none",
title: "建设中" console.log('状态栏的高度', res.statusBarHeight);
}) this.statusBarHeight = res.statusBarHeight;
}
}, // #ifdef MP-WEIXIN
async getNav(code) { //
await weixin.request({ let menuBottonInfo = uni.getMenuButtonBoundingClientRect();
newUrl: true, //
api: '/api/member/applet-menu-first/index', this.menuBarHeight = menuBottonInfo.height;
data: { // - + - = ++
page: 1, this.navBarHeight = menuBottonInfo.bottom - res.statusBarHeight + (menuBottonInfo.top - res.statusBarHeight);
page_size: 8, // #endif
sort_name: "sort_number",
sort_type: "asc" if (options.promotion_id) {
}, uni.setStorageSync("base_promotion_id", options.promotion_id)
utilSuccess: (res) => { }
this.indexNav = res.data; if (options.product_type_id) {
} this.product_type_id = options.product_type_id
}) }
}, if (options.keyword) {
getActivityList() { this.keyword = options.keyword;
weixin.request({ }
api:"/api/member/active-list",
data:this.activitySelect, this.loadPage(1);
utilSuccess:res => { },
if(res.data.length > 0){ onShow() {},
this.activitySelect.page ++ methods: {
}else{ toback: function() {
uni.showToast({ let route = getCurrentPages();
icon:'none', console.log(route)
title:"没有更多了" if (route.length > 1) {
}) uni.navigateBack({
} delta: 1
if(this.activitySelect.page === 1){ })
this.activityList = res.data } else {
}else{ uni.switchTab({
this.activityList.push(...res.data) url: "/pages/home/home"
} })
console.log(res); }
},
utilFail:err => {
console.log(err);
}
})
},
getServiceList() {
// weixin.request({
// api:"/api/member/active-list",
// data:{
// },
// utilSuccess:res => {
// console.log(res);
// },
// utilFail:err => {
// console.log(err);
// }
// })
}, },
getAdS() { confirm: function() {
this.ads = [] this.loadPage(1);
weixin.request({
newUrl: true,
api: '/api/member/other/advertisement',
data: {
origin_system: 1
},
utilSuccess: (res) => {
res.map(item => {
if (item.type === 0) {
this.ads.push({
id: item.id,
pic: item.pic,
action: item.action
})
}
})
},
utilFail: (err) => {
console.log(err, 'err');
}
})
}, },
gotoDetail(id) { gotoDetail: function(e) {
var id = e.currentTarget.dataset.id
uni.navigateTo({ uni.navigateTo({
url: `/pages/active/detail?id=${id}` url: "/pages/active/detail?id=" + id
}) })
},
loadPage: function(page) {
uni.hideKeyboard()
var that = this;
that.isLoading = true;
weixin.request({
bindThis: that,
api: '/api/member/active-list',
customLoading: false,
data: {
page: page,
page_size: 6,
keyword: that.keyword,
},
utilSuccess: function(r) {
var res = r.data;
that.isLoading = false;
var hasNoMore = r.total < 6 && page > 1;
console.log("hasNoMore", hasNoMore)
if (hasNoMore || res.length == 0 && page > 1) {
uni.stopPullDownRefresh(); // < ,
//
uni.showToast({
title: '已加载到最后一页',
icon: 'none'
});
return;
}
var dataList = that.dataList;
for (var m of res) {
if (m.created_at.indexOf('T') > 0)
m.created_at = m.created_at.split("T")[0] + " " + m.created_at.split("T")[
1].split(".")[0];
m.poster = (weixin.isNull(m.poster) ? "../../static/rishang.png" : m
.poster_url)
}
if (page == 1) {
dataList = res;
} else {
dataList.push(...res);
}
that.currentPage = page;
that.dataList = dataList;
},
utilFail: function(res) {
if (page == 1) {
that.currentPage = page;
that.orders = [];
}
util.alert(res);
}
});
} }
} }
} }
</script> </script>
<style> <style>
page { page {
background-color: #F6F6F6; display: flex
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar {
.activeTop{
width:100%;
height:342rpx;
background: linear-gradient(180deg, #FF578A 0%, rgba(255, 87, 138, 0) 100%);
}
.searchBox{
padding:20rpx 30rpx;
display: flex; display: flex;
justify-content: space-between; flex-direction: column;
align-items: center; flex: 1;
} overflow: hidden;
.searchCol{
width: 600rpx; .navbar-fixed {
height:72rpx; position: fixed;
background-color: #fff; top: 0;
border-radius:36rpx; left: 0;
position: relative; z-index: 99;
line-height:72rpx; width: 100%;
padding:0 30rpx; background-color: #fff;
box-sizing: border-box;
} .statusHeight {
.searchCol .iconfont{ background-color: #fff;
color:#999;
font-size:25rpx;
}
.searchCol input{
position: absolute;
width:100%;
height:100%;
top:0;
left:0;
background: translate;
padding:0 70rpx;
box-sizing: border-box;
font-size:24rpx;
}
.icon-w_location-{
font-size:50rpx;
color:#fff;
}
.album_swiper{
width:690rpx;
height:220rpx;
border-radius:20rpx;
margin: 0 auto;
swiper{
height:calc(690rpx/3.13);
border-radius:20rpx;
image{
height:100%;
border-radius:20rpx;
} }
}
} .navcontent {
.menuBox{ background-color: #fff;
display: flex; display: flex;
flex-wrap: wrap; justify-content: flex-start;
justify-content: space-evenly; align-items: center;
align-items: center; align-content: center;
width:690rpx;
margin:0 auto 10rpx auto; .iconfont {
box-sizing: border-box; margin: 0 20rpx;
.menuCol{ font-size: 40rpx;
width:25%; color: #333;
text-align: center; }
font-size:24rpx;
color:#333;
margin-top:34rpx;
image{
display: block;
width:94rpx;
height:94rpx;
margin: 0 auto 10rpx auto;
} }
} }
.shopContent {
box-sizing: border-box;
height: 100%;
flex: 1;
overflow: hidden;
}
.scroll-y-item {
height: 100%;
}
} }
.introBox{
width:710rpx; .input-view {
margin:20rpx auto 0 auto; line-height: 64rpx;
width: 450rpx;
height: 64rpx;
background: #EEEEEE;
border-radius: 32rpx;
font-size: 28rpx;
color: #333;
box-sizing: border-box;
position: relative;
.nav-bar-input {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 0 30rpx;
box-sizing: border-box;
}
}
.introBox {
width: 710rpx;
margin: 20rpx auto 0 auto;
border-radius: 16rpx; border-radius: 16rpx;
background: #fff; background: #fff;
padding:0 35rpx; padding: 0 24rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.intro_row{
display: flex; .introBox .intro_column:last-child {
justify-content: space-between; border-bottom: none;
width:100%;
} }
.row_col{
width:310rpx; .intro_column {
border-radius: 8rpx; display: flex;
padding-bottom:20rpx; justify-content: flex-start;
.imgOuter{ padding: 20rpx 0;
width:310rpx; border-bottom: 2rpx solid #EAEAEA;
height:230rpx;
.imgOuter {
width: 260rpx;
height: 210rpx;
position: relative; position: relative;
image{
width:310rpx; image {
height:230rpx; width: 260rpx;
border-radius:8rpx 8rpx 0 0; height: 210rpx;
}
.date{
background-color: rgba(0,0,0,0.3);
font-size:20rpx;
color:#fff;
line-height:32rrpx;
padding:0 8rpx;
border-radius: 5rpx; border-radius: 5rpx;
}
.i_intro {
position: absolute; position: absolute;
left: 20rpx; top: 0;
bottom:20rpx; left: 0;
font-weight:500; //width: 68rpx;
padding: 0rpx 10rpx;
height: 32rpx;
background: #FF578A;
border-radius: 5rpx 0px 18rpx 5rpx;
font-size: 22rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 32rpx;
text-align: center;
} }
} }
.title{
width:100%; .columnInfo {
font-size:28rpx; width: 360rpx;
color:#333; margin-left: 22rpx;
font-weight:500;
overflow: hidden; .discuss {
white-space: nowrap; margin: 13rpx 0 !important;
text-overflow: ellipsis;
padding-top:20rpx;
}
.subTit{
width:100%;
font-size:22rpx;
color:#333;
font-weight:400;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top:10rpx;
}
.price{
margin-top:20rpx;
font-size:22rpx;
color:#999;
text{
font-size:32rpx;
font-weight:400;
padding-right:15rpx;
} }
}
} .menu {
.introBox .intro_column:last-child{border-bottom:none;} font-size: 24rpx;
.intro_column{ color: #333;
display: flex; margin-top: 10rpx;
justify-content: flex-start;
padding:20rpx 0; .hui {
border-bottom:2rpx solid #EAEAEA; margin-right: 8rpx;
.imgOuter{ display: inline-block;
width: 260rpx; width: 30rpx;
height:210rpx; height: 30rpx;
position: relative; background: #FF753E;
image{width:260rpx;height:210rpx;border-radius:5rpx;} border-radius: 2rpx;
.i_intro{position: absolute;top:0;left:0;width: 68rpx;height: 32rpx;background: #FF578A;border-radius: 5rpx 0px 18rpx 5rpx;font-size: 22rpx;font-weight: 400;color: #FFFFFF;line-height: 32rpx;text-align: center;} font-size: 22rpx;
} color: #FFFFFF;
.columnInfo{ text-align: center;
width:360rpx; line-height: 30rpx;
margin-left:22rpx; }
.title{ }
width:100%;
font-size:30rpx; .title {
font-weight:bold; width: 100%;
color:#333; font-size: 30rpx;
font-weight: bold;
color: #333;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.tags text{
.tags text {
height: 28rpx; height: 28rpx;
background: rgba(255,177,62,0.1); background: rgba(255, 177, 62, 0.1);
border-radius: 4rpx; border-radius: 4rpx;
line-height:28rpx; line-height: 28rpx;
font-size:20rpx; font-size: 20rpx;
padding: 0 10rpx; padding: 0 10rpx;
margin-right:10rpx; margin-right: 10rpx;
color:#FF753E; color: #FF753E;
} }
.subInfo{
width:100%; .subInfo {
font-size:24rpx; width: 100%;
color:#999; font-size: 24rpx;
font-weight:400; color: #999;
font-weight: 400;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
padding-top:5rpx; padding-top: 5rpx;
.font_red{margin-left:10rpx;}
.font_red {
margin-left: 10rpx;
}
} }
.price{
.price {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
align-content: center; align-content: center;
margin-top:8rpx; margin-top: 8rpx;
text{margin-right:10rpx;}
.shareMoney{ text {
margin-right: 10rpx;
}
.shareMoney {
height: 28rpx; height: 28rpx;
border:2rpx solid #FF578A; border: 2rpx solid #FF578A;
border-radius: 4rpx; border-radius: 4rpx;
line-height:28rpx; line-height: 28rpx;
font-size:20rpx; font-size: 20rpx;
margin-right:10rpx; margin-right: 10rpx;
padding-right:10rpx; padding-right: 10rpx;
color:#FF578A; color: #FF578A;
display: flex; display: flex;
flex-direction: flex-start; flex-direction: flex-start;
text{background: #FF578A;color:#fff;padding: 0 10rpx;}
text {
background: #FF578A;
color: #fff;
padding: 0 10rpx;
}
} }
.free{
.free {
height: 28rpx; height: 28rpx;
background: #FF753E; background: #FF753E;
border-radius: 4rpx; border-radius: 4rpx;
line-height:28rpx; line-height: 28rpx;
font-size:20rpx; font-size: 20rpx;
padding: 0 10rpx; padding: 0 10rpx;
margin-right:10rpx; margin-right: 10rpx;
color:#fff; color: #fff;
} }
} }
} }
} }
.termBox{
.termBox {
width: 750rpx; width: 750rpx;
height: 200rpx; // height: 100rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 70%, rgba(255, 255, 255, 0) 100%); background: #fff;
border-radius: 40rpx 40rpx 0px 0px;
margin-top:20rpx; .termOuter {
.termOuter{
display: flex; display: flex;
align-items: center; align-items: center;
align-content: center; align-content: center;
justify-content: flex-start; justify-content: flex-start;
.termCol{
width:27%; .termCol {
text-align:center; width: 27%;
text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
padding-top:36rpx; padding-top: 36rpx;
.iconfont{font-size: 24rpx;color: #666666;line-height:28rpx;margin-left:8rpx;}
.iconfont {
font-size: 24rpx;
color: #666666;
line-height: 28rpx;
margin-left: 8rpx;
}
} }
.termCol.cur{
color:#FF578A; .termCol.cur {
.iconfont{color: #FF578A;} color: #FF578A;
.iconfont {
color: #FF578A;
}
} }
.termCol:last-child{width:19%;}
.termCol:last-child {
width: 19%;
}
} }
} }
.hasMenu{margin-top:-100rpx;}
</style> .discuss {
display: flex;
justify-content: flex-start;
margin: 25rpx 0;
position: relative;
align-items: center;
align-content: center;
.dis_l {
font-size: 28rpx;
color: #333;
font-weight: 500;
padding-top: 5rpx;
margin-right: 32rpx;
}
.starBox {
display: flex;
justify-content: flex-start;
image {
display: block;
width: 26rpx;
height: 26rpx;
margin-right: 8rpx;
}
}
}
</style>

@ -106,7 +106,7 @@
<u-col span="4"> <u-col span="4">
<view> <view>
<image mode="heightFix" src="../../static/icon_xingming@2x.png"></image> <image mode="heightFix" src="../../static/icon_xingming@2x.png"></image>
参与人数: 活动人数:
</view> </view>
</u-col> </u-col>
<u-col span="8" v-if="info.member_sum"> <u-col span="8" v-if="info.member_sum">

Loading…
Cancel
Save