xat.vue 18.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711
<template>
  <view class="container" style="width: 100%;	min-height: 160vh;position: relative;">
    <view
      style="background-image: url('/static/product/zptop.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;width: 100%;height: 32vh;">

    </view>
    <view
      style="width: 95%;margin: -18vh auto 10px;border-radius: 10px;box-sizing: border-box;padding: 20px;background-color: #fff;display: flex;justify-content: space-around;">
      <view>昨日收益:{{ yesterdayMoney }}</view>
      <view>累计使用:{{ haveUsed }}</view>
      <view>持有数量:{{ haveNum }}</view>
    </view>
    <view style="width: 95%;margin: 0vh auto 0;border-radius: 10px;">
      <!-- <view
              style="color:#022360;font-weight: bold;font-size: 18px;width: 100%;text-align: center;margin-top: 8vh;">
              邀请1人领取6000雄安补贴+8000现金</view> -->
      <view v-for="(item, index) in list" :key="index" :style="{
        width: '95%',
      }"
        style="margin: 10px auto;background-color: #fff;box-sizing: border-box;padding: 8px 10px;border-radius: 10px;">
        <view style="display: flex;flex-direction: column;align-items: center;">
          <view :style="{
            backgroundImage: `url('/static/product/c${item.productId}.png')`,
            backgroundSize: '100% 100%',
            backgroundPosition: 'center',
            backgroundRepeat: 'no-repeat',
            width: '250px',
            height: '120px'
          }" style="border-radius: 10px;">
          </view>
          <view style="display: flex;flex-direction: column;margin-top:10px;align-items: center;width: 100%;">
            <!-- <view style="display: flex;flex-direction: column;align-items: center;">
              <view style="font-weight: bold;">
                {{ item.productName }}

              </view>
              <view style="font-size: 10px;">
                {{ item.productTitle }}

              </view>

            </view> -->

            <view style="display: flex;align-items: center;font-size: 10px;justify-content: space-around;width: 100%;">
              <view style="display: flex;align-items: center;flex-direction: column;">
                <view style="font-size: 14px;font-weight: bold;">卡内余额</view>
                <view style="font-size: 14px;color: #e40112;"> {{ item.buttonStyle / 10000 }}</view>
              </view>
              <view style="display: flex;align-items: center;flex-direction: column;">
                <view style="font-size: 14px;font-weight: bold;">可取现额度</view>
                <view style="font-size: 14px;color: #e40112;"> {{ item.fontStyle / 10000 }}</view>
              </view>
              <view style="display: flex;align-items: center;flex-direction: column;">
                <view style="font-size: 14px;font-weight: bold;">补助收益</view>
                <view style="font-size: 14px;color: #e40112;">{{ item.orderNum }}元/天</view>
              </view>
              <view style="display: flex;align-items: center;flex-direction: column;" v-if="item.productId == 99">
                <view style="font-size: 14px;font-weight: bold;">赠送支票</view>
                <view style="font-size: 14px;color: #e40112;">20万</view>
              </view>
            </view>
          </view>
        </view>
        <view
          style="color:#fff;font-size: 12px;width: 70%;text-align: center;margin: 0px auto;height: 30px; border-radius: 15px;line-height: 30px;background-color: #e40112;margin-top: 5px;"
          @click="zttc(item)">
          查看进度
        </view>
      </view>
    </view>
    <!-- <view class="tabbar">
          <tabbar num="3"></tabbar>
      </view> -->
    <!-- <view class="">
      <Payup @close="payclose" :show="payshow" :url="urls" wechat="1" zfb="1" ysf="1" :mony="paymony" :title="paytitle"
        :type="paytype" payway="0" :zfsm="paysm" btn="立即开通">
      </Payup>
    </view> -->
    <uv-popup mode="bottom" ref="stepPop" customStyle="height: 700rpx;">
      <view
        style=" width: 100%;border-radius: 10px;display: flex;justify-content: space-between;flex-direction: column;overflow-y: auto;box-sizing: border-box;padding: 20px">
        <u-steps :current="stepObj.status" direction="column">
          <u-steps-item :title="item.title" v-for="(item, index) in stepArr1"
            :status="stepObj.status == 0 ? 'finish' : 'wait'">
            <template v-slot:desc>
              <view style="display: flex;justify-content: space-between;">
                <view style="flex: 1;margin-right: 20px;">{{ item.desc }}</view>
                <view class="warpbtn">
                  <view class="btn11" @click="jiaoqian(stepObj.extend4, 1)" v-if="stepObj.extend4 && index == 1">
                    {{ item[`desc${stepObj.extend4}`] }}</view>
                  <view class="btn11" @click="jiaoqian(stepObj.extend5, 2)" v-if="stepObj.extend5 && index == 2">
                    {{ item[`desc${stepObj.extend5}`] }}</view>
                  <view class="btn11" @click="jiaoqian(stepObj.extend6, 3)" v-if="stepObj.extend6 && index == 3">
                    {{ item[`desc${stepObj.extend6}`] }}</view>
                </view>
              </view>
            </template>
          </u-steps-item>
        </u-steps>
      </view>
    </uv-popup>
    <Payup @close="payclose" :productId="productId" :show="payshow" :url="urls" wechat="1" zfb="1" ysf="1" :mony="paymony" :title="paytitle"
      :type="paytype" payway="0" :zfsm="paysm" btn="立即支付">
    </Payup>
  </view>
