feat(提现)

This commit is contained in:
unknown 2024-05-31 01:06:20 +08:00
parent 659c5524a0
commit 87aaba008e
17 changed files with 294 additions and 243 deletions

View File

@ -113,6 +113,15 @@
"meta": { "meta": {
"auth": false "auth": false
} }
},
{
"path": "wallet/withdraw",
"style": {
"navigationBarTitleText": "提现"
},
"meta": {
"auth": false
}
} }
] ]
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<pb-layout title="图标" navbar="normal" tabbar="/pages/index/icons" opacityBgUi="bg-white" color="black"> <pb-layout title="图标" navbar="normal" tabbar="/pages/index/icons" opacityBgUi="bg-white" color="black">
<view> <view>
<text v-for="item in icons" :class="[item, 'icon-x']"></text> <text v-for="item in icons" :class="[item]"></text>
</view> </view>
</pb-layout> </pb-layout>
</template> </template>

View File

@ -1,5 +1,6 @@
<template> <template>
<pb-layout navbar="inner" class="wallet-wrap" color="#fff" title="余额" :bgStyle="bgStyle"> <pb-layout navbar="inner" class="wallet-wrap" iconColor="#fff" leftIcon="leftIcon" color="#fff" title="余额"
:bgStyle="bgStyle">
<view class="header-box ss-row-center ss-col-center"> <view class="header-box ss-row-center ss-col-center">
<view class="card-box ui-BG-Main ui-Shadow-Main ss-flex ss-row-between ss-col-center"> <view class="card-box ui-BG-Main ui-Shadow-Main ss-flex ss-row-between ss-col-center">
<view class="ss-flex ss-flex-col ss-row-between ss-col-top ss-gap-40"> <view class="ss-flex ss-flex-col ss-row-between ss-col-top ss-gap-40">
@ -11,7 +12,7 @@
<view class="money-num">{{ state.showMoney ? fen2yuan(userWallet.balance) : '*****' }}</view> <view class="money-num">{{ state.showMoney ? fen2yuan(userWallet.balance) : '*****' }}</view>
</view> </view>
<button class="ss-reset-button topup-btn" @tap="peach.$router.go('/pages/pay/recharge')"> <button class="ss-reset-button topup-btn" @tap="peach.$router.go('/pages/user/wallet/withdraw')">
提现 提现
</button> </button>
</view> </view>

View File

@ -0,0 +1,40 @@
<template>
<pb-layout navbar="normal" class="withdraw-wrap" leftIcon="leftIcon" title="提现" :bgStyle="bgStyle">
<view class="alert">
提现至
</view>
<view class="method">
<view class="label">其选择提现方式</view>
<view class="cicon-angle"></view>
</view>
<view class="detail">
<view class="label">提现金额</view>
<view class="account">
<uni-easyinput type="number" />
<view class="all">全部提现</view>
</view>
<view class="note">
<view class="last">
剩余额度{{ state.last }}
</view>
<view class="can-use">
可用额度{{ state.canUse }}
</view>
</view>
</view>
</pb-layout>
</template>
<script setup>
import { ref } from 'vue'
const bgStyle = {
backgroundColor: '#fff',
description: '',
}
const state = ref({
last: 1000,
canUse: 10000
})
</script>

View File

