Browse Source

合并修改,首页修改

master
杨豪 3 years ago
parent
commit
f9cc1ac72b
  1. 23
      api/home.js
  2. 33
      api/store.js
  3. 169
      components/quick-skeleton/quick-skeleton.vue
  4. 19
      components/vSwiper.vue
  5. 4
      config/index.js
  6. 1
      pages.json
  7. 3
      pages/Loading/index.vue
  8. 2
      pages/activity/detail/index.vue
  9. 1475
      pages/home/index.vue
  10. 759
      pages/home/index2.vue
  11. 2
      pages/life/articleDetail/index.vue
  12. 2
      pages/life/articleList/index.vue
  13. 518
      pages/life/index.vue
  14. 2
      pages/user/index.vue
  15. 2
      pages/user/mine/index.vue
  16. BIN
      static/images/life-bg.png
  17. BIN
      static/images/shareImg.png
  18. BIN
      static/images/user/tyg-img.png

23
api/home.js

@ -0,0 +1,23 @@
import request from '@/utils/request'
export function getIndexData(q){
return request.get('index', q, {login: false})
}
/*
* 文章列表
* */
export function getArticle(q) {
return request.get("/article/list", q, {
login: false
});
}
/*
* 文章详情
* */
export function getArticleDetail(q) {
return request.get("/article/details/" + q.id);
}

33
api/store.js

@ -136,6 +136,20 @@ export function getCartNum() {
return request.get("/cart/count");
}
// 最新活动
export function getActivity(data) {
return request.get("/life/index", data, {
login: true
});
}
/*
* 添加收藏
* */
@ -267,22 +281,3 @@ export function storeListApi(data) {
});
}
/*
* 文章列表
* */
export function getArticle(q) {
return request.get("/article/list", q, {
login: false
});
}
/*
* 文章详情
* */
export function getArticleDetail(q) {
return request.get("/article/details/" + q.id,{
login: false
});
}

169
components/quick-skeleton/quick-skeleton.vue

@ -0,0 +1,169 @@
<template>
<view :style="{width: systemInfo.width + 'px', height: systemInfo.height + 'px', backgroundColor: bgcolor, position: 'absolute', left: 0, top: 0, zIndex: 9998, overflow: 'hidden'}">
<view v-for="(item,rect_idx) in skeletonRectLists" :key="rect_idx + 'rect'" :class="[loading == 'chiaroscuro' ? 'chiaroscuro' : '']" :style="{width: item.width + 'px', height: item.height + 'px', backgroundColor: 'rgb(194, 207, 214)', position: 'absolute', left: item.left + 'px', top: item.top + 'px'}"></view>
<view v-for="(item,circle_idx) in skeletonCircleLists" :key="circle_idx + 'circle'" :class="loading == 'chiaroscuro' ? 'chiaroscuro' : ''" :style="{width: item.width + 'px', height: item.height + 'px', backgroundColor: 'rgb(194, 207, 214)', borderRadius: item.width + 'px', position: 'absolute', left: item.left + 'px', top: item.top + 'px'}"></view>
<view class="spinbox" v-if="loading == 'spin'">
<view class="spin"></view>
</view>
</view>
</template>
<script>
export default {
name: "skeleton",
props: {
bgcolor: {
type: String,
value: '#FFF'
},
selector: {
type: String,
value: 'skeleton'
},
loading: {
type: String,
value: 'spin'
},
show: {
type: Boolean,
value: false
}
},
data() {
return {
loadingAni: ['spin', 'chiaroscuro'],
systemInfo: {},
skeletonRectLists: [],
skeletonCircleLists: []
}
},
watch: {
show() {
this.attachedAction();
this.readyAction();
}
},
methods: {
attachedAction: function(){
//
const systemInfo = uni.getSystemInfoSync();
this.systemInfo = {
width: systemInfo.windowWidth,
height: systemInfo.windowHeight
};
this.loading = this.loadingAni.includes(this.loading) ? this.loading : 'spin';
},
readyAction: function(){
const that = this;
//
uni.createSelectorQuery().selectAll(`.${this.selector}`).boundingClientRect().exec(function(res){
that.systemInfo.height = res[0][0].height + res[0][0].top;
});
//
this.rectHandle();
//
this.radiusHandle();
},
rectHandle: function(){
const that = this;
//
uni.createSelectorQuery().selectAll(`.${this.selector}-rect`).boundingClientRect().exec(function(res){
that.skeletonRectLists = res[0];
});
},
radiusHandle(){
const that = this;
uni.createSelectorQuery().selectAll(`.${this.selector}-radius`).boundingClientRect().exec(function(res){
that.skeletonCircleLists = res[0];
});
}
}
}
</script>
<style>
.spinbox{
position: fixed;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
z-index: 9999
}
.spin {
display: inline-block;
width: 64rpx;
height: 64rpx;
}
.spin:after {
content: " ";
display: block;
width: 46rpx;
height: 46rpx;
margin: 1rpx;
border-radius: 50%;
border: 5rpx solid #409eff;
border-color: #409eff transparent #409eff transparent;
animation: spin 1.2s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.chiaroscuro{
width: 100%;
height: 100%;
background: rgb(194, 207, 214);
animation-duration: 2s;
animation-name: blink;
animation-iteration-count: infinite;
}
@keyframes blink {
0% {
opacity: .4;
}
50% {
opacity: 1;
}
100% {
opacity: .4;
}
}
@keyframes flush {
0% {
left: -100%;
}
50% {
left: 0;
}
100% {
left: 100%;
}
}
.shine {
animation: flush 2s linear infinite;
position: absolute;
top: 0;
bottom: 0;
width: 100%;
background: linear-gradient(to left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, .85) 50%,
rgba(255, 255, 255, 0) 100%
)
}
</style>