</template>
<script>
import tabbar from "@/components/TarBar/TarBar.vue";
import Payup from "@/components/payup/payup.vue";

export default {
  components: {
    Payup,
    tabbar,
  },
  data() {
    return {
      height: 1280,
      hbimg: "",
      invitnum: '',
      linkstr: '',
      qr: false,
      link: false,
      invit: false,
      show: false,
      missionList: '',
      list: '',
      arrList: {
        code: 'https://qm.qq.com/cgi-bin/qm/qr?k=LKqML292dD2WvwQfAJXBUmvgbiB_TZWF&noverify=0',
        size: 250, // 二维码大小
        type: 'none',
        padding: 1,
      },
      yesterdayMoney: null,
      haveUsed: null,
      haveNum: null,
      productId: '',
      stepObj: { status: 1 },
      payshow: false,
      paysm: '',
      paytitle: '绑定支付宝',
      paytype: 12,
      paymony: 199,
      urls: '/ops/daybook',
      stepArr: [
        { title: '申购成功', desc: "恭喜您申购成功,请耐心等待" },
        { title: '正在制卡中', desc: "正在为您制卡中", desc1: "立即制卡", desc2: "制卡中", desc3: '已制卡' },
        { title: '银行备案中', desc: "资料已送报工信局备案", desc1: "提交资料费", desc2: "审核中", desc3: '已审核' },
        { title: '备案完成', desc: "您的专属工作人员已成功取卡,准备为您上门", desc1: "快递上门服务费", desc2: "审核中", desc3: '已审核' },
        { title: '上门中', desc: "请保持电话24小时畅通,以免错过电话" },
      ],
      stepArr1: []
    };
  },
  onPullDownRefresh() {
    uni.startPullDownRefresh();
  },
  onLoad() {

    this.action = getApp().globalData.base;

    this.$request("/ops/appmenu/list", {}, "get").then((res) => {
      this.menulist = res.data.rows.filter((item) => item.amenuType == 1);
      this.fornum = this.menulist.length % 4;
      if (this.fornum == 0) {
        this.fornum = 4;
      }
      // 邀请图片
    });
    this.getInfo()
    this.getList()

  },
  onShow() {
    uni.hideTabBar();

    this.$request(
      "/system/config/configKey/mous/apk_version",
      {},
      "get",
      true,
      true
    ).then((res) => {
      this.kfUrl = res.data.msg;
    });

    this.$request("/system/user/qRCode", {}, "get").then((res) => {
      // this.linkstr = res.data.data
      this.invitnum = res.data.data.slice(-6);
    });
    this.getuserinfo();
    this.getList()
  },
  methods: {
    zttc(item) {
      this.stepObj = item
      this.$refs.stepPop.open('bottom')
      this.stepArr1 = this.stepArr.filter((v, index) => index <= item.status)
    },
    jiaoqian(type, type1) {
      if (type != 1) {
        return false
      }
      this.paytype = 12
      this.paymony = 199
      this.productId = this.stepObj.id
      if (type1 == 1) {
        this.paytitle = '制卡费'
      }
      if (type1 == 2) {
        this.paytitle = '提交资料费'
      }
      if (type1 == 3) {
        this.paytitle = '快速上门服务费'
      }
      this.payshow = true
    },
    getList() {
      this.$request("/system/user/xatList", {}, "get").then((res) => {
        // this.linkstr = res.data.data
        // this.invitnum = res.data.data.slice(-6);
        this.list = res.data.data.xatList

        this.yesterdayMoney = res.data.yesterdayMoney
        this.haveUsed = res.data.data.haveUsed
        this.haveNum = res.data.data.number
      });
    },
    missionClick(item) {
      console.log(item.status)
      if (item.status == 0) {
        this.goyq()
      }
      if (item.status == 2) {

      }
      if (item.status == 1) {

        this.$request(" /system/user/claimRewards ", { id: item.id }, "post").then((res) => {
          uni.showToast({
            title: '领取成功',
            icon: 'none'
          })
          this.getuserinfo();
          this.getInfo()
        });
      }
    },
    getInfo() {
      this.$request("/system/user/allTask", {}, 'get').then((res) => {
        console.log(res.data)
        this.missionList = res.data.data.sort((obj1, obj2) => Number(obj1.column1) - Number(obj2.column1));
      })
    },

    paste(value) {
      uni.setClipboardData({
        data: value
      });
    },
    qrshare() {
      uni.navigateTo({
        url: '/components/invite/haibao'
      })
    },

    bc() {
      uni.showToast({
        title: '若遇保存失败,请截图分享',
        icon: 'none'
      })
    },
    gojp() {
      if (!this.smpd) {
        uni.showToast({
          title: "请先进行实名认证",
          icon: "none",
        });

        let sm = setTimeout(() => {
          uni.navigateTo({
            url: "/components/my/shiming",
          });
          clearTimeout(sm);
        }, 1500);
        return;
      }
      uni.navigateTo({
        url: "/components/my/jp",
      });
    },
    gomx(tab) {
      uni.navigateTo({
        url: `/components/my/zjmx/zjmx?tab=${tab}`,
      });

    },
    closedh() {
      this.showdh = false;
    },
    qhxj() {
      if (!this.smpd) {
        uni.showToast({
          title: "请先进行实名认证",
          icon: "none",
        });

        let sm = setTimeout(() => {
          uni.navigateTo({
            url: "/components/my/shiming",
          });
          clearTimeout(sm);
        }, 1500);
        return;
      }

      this.showdh = true;
    },

    payclose(i) {
      this.payshow = i;
    },

    tytsconfirm() {
      this.tyts = false;
      uni.reLaunch({
        url: "/pages/index/index",
      });
    },

    sign() {
      this.$request("/system/user/sign", {}, "Put", true).then((res) => {
        if (res.data.code == 200) {
          this.getuserinfo();
          // this.isshowqd = true
          uni.showToast({
            title: "恭喜您签到成功",
            icon: "none",
          });
          // this.showMask = true
        } else {
          uni.showToast({
            title: res.data.msg,
            icon: "none",
          });
        }
        // console.log(res);
      });
    },
    close(i) {
      this.show = i;
    },

    //获取用户信息
    getuserinfo() {
      this.$request("/system/user/", {}, "get").then((res) => {
        this.wsm = res.data.nickName;
        this.pname = res.data.pname;

        if (res.data.q0 || res.data.q0 == 0) {
          this.q0 = res.data.q0;
        }
        if (res.data.q1 || res.data.q1 == 0) {
          this.q1 = res.data.q1;
        }
        if (res.data.q2 || res.data.q2 == 0) {
          this.q2 = res.data.q2;
        }
        if (res.data.q3 || res.data.q3 == 0) {
          this.q3 = res.data.q3;
        }
        if (res.data.q4 || res.data.q4 == 0) {
          this.q4 = res.data.q4;
        }
        if (res.data.q5) {
          this.q5 = res.data.q5;
        }
        if (res.data.q6) {
          this.q6 = res.data.q6;
        }
        if (res.data.q7) {
          this.q7 = res.data.q7;
        }
        if (res.data.vip) {
          this.vip = res.data.vip;
        }
        this.username = res.data;
        this.signs = res.data.todaySign;
        // console.log(res.data);
        if (res.data.data == "true") {
          this.smpd = true;
          //判断用户是否实名
          this.shiming = res.data.data;
        }
      });
    },


    yj() {
      console.log("111111")
      if (this.username.smCount < 3) {
        uni.showToast({
          title: "请先邀请3人实名注册",
          icon: "none",
        });
      } else {
        uni.showToast({
          title: "请等待开放提现服务",
          icon: "none",
        });
      }

    },




    // 跳转导航
    go(url, amenuContent) {
      if (amenuContent == 1) {
        this.edit();
      } else if (amenuContent == 2) {
        // #ifdef APP
        // void plus.runtime.openWeb(encodeURI(url));
        plus.runtime.openURL(encodeURI(this.kfUrl));
        // #endif
        // #ifdef H5
        location.href = this.kfUrl;
        // #endif
      } else {
        uni.navigateTo({
          url: url,
        });
      }
    },

    go1() {
      uni.navigateTo({
        url: "/components/my/xgzl",
      });
    },
    go22() {
      uni.navigateTo({
        url: "/components/my/bank/bank",
      });
    },
    go2() {
      uni.navigateTo({
        url: "/components/ptzw12",
      });
    },
    go21() {
      uni.navigateTo({
        url: "/components/ptzw12a",
      });
    },
    go3() {
      uni.navigateTo({
        url: "/components/my/withdraw/withdraw",
      });
    },
    go4() {
      uni.navigateTo({
        url: "/components/my/team",
      });
    },
    go5() {
      uni.navigateTo({
        url: "/components/my/shdz/shdz",
      });
    },
    go6() {
      uni.navigateTo({
        url: "/components/my/tzjl",
      });
    },
    go8() {
      uni.navigateTo({
        url: "/components/my/download/download",
      });
    },
    go9() {
      let kfUrl = 'https://kf.xiongaxsd.com/#/chat'
      // #ifdef APP

      plus.runtime.openURL(encodeURI(kfUrl));
      // #endif
      // #ifdef H5

      location.href = kfUrl;
      // #endif
    },
    // 跳转邀请
    goyq(item) {
      console.log(item)
      let data = JSON.stringify(item)
      uni.navigateTo({
        url: `/components/buytk?item=${data}`,
      });
    },
    gotdz() {
      uni.navigateTo({
        url: "/pages/tdzqy/tdzqy",
      });
    },

    // 提现
    gotx() {

    },

    // 跳转到提现页面
    gopay(balance, type, title) {
      console.log(balance, "balance")
      console.log(type, "type")
      console.log(title, "title")
      if (balance <= 0) {
        uni.showToast({
          title: "余额不足",
          icon: "none",
        });
      } else {
        uni.navigateTo({
          url: `/components/my/tixian/tixian?balance=${balance}&type=${type}&title=${title}`,
        });
      }
    },
    // 跳转充值
    gocz() {
      uni.navigateTo({
        url: "/components/my/chongzhi",
      });
    },

    gotz() {
      uni.navigateTo({
        url: "/components/my/tzjl",
      });
    },

    //跳转资金明细
    gozijin(val) {
      uni.navigateTo({
        url: `/components/my/zjmx/zjmx?tab=${val}`,
      });
    },

    edit() {
      uni.showModal({
        title: "退出确认",
        content: "您确定要退出登录吗?",
        success(res) {
          if (res.confirm) {
            uni.removeStorageSync("token"),
              uni.reLaunch({
                url: "/pages/Login/Login",
                success() {
                  history.pushState(null, null, location.href);
                },
              });
          }
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
page {
  // background-image: url('../../static/my/bg.png');

  // padding-top: 30px;
}

.top {
  // background-image: url("../../static/vv1.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: #000;
  // background-image: linear-gradient(to top, #f7cf72 0%, #ff973e 100%);
  height: 280rpx;
  // width: 95%;
  margin: 0 auto;
  // border-radius: 12px;

  display: flex;
  // flex-direction: column;
  align-items: center;

}

.btn {
  width: 75%;
  height: 40px;
  font-size: 18px;
  font-weight: bold;
  line-height: 35px;
  text-align: center;
  color: #fff;
  border-radius: 28px;
  margin-top: 20px;
  margin-left: 20%;
  // margin: 50px auto 0;
  // background-color: #227be1;
  // background-image: linear-gradient(to top, #ff7d38 0%, #ffb60d 100%) // background-image: url('../../static/ljsq.png');
}

.warpbtn {
  display: flex;

  .btn11 {
    width: 240rpx;
    height: 60rpx;
    line-height: 60rpx;
    text-align: center;
    border-radius: 50rpx;
    background: red;
    color: #fff;
  }
}

.zc {
  // background-color: red;
  // background-image: url('../../static/my/zcbg.png');
  // box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.5);
  width: 100%;
  margin: -105rpx auto 0;
  // height: 440rpx;
  box-sizing: border-box;
  padding-top: 45rpx;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;

  .zcitem1 {
    margin-bottom: 10px;
    border-radius: 8px;
    // margin-right: 5px;
    height: 198rpx;
    width: 32%;
    padding: 20rpx 0rpx;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    background-image: linear-gradient(to top, #eac7d4 0%, #fefdfe 100%);
    // background-image: url('../../static/my/gryl.png');
  }
}

.botoom {
  padding: 40rpx 0 10px;
  border-radius: 12px;
  box-sizing: border-box;
  width: 97%;
  margin: 10px auto 0;
  background-color: #fff;
}

.nav {
  display: flex;
  // flex-direction: column;
  justify-content: space-around;
  flex-wrap: wrap;

  // background-image: url('../../static/my/navbg.png');
  // height: 300px;
  padding: 10px 0;

  .nav-item {
    // background-color: red;
    // border-bottom: 1px solid #ccc;
    // border-radius: 6px;
    // height: 45px;
    display: flex;
    text-align: center;
    // flex-direction: column;
    align-items: center;
    // background-color: rebeccapurple;
    justify-content: center;
    box-sizing: border-box;
    padding: 7px 0;
    margin: 0px auto;
    width: 32%;
    color: #000;
  }

  .zh {
    border-bottom: none;
  }
}

.edit {
  // background-image: url('../../static/my/tc.png');
  font-size: 16px;
  text-align: center;
  height: 55px;
  line-height: 55px;
  width: 94%;
  color: rgba(248, 231, 191, 1);
  border-radius: 12px;
  margin: 10px auto 20px;
}

.btn1 {
  background-color: #999;
}
</style>