@ -1,11 +1,11 @@
import { ref } from 'vue' import { ref } from "vue";
import { defineStore } from 'pinia' import { defineStore } from "pinia";
import $platform from '@/peach/platform' import $platform from "@/peach/platform";
import $router from '@/peach/router' import $router from "@/peach/router";
import useSysStore from './sys' import useSysStore from "./sys";
const useAppStore = defineStore( const useAppStore = defineStore(
'app', "app",
() => { () => {
/** /**
* @description 应用信息 * @description 应用信息
@ -18,14 +18,14 @@ const useAppStore = defineStore(
* @param string filesystem 文件系统 * @param string filesystem 文件系统
*/ */
const info = ref({ const info = ref({
name: '', name: "",
logo: '', logo: "",
version: '', version: "",
copyright: '', copyright: "",
copytime: '', copytime: "",
cdnurl: '', cdnurl: "",
filesystem: '', filesystem: "",
}) });
/** /**
* @description 平台信息 * @description 平台信息
@ -40,12 +40,12 @@ const useAppStore = defineStore(
methods: [], methods: [],
forwardInfo: {}, forwardInfo: {},
posterInfo: {}, posterInfo: {},
linkAddress: '', linkAddress: "",
}, },
bindMobile: 0, bindMobile: 0,
}) });
const chat = ref({}) const chat = ref({});
/** /**
* @description 模板信息 * @description 模板信息
@ -57,52 +57,53 @@ const useAppStore = defineStore(
tabbar: { tabbar: {
items: [ items: [
{ {
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/1-002.png', activeIconUrl: "/static/a-index.png",
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/1-001.png', iconUrl: "/static/index.png",
text: '首页', text: "首页",
url: '/pages/index/index', url: "/pages/index/index",
}, },
{ {
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/2-002.png', activeIconUrl: "/static/a-product.png",
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/2-001.png', iconUrl: "/static/product.png",
text: '产品', text: "产品",
url: '/pages/index/product', url: "/pages/index/product",
}, },
{ {
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/3-002.png', activeIconUrl: "/static/a-order.png",
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/3-001.png', iconUrl: "/static/order.png",
text: '订单', text: "订单",
url: '/pages/order/list', url: "/pages/order/list",
}, },
{ {
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-002.png', activeIconUrl: "/static/a-my.png",
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-001.png', iconUrl: "/static/my.png",
text: '我的', text: "我的",
url: '/pages/index/my', url: "/pages/index/my",
}, },
{ {
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-002.png', activeIconUrl:
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-001.png', "http://mall.yudao.iocoder.cn/static/images/4-002.png",
text: 'icons', iconUrl: "http://mall.yudao.iocoder.cn/static/images/4-001.png",
url: '/pages/index/icons', text: "icons",
url: "/pages/index/icons",
}, },
], ],
style: { style: {
activeColor: '#fc4141', activeColor: "#fc4141",
bgColor: '#fff', bgColor: "#fff",
bgType: 'color', bgType: "color",
color: '#282828', color: "#282828",
}, },
theme: 'red', theme: "red",
}, },
}, },
}) });
// 全局分享信息 // 全局分享信息
const shareInfo = ref({}) const shareInfo = ref({});
// 小程序发货信息管理 0: 没有 1 // 小程序发货信息管理 0: 没有 1
const hasWechatTradeManaged = ref(0) const hasWechatTradeManaged = ref(0);
/** /**
* @author Ankkaya * @author Ankkaya
@ -112,47 +113,47 @@ const useAppStore = defineStore(
*/ */
async function init() { async function init() {
// 检查网络 // 检查网络
const networkStatus = await $platform.checkNetwork() const networkStatus = await $platform.checkNetwork();
if (!networkStatus) { if (!networkStatus) {
$router.error('NetworkError') $router.error("NetworkError");
} }
if (true) { if (true) {
this.info = { this.info = {
name: '🍑商城', name: "🍑商城",
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png', logo: "https://static.iocoder.cn/ruoyi-vue-pro-logo.png",
version: '1.0.0', version: "1.0.0",
copyright: '全部开源,个人与企业可 100% 免费使用', copyright: "全部开源,个人与企业可 100% 免费使用",
copytime: 'Copyright© 2018-2024', copytime: "Copyright© 2018-2024",
cdnurl: 'https://file.sheepjs.com', // 云存储域名 cdnurl: "https://file.sheepjs.com", // 云存储域名
filesystem: 'qcloud', // 云存储平台 filesystem: "qcloud", // 云存储平台
} };
this.platform = { this.platform = {
share: { share: {
methods: ['poster', 'link'], methods: ["poster", "link"],
linkAddress: 'https://shopro.sheepjs.com/#/', linkAddress: "https://shopro.sheepjs.com/#/",
posterInfo: { posterInfo: {
user_bg: '/static/img/shop/config/user-poster-bg.png', user_bg: "/static/img/shop/config/user-poster-bg.png",
goods_bg: '/static/img/shop/config/goods-poster-bg.png', goods_bg: "/static/img/shop/config/goods-poster-bg.png",
groupon_bg: '/static/img/shop/config/groupon-poster-bg.png', groupon_bg: "/static/img/shop/config/groupon-poster-bg.png",
}, },
}, },
bind_mobile: 0, bind_mobile: 0,
} };
this.chat = { this.chat = {
chat_domain: 'https://api.shopro.sheepjs.com/chat', chat_domain: "https://api.shopro.sheepjs.com/chat",
room_id: 'admin', room_id: "admin",
} };
this.has_wechat_trade_managed = 0 this.has_wechat_trade_managed = 0;
// 加载主题 // 加载主题
const sysStore = useSysStore() const sysStore = useSysStore();
sysStore.setTheme() sysStore.setTheme();
return Promise.resolve(true) return Promise.resolve(true);
} else { } else {
$router.error('InitError', res.msg || '加载失败') $router.error("InitError", res.msg || "加载失败");
} }
} }
@ -164,18 +165,18 @@ const useAppStore = defineStore(
shareInfo, shareInfo,
hasWechatTradeManaged, hasWechatTradeManaged,
init, init,
} };
}, },
{ {
persist: { persist: {
enabled: true, enabled: true,
strategies: [ strategies: [
{ {
key: 'app-store', key: "app-store",
}, },
], ],
}, },
} }
) );
export default useAppStore export default useAppStore;