19
components/vSwiper.vue

@ -1,15 +1,18 @@
<template>
<swiper class="swiper-block" vertical="true" circular="true" previous-margin="90rpx" next-margin="90rpx" current="0" @change="swiperChange">
<block v-for="(item, index) in imgs" :key="index">
<block v-for="(item, index) in articleList" :key="index">
<swiper-item class="swiper-item" :class="(swiperIndex == index ? 'active' : '')" @tap="previewImg">
<view class="item-box" :class="(swiperIndex == index ? 'active' : '')" @click="toDetial(item.id)">
<image mode="aspectFill" :src="item.imageInput" class="slide-image"></image>
<view class="content-box">
<view class="title-box">标题标题标题标题标题</view>
<view class="title-box">{{item.title}}</view>
<view class="content acea-row">
<view>云快讯</view>
<view>3小时钱</view>
<view>300阅读</view>
<view>{{item.author}}</view>
<view>{{item.createTime}}</view>
<view class="acea-row row-middle">
<text>{{item.visit}}</text>
<image src="../static/images/eye.png" class="eye"></image>
</view>
</view>
</view>
</view>
@ -21,7 +24,7 @@
<script>
export default{
props: {
imgs: {
articleList: {
type: Array,
default: []
}
@ -104,4 +107,8 @@
border-radius: 20rpx;
z-index: 20;
}
.eye{
width: 24rpx;
height: 24rpx;
}
</style>

4
config/index.js

@ -1,7 +1,7 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api'
// export const VUE_APP_API_URL = 'http://192.168.0.111:8092/api'
// export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api'
export const VUE_APP_API_URL = 'http://192.168.0.111:8092/api'
// export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api'
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'

1
pages.json

@ -255,7 +255,6 @@
{
"path": "pages/life/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "生活",
"enablePullDownRefresh": true
}

3
pages/Loading/index.vue

@ -25,6 +25,9 @@ export default {
data() {
return {}
},
onLoad() {
},
onShow() {
// console.log('getUser',this.userInfo)
var url = handleQrCode()

2
pages/activity/detail/index.vue

@ -109,7 +109,7 @@ export default {
*/
onLoad: function (options) {
let erCodeId = uni.getStorageSync('activityId');
console.log(options)
if (options.id) {
this.setData({
activityId: options.id

1475
pages/home/index.vue

File diff suppressed because it is too large Load Diff

759
pages/home/index2.vue

@ -0,0 +1,759 @@
<template>
<view class="home-page">
<view class="top-bg-box" @tap="toGuidePage">
<image src="https://download.cyjyyjy.com/index-top-bg2.png"></image>
</view>
<!-- <view class="page-top-box">
<image src="../../images/home/top-bg.png" class="top-bg"></image>
<view class="page-title" style="top:{{menuTop}}px;height:{{menuHeight}}px;line-height: {{menuHeight}}px;">禅意云生态</view>
<view class="top-box-content" style="top: {{CustomBar + menuHeight}}rpx;">
<view class="search-box acea-row row-between-wrapper">
<view class="localtion-box acea-row row-middle">
<image src="../../images/home/localtion.png"></image>
<text>{{city}}</text>
</view>
<view class="search acea-row row-middle">
<image src="../../images/home/search.png"></image>
<text>大家都在搜 APP开发</text>
</view>
<image class="message-icon" src="../../images/home/message.png"></image>
</view>
<view class="home-menu-box">
<view class="menu-list acea-row row-between">
<view class="menu-item acea-row row-column row-middle" wx:for="{{menuList}}" wx:key="index">
<image src="{{item.icon}}"></image>
<text>{{item.text}}</text>
</view>
</view>
</view>
</view>
</view> -->
<!-- 招商会 -->
<view class="investment-box">
<view class="investment-title-box acea-row row-between-wrapper">
<view class="acea-row">
<text class="fz32">热门活动</text>
<view class="hot"></view>
</view>
<!-- <view class="more acea-row row-middle">
<text>全部</text>
<image src="/static/images/home/arrow-r.png"></image>
</view> -->
</view>
<view class="investement-list">
<scroll-view class="scroll-view_H" scroll-x="true">
<view v-for="(item, index) in recommendActivity" :key="index" class="investment-item" @tap="toActiveDetail" :data-id="item.id">
<image class="item-bg" :src="item.images" mode="aspectFill"></image>
<view class="tips-box acea-row row-right">
<view v-for="(flag, index2) in spl.spl(item.flag)" :key="index2" :class="'tips-item ' + (index2%2 == 0 ? 'bg2' : '' )" v-if="index2 < 3">{{flag}}</view>
</view>
<view class="item-info-box acea-row row-column row-center">
<view class="address-box line1">
<image src="/static/images/home/localtion.png"></image>
<text>{{item.address}}</text>
</view>
<view class="time-box">
<image src="/static/images/home/time.png"></image>
<text>{{item.activityStartTime}}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 尊享福利 -->
<!-- <view class="welfare-box">
<view class="welfare-title">尊享福利</view>
<view class="welfare-list-box">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="welfare-item" wx:for="{{3}}" wx:key="index">
<view class="item-box acea-row">
<image src="../../images/home/welfare1.png"></image>
<view class="welfare-info-box acea-row row-column row-between">
<view>
<view class="w-name">保时捷Porsche-Panamera 4S E-Hybrid 行政加长版</view>
<view class="w-address">武汉光谷保时捷中心</view>
</view>
<view>
<view class="w-price">140</view>
<view class="w-oldPrice">市场价约为157</view>
</view>
</view>
<view class="buy-btn">立即抢购</view>
</view>
<view class="item-box acea-row">
<image src="../../images/home/welfare1.png"></image>
<view class="welfare-info-box acea-row row-column row-between">
<view>
<view class="w-name">保时捷Porsche-Panamera 4S E-Hybrid 行政加长版</view>
<view class="w-address">武汉光谷保时捷中心</view>
</view>
<view>
<view class="w-price">140</view>
<view class="w-oldPrice">市场价约为157</view>
</view>
</view>
<view class="buy-btn">立即抢购</view>
</view>
data-i </view>
</scroll-view>
</view>
</view> -->
<!-- 供需模块 -->
<view class="demandhall-box">
<view class="tabs-box acea-row row-around">
<view :class="'tab-item ' + (active == 1 ? 'tab-item-a' : '')" data-i="1" @tap="tabClick">最新供应</view>
<view :class="'tab-item ' + (active == 2 ? 'tab-item-a' : '')" data-i="2" @tap="tabClick">需求广场</view>
<!-- <view class="tab-item {{active == 3 ? 'tab-item-a' : ''}}" data-i="3" bindtap="tabClick">金牌投资人</view> -->
</view>
<view class="list-box" v-if="active == 1">
<view v-for="(item, index) in resourcesList" :key="index" class="item">
<view class="item-top">
<view class="project-name line1">{{item.title}}</view>
<view class="tag">{{item.cname}}</view>
<view class="desc line2">{{item.detailedDescription}}</view>
<view class="buy-btn" @tap="toResourcesDetail" :data-id="item.id">了解详情</view>
</view>
<view class="company-box acea-row">
<image :src="item.enterpriseDto.enterpriseLogo" class="logo"></image>
<view class="company-info acea-row row-column row-between">
<view class="company-name line1 fz28">{{item.enterpriseDto.enterpriseName}}</view>
<view class="company-name line2 fz24">{{item.enterpriseDto.enterpriseTitle}}</view>
<view class="tags-box acea-row">
<!-- <view class="tag-item fz20">网站建设</view> -->
<view class="tag-item fz20 bgG">{{item.cname}}</view>
<!-- <view class="tag-item fz20 bgO">网站建设</view> -->
</view>
</view>
<view class="into-btn acea-row row-center-wrapper" @tap="toCompanyDetail" :data-id="item.enterpriseId">
<image src="/static/images/home/company-icon.png"></image>
<text>进入企业</text>
</view>
</view>
</view>
</view>
<view class="list-box" v-if="active == 2">
<view v-for="(item, index) in demandList" :key="index" class="item" @tap="toNeedDetail" :data-id="item.id">
<view class="item-top">
<view class="project-name">{{item.title}}</view>
<view class="desc line2">{{item.detailedDescription}}</view>
<view class="tags-box tags-box2 acea-row">
<view class="tag-item fz20">{{item.enterpriseDto.cname}}</view>
<!-- <view class="tag-item fz20 bgG">网站建设</view>
<view class="tag-item fz20 bgO">网站建设</view> -->
</view>
<view class="price">{{item.capital}}</view>
</view>
</view>
</view>
</view>
<view class="to-demandhall acea-row row-center row-middle" @tap="toTab2">
<text>更多内容去供需大厅</text>
<image src="/static/images/home/arrow-r.png"></image>
</view>
<tabbar :current="currentTabIndex" @click="tabBarClick"></tabbar>
</view>
</template>
<script module="spl" lang="wxs" src="../../utils/subutil.wxs"></script>
<script>
// index.js
//
const app = getApp();
import util from '../../utils/util';
var QQMapWX = require("../../utils/qqmap-wx-jssdk.min.js");
var qqmapsdk;
import tabbar from "../../tabbarComponent/tabbar";
export default {
data() {
return {
menuList: [
{
icon: "/static/images/home/menu1.png",
text: 'IT制作'
}, {
icon: "/static/images/home/menu2.png",
text: 'logo设计'
}, {
icon: "/static/images/home/menu3.png",
text: '文案策划'
}, {
icon: "/static/images/home/menu4.png",
text: 'app开发'
}, {
icon: "/static/images/home/menu5.png",
text: '装修服务'
}, {
icon: "/static/images/home/menu6.png",
text: '软件定制'
}, {
icon: "/static/images/home/menu7.png",
text: '法律服务'
}, {
icon: "/static/images/home/menu8.png",
text: '小程序'
}, {
icon: "/static/images/home/menu9.png",
text: '网络营销'
}, {
icon: "/static/images/home/menu10.png",
text: '全部分类'
},
],
CustomBar: app.globalData.CustomBar,
menuHeight: app.globalData.menuHeight,
navHeight: app.globalData.navHeight,
menuTop: app.globalData.menuTop,
active: 1,
recommendActivity: [],
demandList: [],
resourcesList: [],
province: '',
city: '',
cagetoryList: "",
latitude: "",
longitude: "",
currentTabIndex: 0
};
},
components: {
tabbar
},
props: {},
onShareAppMessage: function(res) {
return {
title: '禅易云生态',
path: '/pages/home/index',
}
},
onLoad() {
uni.hideTabBar();
// app.globalData.editTabbar();
this.pagePath = '/pages/home/index'
this.getCagetoryList();
qqmapsdk = new QQMapWX({
key: 'UVEBZ-M3VRS-CO4OH-6F5QZ-X7FB7-SVFOX' //key
});
this.getLocation();
},
onPullDownRefresh: function () {
//
this.getCagetoryList();
},
methods: {
tabBarClick(index){
// console.log('tabBar' + index)
this.currentTabIndex = index
},
toGuidePage() {
uni.navigateTo({
url: '/pages/guide/index'
});
},
toActiveDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/activity/detail/index?id=' + id
});
},
tabClick(e) {
this.setData({
active: e.currentTarget.dataset.i
});
},
toTab2() {
uni.switchTab({
url: '/pages/demandHall/index'
});
},
getCagetoryList() {
uni.showNavigationBarLoading();
app.http('get', 'index').then(res => {
if (res.data.success) {
res.data.data.recommendActivity.content.forEach(item => {
item.activityStartTime = util.getWeek(item.activityStartTime);
});
this.setData({
demandList: res.data.data.demandList,
resourcesList: res.data.data.resourcesDtos,
cagetoryList: res.data.data.cagetoryDtos,
recommendActivity: res.data.data.recommendActivity.content
}); //
uni.hideNavigationBarLoading(); //
uni.stopPullDownRefresh();
}
});
},
toResourcesDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/resourcesDetail/index?id=' + id
});
},
toCompanyDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/companyDetail/index?id=' + id
});
},
toNeedDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/needsDetail/index?id=' + id
});
},
getLocation() {
let vm = this;
uni.getLocation({
type: 'wgs84',
success: function (res) {
// console.log(JSON.stringify(res))
var latitude = res.latitude;
var longitude = res.longitude;
var speed = res.speed;
var accuracy = res.accuracy;
vm.getLocal(latitude, longitude);
},
fail: function (res) {
console.log('fail' + JSON.stringify(res));
}
});
},
//
getLocal: function (latitude, longitude) {
let vm = this;
qqmapsdk.reverseGeocoder({
location: {
latitude: latitude,
longitude: longitude
},
success: function (res) {
// console.log(JSON.stringify(res));
let province = res.result.ad_info.province;
let city = res.result.ad_info.city;
vm.setData({
province: province,
city: city,
latitude: latitude,
longitude: longitude
}); // console.log(city)
},
fail: function (res) {
console.log(res);
},
complete: function (res) {// console.log(res);
}
});
}
}
};
</script>
<style>
.home-page{
padding-bottom: 190rpx;
}
.top-bg-box{
width: 750rpx;
height: 420rpx;
}
.top-bg-box image{
width: 100%;
height: 100%;
}
.page-top-box{
width: 100%;
height: 598rpx;
position: relative;
}
.page-title{
width: 100%;
color: #fff;
text-align: center;
position: relative;
}
.top-bg{
width: 100%;
height: 598rpx;
position: absolute;
}
.top-box-content{
position: relative;
}
.search-box{
color: #fff;
font-size: 32rpx;
padding: 0 60rpx 0 40rpx;
}
.localtion-box image{
width: 26rpx;
height: 31rpx;
margin-right: 10rpx;
}
.search{
width: 448rpx;
height: 68rpx;
font-size: 28rpx;
padding: 16rpx 20rpx;
background: rgba(255, 255, 255, 0.38);
border-radius: 8rpx;
}
.search image{
width: 35rpx;
height: 35rpx;
margin-right: 16rpx;
}
.message-icon{
width: 36rpx;
height: 36rpx;
}
.home-menu-box{
width: 670rpx;
height: 286rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 20rpx rgba(151, 69, 34, 0.28);
border-radius: 12rpx;
margin: 28rpx auto 0;
padding: 42rpx;
}
.menu-list{
color: #1D1D1D;
font-size: 24rpx;
}
.menu-item{
width: 20%;
/* margin-right:16rpx; */
margin-bottom: 34rpx;
}
.menu-item:nth-child(5n){
margin-right: 0;
}
.menu-item image{
width: 52rpx;
height: 52rpx;
}
.investment-box{
width: 100%;
padding: 40rpx 0 0 40rpx;
}
.investment-title-box{
width: 100%;
padding-right: 40rpx;
}
.fz32{
font-size: 32rpx;
color: #1D1D1D;
}
.hot{
width: 26rpx;
height: 26rpx;
text-align: center;
line-height: 26rpx;
background: linear-gradient(147deg, #FB7E4A 0%, #FF5100 100%);
border-radius: 8rpx 0px 8rpx 0px;
font-size: 18rpx;
color: #fff;
margin-left: 16rpx;
}
.more{
font-size: 24rpx;
color: #999999;
}
.more image{
width: 9rpx;
height: 16rpx;
margin-left: 12rpx;
margin-top: 2rpx;
}
.investement-list{
width: 100%;
margin-top: 34rpx;
}
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.investment-item{
display: inline-block;
width: 324rpx;
height: 408rpx;
margin-right:20rpx;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
position: relative;
}
.investment-item .item-bg{
width: 324rpx;
height: 408rpx;
position: absolute;
border-radius: 8rpx;
}
.tips-box{
position: relative;
top: 20rpx;
}
.tips-item{
padding: 6rpx 10rpx;
line-height: 28rpx;
font-size: 20rpx;
color: #fff;
background: rgba(255, 81, 0, 0.63);
border-radius: 8rpx;
margin-right: 14rpx;
}
.bg2{
background: rgba(255, 170, 0, 0.63);
}
.item-info-box{
width: 300rpx;
height: 102rpx;
background: rgba(255, 255, 255, 0.8);
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.2);
border-radius: 8rpx;
position: absolute;
bottom: 18rpx;
left: 50%;
margin-left: -150rpx;
font-size: 22rpx;
color: #404040;
}
.item-info-box image{
width: 14rpx;
height: 17rpx;
margin: 0 12rpx 0 12rpx;
}
.welfare-box{
width: 100%;
padding-left: 40rpx;
margin-top: 52rpx;
}
.welfare-title{
font-size: 32rpx;
color: #1D1D1D;
margin-bottom: 38rpx;
}
.welfare-list-box{
width: 100%;
}
.welfare-item{
display: inline-block;
margin-right: 6rpx;
padding: 12rpx;
}
.item-box{
width: 650rpx;
height: 248rpx;
background: #FFFFFF;
box-shadow: 0px 0rpx 12rpx rgba(0, 0, 0, 0.16);
padding: 22rpx 16rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
position: relative;
}
.buy-btn{
width: 144rpx;
height: 52rpx;
text-align: center;
line-height: 52rpx;
background: linear-gradient(315deg, #FB966C 0%, #FFC2AA 100%);
border-radius: 12rpx;
color: #fff;
font-size: 24rpx;
position: absolute;
bottom: 30rpx;
right: 30rpx;
}
.item-box image{
width: 198rpx;
height: 204rpx;
margin-right: 12rpx;
}
.welfare-info-box{
width: 394rpx;
}
.w-name{
width: 390rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #1D1D1D;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.w-address{
font-size: 24rpx;
line-height: 34rpx;
color: #707070;
margin: 8rpx 0 14rpx;
}
.w-price{
font-size: 28rpx;
font-weight: bold;
line-height: 40rpx;
color: #FF7942;
}
.w-oldPrice{
font-size: 20rpx;
color: #BCBCBC;
text-decoration: line-through;
}
.demandhall-box{
width: 100%;
padding: 40rpx;
}
.tabs-box{
padding-left: 30rpx;
padding-right: 12rpx;
}
.tab-item{
font-size: 28rpx;
color: #9C9C9C;
padding-bottom: 8rpx;
}
.tab-item-a{
color: #1D1D1D;
border-bottom: 4rpx solid #FF7942;
}
.list-box{
width: 100%;
margin-top: 36rpx;
}
.item{
width: 670rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(190, 190, 190, 0.3);
border-radius: 12rpx;
padding: 28rpx 20rpx 18rpx;
margin-bottom: 32rpx;
}
.item-top{
padding-bottom: 24rpx;
position: relative;
}
.item-top .buy-btn{
right: 0;
}
.project-name{
width: 400rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 58rpx;
color: #1D1D1D;
}
.tags-box2{
margin-top: 12rpx;
}
.price{
color: #FF5100;
font-size: 28rpx;
position: absolute;
top: 0;
right: 0rpx;
}
.tag{
color: #74BDF7;
font-size: 20rpx;
line-height: 28rpx;
margin: 12rpx 0 20rpx;
}
.desc{
font-size: 24rpx;
line-height: 34rpx;
color: #666666;
margin-top: 8rpx;
}
.company-box{
padding-top: 12rpx;
position: relative;
border-top: 2rpx solid #ECECEC;
}
.company-box image{
width: 128rpx;
height: 128rpx;
border-radius: 8rpx;
}
.company-info{
width: calc(100% - 298rpx);
margin-left: 12rpx;
}
.fz28{
font-size: 28rpx;
line-height: 40rpx;
color: #1D1D1D;
}
.fz24{
font-size: 24rpx;
line-height: 34rpx;
}
.fz20{
font-size: 20rpx;
line-height: 28rpx;
}
.item-top .buy-btn{
top: 0;
}
.into-btn{
font-size: 20rpx;
color: #FF5100;
width: 144rpx;
height: 40rpx;
border: 1rpx solid #FF5100;
opacity: 1;
border-radius: 20rpx;
position: absolute;
top: 18rpx;
right: 0rpx;
}
.into-btn image{
width: 21rpx;
height: 19rpx;
margin-right: 6rpx;
}
.tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
}
.bgG{
border: 1rpx solid #3A9EFA;
color: #3A9EFA;
}
.bgO{
border: 1rpx solid #FC9367;
color: #FC9367;
}
.to-demandhall{
font-size: 28rpx;
color: #A7A7A7;
margin-bottom: 28rpx;
}
.to-demandhall image{
width: 13rpx;
height: 23rpx;
margin-left: 15rpx;
}
</style>

