| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- <template>
- <v-page class="pledgeRonqi">
- <v-header class="" :border="false" :title="$t('pledge.e4')"
- :leftClick="()=>_router.replace('/pages/pledge/introduce')">
- <template #right>
- <v-link :to="{path:'/pages/pledge/order'}">
- <van-icon class="fn-20 pld-mt" name="orders-o" />
- </v-link>
- </template>
- </v-header>
- <view class="pledgeMain">
- <swiper class="lunbo" :autoplay="true" indicator-color="white">
- <swiper-item class="my_swipe_item" v-for="(item, idx) in pledge" :key="idx">
- <img width="100%" height="100%" fit="cover" :src="item.spread_img" />
- </swiper-item>
- </swiper>
- </view>
- <view class="pledgeList" v-for="(item, idx) in pledge" :key="idx">
- <!-- <view class="listLeft">
- <img class="listImg" :src="item.cover" />
- </view> -->
- <view class="listRigth" style="width: 100%;">
- <view class="pledgeFirstTitle pledgeListTitle" style="width: 100%;">{{item.name}}</view>
- <view class="pledgeListTitle d-flex justify-between align-center">
- <view style="flex:1">
- <text>{{ $t("pledge.biz") }}:</text>
- <text class="fgrey">{{item.coin_name}}</text>
- </view>
- </view>
- <view class="pledgeListTitle d-flex justify-between align-center">
- <view class="d-flex align-center" style="flex:1">
- <text>{{ $t("pledge.rate") }}:</text>
- <text class="fgreen">{{item.min_rate}}%~{{item.max_rate}}%</text>
- </view>
-
- </view>
-
- <view class="pledgeListTitle d-flex justify-between align-center">
- <view>
- <!-- <text>{{ $t("option.b3") }}:</text> -->
- <text>{{$t('pledge.e5')}}:</text>
- <text class="fgreen">{{item.min_amount}}~{{item.max_amount}}</text>
- </view>
-
-
- </view>
- <view class="pledgeListTitle d-flex justify-between align-center">
- <view class="d-flex align-center" style="flex:1">
- <text>{{ $t("pledge.cycle") }}:</text>
- <text class="fgrey">{{item.cycle}} {{$t('exchange.f0')}}</text>
- </view>
-
- </view>
- </view>
- <view class="d-flex justify-end">
- <!-- <button v-if="item.can_buy == true" @click="dump(item.id)" class='join'>{{ $t("pledge.join")}}</button> -->
- <button @click="dump(item.id)"
- class='join'>{{ $t("pledge.join")}}</button>
- </view>
- </view>
- <!-- <view class="pledgeList_main" v-for="(item, idx) in pledge"
- :key="idx"
- >
- <view class="listLeft_logo">
- <img class="listImg" :src="item.cover" />
- </view>
- <view class="listRigth">
- <view class="pledgeFirstTitle pledgeListTitle">{{item.name}}</view>
- <view class="pledgeListTitle">
- <text>{{ $t("pledge.biz") }}:</text>
- <text class="fgrey">{{item.coin_name}}</text>
- </view>
- <view class="pledgeListTitle">
- <text>{{ $t("pledge.cycle") }}:</text>
- <text class="fgrey">{{item.cycle}}{{$t('exchange.f0')}}</text>
- </view>
- <view class="pledgeListTitle">
- <text>{{ $t("pledge.rate") }} ≈ </text>
- <text class="fgreen">{{item.rate}}%</text>
- </view>
- <view class="pledgeListTitle">
- <text>{{ $t("option.b3") }}:</text>
- <text class="fgreen">{{item.can_buy_num}}</text>
- </view>
- <button v-if="item.can_buy == true" @click="dump(item.id)" class='join'>{{ $t("pledge.join")}}</button>
- <button v-if="item.can_buy == false" class='unjoin'>{{ $t("pledge.join")}}</button>
- </view>
- </view> -->
- </v-page>
- </template>
- <script>
- import Pledge from "@/api/pledge";
- export default {
- name: "pledge",
- data() {
- return {
- pledge: {},
- };
- },
- methods: {
- indexData() {
- let data = {};
- let ajax = Pledge.indexList(data, {
- loading: true
- });
- console.log(ajax);
- ajax
- .then((res) => {
- this.pledge = res.data;
- })
- .catch(() => {});
- },
- dump(id) {
- // this.$router.push({
- // path: '/pages/pledge/detail?id=' + id
- // })
- uni.navigateTo({
- url:'/pages/pledge/detail?id=' + id
- })
- },
- jumpBack() {
- // this.$router.push({
- // path: '/pages/base/index'
- // });
- uni.navigateTo({
- url:'/pages/base/index',
- fail() {
- uni.switchTab({
- url:'/pages/base/index'
- })
- }
- })
- },
- unjoin(invit_num) {
- // this.$dialog
- // .confirm({
- // title: this.$t("common.tips"),
- // message: `${this.$t("pledge.a9")}${
- // invit_num
- // }${this.$t("pledge.b1")}${this.$t("pledge.b2")}`,
- // cancelButtonText: this.$t('pledge.b4'),
- // confirmButtonText: this.$t('pledge.b3')
- // })
- // .then(() => {
- // this.$router.push({
- // path: '/pages/invite/index'
- // });
- // })
- // .catch(() => {});
- // this.$toast(this.$t("pledge.a7"));
- // return;
- uni.navigateTo({
- url:'/pages/invite/index',
- fail() {
- uni.switchTab({
- url:'/pages/invite/index'
- })
- }
- })
-
- }
- },
- mounted() {
- this.indexData();
- },
- onLoad() {
- this.indexData();
- },
- destroyed() {},
- };
- </script>
- <style lang="scss" scoped>
- //50 185 450 11 =》696 750 54
- .pledgeList {
- margin-top: 30upx;
- background: var(--list);
- padding: 25upx;
- display: block;
- }
- .lunbo {
- margin: 30upx;
- }
- .listLeft {
- width: 185upx;
- height: 185upx;
- line-height: 400upx;
- display: inline-block;
- }
- .listRigth {
- width: 490upx;
- margin-left: 11upx;
- position: relative;
- display: inline-block;
- }
- .listImg {
- width: 100%;
- height: 100%;
- }
- .fgrey {
- color: #666666
- }
- .fgreen {
- color: #00A67F
- }
- .join {
- background: #FFC119;
- color: #333333;
- width: max-content;
- height: 60upx;
- line-height: 60upx;
- font-size: 26upx;
- font-weight: bold;
- padding: 0 20upx;
- margin: 0;
- }
- .pld-mt {
- margin-top: 30upx;
- }
- .unjoin {
- background: gray;
- color: #aaa;
- width: 145upx;
- height: 60upx;
- line-height: 60upx;
- font-size: 26upx;
- font-weight: bold;
- padding: 0;
- margin: 0;
- }
- .pledgeList_main {
- display: flex;
- display: -webkit-flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- margin-top: 30upx;
- padding: 25upx;
- background: var(--list);
- }
- .listLeft_logo {
- width: 185upx;
- height: 185upx;
- }
- </style>
|