View File

@ -82,6 +82,11 @@ const props = defineProps({
default: '', default: '',
}, },
iconColor: {
type: String,
default: '#000'
},
title: { title: {
// //
type: String, type: String,
@ -191,14 +196,17 @@ const init = () => {
.sicon-back { .sicon-back {
font-size: 32rpx; font-size: 32rpx;
color: v-bind(iconColor)
} }
.sicon-home { .sicon-home {
font-size: 32rpx; font-size: 32rpx;
color: v-bind(iconColor)
} }
.sicon-more { .sicon-more {
font-size: 32rpx; font-size: 32rpx;
color: v-bind(iconColor)
} }
.icon-button { .icon-button {

View File

@ -6,7 +6,8 @@
:opacityBgUi="opacityBgUi" @search="(e) => emits('search', e)" :defaultSearch="defaultSearch" /> :opacityBgUi="opacityBgUi" @search="(e) => emits('search', e)" :defaultSearch="defaultSearch" />
<view class="page-body" :style="[bgBody]"> <view class="page-body" :style="[bgBody]">
<!-- 顶部导航栏-情况2沉浸式头部 --> <!-- 顶部导航栏-情况2沉浸式头部 -->
<pb-inner-navbar v-if="navbar === 'inner'" :color="color" :title="title" :leftIcon="leftIcon" /> <pb-inner-navbar v-if="navbar === 'inner'" :iconColor="iconColor" :color="color" :title="title"
:leftIcon="leftIcon" />
<view v-if="navbar === 'inner'" :style="[{ paddingTop: peach.$platform.navBar + 'px' }]"></view> <view v-if="navbar === 'inner'" :style="[{ paddingTop: peach.$platform.navBar + 'px' }]"></view>
<!-- 页面内容插槽 --> <!-- 页面内容插槽 -->
@ -106,6 +107,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
iconColor: {
type: String,
default: '#000'
}
}) })
const emits = defineEmits(['search']) const emits = defineEmits(['search'])

View File

@ -1,29 +1,16 @@
<template> <template>
<view class="u-page__item" v-if="tabbar?.items?.length > 0"> <view class="u-page__item" v-if="tabbar?.items?.length > 0">
<pb-s-tabbar <pb-s-tabbar :value="path" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true"
:value="path" :inactiveColor="tabbar.style.color" :activeColor="tabbar.style.activeColor" :midTabBar="tabbar.mode === 2"
:fixed="true" :customStyle="tabbarStyle">
:placeholder="true" <pb-tabbar-item v-for="(item, index) in tabbar.items" :key="item.text" :text="item.text" :name="item.url"
:safeAreaInsetBottom="true" :isCenter="getTabbarCenter(index)" :centerImage="peach.$url.cdn(item.iconUrl)"
:inactiveColor="tabbar.style.color" @tap="peach.$router.go(item.url)">
:activeColor="tabbar.style.activeColor"
:midTabBar="tabbar.mode === 2"
:customStyle="tabbarStyle"
>
<pb-tabbar-item
v-for="(item, index) in tabbar.items"
:key="item.text"
:text="item.text"
:name="item.url"
:isCenter="getTabbarCenter(index)"
:centerImage="peach.$url.cdn(item.iconUrl)"
@tap="peach.$router.go(item.url)"
>
<template v-slot:active-icon> <template v-slot:active-icon>
<image class="u-page__item__slot-icon" :src="peach.$url.cdn(item.activeIconUrl)"></image> <image class="u-page__item__slot-icon" :src="peach.$url.static(item.activeIconUrl, 'local')"></image>
</template> </template>
<template v-slot:inactive-icon> <template v-slot:inactive-icon>
<image class="u-page__item__slot-icon" :src="peach.$url.cdn(item.iconUrl)"></image> <image class="u-page__item__slot-icon" :src="peach.$url.static(item.iconUrl, 'local')"></image>
</template> </template>
</pb-tabbar-item> </pb-tabbar-item>
</pb-s-tabbar> </pb-s-tabbar>

BIN
static/a-index.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

BIN
static/a-my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

BIN
static/a-order.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

BIN
static/a-product.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
static/index.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

BIN
static/my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

BIN
static/order.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

BIN
static/point.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/product.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B