Forráskód Böngészése

Merge branch 'master' of http://git.huaml.com/zhh/front-end

shish 5 hónapja
szülő
commit
d193ba2a0b

+ 18 - 2
hdApp/src/admin/member/detail.vue

@@ -41,7 +41,12 @@
         </view>
 
         <view class="data-list">
-          <view class="app-size-30 app-bold">{{ buyAmount }}</view>
+          <view class="app-size-30 app-bold" style="display:flex;align-items:center;justify-content:center;">
+            {{ buyAmount }}
+            <view @click.stop="handleUpdateBuyAmount" style="margin-left:18upx;display:flex;">
+              <zui-svg-icon icon="general-refresh" :width="19" :height="19" color="#666" />
+            </view>
+          </view>
           <view class="app-color-3">累计消费</view>
         </view>
 
@@ -482,7 +487,7 @@ import ModalModule from "@/components/plugin/modal";
 import { getLevel } from "@/utils/config";
 import TuiListCell from "@/components/plugin/list-cell";
 import { getUserDet, remarkAdd, remarkDel, upgrade, resetPassword } from "@/api/member";
-import { changeName,changeMemberLevel,modifyBirthday } from "@/api/custom"
+import { changeName,changeMemberLevel,modifyBirthday,updateBuyAmount } from "@/api/custom"
 import { getLevelInitData } from "@/api/member"
 import {toManRecharge} from "@/api/recharge"
 import {deductBalance} from "@/api/deduct"
@@ -746,6 +751,17 @@ export default {
         this.balance = res.data.balance?parseFloat(res.data.balance):0;
       })
     },
+    handleUpdateBuyAmount() {
+      updateBuyAmount({ customId: this.option.id }).then(res => {
+        if (res.code == 1) {
+          this.$msg('累计消费更新成功')
+          // 更新累计消费
+          this.buyAmount = res.data.buyAmount?parseFloat(res.data.buyAmount):0;
+        } else {
+          this.$msg(res.msg || '累计消费更新失败')
+        }
+      })
+    },
     _upgrade() {
       upgrade({
         userId: this.data.id,

+ 4 - 0
hdApp/src/api/custom/index.js

@@ -47,4 +47,8 @@ export const modifyBirthday = data => {
 
 export const getVisit = data => {
 	return https.get('/custom/get-visit', data)
+}
+
+export const updateBuyAmount = data => {
+	return https.post('/custom/update-buy-amount', data)
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
hdApp/src/assets/svg-icons/general/refresh.svg


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2 - 1
hdApp/src/static/svg-icons-lib.js


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott