| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920 |
- <template>
- <view :class="[AppTheme]" class="content">
-
- <!-- #ifdef APP-PLUS||MP-WEIXIN -->
- <u-sticky offsetTop="0" style="z-index: 10;">
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <u-sticky offsetTop="-44" style="z-index: 10;">
- <!-- #endif -->
- <view class="navbar">
- <u-tabs ref="uTabs" :list="navList" :activeStyle="{
- color: primary,
- transform: 'scale(1.05)'
- }" :inactiveStyle="{
- color: '#606266',
- transform: 'scale(1)'
- }" lineWidth="30" :scrollable="false" :lineColor="primary" :current="tabCurrentIndex" @click="tabClick">
- </u-tabs>
- </view>
- </u-sticky>
-
- <swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
- <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex" @touchmove.stop="">
- <scroll-view class="list-scroll-content" scroll-y @scrolltolower="handle">
- <view>
- <view class="notes-con" v-for="(item, index) in orderlist" :key="index">
- <view class="total-share" @click.stop="goDetails(item.id)">
- <view class="ts-left">
- <view class="ts-h">
- <view class="ts-bg bg-primary"><text class="all-p ">农场认养</text></view>
- <text class="expect">订单:{{ item.id }}</text>
- </view>
- <view class="ts-f">
- <view>
- <view class="num">{{ item.payprice }}</view>
- <view class="sam zi">元</view>
- </view>
- <view>
- <view class="num">3</view>
- <view class="sam zi">年</view>
- </view>
- <view>
- <view class="num">{{ item.soil_number }}</view>
- <view class="sam zi">平方米</view>
- </view>
- </view>
- </view>
- <view class="ts-right">
- <view class="abso border-primary">
- <image :src="settingFile.root_img+'/static/app/imgs/mine/17.png'" mode="" />
- <view class="now text-primary" v-if="swiperCurrent == 1">已到期</view>
- <view class="now text-primary" v-if="swiperCurrent == 0">托管中</view>
- </view>
- </view>
- </view>
- <view class="action-box b-t">
- <button class="action-btn recom text-primary border-primary"
- @click="goOrderDetail(item)" >查看订单</button>
- </view>
- </view>
- </view>
- <u-modal :showCancelButton="true" :title="title" :content="content" :show="flag"
- @confirm="confirm" @cancel="cancel"></u-modal>
- <u-loadmore :line="true" :status="loadingType" />
- </scroll-view >
- </swiper-item>
- </swiper>
- </view>
- </template>
- <script>
- import Landapi from '@/api/land/index.js';
- import Mallapi from '@/api/mall/index.js';
- export default {
- data() {
- return {
- triggered: true, //设置当前下拉刷新的状态
- refresherEnabled: true,
- tabCurrentIndex: 0,
- status: 'loadmore',
- primary: this.$theme.primary,
- settingFile: getApp().globalData.siteinfo,
- // 当前排序方式视图
- nowsetyindex: 1,
- // 订单列表
- orderlist: [],
- //顶部距离
- scrollTop: 0,
- modalshow: false,
- content: '该订单还未支付,是否先支付?',
- seorder: {},
- nowindex: 1, //当前列表分页
- customstyle: {
- background: '#F4F6F8'
- },
- navList: [{
- name: '全部',
- loadingType: 'more'
- },
- {
- name: '租赁中',
- loadingType: 'more'
- }
- ],
- loadingType: 'more',
-
- flag: false,
- title: '温馨提示',
- current: 0,
- swiperCurrent: 0,
- nomorelist: false,
- _freshing: false
- };
- },
- onLoad() {
- this.getorderlist(this.swiperCurrent, this.nowindex);
- this._freshing = false;
- },
- onPullDownRefresh() {
- console.log('下拉刷新了')
- this.nowindex = 1
- console.log(this.swiperCurrent,'this.swiperCurrent')
- this.getorderlist(this.swiperCurrent+1, this.nowindex);
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 1500)
- },
- onReachBottom() {
- console.log('上拉加载了')
- this.nowindex++
- let parms = {
- p: this.nowindex,
- type: this.swiperCurrent
- };
- this.status = 'loading'
- Landapi.getlandorder(parms).then(res => {
- if (res.status == 1) {
- if (res.data !== null && res.data !== undefined && res.data.length > 0) {
- // 获取服务套餐详情集合
- this.status = 'nomore'
- res.data.forEach(item => {
- that.orderlist.push(item);
- });
- if (res.data.length == 10) {
- this.status = 'loadmore'
- } else {
- this.status = 'nomore'
- }
- }
- } else {
- this.nowindex--
- this.status = "nomore"
- }
- })
- },
- onShow() {},
- methods: {
- tabClick(e) {
- this.p = 1;
- this.tabCurrentIndex = e.index;
- this.tabsChange(e)
- },
- goOrderDetail(item) {
- uni.navigateTo({
- url: `/pagesD/pages/order/orderDetail?sid=${item.sid}&id=${item.id}`
- });
- },
- step: function(i) {
- var id = 'progress' + i;
- return id;
- },
- refund(id, index) {
- var that = this;
- let tmplIdsone = that.$config.temlist;
- if (tmplIdsone) {
- that.$until.requestSubscribeMessage([tmplIdsone['returnReminder']], tmplIdsone, function() {
- that.refund2(id, index)
- });
- } else {
- that.refund2(id, index)
- }
- },
- refund2(id, index) {
- let that = this;
- uni.showModal({
- title: '提示',
- content: '请确认是否申请土地订单退款!',
- success: function(res) {
- if (res.confirm) {
- Landapi.soilTuikuan({
- id
- }).then(res => {
- if (res.status == 1) {
- that.orderlist[index].isback = 0
- that.orderlist[index].status_period = 3
- uni.showToast({
- title: res.msg,
- icon: "success"
- })
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- }
- })
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- // tabs通知swiper切换
- tabsChange(e) {
- this.nomorelist = false;
- this.nowindex = 1;
- if (this.swiperCurrent === e.index) {
- return;
- } else {
- this.swiperCurrent = e.index;
- this.orderlist = [];
- this.getorderlistcase(this.swiperCurrent + 1, this.nowindex);
- }
- },
- //发起根据id查看订单信息请求
- lookorderbyid(order) {
- let that = this;
- that.modalshow = true;
- that.seorder = order;
- },
- //获取订单列表
- getorderlist(type, p) {
- var that = this;
- let parms = {
- p: p,
- type: type
- };
- if (!this.nomorelist) {
- Landapi.getlandorder(parms).then(res => {
- if (res.status == 1) {
- if (res.data !== null && res.data !== undefined && res.data.length > 0) {
- // 获取服务套餐详情集合
- this.orderlist = []
- res.data.forEach(item => {
- that.orderlist.push(item);
- });
- this.nowindex = p;
- this.status = 'nomore'
- if (res.data.length == 10) {
- this.status = 'loadmore'
- } else {
- this.status = 'nomore'
- }
- }
- } else {
- this.status = 'nomore'
- this.nomorelist = true;
- }
- });
- }
- },
- //获取订单列表
- getorderlistcase(type, p) {
- var that = this;
- let parms = {
- p: p,
- type: type
- };
- if (!this.nomorelist) {
- Landapi.getlandorder(parms).then(res => {
- if (res.status == 1) {
- if (res.data !== null && res.data !== undefined && res.data.length > 0) {
- // 获取服务套餐详情集合
- that.orderlist = res.data;
- this.nowindex = p;
- }
- } else {
- this.nomorelist = true;
- }
- });
- }
- },
- //修改订单
- uporderdata(item) {
- var that = this;
- let tmplIdsone = that.$config.temlist;
- if (tmplIdsone) {
- that.$until.requestSubscribeMessage([tmplIdsone['orderSuccess'], tmplIdsone['orderDelivery'],
- tmplIdsone['returnReminder']
- ], tmplIdsone, function() {
- that.uporderdata2(item)
- });
- } else {
- that.uporderdata2(item)
- }
- },
- uporderdata2(item) {
- let that = this;
- //发送订单id获取订单总金额,在执行成功的回调函数发起支付请求
- Landapi.lookorderbyid({
- id: item.id
- }).then(res => {
- if (res.status == 1) {
- let seeds = [];
- res.data.seeds.forEach((item, index) => {
- seeds.push({
- seed_id: item.seed_id,
- seed_num: item.seed_num
- })
- })
- let parms = {
- id: item.id,
- seeds: JSON.stringify(seeds),
- money: res.data.order_money
- };
- that.$refs.payment.payopen(parms);
- } else {
- that.$api.msg(res.msg);
- }
- });
- },
- //查看信息弹出框确定操作
- modalconfirm() {
- this.nowpay(this.seorder);
- },
- //追加种子
- appseed(item) {
- let that = this;
- let parms = {
- id: item.id
- };
- Landapi.lookorderbyid(parms).then(res => {
- if (res.status == 1) {
- let params2 = {
- id: item.id,
- seeds: res.data.seeds,
- subdivision_area: item.subdivision_area
- };
- //传导种子集合,选择完毕后更新种子值
- uni.navigateTo({
- url: '/pagesB/pages/chooseland/seed/appseed/appseed?params=' + JSON.stringify(
- params2)
- });
- } else {
- that.$api.msg(res.msg);
- }
- });
- },
- //查看信息弹出框取消操作
- modalcancel() {
- uni.navigateTo({
- url: '/pagesB/pagesD/pages/orderdeleti/orderdeleti?orderid=' + this.seorder.id
- });
- },
- navTo(url) {
- this.$until.toUrl(url);
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- page{
- height: 101%;
- }
- .content {
- background: $page-color-base;
- height:100%;
- box-sizing: border-box;
- }
-
- .swiper-box {
- height: calc(100vh - 44px);
- }
-
- .list-scroll-content {
- height: 100%;
- overflow-y: auto;
- }
-
- .navbar {
- height: 40px;
- padding: 0 5px;
- background: #fff;
- box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
- width: 100%;
- z-index: 10;
-
- .nav-item {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- font-size: 15px;
- position: relative;
-
- &.current {
-
- &:after {
- content: '';
- position: absolute;
- left: 50%;
- bottom: 0;
- transform: translateX(-50%);
- width: 44px;
- height: 0;
- border-bottom-width: 2px;
- border-bottom-style: solid;
- }
- }
- }
- }
-
- .uni-swiper-item {
- height: auto;
- }
-
- .order-item {
- display: flex;
- flex-direction: column;
- padding-left: 30upx;
- background: #fff;
- margin-top: 16upx;
-
- .i-top {
- display: flex;
- align-items: center;
- height: 80upx;
- padding-right: 30upx;
- font-size: $font-base;
- color: $font-color-dark;
- position: relative;
-
- .time {
- flex: 1;
- }
-
- .state {
- color: $base-color;
- }
-
- .del-btn {
- padding: 10upx 0 10upx 36upx;
- font-size: $font-lg;
- color: $font-color-light;
- position: relative;
-
- &:after {
- content: '';
- width: 0;
- height: 30upx;
- border-left: 1px solid $border-color-dark;
- position: absolute;
- left: 20upx;
- top: 50%;
- transform: translateY(-50%);
- }
- }
- }
-
- /* 多条商品 */
- .goods-box {
- height: 160upx;
- padding: 20upx 0;
- white-space: nowrap;
-
- .goods-item {
- width: 120upx;
- height: 120upx;
- display: inline-block;
- margin-right: 24upx;
- }
-
- .goods-img {
- display: block;
- width: 100%;
- height: 100%;
- }
- }
-
- /* 单条商品 */
- .goods-box-single {
- display: flex;
- padding: 20upx 0;
-
- .goods-img {
- display: block;
- width: 120upx;
- height: 120upx;
- }
-
- .right {
- flex: 1;
- display: flex;
- flex-direction: column;
- padding: 0 30upx 0 24upx;
- overflow: hidden;
-
- .title {
- font-size: $font-base + 2upx;
- color: $font-color-dark;
- line-height: 1;
- }
-
- .attr-box {
- font-size: $font-sm + 2upx;
- color: $font-color-light;
- padding: 10upx 12upx;
- }
-
- .price {
- font-size: $font-base + 2upx;
- color: $font-color-dark;
-
- &:before {
- content: '¥';
- font-size: $font-sm;
- margin: 0 2upx 0 8upx;
- }
- }
- }
- }
-
- .price-box {
- display: flex;
- justify-content: flex-end;
- align-items: baseline;
- padding: 20upx 30upx;
- font-size: $font-sm + 2upx;
- color: $font-color-light;
-
- .num {
- margin: 0 8upx;
- color: $font-color-dark;
- }
-
- .price {
- font-size: $font-lg;
- color: $font-color-dark;
-
- &:before {
- content: '¥';
- font-size: $font-sm;
- margin: 0 2upx 0 8upx;
- }
- }
- }
-
- .action-box {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- height: 100upx;
- position: relative;
- padding-right: 30upx;
- }
-
- .action-btn {
- width: 160upx;
- height: 60upx;
- margin: 0;
- margin-left: 24upx;
- padding: 0;
- text-align: center;
- line-height: 60upx;
- font-size: $font-sm + 2upx;
- background: #fff;
- border-radius: 100px;
-
- &:after {
- border-radius: 100px;
- }
-
- &.recom {
- background: #fff9f9;
- }
- }
- }
-
- /* load-more */
- .uni-load-more {
- display: flex;
- flex-direction: row;
- height: 80upx;
- align-items: center;
- justify-content: center;
- }
-
- .uni-load-more__text {
- font-size: 28upx;
- color: #999;
- }
-
- .uni-load-more__img {
- height: 24px;
- width: 24px;
- margin-right: 10px;
- }
-
- .uni-load-more__img>view {
- position: absolute;
- }
-
- .uni-load-more__img>view view {
- width: 6px;
- height: 2px;
- border-top-left-radius: 1px;
- border-bottom-left-radius: 1px;
- background: #999;
- position: absolute;
- opacity: 0.2;
- transform-origin: 50%;
- animation: load 1.56s ease infinite;
- }
-
- .uni-load-more__img>view view:nth-child(1) {
- transform: rotate(90deg);
- top: 2px;
- left: 9px;
- }
-
- .uni-load-more__img>view view:nth-child(2) {
- transform: rotate(180deg);
- top: 11px;
- right: 0;
- }
-
- .uni-load-more__img>view view:nth-child(3) {
- transform: rotate(270deg);
- bottom: 2px;
- left: 9px;
- }
-
- .uni-load-more__img>view view:nth-child(4) {
- top: 11px;
- left: 0;
- }
-
- .load1,
- .load2,
- .load3 {
- height: 24px;
- width: 24px;
- }
-
- .load2 {
- transform: rotate(30deg);
- }
-
- .load3 {
- transform: rotate(60deg);
- }
-
- .load1 view:nth-child(1) {
- animation-delay: 0s;
- }
-
- .load2 view:nth-child(1) {
- animation-delay: 0.13s;
- }
-
- .load3 view:nth-child(1) {
- animation-delay: 0.26s;
- }
-
- .load1 view:nth-child(2) {
- animation-delay: 0.39s;
- }
-
- .load2 view:nth-child(2) {
- animation-delay: 0.52s;
- }
-
- .load3 view:nth-child(2) {
- animation-delay: 0.65s;
- }
-
- .load1 view:nth-child(3) {
- animation-delay: 0.78s;
- }
-
- .load2 view:nth-child(3) {
- animation-delay: 0.91s;
- }
-
- .load3 view:nth-child(3) {
- animation-delay: 1.04s;
- }
-
- .load1 view:nth-child(4) {
- animation-delay: 1.17s;
- }
-
- .load2 view:nth-child(4) {
- animation-delay: 1.3s;
- }
-
- .load3 view:nth-child(4) {
- animation-delay: 1.43s;
- }
-
- @-webkit-keyframes load {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0.2;
- }
- }
- </style>
- <style lang="scss">
- page {
- width: 100%;
- height: 100%;
- }
-
- // .subrecord {
- // width: 100%;
- // min-height: 100%;
- // padding-top: 0.1rpx;
- // padding-bottom: 20rpx;
- // background: #f1f1f1;
- // position: relative;
- .no-data {
- width: 160rpx;
- height: 160rpx;
- position: absolute;
- top: 35%;
- left: 50%;
- margin-left: -80rpx;
- }
-
- .no-data image {
- width: 100%;
- height: 100%;
- }
-
- .notes-con {
- width: calc(100% - 40rpx);
- margin: 0 auto;
- border-radius: 20rpx;
- background-color: #ffffff;
- }
-
- .total-share {
- width: 100%;
- display: flex;
- justify-content: flex-start;
- margin: 20rpx auto;
- }
-
- .action-box {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- height: 100upx;
- position: relative;
- padding-right: 30upx;
- }
-
- .action-btn {
- width: 160upx;
- height: 60upx;
- margin: 0;
- margin-left: 24upx;
- padding: 0;
- text-align: center;
- line-height: 60upx;
- font-size: $font-sm + 2upx;
- background: #fff;
- border-radius: 100px;
-
- &:after {
- border-radius: 100px;
- }
-
- &.recom {
- background: #fff9f9;
- border-width: 1rpx;
- border-style: solid;
- }
- }
-
- .ts-left {
- margin-top: 16rpx;
- margin-left: 20rpx;
- }
-
- .total-share .ts-h,
- .ts-f {
- width: 472rpx;
- }
-
- .ts-f {
- margin-top: -14rpx;
- }
-
- .total-share .ts-h {
- height: 70rpx;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-bottom: 50rpx;
- margin-top: 10rpx;
- }
-
- .total-share .ts-h .ts-bg {
- width: 74rpx;
- height: 70rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 16rpx;
- background-size: 100%;
- margin-right: 16rpx;
- text-align: center;
- }
-
- .total-share .ts-h .all-p {
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: 800;
- color: rgba(255, 255, 255, 1);
- letter-spacing: 6rpx;
- margin-left: 5rpx;
- margin-top: -8rpx;
- }
-
- .total-share .ts-h .expect {
- display: inline-block;
- width: 360rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 31rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: rgba(0, 0, 0, 1);
- }
-
- .ts-f {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- .ts-f .red-pre {
- font-size: 52rpx;
- font-family: PingFang SC;
- font-weight: 800;
- color: rgba(255, 31, 31, 1);
- }
-
- .ts-f .num {
- position: relative;
- top: 14rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 800;
- color: rgba(0, 0, 0, 1);
- text-align: center;
- }
-
- .ts-f .sam {
- text-align: center;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: rgba(102, 102, 102, 1);
- }
-
- .ts-f .sam.zi {
- margin-top: 24rpx;
- }
-
- .ts-right {
- margin-left: 10rpx;
- /*float: right;*/
- position: relative;
- margin-top: 40rpx;
- }
-
- .ts-right .abso {
- width: 140rpx;
- height: 140rpx;
- position: absolute;
- font-size: 24rpx;
- left: 46rpx;
- border-width: 4rpx;
- border-style: solid;
- border-radius: 50%;
- text-align: center;
- padding-top: 26rpx;
- box-sizing: border-box;
-
- image {
- width: 45rpx;
- height: 51rpx;
- }
- }
-
- .abso .yet {
- margin-left: 16rpx;
- width: 46rpx;
- height: 52rpx;
- }
-
- .abso .now {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 800;
- }
- </style>
|