chenrui 4 年之前
父节点
当前提交
6e36045273
共有 2 个文件被更改,包括 18 次插入6 次删除
  1. 4 3
      api/officialPartnerGoldLog.js
  2. 14 3
      pages/index/index.vue

+ 4 - 3
api/officialPartnerGoldLog.js

@@ -20,9 +20,10 @@ export const GoldLogCancel = params => {
 };
 
 // 总计乐豆数
-export const getUnFinishedOrder = params => {
+export const GoldLogTotal = params => {
 	return axios.request({
-	  url: `order/unFinishedOrderRunStatus`,
-	  method: 'get',
+	  url: `officialPartnerGoldLog/total`,
+	  method: 'post',
+	  data: params
 	})
 }

+ 14 - 3
pages/index/index.vue

@@ -7,7 +7,7 @@
 				<text class="homePage-tit">交易记录</text>
 				<view class="total-con">
 					总计:
-					<text class="goleNum">150</text>
+					<text class="goleNum">{{ldTotal}}</text>
 					<image src="/static/ledou.png" class="ld-icon"></image>
 				</view>
 			</view>
@@ -52,7 +52,7 @@
 </template>
 <script>
 	import searchModal from './searchModal.vue'
-	import { getGoldLogList, GoldLogCancel } from '@/api/officialPartnerGoldLog.js'
+	import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
 	export default {
 		components: { searchModal },
 		data() {
@@ -75,12 +75,24 @@
 					color: '#fff'
 				},
 				scrollTop: 0,  //  滚动条位置
+				ldTotal: 0  //  乐豆总计数
 			}
 		},
 		onShow() {
 			this.searchHandle(1)
+			this.getGoldLogTotal()
 		},
 		methods:{
+			//  总计
+			getGoldLogTotal(){
+				GoldLogTotal({}).then(res => {
+					if(res.status == 200){
+						this.ldTotal = res.data ? res.data.changeNum : 0
+					}else{
+						this.ldTotal = 0
+					}
+				})
+			},
 			// 获取查询参数 刷新列表
 			refresh(params){
 				this.searchForm = params
@@ -95,7 +107,6 @@
 				  title: '提示',
 				  content: '撤销单据后乐豆将全部退回给原支付账号,确认撤销吗?',
 				  success(res) {
-					  console.log(res,'----res',row.id)
 				    if (res.confirm) {
 				      GoldLogCancel({ id: row.id }).then(ret => {
 						  if(ret.status == 200){