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,9 +1,9 @@
<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>
<script setup> <script setup>

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,181 +1,182 @@
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 应用信息
* @param string name 应用名称 * @param string name 应用名称
* @param string logo 应用logo * @param string logo 应用logo
* @param string version 应用版本 * @param string version 应用版本
* @param string copyright 版权信息 * @param string copyright 版权信息
* @param string copyrightTime 版权时间 * @param string copyrightTime 版权时间
* @param string cdnurl 静态资源域名 * @param string cdnurl 静态资源域名
* @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 平台信息
* @param Array share.methods 分享方式 * @param Array share.methods 分享方式
* @param Object share.forwardInfo 转发信息 * @param Object share.forwardInfo 转发信息
* @param Object share.posterInfo 海报信息 * @param Object share.posterInfo 海报信息
* @param string share.linkAddress 分享链接地址 * @param string share.linkAddress 分享链接地址
* @param number bindMobile 绑定手机号提醒 0: 提醒 1: 不提醒 * @param number bindMobile 绑定手机号提醒 0: 提醒 1: 不提醒
*/ */
const platform = ref({ const platform = ref({
share: { share: {
methods: [], methods: [],
forwardInfo: {}, forwardInfo: {},
posterInfo: {}, posterInfo: {},
linkAddress: '', linkAddress: "",
},
bindMobile: 0,
});
const chat = ref({});
/**
* @description 模板信息
* @param Object basic 基础模板
* @param Object tabbar 底部导航模板
*/
const template = ref({
basic: {
tabbar: {
items: [
{
activeIconUrl: "/static/a-index.png",
iconUrl: "/static/index.png",
text: "首页",
url: "/pages/index/index",
}, },
bindMobile: 0, {
}) activeIconUrl: "/static/a-product.png",
iconUrl: "/static/product.png",
const chat = ref({}) text: "产品",
url: "/pages/index/product",
/**
* @description 模板信息
* @param Object basic 基础模板
* @param Object tabbar 底部导航模板
*/
const template = ref({
basic: {
tabbar: {
items: [
{
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/1-002.png',
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/1-001.png',
text: '首页',
url: '/pages/index/index',
},
{
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/2-002.png',
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/2-001.png',
text: '产品',
url: '/pages/index/product',
},
{
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/3-002.png',
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/3-001.png',
text: '订单',
url: '/pages/order/list',
},
{
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-002.png',
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-001.png',
text: '我的',
url: '/pages/index/my',
},
{
activeIconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-002.png',
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/4-001.png',
text: 'icons',
url: '/pages/index/icons',
},
],
style: {
activeColor: '#fc4141',
bgColor: '#fff',
bgType: 'color',
color: '#282828',
},
theme: 'red',
},
}, },
}) {
activeIconUrl: "/static/a-order.png",
// 全局分享信息 iconUrl: "/static/order.png",
const shareInfo = ref({}) text: "订单",
url: "/pages/order/list",
// 小程序发货信息管理 0: 没有 1 },
const hasWechatTradeManaged = ref(0) {
activeIconUrl: "/static/a-my.png",
/** iconUrl: "/static/my.png",
* @author Ankkaya text: "我的",
* @description 小程序初始化 url: "/pages/index/my",
* @param {Type} - },
* @returns {Type} {
*/ activeIconUrl:
async function init() { "http://mall.yudao.iocoder.cn/static/images/4-002.png",
// 检查网络 iconUrl: "http://mall.yudao.iocoder.cn/static/images/4-001.png",
const networkStatus = await $platform.checkNetwork() text: "icons",
if (!networkStatus) { url: "/pages/index/icons",
$router.error('NetworkError') },
} ],
style: {
if (true) { activeColor: "#fc4141",
this.info = { bgColor: "#fff",
name: '🍑商城', bgType: "color",
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png', color: "#282828",
version: '1.0.0', },
copyright: '全部开源,个人与企业可 100% 免费使用', theme: "red",
copytime: 'Copyright© 2018-2024',
cdnurl: 'https://file.sheepjs.com', // 云存储域名
filesystem: 'qcloud', // 云存储平台
}
this.platform = {
share: {
methods: ['poster', 'link'],
linkAddress: 'https://shopro.sheepjs.com/#/',
posterInfo: {
user_bg: '/static/img/shop/config/user-poster-bg.png',
goods_bg: '/static/img/shop/config/goods-poster-bg.png',
groupon_bg: '/static/img/shop/config/groupon-poster-bg.png',
},
},
bind_mobile: 0,
}
this.chat = {
chat_domain: 'https://api.shopro.sheepjs.com/chat',
room_id: 'admin',
}
this.has_wechat_trade_managed = 0
// 加载主题
const sysStore = useSysStore()
sysStore.setTheme()
return Promise.resolve(true)
} else {
$router.error('InitError', res.msg || '加载失败')
}
}
return {
info,
platform,
chat,
template,
shareInfo,
hasWechatTradeManaged,
init,
}
},
{
persist: {
enabled: true,
strategies: [
{
key: 'app-store',
},
],
}, },
} },
) });
export default useAppStore // 全局分享信息
const shareInfo = ref({});
// 小程序发货信息管理 0: 没有 1
const hasWechatTradeManaged = ref(0);
/**
* @author Ankkaya
* @description 小程序初始化
* @param {Type} -
* @returns {Type}
*/
async function init() {
// 检查网络
const networkStatus = await $platform.checkNetwork();
if (!networkStatus) {
$router.error("NetworkError");
}
if (true) {
this.info = {
name: "🍑商城",
logo: "https://static.iocoder.cn/ruoyi-vue-pro-logo.png",
version: "1.0.0",
copyright: "全部开源,个人与企业可 100% 免费使用",
copytime: "Copyright© 2018-2024",
cdnurl: "https://file.sheepjs.com", // 云存储域名
filesystem: "qcloud", // 云存储平台
};
this.platform = {
share: {
methods: ["poster", "link"],
linkAddress: "https://shopro.sheepjs.com/#/",
posterInfo: {
user_bg: "/static/img/shop/config/user-poster-bg.png",
goods_bg: "/static/img/shop/config/goods-poster-bg.png",
groupon_bg: "/static/img/shop/config/groupon-poster-bg.png",
},
},
bind_mobile: 0,
};
this.chat = {
chat_domain: "https://api.shopro.sheepjs.com/chat",
room_id: "admin",
};
this.has_wechat_trade_managed = 0;
// 加载主题
const sysStore = useSysStore();
sysStore.setTheme();
return Promise.resolve(true);
} else {
$router.error("InitError", res.msg || "加载失败");
}
}
return {
info,
platform,
chat,
template,
shareInfo,
hasWechatTradeManaged,
init,
};
},
{
persist: {
enabled: true,
strategies: [
{
key: "app-store",
},
],
},
}
);
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,33 +1,20 @@
<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" <template v-slot:active-icon>
:midTabBar="tabbar.mode === 2" <image class="u-page__item__slot-icon" :src="peach.$url.static(item.activeIconUrl, 'local')"></image>
:customStyle="tabbarStyle" </template>
> <template v-slot:inactive-icon>
<pb-tabbar-item <image class="u-page__item__slot-icon" :src="peach.$url.static(item.iconUrl, 'local')"></image>
v-for="(item, index) in tabbar.items" </template>
:key="item.text" </pb-tabbar-item>
:text="item.text" </pb-s-tabbar>
:name="item.url" </view>
:isCenter="getTabbarCenter(index)"
:centerImage="peach.$url.cdn(item.iconUrl)"
@tap="peach.$router.go(item.url)"
>
<template v-slot:active-icon>
<image class="u-page__item__slot-icon" :src="peach.$url.cdn(item.activeIconUrl)"></image>
</template>
<template v-slot:inactive-icon>
<image class="u-page__item__slot-icon" :src="peach.$url.cdn(item.iconUrl)"></image>
</template>
</pb-tabbar-item>
</pb-s-tabbar>
</view>
</template> </template>
<script setup> <script setup>
@ -37,58 +24,58 @@ import PbSTabbar from './pb-s-tabbar.vue'
import peach from '@/peach' import peach from '@/peach'
const tabbar = computed(() => { const tabbar = computed(() => {
return peach.$store('app').template.basic?.tabbar return peach.$store('app').template.basic?.tabbar
}) })
const tabbarStyle = computed(() => { const tabbarStyle = computed(() => {
const backgroundStyle = tabbar.value.style const backgroundStyle = tabbar.value.style
if (backgroundStyle.bgType === 'color') { if (backgroundStyle.bgType === 'color') {
return { background: backgroundStyle.bgColor } return { background: backgroundStyle.bgColor }
}
if (backgroundStyle.bgType === 'img')
return {
background: `url(${peach.$url.cdn(backgroundStyle.bgImg)}) no-repeat top center / 100% auto`,
} }
if (backgroundStyle.bgType === 'img')
return {
background: `url(${peach.$url.cdn(backgroundStyle.bgImg)}) no-repeat top center / 100% auto`,
}
}) })
const getTabbarCenter = (index) => { const getTabbarCenter = (index) => {
if (unref(tabbar).mode !== 2) return false if (unref(tabbar).mode !== 2) return false
return unref(tabbar).items % 2 > 0 ? Math.ceil(unref(tabbar).items.length / 2) === index + 1 : false return unref(tabbar).items % 2 > 0 ? Math.ceil(unref(tabbar).items.length / 2) === index + 1 : false
} }
const props = defineProps({ const props = defineProps({
path: String, path: String,
default: '', default: '',
}) })
onLoad(() => { onLoad(() => {
// 使 // 使
// app.vue tabbar // app.vue tabbar
uni.hideTabBar() uni.hideTabBar()
}) })
</script> </script>
<style lang="scss"> <style lang="scss">
.u-page { .u-page {
padding: 0; padding: 0;
&__item { &__item {
&__title { &__title {
color: var(--textSize); color: var(--textSize);
background-color: #fff; background-color: #fff;
padding: 15px; padding: 15px;
font-size: 15px; font-size: 15px;
&__slot-title { &__slot-title {
color: var(--textSize); color: var(--textSize);
font-size: 14px; font-size: 14px;
} }
}
&__slot-icon {
width: 25px;
height: 25px;
}
} }
&__slot-icon {
width: 25px;
height: 25px;
}
}
} }
</style> </style>

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