|
@@ -1,295 +1,309 @@
|
|
|
-<template>
|
|
|
|
|
- <view class="content">
|
|
|
|
|
- <view class="yue">
|
|
|
|
|
- <view class="font">当前余额</view>
|
|
|
|
|
- <view class="money">{{ nowmoney | getMoneyStyle }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="row-box">
|
|
|
|
|
- <view class="title">充值金额</view>
|
|
|
|
|
- <view class="row">
|
|
|
|
|
- <text class="tit">¥</text>
|
|
|
|
|
- <input class="input" type="number" v-model="money" placeholder="请输入充值金额"
|
|
|
|
|
- placeholder-class="placeholder" />
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="list">
|
|
|
|
|
- <radio-group @change="tabRadio">
|
|
|
|
|
- <!-- #ifndef APP-PLUS -->
|
|
|
|
|
- <!-- <label>
|
|
|
|
|
- <view class="box">
|
|
|
|
|
- <view class="icon iconfont iconweixin1"></view>
|
|
|
|
|
- <view class="title-box">
|
|
|
|
|
- <view class="title"><text>微信充值</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="right"><radio value="weixin" color=" #456ffb" :checked="type == 'weixin'" /></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </label> -->
|
|
|
|
|
- <!-- #endif -->
|
|
|
|
|
- <!-- #ifdef APP-PLUS -->
|
|
|
|
|
- <!-- <label>
|
|
|
|
|
- <view class="box">
|
|
|
|
|
- <view class="icon iconfont iconzhifubao"></view>
|
|
|
|
|
- <view class="title-box">
|
|
|
|
|
- <view class="title"><text>支付宝支付</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="right"><radio value="ali" color=" #456ffb" :checked="type == 'ali'" /></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </label> -->
|
|
|
|
|
- <!-- #endif -->
|
|
|
|
|
- <label>
|
|
|
|
|
- <view class="box">
|
|
|
|
|
- <view class="icon iconfont">
|
|
|
|
|
- <image class="yongjing" src="http://xmpt.liuniu946.com/img/yongjing.png"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="title-box">
|
|
|
|
|
- <view class="title"><text>佣金充值</text></view>
|
|
|
|
|
- <view class="node">可用佣金¥{{ yongMoney?yongMoney:0 }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="right">
|
|
|
|
|
- <radio value="yongjing" color=" #456ffb" :checked="type == 'yongjing'" />
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </label>
|
|
|
|
|
-
|
|
|
|
|
- </radio-group>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button class="add-btn up" :class="{ 'active-bg': payLoding }"
|
|
|
|
|
- @click="!payLoding ? confirm() : ''">确认充值</button>
|
|
|
|
|
- </view>
|
|
|
|
|
-</template>
|
|
|
|
|
-
|
|
|
|
|
-<script>
|
|
|
|
|
- import {
|
|
|
|
|
- getMoneyStyle
|
|
|
|
|
- } from '@/utils/rocessor.js';
|
|
|
|
|
- import {
|
|
|
|
|
- userBalance,
|
|
|
|
|
- extractBank,
|
|
|
|
|
- rechargeWechat
|
|
|
|
|
- } from '@/api/wallet.js';
|
|
|
|
|
- // #ifdef H5
|
|
|
|
|
- import weixinObj from "@/plugin/jweixin-module/index.js";
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef MP
|
|
|
|
|
- import {
|
|
|
|
|
- rechargeRoutine
|
|
|
|
|
- } from '@/api/wallet.js';
|
|
|
|
|
- // #endif
|
|
|
|
|
- import {
|
|
|
|
|
- mapState
|
|
|
|
|
- } from 'vuex';
|
|
|
|
|
- export default {
|
|
|
|
|
- filters: {
|
|
|
|
|
- getMoneyStyle
|
|
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- // #ifdef H5
|
|
|
|
|
- type: 'yongjing',
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifndef H5
|
|
|
|
|
- type: 'weixin',
|
|
|
|
|
- // #endif
|
|
|
|
|
- money: '', //充值金额
|
|
|
|
|
- payLoding: false, //是否加载中
|
|
|
|
|
- yongMoney: '',
|
|
|
|
|
- nowmoney: '',
|
|
|
|
|
- typeText: 1 //默认支付方式
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- watch: {
|
|
|
|
|
- type(newValue, oldValue) {
|
|
|
|
|
- console.log(newValue);
|
|
|
|
|
- console.log(oldValue);
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- onShow() {
|
|
|
|
|
- this.yongMoney = ''
|
|
|
|
|
- userBalance({}).then(({
|
|
|
|
|
- data
|
|
|
|
|
- }) => {
|
|
|
|
|
- console.log(data);
|
|
|
|
|
- this.nowmoney = data.now_money;
|
|
|
|
|
- });
|
|
|
|
|
- extractBank({}).then(({
|
|
|
|
|
- data
|
|
|
|
|
- }) => {
|
|
|
|
|
- this.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
|
|
|
|
|
- console.log(data, 'wwwww');
|
|
|
|
|
- this.disable = true
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- onLoad(options) {},
|
|
|
|
|
- computed: {
|
|
|
|
|
- // #ifdef H5
|
|
|
|
|
- ...mapState(['weichatObj'])
|
|
|
|
|
- // #endif
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- // 跳转
|
|
|
|
|
- navTo(url) {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: url
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- // 切换选中对象
|
|
|
|
|
- tabRadio(e) {
|
|
|
|
|
- console.log(e, '选中');
|
|
|
|
|
- if (e.detail.value == 'weixin') {
|
|
|
|
|
- this.typeText = 0;
|
|
|
|
|
- }
|
|
|
|
|
- if (e.detail.value == 'yongjing') {
|
|
|
|
|
- this.typeText = 1;
|
|
|
|
|
- }
|
|
|
|
|
- // if (e.detail.value == 'ali') {
|
|
|
|
|
- // this.typeText = 2;
|
|
|
|
|
- // }
|
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
|
|
- this.type = e.target.value
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifndef APP-PLUS
|
|
|
|
|
- this.type = e.detail.value;
|
|
|
|
|
- // #endif
|
|
|
|
|
- console.log(this.typeText);
|
|
|
|
|
- },
|
|
|
|
|
- // 提交
|
|
|
|
|
- // confirm() {
|
|
|
|
|
- // let obj = this;
|
|
|
|
|
- // obj.payLoding = true;
|
|
|
|
|
- // // #ifdef H5
|
|
|
|
|
- // rechargeWechat({ price: this.money, from: this.type })
|
|
|
|
|
- // .then(e => {
|
|
|
|
|
- // let da = e.data.data;
|
|
|
|
|
- // obj.weichatObj.chooseWXPay({
|
|
|
|
|
- // timestamp: da.timestamp,
|
|
|
|
|
- // nonceStr: da.nonceStr,
|
|
|
|
|
- // package: da.package,
|
|
|
|
|
- // signType: da.signType,
|
|
|
|
|
- // paySign: da.paySign,
|
|
|
|
|
- // success: function(res) {
|
|
|
|
|
- // uni.showToast({
|
|
|
|
|
- // title: '充值成功',
|
|
|
|
|
- // duration: 2000,
|
|
|
|
|
- // position: 'top'
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch(e => {
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // console.log(e);
|
|
|
|
|
- // });
|
|
|
|
|
- // // #endif
|
|
|
|
|
- // // #ifdef MP
|
|
|
|
|
- // rechargeRoutine({ price: this.money})
|
|
|
|
|
- // .then(e => {
|
|
|
|
|
- // let da = e.data;
|
|
|
|
|
- // wx.requestPayment({
|
|
|
|
|
- // timeStamp: da.timestamp,
|
|
|
|
|
- // nonceStr: da.nonceStr,
|
|
|
|
|
- // package: da.package,
|
|
|
|
|
- // signType: da.signType,
|
|
|
|
|
- // paySign: da.paySign,
|
|
|
|
|
- // success: function(res) {
|
|
|
|
|
- // uni.redirectTo({
|
|
|
|
|
- // url: '/pages/money/paySuccess'
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
-
|
|
|
|
|
- // })
|
|
|
|
|
-
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch(e => {
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // console.log(e);
|
|
|
|
|
- // });
|
|
|
|
|
- // // #endif
|
|
|
|
|
- // },
|
|
|
|
|
- confirm() {
|
|
|
|
|
- console.log('开始充值');
|
|
|
|
|
- let obj = this;
|
|
|
|
|
- if (obj.payLoding) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (obj.money == '') {
|
|
|
|
|
- obj.$api.msg('请输入充值金额');
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (obj.typeText == null) {
|
|
|
|
|
- obj.$api.msg('请选择充值方式');
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (obj.type == 'yongjing' && obj.money > parseInt(obj.yongMoney)) {
|
|
|
|
|
- obj.$api.msg('佣金不足');
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- obj.payLoding = true
|
|
|
|
|
- // // #ifdef H5
|
|
|
|
|
- // rechargeWechat({ price: this.money, from: this.type })
|
|
|
|
|
- // .then(e => {
|
|
|
|
|
- // let da = e.data.data;
|
|
|
|
|
- // obj.weichatObj.chooseWXPay({
|
|
|
|
|
- // timestamp: da.timestamp,
|
|
|
|
|
- // nonceStr: da.nonceStr,
|
|
|
|
|
- // package: da.package,
|
|
|
|
|
- // signType: da.signType,
|
|
|
|
|
- // paySign: da.paySign,
|
|
|
|
|
- // success: function(res) {
|
|
|
|
|
- // uni.showToast({
|
|
|
|
|
- // title: '充值成功',
|
|
|
|
|
- // duration: 2000,
|
|
|
|
|
- // position: 'top'
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch(e => {
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // console.log(e);
|
|
|
|
|
- // });
|
|
|
|
|
- // // #endif
|
|
|
|
|
- // // #ifdef MP
|
|
|
|
|
- // rechargeRoutine({ price: this.money})
|
|
|
|
|
- // .then(e => {
|
|
|
|
|
- // let da = e.data;
|
|
|
|
|
- // wx.requestPayment({
|
|
|
|
|
- // timeStamp: da.timestamp,
|
|
|
|
|
- // nonceStr: da.nonceStr,
|
|
|
|
|
- // package: da.package,
|
|
|
|
|
- // signType: da.signType,
|
|
|
|
|
- // paySign: da.paySign,
|
|
|
|
|
- // success: function(res) {
|
|
|
|
|
- // uni.redirectTo({
|
|
|
|
|
- // url: '/pages/money/paySuccess'
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
-
|
|
|
|
|
- // })
|
|
|
|
|
-
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch(e => {
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // console.log(e);
|
|
|
|
|
- // });
|
|
|
|
|
- // // #endif
|
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
|
|
|
|
+<template>
|
|
|
|
|
+ <view class="content">
|
|
|
|
|
+ <view class="yue">
|
|
|
|
|
+ <view class="font">当前余额</view>
|
|
|
|
|
+ <view class="money">{{ nowmoney | getMoneyStyle }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="row-box">
|
|
|
|
|
+ <view class="title">充值金额</view>
|
|
|
|
|
+ <view class="row">
|
|
|
|
|
+ <text class="tit">¥</text>
|
|
|
|
|
+ <input class="input" type="number" v-model="money" placeholder="请输入充值金额" placeholder-class="placeholder" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="list">
|
|
|
|
|
+ <radio-group @change="tabRadio">
|
|
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
|
|
+ <label>
|
|
|
|
|
+ <view class="box">
|
|
|
|
|
+ <view class="icon iconfont iconweixin1"></view>
|
|
|
|
|
+ <view class="title-box">
|
|
|
|
|
+ <view class="title"><text>微信充值</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="right"><radio value="weixin" color=" #456ffb" :checked="type == 'weixin'" /></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
|
|
+ <!-- <label>
|
|
|
|
|
+ <view class="box">
|
|
|
|
|
+ <view class="icon iconfont iconzhifubao"></view>
|
|
|
|
|
+ <view class="title-box">
|
|
|
|
|
+ <view class="title"><text>支付宝支付</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="right"><radio value="ali" color=" #456ffb" :checked="type == 'ali'" /></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </label> -->
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ <label>
|
|
|
|
|
+ <view class="box">
|
|
|
|
|
+ <view class="icon iconfont"><image class="yongjing" src="http://xmpt.liuniu946.com/img/yongjing.png"></image></view>
|
|
|
|
|
+ <view class="title-box">
|
|
|
|
|
+ <view class="title"><text>佣金充值</text></view>
|
|
|
|
|
+ <view class="node">可用佣金¥{{ yongMoney ? yongMoney : 0 }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="right"><radio value="yongjing" color=" #456ffb" :checked="type == 'yongjing'" /></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </radio-group>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import { getMoneyStyle } from '@/utils/rocessor.js';
|
|
|
|
|
+import { userBalance, extractBank, rechargeWechat } from '@/api/wallet.js';
|
|
|
|
|
+// #ifdef H5
|
|
|
|
|
+import weixinObj from '@/plugin/jweixin-module/index.js';
|
|
|
|
|
+// #endif
|
|
|
|
|
+// #ifdef MP
|
|
|
|
|
+import { rechargeRoutine } from '@/api/wallet.js';
|
|
|
|
|
+// #endif
|
|
|
|
|
+// #ifdef APP-PLUS
|
|
|
|
|
+import { rechargeApp, rechargeAli, moneyChong } from '@/api/wallet.js';
|
|
|
|
|
+// #endif
|
|
|
|
|
+import { mapState } from 'vuex';
|
|
|
|
|
+export default {
|
|
|
|
|
+ filters: {
|
|
|
|
|
+ getMoneyStyle
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ type: 'yongjing',
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifndef H5
|
|
|
|
|
+ type: 'yongjing',
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ money: '', //充值金额
|
|
|
|
|
+ payLoding: false, //是否加载中
|
|
|
|
|
+ yongMoney: '',
|
|
|
|
|
+ nowmoney: '',
|
|
|
|
|
+ typeText: 1 //默认支付方式
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ type(newValue, oldValue) {
|
|
|
|
|
+ console.log(newValue);
|
|
|
|
|
+ console.log(oldValue);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ this.yongMoney = '';
|
|
|
|
|
+ userBalance({}).then(({ data }) => {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ this.nowmoney = data.now_money;
|
|
|
|
|
+ });
|
|
|
|
|
+ extractBank({}).then(({ data }) => {
|
|
|
|
|
+ this.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
|
|
|
|
|
+ console.log(data, 'wwwww');
|
|
|
|
|
+ this.disable = true;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad(options) {},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ ...mapState(['weichatObj'])
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ // 跳转
|
|
|
|
|
+ navTo(url) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: url
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 切换选中对象
|
|
|
|
|
+ tabRadio(e) {
|
|
|
|
|
+ if (e.detail.value == 'weixin') {
|
|
|
|
|
+ this.typeText = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (e.detail.value == 'yongjing') {
|
|
|
|
|
+ this.typeText = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ // if (e.detail.value == 'ali') {
|
|
|
|
|
+ // this.typeText = 2;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ this.type = e.target.value;
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifndef APP-PLUS
|
|
|
|
|
+ this.type = e.detail.value;
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ console.log(this.typeText);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 提交
|
|
|
|
|
+ // confirm() {
|
|
|
|
|
+ // let obj = this;
|
|
|
|
|
+ // obj.payLoding = true;
|
|
|
|
|
+ // // #ifdef H5
|
|
|
|
|
+ // rechargeWechat({ price: this.money, from: this.type })
|
|
|
|
|
+ // .then(e => {
|
|
|
|
|
+ // let da = e.data.data;
|
|
|
|
|
+ // obj.weichatObj.chooseWXPay({
|
|
|
|
|
+ // timestamp: da.timestamp,
|
|
|
|
|
+ // nonceStr: da.nonceStr,
|
|
|
|
|
+ // package: da.package,
|
|
|
|
|
+ // signType: da.signType,
|
|
|
|
|
+ // paySign: da.paySign,
|
|
|
|
|
+ // success: function(res) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '充值成功',
|
|
|
|
|
+ // duration: 2000,
|
|
|
|
|
+ // position: 'top'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // // #endif
|
|
|
|
|
+ // // #ifdef MP
|
|
|
|
|
+ // rechargeRoutine({ price: this.money})
|
|
|
|
|
+ // .then(e => {
|
|
|
|
|
+ // let da = e.data;
|
|
|
|
|
+ // wx.requestPayment({
|
|
|
|
|
+ // timeStamp: da.timestamp,
|
|
|
|
|
+ // nonceStr: da.nonceStr,
|
|
|
|
|
+ // package: da.package,
|
|
|
|
|
+ // signType: da.signType,
|
|
|
|
|
+ // paySign: da.paySign,
|
|
|
|
|
+ // success: function(res) {
|
|
|
|
|
+ // uni.redirectTo({
|
|
|
|
|
+ // url: '/pages/money/paySuccess'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
|
|
+ // })
|
|
|
|
|
+
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // // #endif
|
|
|
|
|
+ // },
|
|
|
|
|
+ confirm() {
|
|
|
|
|
+ console.log('开始充值');
|
|
|
|
|
+ let obj = this;
|
|
|
|
|
+ if (obj.payLoding) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (obj.money == '') {
|
|
|
|
|
+ obj.$api.msg('请输入充值金额');
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (obj.typeText == null) {
|
|
|
|
|
+ obj.$api.msg('请选择充值方式');
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (obj.type == 'yongjing' && obj.money > parseInt(obj.yongMoney)) {
|
|
|
|
|
+ obj.$api.msg('佣金不足');
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ obj.payLoding = true;
|
|
|
|
|
+ // // #ifdef H5
|
|
|
|
|
+ // rechargeWechat({ price: this.money, from: this.type })
|
|
|
|
|
+ // .then(e => {
|
|
|
|
|
+ // let da = e.data.data;
|
|
|
|
|
+ // obj.weichatObj.chooseWXPay({
|
|
|
|
|
+ // timestamp: da.timestamp,
|
|
|
|
|
+ // nonceStr: da.nonceStr,
|
|
|
|
|
+ // package: da.package,
|
|
|
|
|
+ // signType: da.signType,
|
|
|
|
|
+ // paySign: da.paySign,
|
|
|
|
|
+ // success: function(res) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '充值成功',
|
|
|
|
|
+ // duration: 2000,
|
|
|
|
|
+ // position: 'top'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // // #endif
|
|
|
|
|
+ // // #ifdef MP
|
|
|
|
|
+ // rechargeRoutine({ price: this.money})
|
|
|
|
|
+ // .then(e => {
|
|
|
|
|
+ // let da = e.data;
|
|
|
|
|
+ // wx.requestPayment({
|
|
|
|
|
+ // timeStamp: da.timestamp,
|
|
|
|
|
+ // nonceStr: da.nonceStr,
|
|
|
|
|
+ // package: da.package,
|
|
|
|
|
+ // signType: da.signType,
|
|
|
|
|
+ // paySign: da.paySign,
|
|
|
|
|
+ // success: function(res) {
|
|
|
|
|
+ // uni.redirectTo({
|
|
|
|
|
+ // url: '/pages/money/paySuccess'
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
|
|
+ // })
|
|
|
|
|
+
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // obj.payLoding = false;
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // // #endif
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ if(obj.typeText == 0){
|
|
|
|
|
+ console.log(obj.money,obj.typeText,'0weixin');
|
|
|
|
|
+ rechargeApp({ price: obj.money })
|
|
|
|
|
+ .then(e => {
|
|
|
|
|
+ console.log(e,"123456");
|
|
|
|
|
+ let da = e.data;
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ appid: da.appid,
|
|
|
|
|
+ noncestr: da.noncestr,
|
|
|
|
|
+ package: da.package,
|
|
|
|
|
+ partnerid: da.partnerid,
|
|
|
|
|
+ prepayid: da.prepayid,
|
|
|
|
|
+ timestamp: da.timestamp,
|
|
|
|
|
+ sign: da.sign
|
|
|
|
|
+ };
|
|
|
|
|
+ uni.requestPayment({
|
|
|
|
|
+ provider: 'wxpay',
|
|
|
|
|
+ orderInfo: data,
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ },
|
|
|
|
|
+ fail(res) {
|
|
|
|
|
+ console.log('微信掉起失败');
|
|
|
|
|
+ console.log(res, '失败');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ console.log(e,"123456789");
|
|
|
|
|
+ });
|
|
|
|
|
+ }else {
|
|
|
|
|
+ console.log(this.typeText,'other');
|
|
|
const pushDate = {
|
|
const pushDate = {
|
|
|
price: this.money,
|
|
price: this.money,
|
|
|
from: this.typeText == 1 ? 'yongjing' : 'ali',
|
|
from: this.typeText == 1 ? 'yongjing' : 'ali',
|
|
|
type: this.typeText
|
|
type: this.typeText
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
console.log(pushDate, '徐浩岚', rechargeWechat);
|
|
console.log(pushDate, '徐浩岚', rechargeWechat);
|
|
|
- console.log(obj.type, 'type')
|
|
|
|
|
|
|
+ console.log(obj.type, 'type');
|
|
|
rechargeWechat(pushDate)
|
|
rechargeWechat(pushDate)
|
|
|
.then(e => {
|
|
.then(e => {
|
|
|
console.log(e, '返回数据');
|
|
console.log(e, '返回数据');
|
|
@@ -297,295 +311,284 @@
|
|
|
// obj.money = '';
|
|
// obj.money = '';
|
|
|
// obj.yongMoney = ''
|
|
// obj.yongMoney = ''
|
|
|
console.log(obj.type, 'ali');
|
|
console.log(obj.type, 'ali');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (obj.type == 'yongjing') {
|
|
if (obj.type == 'yongjing') {
|
|
|
// const url = e.data.data;
|
|
// const url = e.data.data;
|
|
|
// console.log(url,'url');
|
|
// console.log(url,'url');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '充值成功',
|
|
title: '充值成功',
|
|
|
- duration: 2000,
|
|
|
|
|
|
|
+ duration: 2000
|
|
|
});
|
|
});
|
|
|
- obj.yongMoney = ''
|
|
|
|
|
- userBalance({}).then(({
|
|
|
|
|
- data
|
|
|
|
|
- }) => {
|
|
|
|
|
|
|
+ obj.yongMoney = '';
|
|
|
|
|
+ userBalance({}).then(({ data }) => {
|
|
|
console.log(data);
|
|
console.log(data);
|
|
|
obj.nowmoney = data.now_money;
|
|
obj.nowmoney = data.now_money;
|
|
|
});
|
|
});
|
|
|
- extractBank({}).then(({
|
|
|
|
|
- data
|
|
|
|
|
- }) => {
|
|
|
|
|
|
|
+ extractBank({}).then(({ data }) => {
|
|
|
obj.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
|
|
obj.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
|
|
|
console.log(data, 'wwwww');
|
|
console.log(data, 'wwwww');
|
|
|
- obj.disable = true
|
|
|
|
|
|
|
+ obj.disable = true;
|
|
|
obj.payLoding = false;
|
|
obj.payLoding = false;
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
- // if (obj.type == 'yongjing') {
|
|
|
|
|
- // uni.navigateTo({
|
|
|
|
|
- // url: '/pages/money/rechargeSuccess'
|
|
|
|
|
- // });
|
|
|
|
|
- // obj.payLoding = false;
|
|
|
|
|
- // console.log(e, '佣金');
|
|
|
|
|
- // }
|
|
|
|
|
})
|
|
})
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
obj.money = '';
|
|
obj.money = '';
|
|
|
obj.payLoding = false;
|
|
obj.payLoding = false;
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef H5
|
|
|
|
|
- // rechargeWechat({ price: this.money, from: this.type })
|
|
|
|
|
- const pushDate = {
|
|
|
|
|
- price: this.money,
|
|
|
|
|
- from: 'weixin',
|
|
|
|
|
- type: this.typeText
|
|
|
|
|
- };
|
|
|
|
|
- rechargeWechat(pushDate)
|
|
|
|
|
- .then(e => {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- if (obj.type == 'weixin') {
|
|
|
|
|
- let da = e.data.data;
|
|
|
|
|
- console.log(weixinObj, 'weixin');
|
|
|
|
|
- weixinObj.chooseWXPay({
|
|
|
|
|
- timestamp: da.timestamp,
|
|
|
|
|
- nonceStr: da.nonceStr,
|
|
|
|
|
- package: da.package,
|
|
|
|
|
- signType: da.signType,
|
|
|
|
|
- paySign: da.paySign,
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '充值成功',
|
|
|
|
|
- duration: 2000,
|
|
|
|
|
- position: 'top'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- }
|
|
|
|
|
- console.log(obj.type, '当前', obj.type == 'yongjing');
|
|
|
|
|
- if (obj.type == 'yongjing') {
|
|
|
|
|
- obj.yongMoney = ''
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: './paySuccess',
|
|
|
|
|
-
|
|
|
|
|
- fail(e) {
|
|
|
|
|
- console.log(e, '错误');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- console.log(e, '佣金');
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- });
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef MP
|
|
|
|
|
- rechargeRoutine({
|
|
|
|
|
- price: this.money
|
|
|
|
|
- })
|
|
|
|
|
- .then(e => {
|
|
|
|
|
- let da = e.data;
|
|
|
|
|
- wx.requestPayment({
|
|
|
|
|
- timeStamp: da.timestamp,
|
|
|
|
|
- nonceStr: da.nonceStr,
|
|
|
|
|
- package: da.package,
|
|
|
|
|
- signType: da.signType,
|
|
|
|
|
- paySign: da.paySign,
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- obj.yongMoney = ''
|
|
|
|
|
- uni.redirectTo({
|
|
|
|
|
- url: '/pages/money/paySuccess'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- obj.payLoding = false;
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- });
|
|
|
|
|
- // #endif
|
|
|
|
|
- },
|
|
|
|
|
- //获取订单列表
|
|
|
|
|
- loadData(source) {
|
|
|
|
|
- console.log(source);
|
|
|
|
|
- //这里是将订单挂载到tab列表下
|
|
|
|
|
- let index = this.tabCurrentIndex;
|
|
|
|
|
- let navItem = this.navList[index];
|
|
|
|
|
- let state = navItem.state;
|
|
|
|
|
- if (source === 'tabChange' && navItem.loaded === true) {
|
|
|
|
|
- //tab切换只有第一次需要加载数据
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (navItem.loadingType === 'loading') {
|
|
|
|
|
- //防止重复加载
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- navItem.loadingType = 'loading';
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- let orderList = [];
|
|
|
|
|
- orderList.forEach(item => {
|
|
|
|
|
- navItem.orderList.push(item);
|
|
|
|
|
- });
|
|
|
|
|
- //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
|
|
|
|
|
- this.$set(navItem, 'loaded', true);
|
|
|
|
|
- //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
|
|
- navItem.loadingType = 'more';
|
|
|
|
|
- }, 600);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
-<style lang="scss">
|
|
|
|
|
- page {
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .yue {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- padding: 30rpx 48rpx 30rpx 26rpx;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
-
|
|
|
|
|
- .font {
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- font-family: PingFang SC;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- color: #333333;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .money {
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- font-family: PingFang SC;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #ef041f;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .add-btn {
|
|
|
|
|
- &.modified {
|
|
|
|
|
- color: $base-color;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.up {
|
|
|
|
|
- background-color: $base-color;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- width: 690rpx;
|
|
|
|
|
- height: 80rpx;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- margin-top: 30rpx;
|
|
|
|
|
- font-size: $font-lg;
|
|
|
|
|
- border-radius: 10rpx;
|
|
|
|
|
- // box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .row-box {
|
|
|
|
|
- margin-top: 30rpx;
|
|
|
|
|
- padding: 20rpx 30rpx;
|
|
|
|
|
- background: #fff;
|
|
|
|
|
-
|
|
|
|
|
- .title {
|
|
|
|
|
- font-size: $font-base + 2rpx;
|
|
|
|
|
- color: $font-color-dark;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- position: relative;
|
|
|
|
|
- height: 80rpx;
|
|
|
|
|
-
|
|
|
|
|
- .tit {
|
|
|
|
|
- flex-shrink: 0;
|
|
|
|
|
- width: 40rpx;
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- color: $font-color-dark;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .input {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- color: $font-color-dark;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .iconlocation {
|
|
|
|
|
- font-size: 36rpx;
|
|
|
|
|
- color: $font-color-light;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .buttom {
|
|
|
|
|
- color: $font-color;
|
|
|
|
|
- font-size: $font-base;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .list {
|
|
|
|
|
- padding-left: 30rpx;
|
|
|
|
|
- margin-top: 30rpx;
|
|
|
|
|
- background-color: #ffffff;
|
|
|
|
|
-
|
|
|
|
|
- .box {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 120rpx;
|
|
|
|
|
- border-bottom: 1px solid $border-color-light;
|
|
|
|
|
-
|
|
|
|
|
- .icon {
|
|
|
|
|
- font-size: 48rpx;
|
|
|
|
|
- padding-right: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .yongjing {
|
|
|
|
|
- width: 48rpx;
|
|
|
|
|
- height: 48rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .iconweixin1 {
|
|
|
|
|
- color: #18bf16;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .iconzhifubao {
|
|
|
|
|
- color: #08aaec;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .title-box {
|
|
|
|
|
- flex-grow: 1;
|
|
|
|
|
- text-align: left;
|
|
|
|
|
-
|
|
|
|
|
- .title {
|
|
|
|
|
- font-size: $font-base + 2rpx;
|
|
|
|
|
- color: $font-color-base;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .node {
|
|
|
|
|
- font-size: $font-sm;
|
|
|
|
|
- color: $font-color-light;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /deep/ .uni-radio-input {
|
|
|
|
|
- width: 45rpx;
|
|
|
|
|
- height: 45rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .active-bg {
|
|
|
|
|
- background-color: $color-gray !important;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ // rechargeWechat({ price: this.money, from: this.type })
|
|
|
|
|
+ const pushDate = {
|
|
|
|
|
+ price: this.money,
|
|
|
|
|
+ from: 'weixin',
|
|
|
|
|
+ type: this.typeText
|
|
|
|
|
+ };
|
|
|
|
|
+ rechargeWechat(pushDate)
|
|
|
|
|
+ .then(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ if (obj.type == 'weixin') {
|
|
|
|
|
+ let da = e.data.data;
|
|
|
|
|
+ console.log(weixinObj, 'weixin');
|
|
|
|
|
+ weixinObj.chooseWXPay({
|
|
|
|
|
+ timestamp: da.timestamp,
|
|
|
|
|
+ nonceStr: da.nonceStr,
|
|
|
|
|
+ package: da.package,
|
|
|
|
|
+ signType: da.signType,
|
|
|
|
|
+ paySign: da.paySign,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '充值成功',
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ position: 'top'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(obj.type, '当前', obj.type == 'yongjing');
|
|
|
|
|
+ if (obj.type == 'yongjing') {
|
|
|
|
|
+ obj.yongMoney = '';
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: './paySuccess',
|
|
|
|
|
+
|
|
|
|
|
+ fail(e) {
|
|
|
|
|
+ console.log(e, '错误');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ console.log(e, '佣金');
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ });
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef MP
|
|
|
|
|
+ rechargeRoutine({
|
|
|
|
|
+ price: this.money
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(e => {
|
|
|
|
|
+ let da = e.data;
|
|
|
|
|
+ wx.requestPayment({
|
|
|
|
|
+ timeStamp: da.timestamp,
|
|
|
|
|
+ nonceStr: da.nonceStr,
|
|
|
|
|
+ package: da.package,
|
|
|
|
|
+ signType: da.signType,
|
|
|
|
|
+ paySign: da.paySign,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ obj.yongMoney = '';
|
|
|
|
|
+ uni.redirectTo({
|
|
|
|
|
+ url: '/pages/money/paySuccess'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ obj.payLoding = false;
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ });
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ },
|
|
|
|
|
+ //获取订单列表
|
|
|
|
|
+ loadData(source) {
|
|
|
|
|
+ console.log(source);
|
|
|
|
|
+ //这里是将订单挂载到tab列表下
|
|
|
|
|
+ let index = this.tabCurrentIndex;
|
|
|
|
|
+ let navItem = this.navList[index];
|
|
|
|
|
+ let state = navItem.state;
|
|
|
|
|
+ if (source === 'tabChange' && navItem.loaded === true) {
|
|
|
|
|
+ //tab切换只有第一次需要加载数据
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (navItem.loadingType === 'loading') {
|
|
|
|
|
+ //防止重复加载
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ navItem.loadingType = 'loading';
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ let orderList = [];
|
|
|
|
|
+ orderList.forEach(item => {
|
|
|
|
|
+ navItem.orderList.push(item);
|
|
|
|
|
+ });
|
|
|
|
|
+ //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
|
|
|
|
|
+ this.$set(navItem, 'loaded', true);
|
|
|
|
|
+ //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
|
|
+ navItem.loadingType = 'more';
|
|
|
|
|
+ }, 600);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss">
|
|
|
|
|
+page {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.yue {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ padding: 30rpx 48rpx 30rpx 26rpx;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+
|
|
|
|
|
+ .font {
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .money {
|
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ef041f;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.add-btn {
|
|
|
|
|
+ &.modified {
|
|
|
|
|
+ color: $base-color;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &.up {
|
|
|
|
|
+ background-color: $base-color;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ width: 690rpx;
|
|
|
|
|
+ height: 80rpx;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ margin-top: 30rpx;
|
|
|
|
|
+ font-size: $font-lg;
|
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
|
+ // box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.row-box {
|
|
|
|
|
+ margin-top: 30rpx;
|
|
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+
|
|
|
|
|
+ .title {
|
|
|
|
|
+ font-size: $font-base + 2rpx;
|
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ height: 80rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .tit {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ width: 40rpx;
|
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .input {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .iconlocation {
|
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
|
+ color: $font-color-light;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .buttom {
|
|
|
|
|
+ color: $font-color;
|
|
|
|
|
+ font-size: $font-base;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.list {
|
|
|
|
|
+ padding-left: 30rpx;
|
|
|
|
|
+ margin-top: 30rpx;
|
|
|
|
|
+ background-color: #ffffff;
|
|
|
|
|
+
|
|
|
|
|
+ .box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 120rpx;
|
|
|
|
|
+ border-bottom: 1px solid $border-color-light;
|
|
|
|
|
+
|
|
|
|
|
+ .icon {
|
|
|
|
|
+ font-size: 48rpx;
|
|
|
|
|
+ padding-right: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .yongjing {
|
|
|
|
|
+ width: 48rpx;
|
|
|
|
|
+ height: 48rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .iconweixin1 {
|
|
|
|
|
+ color: #18bf16;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .iconzhifubao {
|
|
|
|
|
+ color: #08aaec;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .title-box {
|
|
|
|
|
+ flex-grow: 1;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+
|
|
|
|
|
+ .title {
|
|
|
|
|
+ font-size: $font-base + 2rpx;
|
|
|
|
|
+ color: $font-color-base;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .node {
|
|
|
|
|
+ font-size: $font-sm;
|
|
|
|
|
+ color: $font-color-light;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/deep/ .uni-radio-input {
|
|
|
|
|
+ width: 45rpx;
|
|
|
|
|
+ height: 45rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.active-bg {
|
|
|
|
|
+ background-color: $color-gray !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|