2
pages/life/articleDetail/index.vue

@ -23,7 +23,7 @@
</template>
<script>
import { getArticleDetail } from "@/api/store";
import { getArticleDetail } from "@/api/home";
export default{
data() {
return{

2
pages/life/articleList/index.vue

@ -37,7 +37,7 @@
</template>
<script>
import { getArticle } from "@/api/store";
import { getArticle } from "@/api/home";
export default{
data(){
return{

518
pages/life/index.vue

@ -1,6 +1,6 @@
<template>
<view class="productSort">
<!-- <view class="page-top-box" :class="isFixed == true ? 'on' : ''">
<view class="page-top-box" :class="isFixed == true ? 'on' : ''">
<view class="top-box acea-row row-between-wrapper">
<view class="top-box-l acea-row row-middle">
<image src="../../static/images/localtion.png"></image>
@ -17,7 +17,7 @@
</view>
</view>
</div>
</view> -->
</view>
<!-- <view class="banner-img-box acea-row row-between-wrapper">
<view class="img-box-l">
<image src="https://download.cyjyyjy.com/life1.png" @click="alertMessage('功能开发中...')"></image>
@ -27,140 +27,20 @@
<image src="https://download.cyjyyjy.com/life3.png" @click="alertMessage('功能开发中...')"></image>
</view>
</view> -->
<!-- 顶部主页 -->
<view class="main-box">
<view class="back-bg"><image src="../../static/images/life-bg.png" mode=""></image></view>
<view class="top-logo acea-row row-center" :style="'top:' + menuTop + 'px;height:' + menuHeight + 'px;line-height: ' + menuHeight + 'px;'">禪易生态云</view>
<view class="details-btn">了解详情</view>
</view>
<!-- 云快讯 -->
<view class="yun-box">
<view class="acea-row row-between-wrapper">
<image src="../../static/images/yun.png" class="headline-yun"></image>
<view class="more-r" @click="toAritcleList">
<text>查看更多</text>
<image src="../../static/images/home/arrow-r.png"></image>
</view>
</view>
<view class="rotaion">
<vSwiper :imgs="yunList"></vSwiper>
</view>
</view>
<!-- 最新活动 -->
<view class="act-box">
<view class="headline"><image src="../../static/images/new-act.png" mode=""></image></view>
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="slide-left" v-for="(iiem,index) in 3" :key="index">
<view class="act-title">新零售与新营销模式重构和实战升级</view>
<view class="resource-list acea-row-nowrap">
<image src="../../static/images/new-bg.png" class="act-img"></image>
<view>
<view class="act-time acea-row row-left">
<image src="../../static/images/act-time.png" mode=""></image>
<view>12-23 00:00至11-25 23:00</view>
</view>
<view class="act-adress acea-row row-left">
<image src="../../static/images/act-address.png" mode=""></image>
<view class="line1">武汉市江夏区文化大道288号斤斤计较经济</view>
</view>
<view class="acea-row row-between-wrapper act-price">
<text class="act-i">进行中</text>
<text class="act-p">888.00</text>
</view>
</view>
</view>
<view class="act-bottom acea-row row-between-wrapper">
<view class="acea-row row-middle act-num">
<image src="../../static/images/cart.png"></image>
<image src="../../static/images/cart.png"></image>
<image src="../../static/images/cart.png"></image>
<text>15人报名</text>
</view>
<view class="enter-btn">
去报名
</view>
</view>
</view>
</scroll-view>
</view>
<!-- 为您推荐 -->
<view class="rec-box">
<view class="headline"><image src="../../static/images/rec-headline.png" mode=""></image></view>
<view class="rec-switch">
<view class="rec-title acea-row">
<view class="rec-l " @click="tabClick(1)">
<image src="../../static/images/rec-bg.png" class="rec-bg" v-show="active == 1"></image>
<view class="rec-t acea-row row-center-wrapper">
<image src="../../static/images/rec-icon1.png" mode=""></image>
<view>需求</view>
</view>
</view>
<view class="rec-r " @click="tabClick(2)">
<image src="../../static/images/rec-bg.png" class="rec-bg" v-show="active == 2"></image>
<view class="rec-t acea-row row-center-wrapper">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view>资源</view>
</view>
</view>
</view>
<view class="rec-switch-a">
<view class="list-box" v-if="active == 1">
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李子龙111</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李大龙</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
</view>
<view class="list-box" v-if="active == 2">
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李木龙</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李子龙111qqq</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="category-tab-box">
<view class="category-tab-box">
<scroll-view class="scroll-view_H" scroll-x="true" >
<view class="category-item category-item-active">全部商品</view>
<view class="category-item">至尊保驾</view>
<!-- <view class="category-item">至尊保驾</view>
<view class="category-item">优选好房</view>
<view class="category-item">商城福利</view>
<view class="category-item">回头率</view>
<view class="category-item">回头率</view> -->
</scroll-view>
</view> -->
</view>
<view class="warter-box">
<view class="headline">
<!-- <view class="headline">
<image src="../../static/images/rec-title.png" mode=""></image>
</view>
</view> -->
<u-waterfall v-model="flowList" ref="uWaterfall">
<template v-slot:left="{leftList}">
<view class="warter" v-for="(item, index) in leftList" :key="index" @tap="toGoodsDetail(item.id)">
@ -193,7 +73,7 @@
</view>
</template>
<script>
import { getCategory , getProducts, getArticle} from "@/api/store";
import { getCategory , getProducts, getArticle, getActivity} from "@/api/store";
import { trim } from "@/utils";
import { mapGetters } from 'vuex'
import tabbar from "../../tabbarComponent/tabbar";
@ -223,9 +103,10 @@ export default {
page: 1,
limit: 10,
isLoad: true, //
yunList: [],
articleList: [],
active:1,
show:false,
activity:[],
};
},
watch: {
@ -240,7 +121,7 @@ export default {
// },
mounted: function() {
this.getProducts();
this.getArticle();
this.getActivity();
},
onReachBottom() {
if(this.isLoad){
@ -252,15 +133,15 @@ export default {
wx.showNavigationBarLoading();
this.isLoad= true
this.page= 1
this.getActivity();
this.clear().then(()=>{
console.log('清除')
this.getProducts();
})
},
methods: {
toAritcleList(){
this.$yrouter.push("/pages/life/articelList/index")
this.$yrouter.push("/pages/life/articleList/index")
},
async clear(){
this.$refs.uWaterfall.clear();
@ -307,17 +188,19 @@ export default {
});
});
},
getArticle(){
let data = {
isHot: 1,
page: 0,
size: 100
}
getArticle(data).then(res=>{
console.log(res)
this.yunList = res.data.content
getActivity(){
getActivity().then(res=>{
this.articleList = res.data.articleList
this.activity= res.data.activityList;
})
},
toActiveDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/activity/detail/index?id=' + id
});
},
tabClick(i) {
console.log(i,'aiiii')
@ -425,325 +308,46 @@ export default {
}
}
}
.main-box{
width: 100%;
height: 522rpx;
position: relative;
}
.back-bg image{
width: 100%;
height: 522rpx;
}
.logo-title image{
margin-left: 20rpx;
width: 80rpx;
height: 50rpx;
}
.top-logo{
position: absolute;
width: 100%;
color: #fff;
font-weight: 600;
font-size: 32rpx;
}
.details-btn{
width: 196rpx;
height: 52rpx;
border: 2rpx solid #FFFFFF;
border-radius: 26px;
position: absolute;
bottom: 100rpx;
left: 50%;
margin-left: -98rpx;
text-align: center;
line-height: 50rpx;
color: #fff;
font-size: 32rpx;
}
//
.yun-box{
margin: 8rpx 40rpx 28rpx 40rpx;
}
.headline-yun{
width: 112rpx;
height: 52rpx;
}
.more-r{
font-size: 24rpx;
color: #8B8B8B;
}
.more-r image{
width: 12rpx;
height: 18rpx;
margin-left: 8rpx;
}
.rotaion{
width: 670rpx;
margin-top: 24rpx;
}
//
.act-box{
width: 100%;
height: 400rpx;
margin-left: 40rpx;
}
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.slide-left{
width: 584rpx;
height: 344rpx;
display: inline-block;
border-radius: 16rpx;
background-color: #fff;
padding: 20rpx 32rpx 0 20rpx;
margin-right: 32rpx;
}
.act-title{
font-size: 28rpx;
color: #191919;
}
.resource-list{
width: 100%;
height: 190rpx;
margin: 18rpx 0 14rpx 0;
}
.act-img{
width: 162rpx;
height: 190rpx;
margin-right: 28rpx;
}
.act-adress,.act-time{
margin: 8rpx 0 20rpx 0;
}
.act-adress view,.act-time view{
width: 300rpx;
font-size: 24rpx;
color: #191919;
}
.act-time image{
width: 18rpx;
height: 22rpx;
margin-right: 16rpx;
margin-top: 7rpx;
}
.act-adress image{
width: 19rpx;
height: 23rpx;
margin-right: 14rpx;
margin-top: 8rpx;
}
.act-price{
margin-top: 40rpx;
}
.act-i {
font-size: 24rpx;
color: #FF5A0E;
}
.act-p{
font-size: 32rpx;
color: #2A2B2B;
}
.act-bottom{
width: 562rpx;
border-top: 1rpx solid #ECECEC;
}
.act-num image{
width: 36rpx;
height: 36rpx;
border-radius: 50%;
}
.act-num{
min-width: 154rpx;
margin-top: 14rpx;
}
.act-num text{
font-size: 20rpx;
color: #191919;
margin-left: 8rpx;
}
.enter-btn{
width: 138rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
background: linear-gradient(39deg, #FF5A0D 0%, #FFAC85 100%);
border-radius: 26rpx;
color: #fff;
margin-right: 38rpx;
margin-top: 8rpx;
}
//
.rec-box{
width: 706rpx;
height: 493rpx;
margin: 32rpx 22rpx 8rpx 22rpx;
position: relative;
}
.rec-switch{
width: 706rpx;
height: 423rpx;
margin-top: 18rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx;
overflow: hidden;
}
.rec-bg{
width: 706rpx;
height: 423rpx;
}
.rec-title{
.category-tab-box{
border: 1rpx solid black;
width: 100%;
height: 80rpx;
position: relative;
}
.rev-bg{
width: 376rpx;
height: 80rpx;
position: absolute;
left: 0;
}
.rev-bg2{
width: 376rpx;
height: 80rpx;
position: absolute;
left: 0;
background-image: url(../../static/images/rec-bg.png);
}
.rec-l,.rec-r{
width: 50%;
z-index: 2;
position: relative;
}
.rec-l .rec-bg, .rec-r .rec-bg{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.rec-r .rec-bg{
transform: rotate(180deg);
}
.rec-t{
width: 100%;
height: 100%;
position: absolute;
z-index: 3;
}
.rec-l image{
width: 37rpx;
height: 37rpx;
margin-right: 8rpx;
}
.rec-r image{
width: 42rpx;
height: 43rpx;
margin-right: 8rpx;
}
.rec-switch-a{
width: 100%;
height: 330rpx;
}
.list-box{
width: 100%;
height: 330rpx;
}
.rec-list{
position: relative;
height: 165rpx;
padding: 33rpx 40rpx 0 40rpx;
}
.rec-list image{
width: 64rpx;
height: 64rpx;
}
.rec-name{
font-size: 28rpx;
color: #1D1D1D;
margin-left: 16rpx;
}
.rec-address{
width: 80rpx;
height: 34rpx;
font-size: 24rpx;
line-height: 34rpx;
color: #FFFFFF;
background: #FF5100;
border-radius: 16px;
text-align: center;
}
.rec-end{
font-size: 24rpx;
color: #707070;
position: absolute;
right: 22rpx;
}
.rec-message{
width: 582rpx;
height: 40rpx;
font-size: 28rpx;
color: #1D1D1D;
margin-top: 15rpx;
}
// .category-tab-box{
// border: 1rpx solid black;
// width: 100%;
// height: 108rpx;
// line-height: 108rpx;
// padding-left: 30rpx;
// // margin-bottom: 30rpx;
// // padding-top: 190rpx;
// .scroll-view_H{
// white-space: nowrap;
// width: 100%;
// .category-item{
// display: inline-block;
// font-size: 28rpx;
// line-height: 40rpx;
// color: #999;
// margin-right: 40rpx;
// &.category-item-active{
// color: #FF6D31;
// font-size: 32rpx;
// font-weight: 500;
// position: relative;
// &::after{
// content: '';
// width: 70rpx;
// height: 8rpx;
// border-radius: 6rpx;
// display: block;
// position: absolute;
// bottom: -24rpx;
// left: 0;
// background: #FF7942;
// }
// }
// }
// }
// }
.headline image{
width: 148rpx;
height: 52rpx;
height: 108rpx;
line-height: 108rpx;
padding-left: 30rpx;
// margin-bottom: 30rpx;
padding-top: 190rpx;
.scroll-view_H{
white-space: nowrap;
width: 100%;
.category-item{
display: inline-block;
font-size: 28rpx;
line-height: 40rpx;
color: #999;
margin-right: 40rpx;
&.category-item-active{
color: #FF6D31;
font-size: 32rpx;
font-weight: 500;
position: relative;
&::after{
content: '';
width: 70rpx;
height: 8rpx;
border-radius: 6rpx;
display: block;
position: absolute;
bottom: -24rpx;
left: 0;
background: #FF7942;
}
}
}
}
}
.warter-box{
width: 100%;
padding: 24rpx 0 190rpx 24rpx;
padding: 126rpx 24rpx 190rpx 24rpx;
.u-waterfall {
width: 100%;
display: flex;

2
pages/user/index.vue

@ -47,7 +47,7 @@
</view>
</view>
<view class="to-tyg-box" @tap="toMine">
<image src="/static/images/user/tyg-img.png"></image>
<image src="https://download.cyjyyjy.com/tyg-img.png"></image>
</view>
</view>
</view>

2
pages/user/mine/index.vue

@ -199,7 +199,7 @@
if (this.shareFlag) {
return {
title: '禅易云生态',
imageUrl: "/static/images/shareImg.png",
imageUrl: "https://download.cyjyyjy.com/shareImg.png",
path: '/pages/user/agreement/index?id=' + this.userInfo.uid //
};

BIN
static/images/life-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 KiB

BIN
static/images/shareImg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

BIN
static/images/user/tyg-img.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Loading…
Cancel
Save