123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <template>
- <view class="content">
- <view class="top-top"></view>
- <view class="lange"><base-nav></base-nav></view>
- <view class="top">
- <image src="../../static/img/index/index.png" mode="" class="bg"></image>
- <view class="tongz flex">
- <view>
- <view class="tongz-left flex" @click="goDetails">
- <image class="image-left" src="../../static/img/ling.png" mode=""></image>
- <u-notice-bar style="width: 100%;" mode="vertical" type="none" color="#ffffff" :volume-icon="false" :more-icon="true" :list="showList"></u-notice-bar>
- </view>
- </view>
- </view>
- <image src="../../static/img/index/yyxx.png" mode="" class="yz"></image>
- </view>
- <view class="box">
- <view v-for="(item, index) in list" :key="index">
- <view class="discounts">
- <image :src="image[index]" mode="" class="discounts1"></image>
- <view class="money">
- ¥
- <text>{{ item.money * 2 }}</text>
- </view>
- <view class="baodan" @click="baodan(item.id)">{{ $t('hea.ckxq') }}</view>
- </view>
- </view>
- </view>
- <view class="index1">
- <image src="../../static/img/index/index1.png" mode=""></image>
- <view class="bottom" @click="nav('/pages/profit/fund')"><image src="../../static/img/index/bottom.png" mode=""></image></view>
- </view>
- <u-tabbar :list="tabbar" bg-color="#000" active-color="#FAD6B0" inactive-color="#71614f" change="change"></u-tabbar>
- </view>
- </template>
- <script>
- import baseNav from '@/pages/public/nav.vue';
- import { mapState, mapMutations } from 'vuex';
- import { activityList,activitys } from '@/api/active.js';
- import { article } from '@/api/index.js';
- import { saveUrl, interceptor } from '@/utils/loginUtils.js';
- import { children } from '@/api/user.js';
- import { getApplyList } from '../../api/apply.js';
- import store from '../../store/index.js';
- export default {
- components: {
- baseNav,
- },
- computed: {
- ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
- ...mapState(['lang'])
- },
- watch: {
- lang(val) {
- this.$set(this.tabbar[0], 'text', this.$t('hea.sy'));
- this.$set(this.tabbar[1], 'text', this.$t('hea.shlb'));
- this.$set(this.tabbar[2], 'text', this.$t('hea.wd'));
- }
- },
- data() {
- return {
- list: [],
- num: 0,
- image: ['../../static/img/index/youhui1.png', '../../static/img/index/youhui2.png'],
- revenueList: [],
- isShow:false,
- tabbar: [
- {
- iconPath: '../../static/tabBar/home.png',
- selectedIconPath: '../../static/tabBar/home-action.png',
- text: this.$t('hea.sy'),
- pagePath: '/pages/index/index'
- },
- {
- iconPath: '../../static/tabBar/center.png',
- selectedIconPath: '../../static/tabBar/center-action.png',
- text: this.$t('hea.shlb'),
- count: 0,
- pagePath: '/pages/user/applyList'
- },
- {
- iconPath: '../../static/tabBar/user.png',
- selectedIconPath: '../../static/tabBar/user-action.png',
- text: this.$t('hea.wd'),
- pagePath: '/pages/user/user'
- }
- ],
- showList: []
- };
- },
- onShow() {
- if (this.hasLogin) {
- let obj = this;
- obj.isShow = false;
- obj.list = [];
- this.loadData();
- } else {
- let obj = this;
- uni.showModal({
- title: obj.$t('hea.login'),
- content: obj.$t('hea.logininfo'),
- success: e => {
- if (e.confirm) {
- saveUrl();
- interceptor();
- }
- },
- fail: e => {
- console.log(e);
- }
- });
- }
- },
- methods: {
- baodan(id) {
- uni.navigateTo({
- url: '/pages/index/infoDetail?id=' + id
- });
- },
- async loadData() {
- uni.showLoading({
- title:'数据加载中',
- })
- const obj = this;
- await activitys({},1).then(e =>{
- children({}, this.userInfo.id).then(({ data }) => {
- obj.num = data.length
- console.log(e.data.income,'11111')
- console.log(obj.num,'22222')
- if(e.data.income >= 20000 && obj.num >= 5){
- console.log(111111111)
- obj.isShow = true
- }
- activityList({}).then(({ data }) => {
- uni.hideLoading()
- this.list = data.list;
- if(!obj.isShow){
- console.log(22222222222222222)
- this.list.pop()
- }
- });
- });
- })
-
- article({
- page: 1,
- limit: 10000,
- category_id: 14
- }).then(({ data }) => {
- let arr = [];
- data.list.forEach(e => {
- arr.push(e.synopsis);
- });
- this.showList = arr;
- });
- getApplyList({
- page: 1,
- limit: 1,
- status: 0
- }).then(({ data }) => {
- this.tabbar[1].count = data.count
- });
- },
- change(index) {
- console.log(index);
- },
- nav(url) {
- uni.navigateTo({
- url
- });
- },
- goDetails() {
- uni.navigateTo({
- url: '/pages/index/list'
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- page {
- height: auto;
- }
- .content {
- .top-top {
- height: var(--status-bar-height);
- width: 100%;
- background: #000;
- }
- .top {
- position: relative;
- display: flex;
- flex-direction: column;
- z-index: 10;
- .bg {
- width: 100%;
- height: 900rpx;
- }
- .yz {
- width: 90%;
- height: 700rpx;
- margin: 20rpx auto 0;
- }
- }
- .box {
- .discounts {
- margin: 20rpx 30rpx;
- display: flex;
- justify-content: center;
- position: relative;
- width: 690rpx;
- height: 890rpx;
- z-index: 30;
- .discounts1 {
- width: 100%;
- height: 100%;
- }
- .money {
- margin: 0 auto;
- display: flex;
- justify-content: center;
- align-items: center;
- top: 0;
- margin-top: 250rpx;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: bold;
- color: #c63535;
- line-height: 30rpx;
- position: absolute;
- text {
- font-size: 116rpx;
- font-family: Source Han Sans CN;
- font-weight: 800;
- color: #c63535;
- line-height: 115rpx;
- }
- }
- .baodan {
- position: absolute;
- top: 690rpx;
- width: 300rpx;
- height: 80rpx;
- text-align: center;
- line-height: 80rpx;
- color: #ffffff;
- background: #4e2c0e;
- font-size: 40rpx;
- border-radius: 10rpx;
- }
- }
- .earnings-box {
- z-index: 100;
- position: relative;
- margin: 40rpx 30rpx;
- width: 690rpx;
- height: 1140rpx;
- .earnings {
- width: 100%;
- height: 100%;
- }
- .text-box {
- position: absolute;
- top: 184rpx;
- left: 110rpx;
- .textDetail {
- min-height: 134rpx;
- max-height: 140rpx;
- overflow: hidden;
- padding-bottom: 64rpx;
- .textDetail-title {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #4e2c0e;
- line-height: 30rpx;
- padding-bottom: 10rpx;
- }
- .textDetail-content {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #4e2c0e;
- line-height: 30rpx;
- }
- }
- }
- }
- }
- .index1 {
- margin-top: -200rpx;
- width: 100%;
- height: 713rpx;
- position: relative;
- image {
- width: 100%;
- height: 100%;
- }
- .bottom {
- height: 200rpx;
- width: 90%;
- margin: 0 auto;
- position: absolute;
- bottom: 250rpx;
- left: 5%;
- }
- }
- }
- .tongz {
- width: 690rpx;
- height: 70rpx;
- margin: 10rpx auto 0;
- padding: 18rpx 30rpx 18rpx 24rpx;
- align-items: center;
- position: relative;
- background: #1f2020;
- border-radius: 30rpx;
- .tongz-bg {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- width: 690rpx;
- height: 70rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .tongz-left {
- width: 640rpx;
- .image-left {
- width: 40rpx;
- height: 34rpx;
- }
- .tongz-font {
- margin-left: 22rpx;
- font-size: 28rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #ffffff;
- }
- }
- .tongz-right {
- position: relative;
- z-index: 11;
- width: 12rpx;
- height: 26rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- </style>
|