商户流水

master
jevononlie 6 months ago
parent 802b8529e4
commit 5d03db0389

@ -1,3 +1,11 @@
<!--
* @Author: jevononlie 728254585@qq.com
* @Date: 2024-01-04 12:54:56
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-04-28 14:52:36
* @FilePath: /app-nx-recycle/README.md
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
### 技术栈
- 前端框架:[uni-app](https://uniapp.dcloud.net.cn/) (Vue3 + TS)
@ -37,3 +45,4 @@ npm run dev:h5
3. 微信开发者工具导入 `/dist/dev/mp-weixin` 目录
18260208760

@ -2,14 +2,14 @@
* @Author: jevononlie 728254585@qq.com
* @Date: 2024-04-10 13:38:49
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-04-26 18:56:11
* @LastEditTime: 2024-04-28 14:45:21
* @FilePath: /app-nx-personal/src/config.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const config = {
// 开发
develop: {
baseUrl: 'http://222.71.165.188:8808',
baseUrl: 'http://localhost:8808',
},
// 体验
trial: {

@ -1,7 +1,5 @@
<script setup lang="ts">
import { postLoginWxMinAPI } from '@/services/login'
import { getOrgUserAPI } from '@/services/wallet'
import { useMemberStore } from '@/stores'
import type { LoginResult } from '@/types/member'
import { onLoad } from '@dcloudio/uni-app'
@ -122,13 +120,6 @@ const loginSuccess = async (profile: LoginResult) => {
//
const memberStore = useMemberStore()
memberStore.setProfile(profile)
const pramas = {
phone: profile.phone,
}
const res = await getOrgUserAPI(pramas)
profile.isOrgUser = res.data
memberStore.setProfile(profile)
//
uni.showToast({ icon: 'success', title: '登录成功' })
setTimeout(() => {

@ -17,18 +17,15 @@ const isLogin = computed(() => {
const storage_token = uni.getStorageSync('storage_userInfo')?.token
return !!token || !!storage_token
})
const isShowWallet = computed(() => {
const isOrgUser = memberStore.profile?.isOrgUser
return isOrgUser
})
onShow(() => {
if (isLogin.value) {
getMemberProfileData()
getData()
}
})
const isLoading = ref(false)
const getMemberProfileData = async () => {
const orgFund = ref(null)
const getData = async () => {
isLoading.value = true
const res = await getMemberProfileAPI()
isLoading.value = false
@ -44,17 +41,17 @@ const getMemberProfileData = async () => {
orderTotal: obj.orderTotal,
recycleMiles: obj.recycleMiles,
}
orgFund.value = obj.fund
}
const handleOrderList = () => {
uni.navigateTo({ url: '/pages/orderCompleteList/orderCompleteList' })
const url = `/pages/orderCompleteList/orderCompleteList`
uni.navigateTo({ url })
}
const handleWallet = () => {
const url = `/pagesMember/wallet/wallet?fund=${orgFund.value}`
uni.navigateTo({ url })
}
// const handleOrderAuto = () => {
// uni.navigateTo({ url: '/pages/orderAuto/orderAuto' })
// }
// const handleNewsList = () => {
// uni.navigateTo({ url: '/pages/newsList/newsList' })
// }
</script>
<template>
<view class="viewport">
@ -124,10 +121,10 @@ const handleOrderList = () => {
<uni-icons type="settings" color="#3775F6" size="20"></uni-icons>
<view class="label"> 设置 </view>
</navigator>
<!-- <navigator v-if="!isShowWallet" class="settings item arrow" url="/pagesMember/wallet/wallet" hover-class="none">
<navigator v-if="orgFund != null" class="settings item arrow" @click="handleWallet" hover-class="none">
<uni-icons type="wallet" color="#3775F6" size="20"></uni-icons>
<view class="label"> 我的钱包 </view>
</navigator> -->
</navigator>
</view>
</view>
</template>

@ -35,7 +35,9 @@ const queryParams: Required<GetWalletsParams> = {
pageSize: 5,
mobilePhone: memberStore.profile?.phone,
}
onLoad(async () => {
const orgFund = ref(0)
onLoad(async (option) => {
orgFund.value = option.fund
const res = await postlistWalletAPI(queryParams)
})
@ -54,7 +56,7 @@ const handleAll = () => {
<view class="card">
<view class="item">
<view class="label">可用余额</view>
<view class="val">12.14</view>
<view class="val">{{ orgFund }}</view>
</view>
<view class="item">
<view class="label add" @click="handleCreate"></view>

@ -2,22 +2,11 @@
* @Author: jevononlie 728254585@qq.com
* @Date: 2024-04-25 17:01:03
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-04-25 17:02:21
* @LastEditTime: 2024-04-28 17:04:23
* @FilePath: /app-nx-recycle/src/services/wallet.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/utils/http'
/**
*
* @param data
*/
export const getOrgUserAPI = (data: any) => {
return http<any>({
method: 'GET',
url: '/enterprise/org-user',
data,
})
}
/**
*

Loading…
Cancel
Save