add customer service recharge type
This commit is contained in:
parent
797660f0bc
commit
62f18ed924
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="common-layout" :style="{minHeight: appStore.windowInfo.screenHeight + 'px', background: bgColor}">
|
<view class="common-layout" :style="{ minHeight: appStore.windowInfo.screenHeight + 'px', background: bgColor }">
|
||||||
<!-- <el-container>
|
<!-- <el-container>
|
||||||
<el-aside
|
<el-aside
|
||||||
v-if="!appStore.isMobileView"
|
v-if="!appStore.isMobileView"
|
||||||
width="200px"
|
width="200px"
|
||||||
@ -8,11 +8,11 @@
|
|||||||
<PcSiderBar />
|
<PcSiderBar />
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-container> -->
|
<el-container> -->
|
||||||
<!-- <el-header> -->
|
<!-- <el-header> -->
|
||||||
<!-- <MobileHeader v-if="appStore.isMobileView"></MobileHeader> -->
|
<!-- <MobileHeader v-if="appStore.isMobileView"></MobileHeader> -->
|
||||||
<!-- <PcHeader v-if="!appStore.isMobileView"></PcHeader> -->
|
<!-- <PcHeader v-if="!appStore.isMobileView"></PcHeader> -->
|
||||||
<!-- </el-header> -->
|
<!-- </el-header> -->
|
||||||
<!-- <el-main>
|
<!-- <el-main>
|
||||||
<view
|
<view
|
||||||
class="content-container"
|
class="content-container"
|
||||||
:class="{
|
:class="{
|
||||||
@ -27,139 +27,138 @@
|
|||||||
</el-container>
|
</el-container>
|
||||||
</el-container> -->
|
</el-container> -->
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<view v-if="showCustomer"
|
<view v-if="showCustomer" class="service-icon" style="width: 50px; height: 50px;"
|
||||||
class="service-icon"
|
|
||||||
style="width: 50px; height: 50px;"
|
|
||||||
:style="{ 'bottom': serviceIconXY.bottom + 'px', 'left': serviceIconXY.x + 'px' }"
|
:style="{ 'bottom': serviceIconXY.bottom + 'px', 'left': serviceIconXY.x + 'px' }"
|
||||||
@click.stop="handleServiceClick"
|
@click.stop="handleServiceClick" @touchmove.prevent="handleTouchMove">
|
||||||
@touchmove.prevent="handleTouchMove"
|
|
||||||
>
|
|
||||||
<theme-image src="@/static/icon-service-top.png" style="width: 50px; height: 50px;"></theme-image>
|
<theme-image src="@/static/icon-service-top.png" style="width: 50px; height: 50px;"></theme-image>
|
||||||
</view>
|
</view>
|
||||||
<DepositClosePopup/>
|
<DepositClosePopup />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, reactive, ref } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { useAppStore } from '@/store/useAppStore.js'
|
import { useAppStore } from '@/store/useAppStore.js'
|
||||||
import { useUserStore } from '@/store/useUserStore'
|
import { useUserStore } from '@/store/useUserStore'
|
||||||
|
|
||||||
import PcHeader from '@/components/header/PcHeader.vue'
|
|
||||||
import MobileHeader from '@/components/header/MobileHeader.vue'
|
|
||||||
import PcFooter from '@/components/footer/PcFooter.vue'
|
|
||||||
import MobileFooter from '@/components/footer/MobileFooter.vue'
|
|
||||||
import PcSiderBar from '@/components/siderbar/PcSiderBar.vue'
|
|
||||||
|
|
||||||
import Toast from '@/module/toast/toast'
|
import PcHeader from '@/components/header/PcHeader.vue'
|
||||||
import { openUrl } from '@/module/utils/openUrl'
|
import MobileHeader from '@/components/header/MobileHeader.vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import PcFooter from '@/components/footer/PcFooter.vue'
|
||||||
import GlobalConfig from '@/config/global.config.js'
|
import MobileFooter from '@/components/footer/MobileFooter.vue'
|
||||||
|
import PcSiderBar from '@/components/siderbar/PcSiderBar.vue'
|
||||||
import DepositClosePopup from '@/pages/wallet/components/DepositClosePopup.vue'
|
|
||||||
|
|
||||||
onMounted(() => {
|
import Toast from '@/module/toast/toast'
|
||||||
loadData()
|
import { openUrl } from '@/module/utils/openUrl'
|
||||||
// handlePages()
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import GlobalConfig from '@/config/global.config.js'
|
||||||
|
|
||||||
|
import DepositClosePopup from '@/pages/wallet/components/DepositClosePopup.vue'
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
loadData()
|
||||||
|
// handlePages()
|
||||||
|
})
|
||||||
|
defineProps({
|
||||||
|
bgColor: {
|
||||||
|
type: String,
|
||||||
|
default: 'transparent'
|
||||||
|
},
|
||||||
|
showCustomer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const appStore = useAppStore()
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const serviceIconXY = reactive({
|
||||||
|
x: appStore.windowInfo.windowWidth - 50,
|
||||||
|
y: appStore.windowInfo.windowHeight * 0.7,
|
||||||
|
bottom: 100
|
||||||
|
})
|
||||||
|
|
||||||
|
const loadData = () => {
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlePages = () => {
|
||||||
|
const pages = getCurrentPages()
|
||||||
|
const currentPage = pages[pages.length - 1]
|
||||||
|
const currentRoute = currentPage.route
|
||||||
|
console.log('currentRoute', currentRoute);
|
||||||
|
|
||||||
|
const pathKeys = currentRoute.split('/').slice(1).join('.')
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: `${GlobalConfig.appName} - ${t(pathKeys)}`
|
||||||
})
|
})
|
||||||
defineProps({
|
}
|
||||||
bgColor: {
|
|
||||||
type: String,
|
const handleTouchMove = (e) => {
|
||||||
default: 'transparent'
|
if (e.type === 'touchmove' && e.touches.length) {
|
||||||
},
|
const windowInfo = uni.getWindowInfo()
|
||||||
showCustomer: {
|
const currentTouch = e.touches[0]
|
||||||
type: Boolean,
|
const x = currentTouch.pageX
|
||||||
default: true
|
const y = currentTouch.pageY
|
||||||
|
if (x > 0 && x < windowInfo.windowWidth - 50) {
|
||||||
|
serviceIconXY.x = x
|
||||||
}
|
}
|
||||||
})
|
if (y > 0 && y < windowInfo.windowHeight - 50) {
|
||||||
const appStore = useAppStore()
|
serviceIconXY.y = y
|
||||||
const userStore = useUserStore()
|
serviceIconXY.bottom = windowInfo.windowHeight - y
|
||||||
const { t } = useI18n()
|
|
||||||
|
|
||||||
const serviceIconXY = reactive({
|
|
||||||
x: appStore.windowInfo.windowWidth - 50,
|
|
||||||
y: appStore.windowInfo.windowHeight * 0.7,
|
|
||||||
bottom: 100
|
|
||||||
})
|
|
||||||
|
|
||||||
const loadData = () => {
|
|
||||||
}
|
|
||||||
|
|
||||||
const handlePages = () => {
|
|
||||||
const pages = getCurrentPages()
|
|
||||||
const currentPage = pages[pages.length - 1]
|
|
||||||
const currentRoute = currentPage.route
|
|
||||||
console.log('currentRoute', currentRoute);
|
|
||||||
|
|
||||||
const pathKeys = currentRoute.split('/').slice(1).join('.')
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: `${GlobalConfig.appName} - ${t(pathKeys)}`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleTouchMove = (e) => {
|
|
||||||
if (e.type === 'touchmove' && e.touches.length) {
|
|
||||||
const windowInfo = uni.getWindowInfo()
|
|
||||||
const currentTouch = e.touches[0]
|
|
||||||
const x = currentTouch.pageX
|
|
||||||
const y = currentTouch.pageY
|
|
||||||
if (x > 0 && x < windowInfo.windowWidth - 50) {
|
|
||||||
serviceIconXY.x = x
|
|
||||||
}
|
|
||||||
if (y > 0 && y < windowInfo.windowHeight - 50) {
|
|
||||||
serviceIconXY.y = y
|
|
||||||
serviceIconXY.bottom = windowInfo.windowHeight - y
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const handleServiceClick = async () => {
|
|
||||||
openUrl(appStore.FAQ)
|
const handleServiceClick = async () => {
|
||||||
}
|
// openUrl(appStore.FAQ)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/account/CustomService'
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.common-layout {
|
.common-layout {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
// transform: translate(0,0)
|
// transform: translate(0,0)
|
||||||
}
|
}
|
||||||
|
|
||||||
.service-icon {
|
.service-icon {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1011;
|
z-index: 1011;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-container {
|
.content-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-container-mobile-padding {
|
.content-container-mobile-padding {
|
||||||
// padding-top: 120rpx;
|
// padding-top: 120rpx;
|
||||||
padding-bottom: 110rpx;
|
padding-bottom: 110rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-container-pc-padding {
|
.content-container-pc-padding {
|
||||||
padding-top: 64px;
|
padding-top: 64px;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.common-layout {
|
.common-layout {
|
||||||
|
|
||||||
.el-header {
|
.el-header {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
}
|
|
||||||
|
|
||||||
.el-main {
|
|
||||||
padding: 0px !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-main {
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -52,7 +52,7 @@ import { usePromoStore } from '@/store/usePromoStore';
|
|||||||
import { formatNum } from '@/module/utils/util';
|
import { formatNum } from '@/module/utils/util';
|
||||||
import toast from '@/module/toast/toast';
|
import toast from '@/module/toast/toast';
|
||||||
import { createRechargeApi } from '@/api/promo';
|
import { createRechargeApi } from '@/api/promo';
|
||||||
import { openWeb } from '@/module/utils/openUrl';
|
import { openUrl } from '@/module/utils/openUrl';
|
||||||
|
|
||||||
const popup = ref(null)
|
const popup = ref(null)
|
||||||
const themeStore = useThemeStore()
|
const themeStore = useThemeStore()
|
||||||
@ -70,7 +70,7 @@ const handleDeposit = async () => {
|
|||||||
const amount = content.value[activeIndex.value].rechargeAmount
|
const amount = content.value[activeIndex.value].rechargeAmount
|
||||||
const { data } = await createRechargeApi({ amount })
|
const { data } = await createRechargeApi({ amount })
|
||||||
uni.setStorageSync('rechargeAmount', amount)
|
uni.setStorageSync('rechargeAmount', amount)
|
||||||
openWeb(data.url)
|
openUrl(data.url)
|
||||||
toast.hideLoading()
|
toast.hideLoading()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("deposit error: ", error);
|
console.log("deposit error: ", error);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { useThemeStore } from '@/store/useThemeStore.js'
|
import { useThemeStore } from '@/store/useThemeStore.js'
|
||||||
import { createBankruptRechargeApi } from '@/api/home'
|
import { createBankruptRechargeApi } from '@/api/home'
|
||||||
import { openWeb } from '@/module/utils/openUrl'
|
import { openUrl } from '@/module/utils/openUrl'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
detail: {
|
detail: {
|
||||||
@ -29,7 +29,7 @@ const createOrder = async (recharge) => {
|
|||||||
const { data } = await createBankruptRechargeApi(recharge);
|
const { data } = await createBankruptRechargeApi(recharge);
|
||||||
console.log('createOrder', data);
|
console.log('createOrder', data);
|
||||||
if (data?.isSuccess) {
|
if (data?.isSuccess) {
|
||||||
openWeb(data?.url);
|
openUrl(data?.url);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('createOrder error', error);
|
console.log('createOrder error', error);
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
{{ $t("account.button.switchAccount") }}
|
{{ $t("account.button.switchAccount") }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button @click="handleService">Self-Service</button>
|
<!-- <button @click="handleService">Self-Service</button> -->
|
||||||
<view class="w-full" style="height: 240rpx;"></view>
|
<view class="w-full" style="height: 240rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -202,7 +202,11 @@ const menuNavigator = (router) => {
|
|||||||
*/
|
*/
|
||||||
const helpMenuNavigator = (item) => {
|
const helpMenuNavigator = (item) => {
|
||||||
if (item.routerType === 'FAQ') {
|
if (item.routerType === 'FAQ') {
|
||||||
openUrl(appStore.FAQ)
|
// openUrl(appStore.FAQ)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/account/CustomService'
|
||||||
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if (item.name == "Phone Binding") {
|
if (item.name == "Phone Binding") {
|
||||||
if (!userStore.userInfo.mobile) {
|
if (!userStore.userInfo.mobile) {
|
||||||
|
@ -3,7 +3,7 @@ import { ref, computed } from 'vue'
|
|||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { useThemeStore } from "@/store/useThemeStore";
|
import { useThemeStore } from "@/store/useThemeStore";
|
||||||
import { useAppStore } from '@/store/useAppStore'
|
import { useAppStore } from '@/store/useAppStore'
|
||||||
import { getQuestionsApi, questionIndexApi } from '@/api/account'
|
import { questionIndexApi, questionSuccessApi, questionFailApi } from '@/api/account'
|
||||||
import { openUrl } from '@/module/utils/openUrl'
|
import { openUrl } from '@/module/utils/openUrl'
|
||||||
|
|
||||||
const themeStore = useThemeStore()
|
const themeStore = useThemeStore()
|
||||||
@ -67,7 +67,27 @@ const getQustionList = async () => {
|
|||||||
const _data = JSON.parse(data?.data)
|
const _data = JSON.parse(data?.data)
|
||||||
questions.value = _data
|
questions.value = _data
|
||||||
}
|
}
|
||||||
|
const onNoZan = (id) => {
|
||||||
|
questionFailApi({questionId: id})
|
||||||
|
newMsg('I\'m sorry that I can\'t help you.', 1,'msg')
|
||||||
|
}
|
||||||
|
const onZan = (id) => {
|
||||||
|
questionSuccessApi({questionId: id})
|
||||||
|
newMsg('I\'m glad that I could help you.!', 1,'msg')
|
||||||
|
}
|
||||||
|
const onSend = () => {
|
||||||
|
if (!inputVal.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newMsg(inputVal.value, 1, 'msg')
|
||||||
|
inputVal.value = ''
|
||||||
|
setTimeout(() => {
|
||||||
|
newMsg('Sorry, I\'m unable to answer your question. Please click the online customer service at the top right corner.', 2, 'msg')
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
const toOnlineService = () => {
|
||||||
|
openUrl(appStore.FAQ)
|
||||||
|
}
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getQustionList()
|
getQustionList()
|
||||||
})
|
})
|
||||||
@ -76,7 +96,7 @@ onLoad(() => {
|
|||||||
<mobile-custom-layout title="Self-service Customer" bgColor="#2F0101" :headBgColor="themeStore.theme.bgColor"
|
<mobile-custom-layout title="Self-service Customer" bgColor="#2F0101" :headBgColor="themeStore.theme.bgColor"
|
||||||
:paddingTop="appStore.headerStyle.height" :show-customer="false">
|
:paddingTop="appStore.headerStyle.height" :show-customer="false">
|
||||||
<template #head-right>
|
<template #head-right>
|
||||||
<view>
|
<view @click="toOnlineService">
|
||||||
<theme-image src="@/static/account/customer_head.png" class="icon-kf-head"></theme-image>
|
<theme-image src="@/static/account/customer_head.png" class="icon-kf-head"></theme-image>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -94,7 +114,7 @@ onLoad(() => {
|
|||||||
{{ item.display }}
|
{{ item.display }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center justify-center online-service">
|
<view class="flex items-center justify-center online-service" @click="toOnlineService">
|
||||||
<theme-image src="@/static/account/customer.png" class="icon-kf"></theme-image>
|
<theme-image src="@/static/account/customer.png" class="icon-kf"></theme-image>
|
||||||
<view class="btn-txt">{{ $t('account.contact') }}</view>
|
<view class="btn-txt">{{ $t('account.contact') }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -106,13 +126,14 @@ onLoad(() => {
|
|||||||
style="margin-left: 10rpx;"></theme-image>
|
style="margin-left: 10rpx;"></theme-image>
|
||||||
<theme-image v-else src="@/static/account/customer.png" class="icon-avatar"
|
<theme-image v-else src="@/static/account/customer.png" class="icon-avatar"
|
||||||
style="margin-right: 10rpx;"></theme-image>
|
style="margin-right: 10rpx;"></theme-image>
|
||||||
<view class="msg-text" :class="[item.type === 1 ? 'mr-10' : 'ml-10']">
|
<view class="relative msg-text" :class="[item.type === 1 ? 'mr-10' : 'ml-10']">
|
||||||
<template v-if="item.mtype === 'msg'">
|
<template v-if="item.mtype === 'msg'">
|
||||||
{{ item.msg }}
|
{{ item.msg }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view v-for="child in item.msg" :key="child.id" @click="questionClick(child)"
|
<view v-for="child in item.msg" :key="child.id" @click="questionClick(child)"
|
||||||
class="flex items-center question-item" :style="{paddingLeft: child.type === 2 ? '24rpx' : '0px'}">
|
class="flex items-center question-item"
|
||||||
|
:style="{ paddingLeft: child.type === 2 ? '24rpx' : '0px' }">
|
||||||
<view class="dot" v-if="child.type === 2"></view>
|
<view class="dot" v-if="child.type === 2"></view>
|
||||||
<view class="question-text" v-if="child.type === 1">
|
<view class="question-text" v-if="child.type === 1">
|
||||||
<rich-text :nodes="child.text"></rich-text>
|
<rich-text :nodes="child.text"></rich-text>
|
||||||
@ -120,8 +141,16 @@ onLoad(() => {
|
|||||||
<view class="question-text" v-else>
|
<view class="question-text" v-else>
|
||||||
{{ child.display }}
|
{{ child.display }}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="is-usefull pos-absolute"
|
||||||
|
v-if="item.type === 2 && child.type === 1 && child.solveType === 2">
|
||||||
|
<theme-image src="@/static/account/dianzan.png" class="icon-use"
|
||||||
|
style="margin-right: 10rpx;" @click="onZan(child.id)"></theme-image>
|
||||||
|
<theme-image src="@/static/account/daozan.png" class="icon-use zan-reverse"
|
||||||
|
style="margin-right: 10rpx;" @click="onNoZan(child.id)"></theme-image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<empty-hold height="120rpx"></empty-hold>
|
<empty-hold height="120rpx"></empty-hold>
|
||||||
@ -132,7 +161,7 @@ onLoad(() => {
|
|||||||
<input type="text" v-model="inputVal" class="w-full ft12"
|
<input type="text" v-model="inputVal" class="w-full ft12"
|
||||||
placeholder="Please enter your question" />
|
placeholder="Please enter your question" />
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn ml-2 ft13 flex-center">Send</view>
|
<view class="submit-btn ml-2 ft13 flex-center" @click="onSend">Send</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</mobile-custom-layout>
|
</mobile-custom-layout>
|
||||||
@ -148,6 +177,7 @@ onLoad(() => {
|
|||||||
|
|
||||||
.question-list {
|
.question-list {
|
||||||
padding: 20rpx 100rpx;
|
padding: 20rpx 100rpx;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
.question-content {
|
.question-content {
|
||||||
padding: 18rpx 24rpx;
|
padding: 18rpx 24rpx;
|
||||||
@ -196,13 +226,26 @@ onLoad(() => {
|
|||||||
|
|
||||||
.msg-item {
|
.msg-item {
|
||||||
align-items: start;
|
align-items: start;
|
||||||
margin-top: 60rpx;
|
margin-bottom: 80rpx;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.icon-avatar {
|
.icon-avatar {
|
||||||
width: 54rpx;
|
width: 54rpx;
|
||||||
height: 54rpx;
|
height: 54rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.is-usefull {
|
||||||
|
bottom: -60rpx;
|
||||||
|
right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-use {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
.zan-reverse{
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.req-right {
|
.req-right {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
import EarnOld from './components/EarnOld.vue'
|
import EarnOld from './components/EarnOld.vue'
|
||||||
import EarnV2 from './components/EarnV2.vue'
|
import EarnV2 from './components/EarnV2.vue'
|
||||||
|
import EarnV3 from './components/EarnV3.vue'
|
||||||
import { useAppStore } from '@/store/useAppStore'
|
import { useAppStore } from '@/store/useAppStore'
|
||||||
import { useThemeStore } from '@/store/useThemeStore'
|
import { useThemeStore } from '@/store/useThemeStore'
|
||||||
|
|
||||||
|
15
src/pages/earn/components/EarnV3.vue
Normal file
15
src/pages/earn/components/EarnV3.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<script setup>
|
||||||
|
import { ref, computed } from "vue";
|
||||||
|
import { useThemeStore } from "@/store/useThemeStore";
|
||||||
|
import { useAppStore } from '@/store/useAppStore'
|
||||||
|
|
||||||
|
const appStore = useAppStore()
|
||||||
|
const themeStore = useThemeStore()
|
||||||
|
const earnTheme = computed(() => themeStore.theme.earn)
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<mobile-custom-layout bgColor="#79000C" paddingTop="0px">
|
||||||
|
<view>12</view>
|
||||||
|
</mobile-custom-layout>
|
||||||
|
</template>
|
||||||
|
<style lang="scss scoped"></style>
|
@ -254,7 +254,7 @@ import { requestAppEventUpload } from "@/api/app.js";
|
|||||||
import { useAppStore } from "@/store/useAppStore";
|
import { useAppStore } from "@/store/useAppStore";
|
||||||
import { useThemeStore } from "@/store/useThemeStore";
|
import { useThemeStore } from "@/store/useThemeStore";
|
||||||
import { useUserStore } from "@/store/useUserStore";
|
import { useUserStore } from "@/store/useUserStore";
|
||||||
import { openWeb } from '@/module/utils/openUrl.js'
|
import { openUrl } from '@/module/utils/openUrl.js'
|
||||||
import HomeUserInfo from "@/pages/home/components/HomeUserInfo.vue";
|
import HomeUserInfo from "@/pages/home/components/HomeUserInfo.vue";
|
||||||
import VipItem from "../account/components/VipItem/VipItem.vue";
|
import VipItem from "../account/components/VipItem/VipItem.vue";
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ const deposit = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const openCustomer = () => {
|
const openCustomer = () => {
|
||||||
openWeb(userStore.serviceUrl)
|
openUrl(userStore.serviceUrl)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<theme-image v-if="item.status === 1" src="@/static/icon-succeed.png" style="width: 50rpx; height: 50rpx;"></theme-image>
|
<theme-image v-if="item.status === 1" src="@/static/icon-succeed.png" style="width: 50rpx; height: 50rpx;"></theme-image>
|
||||||
<!-- <theme-image v-else-if="item.status === 0" src="@/static/wallet/icon-fail.png" style="width: 50rpx; height: 50rpx;"></theme-image> -->
|
<!-- <theme-image v-else-if="item.status === 0" src="@/static/wallet/icon-fail.png" style="width: 50rpx; height: 50rpx;"></theme-image> -->
|
||||||
<theme-image v-else src="@/static/icon-pending.png" style="width: 50rpx; height: 50rpx;"></theme-image>
|
<theme-image v-else src="@/static/icon-pending.png" style="width: 50rpx; height: 50rpx;"></theme-image>
|
||||||
<view v-if="item.manualRechargeStatus === 0 || item.manualRechargeStatus === 3" class="list-item-utr-conner">
|
<view v-if="(item.manualRechargeStatus === 0 || item.manualRechargeStatus === 3) && item.status === 0" class="list-item-utr-conner">
|
||||||
<view>Self</view>
|
<view>Self</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
{{ $t('deposit.depositAmount') }}:
|
{{ $t('deposit.depositAmount') }}:
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="ft12 ml32 label label-min" :style="{ background: themeStore.theme.wallet.min }">Min: {{
|
<view class="ft12 ml32 label label-min" :style="{ background: themeStore.theme.wallet.min }">Min: {{
|
||||||
$formatThousandDot(depositStore.onlineDepositMin) }}</view>
|
$formatThousandDot(depositStore.onlineDepositMin) }}</view>
|
||||||
<view class="ft12 ml32 label label-max" :style="{ background: themeStore.theme.wallet.max }"> Max: {{
|
<view class="ft12 ml32 label label-max" :style="{ background: themeStore.theme.wallet.max }"> Max: {{
|
||||||
$formatThousandDot(depositStore.onlineDepositMax) }}</view>
|
$formatThousandDot(depositStore.onlineDepositMax) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="plr30 pb30">
|
<view class="plr30 pb30">
|
||||||
@ -31,31 +31,41 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else class="badge-view">
|
<view v-else class="badge-view">
|
||||||
<view>{{ depositStore.onlineDepositType.gift > 0 ?
|
<view>{{ depositStore.onlineDepositType.gift > 0 ?
|
||||||
`+${depositStore.onlineDepositType.giftList[index]}` : '' }}
|
`+${depositStore.onlineDepositType.giftList[index]}` : '' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-content flex-center"
|
<view class="item-content flex-center"
|
||||||
:class="{ 'select': Number(depositStore.onlinePaymentData.depositAmount || 0) === Number(item) }">
|
:class="{ 'select': Number(depositStore.onlinePaymentData.depositAmount || 0) === Number(item) }">
|
||||||
<view style="color: #FEBF05;font-weight: bold;">{{ appStore.currencySign }} {{
|
<view style="color: #FEBF05;font-weight: bold;">{{ appStore.currencySign }} {{
|
||||||
$formatThousandDot(item) }}</view>
|
$formatThousandDot(item) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="plr30 ptb24 ft15 flex justify-between items-center" :style="{ 'color': themeStore.theme.text.light, marginTop: '38rpx' }">
|
<view class="plr30 ptb24 ft15 flex justify-between items-center"
|
||||||
|
:style="{ 'color': themeStore.theme.text.light, marginTop: '38rpx' }">
|
||||||
<text>{{ $t('deposit.depositEvent') }}:</text>
|
<text>{{ $t('deposit.depositEvent') }}:</text>
|
||||||
<text v-if="depositStore.activeType == 2" @click="toPoster" class="change-account-text" :style="{ color: themeStore.theme.text.theme }">
|
<text v-if="depositStore.activeType == 2" @click="toPoster" class="change-account-text"
|
||||||
|
:style="{ color: themeStore.theme.text.theme }">
|
||||||
{{ $t('withdraw.posterText') }}
|
{{ $t('withdraw.posterText') }}
|
||||||
</text>
|
</text>
|
||||||
<text v-else @click="handleHistoryClick" class="change-history-text" :style="{ color: themeStore.theme.text.theme }">
|
<text v-else @click="handleHistoryClick" class="change-history-text"
|
||||||
|
:style="{ color: themeStore.theme.text.theme }">
|
||||||
{{ $t('deposit.historyNot') }}
|
{{ $t('deposit.historyNot') }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pt24 plr16 flex-wrap pay-method">
|
<view class="pt24 plr16 flex-wrap pay-method">
|
||||||
<view class="select-btn-container" v-for="(item, index) in payMethod" :key="index"
|
<view class="relative select-btn-container" v-for="(item, index) in payMethod" :key="index"
|
||||||
@click.stop="handlePayMethodSelect(item)">
|
@click.stop="handlePayMethodSelect(item, index)">
|
||||||
<view class="select-btn"
|
<view class="flex-center select-btn"
|
||||||
|
:style="{ background: activeMethod === index ? themeStore.theme.wallet.payBg : themeStore.theme.wallet.payBg1 }">
|
||||||
|
<theme-image :src="`@/static/${item.icon}`" style="width: 40rpx; height: 40rpx;"></theme-image>
|
||||||
|
<view class="pay-name" :style="{ color: themeStore.theme.light }">{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
<theme-image v-if="activeMethod === index" src="@/static/wallet/icon-btn-select-m.png"
|
||||||
|
class="select-btn-check-img pos-absolute" mode="aspectFill" />
|
||||||
|
<view v-if="false" class="select-btn"
|
||||||
:style="{ 'background': item.disable ? themeStore.theme.corner.disabledBg : item.name == depositStore.onlinePaymentData.rechargeName ? themeStore.theme.corner.selectBtnBg : themeStore.theme.corner.selectBtnColor }">
|
:style="{ 'background': item.disable ? themeStore.theme.corner.disabledBg : item.name == depositStore.onlinePaymentData.rechargeName ? themeStore.theme.corner.selectBtnBg : themeStore.theme.corner.selectBtnColor }">
|
||||||
<view class="nice-icon" v-if="item.isRecommend"
|
<view class="nice-icon" v-if="item.isRecommend"
|
||||||
:style="{ 'color': themeStore.theme.corner.text, 'background': themeStore.theme.corner.selectBtnColor }">
|
:style="{ 'color': themeStore.theme.corner.text, 'background': themeStore.theme.corner.selectBtnColor }">
|
||||||
@ -183,18 +193,42 @@ const tabStyle = computed(() => {
|
|||||||
color: depositType.value === 'bank' ? themeStore.theme.wallet.light : themeStore.theme.wallet.textColor
|
color: depositType.value === 'bank' ? themeStore.theme.wallet.light : themeStore.theme.wallet.textColor
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const payMethod = computed(() => {
|
// const payMethod = computed(() => {
|
||||||
return depositStore.onlinePaymentData.depositMethodList.filter(item => item.type == depositStore.activeType)
|
// return depositStore.onlinePaymentData.depositMethodList.filter(item => item.type == depositStore.activeType)
|
||||||
})
|
// })
|
||||||
|
const activeMethod = ref(0)
|
||||||
|
const payMethod = ref([
|
||||||
|
{
|
||||||
|
name: 'PayTM',
|
||||||
|
icon: 'wallet/pay_PayTM.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'PhonePe',
|
||||||
|
icon: 'wallet/pay_PhonePe.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GooglePay',
|
||||||
|
icon: 'wallet/pay_GooglePay.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'UPI',
|
||||||
|
icon: 'wallet/pay_UPI.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'QRcode',
|
||||||
|
icon: 'wallet/pay_QRcode.png'
|
||||||
|
},
|
||||||
|
])
|
||||||
|
depositStore.onlinePaymentData.payMethod = payMethod.value[0].name
|
||||||
const handleHistoryClick = () => {
|
const handleHistoryClick = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/wallet/DepositHistory'
|
url: '/pages/wallet/DepositHistory'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const toPoster = () => {
|
const toPoster = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/activity/Poster',
|
url: '/pages/activity/Poster',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleSelect = (type) => {
|
const handleSelect = (type) => {
|
||||||
depositType.value = type
|
depositType.value = type
|
||||||
@ -203,16 +237,17 @@ const handleChannelChange = (channel) => {
|
|||||||
depositStore.onlinePaymentData.payType = channel
|
depositStore.onlinePaymentData.payType = channel
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePayMethodSelect = (item) => {
|
const handlePayMethodSelect = (item, idx) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
|
activeMethod.value = idx
|
||||||
if (item.disable) { return }
|
// if (item.disable) { return }
|
||||||
depositStore.onlinePaymentData.depositMethod = item.type
|
depositStore.onlinePaymentData.payMethod = item.name
|
||||||
depositStore.onlinePaymentData.depositMethodName = item.name
|
// depositStore.onlinePaymentData.depositMethod = item.type
|
||||||
depositStore.onlinePaymentData.depositMethodSelectItem = item
|
// depositStore.onlinePaymentData.depositMethodName = item.name
|
||||||
depositStore.onlinePaymentData.rechargeName = item.name
|
// depositStore.onlinePaymentData.depositMethodSelectItem = item
|
||||||
depositStore.onlinePaymentData.payType = item.payType?.split(',')[0]
|
// depositStore.onlinePaymentData.rechargeName = item.name
|
||||||
depositStore.payType = item.payType
|
// depositStore.onlinePaymentData.payType = item.payType?.split(',')[0]
|
||||||
|
// depositStore.payType = item.payType
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAmountSelect = (item) => {
|
const handleAmountSelect = (item) => {
|
||||||
@ -254,8 +289,9 @@ const handleConfirmClick = async () => {
|
|||||||
channelId: depositStore.onlinePaymentData.depositChannel,
|
channelId: depositStore.onlinePaymentData.depositChannel,
|
||||||
rechargeType: depositStore.onlinePaymentData.depositMethod === 5 ? 'H' : depositStore.onlineDepositType.rechargeType,
|
rechargeType: depositStore.onlinePaymentData.depositMethod === 5 ? 'H' : depositStore.onlineDepositType.rechargeType,
|
||||||
accountType: depositStore.onlinePaymentData.depositMethod,
|
accountType: depositStore.onlinePaymentData.depositMethod,
|
||||||
rechargeName: depositStore.onlinePaymentData.rechargeName,
|
// rechargeName: depositStore.onlinePaymentData.rechargeName,
|
||||||
payType: depositStore.onlinePaymentData.payType,
|
payType: depositStore.onlinePaymentData.payType,
|
||||||
|
payMethod: depositStore.onlinePaymentData.payMethod,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
params = {
|
params = {
|
||||||
@ -263,8 +299,9 @@ const handleConfirmClick = async () => {
|
|||||||
channelId: depositStore.onlinePaymentData.depositChannel,
|
channelId: depositStore.onlinePaymentData.depositChannel,
|
||||||
rechargeType: depositStore.onlinePaymentData.depositMethod === 5 ? 'H' : depositStore.onlineDepositType.rechargeType,
|
rechargeType: depositStore.onlinePaymentData.depositMethod === 5 ? 'H' : depositStore.onlineDepositType.rechargeType,
|
||||||
accountType: depositStore.onlinePaymentData.depositMethodName,
|
accountType: depositStore.onlinePaymentData.depositMethodName,
|
||||||
rechargeName: depositStore.onlinePaymentData.rechargeName,
|
// rechargeName: depositStore.onlinePaymentData.rechargeName,
|
||||||
payType: depositStore.onlinePaymentData.payType,
|
payType: depositStore.onlinePaymentData.payType,
|
||||||
|
payMethod: depositStore.onlinePaymentData.payMethod,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(params);
|
console.log(params);
|
||||||
@ -283,14 +320,17 @@ const handleConfirmClick = async () => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.online-deposit-container {
|
.online-deposit-container {
|
||||||
padding-bottom: 220rpx;
|
padding-bottom: 220rpx;
|
||||||
|
|
||||||
.change-account-text {
|
.change-account-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
text-decoration-line: underline;
|
text-decoration-line: underline;
|
||||||
}
|
}
|
||||||
.change-history-text{
|
|
||||||
font-size: 26rpx;
|
.change-history-text {
|
||||||
text-decoration-line: underline;
|
font-size: 26rpx;
|
||||||
}
|
text-decoration-line: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.pay-type-box {
|
.pay-type-box {
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
|
|
||||||
@ -304,13 +344,28 @@ const handleConfirmClick = async () => {
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
grid-gap: 20rpx;
|
grid-gap: 16rpx;
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-btn-container {
|
.select-btn-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1;
|
width: 222rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
|
||||||
|
.select-btn-check-img {
|
||||||
|
width: 222rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
z-index: 110;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pay-name {
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@ -332,7 +387,7 @@ const handleConfirmClick = async () => {
|
|||||||
|
|
||||||
.select-btn {
|
.select-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 85rpx;
|
height: 100rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@ -379,15 +434,6 @@ const handleConfirmClick = async () => {
|
|||||||
color: #999999;
|
color: #999999;
|
||||||
filter: grayscale(100%);
|
filter: grayscale(100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-btn-check-img {
|
|
||||||
position: absolute;
|
|
||||||
top: 0rpx;
|
|
||||||
left: 0rpx;
|
|
||||||
right: 0rpx;
|
|
||||||
bottom: 0rpx;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.check-radio {
|
.check-radio {
|
||||||
|
458
src/pages/wallet/components/OnlineDepositOld1.vue
Normal file
458
src/pages/wallet/components/OnlineDepositOld1.vue
Normal file
@ -0,0 +1,458 @@
|
|||||||
|
<template>
|
||||||
|
<view class="online-deposit-container">
|
||||||
|
<!-- <view class="pay-type-box w-full flex justify-between items-center">
|
||||||
|
<view v-for="(item, index) in walletTab" :key="index" class="pay-type-item flex-1 flex-center"
|
||||||
|
:style="{ background: depositType === 'bank' ? themeStore.theme.wallet.normal : '', color: depositType === 'bank' ? themeStore.theme.wallet.button.textColor : 'red' }"
|
||||||
|
@click="handleSelect('bank')">{{ item.value }}</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="plr30 ptb24 ft15 flex justify-between items-center"
|
||||||
|
:style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
{{ $t('deposit.depositAmount') }}:
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="ft12 ml32 label label-min" :style="{ background: themeStore.theme.wallet.min }">Min: {{
|
||||||
|
$formatThousandDot(depositStore.onlineDepositMin) }}</view>
|
||||||
|
<view class="ft12 ml32 label label-max" :style="{ background: themeStore.theme.wallet.max }"> Max: {{
|
||||||
|
$formatThousandDot(depositStore.onlineDepositMax) }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="plr30 pb30">
|
||||||
|
<MoneyInput v-model="depositStore.onlinePaymentData.depositAmount"
|
||||||
|
:placeholder="$t('deposit.depositAmount')" :max="depositStore.onlineDepositMax"
|
||||||
|
:min="depositStore.onlineDepositMin" @change="handleAmountInput" />
|
||||||
|
</view>
|
||||||
|
<view class="plr30" :style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
<view class="flex-wrap amount-box">
|
||||||
|
<view v-for="(item, index) in depositStore.onlineDepositType.amountList" :key="index"
|
||||||
|
@click.stop="handleAmountSelect(item)">
|
||||||
|
<view class="select-item-container">
|
||||||
|
<view v-if="depositStore.isTypeB" class="badge-view">
|
||||||
|
<view>{{ depositStore.isTypeB ? `+${depositStore.onlineDepositType.giftList[index]}` : '' }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="badge-view">
|
||||||
|
<view>{{ depositStore.onlineDepositType.gift > 0 ?
|
||||||
|
`+${depositStore.onlineDepositType.giftList[index]}` : '' }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-content flex-center"
|
||||||
|
:class="{ 'select': Number(depositStore.onlinePaymentData.depositAmount || 0) === Number(item) }">
|
||||||
|
<view style="color: #FEBF05;font-weight: bold;">{{ appStore.currencySign }} {{
|
||||||
|
$formatThousandDot(item) }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="plr30 ptb24 ft15 flex justify-between items-center" :style="{ 'color': themeStore.theme.text.light, marginTop: '38rpx' }">
|
||||||
|
<text>{{ $t('deposit.depositEvent') }}:</text>
|
||||||
|
<text v-if="depositStore.activeType == 2" @click="toPoster" class="change-account-text" :style="{ color: themeStore.theme.text.theme }">
|
||||||
|
{{ $t('withdraw.posterText') }}
|
||||||
|
</text>
|
||||||
|
<text v-else @click="handleHistoryClick" class="change-history-text" :style="{ color: themeStore.theme.text.theme }">
|
||||||
|
{{ $t('deposit.historyNot') }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="pt24 plr16 flex-wrap pay-method">
|
||||||
|
<view class="select-btn-container" v-for="(item, index) in payMethod" :key="index"
|
||||||
|
@click.stop="handlePayMethodSelect(item)">
|
||||||
|
<view class="select-btn"
|
||||||
|
:style="{ 'background': item.disable ? themeStore.theme.corner.disabledBg : item.name == depositStore.onlinePaymentData.rechargeName ? themeStore.theme.corner.selectBtnBg : themeStore.theme.corner.selectBtnColor }">
|
||||||
|
<view class="nice-icon" v-if="item.isRecommend"
|
||||||
|
:style="{ 'color': themeStore.theme.corner.text, 'background': themeStore.theme.corner.selectBtnColor }">
|
||||||
|
<view>{{ appStore.currencySign }}{{ item.isRecommend }}+</view>
|
||||||
|
</view>
|
||||||
|
<!-- <theme-image v-if="item.type === depositStore.onlinePaymentData.depositMethod"
|
||||||
|
class="select-btn-bg-img" src="@/static/wallet/icon-btn-bg-select.png" mode="aspectFill" />
|
||||||
|
<theme-image v-else-if="item.disable" src="@/static/wallet/icon-btn-bg-disable.png"
|
||||||
|
class="select-btn-bg-img" mode="aspectFill" />
|
||||||
|
<theme-image v-else src="@/static/wallet/icon-btn-bg.png" class="select-btn-bg-img"
|
||||||
|
mode="aspectFill" /> -->
|
||||||
|
<view class="flex-acenter cfff select-btn-text" :class="{ 'disable': item.disable }">
|
||||||
|
<!-- <theme-image v-if="item.disable" :src="item.unableUrl" mode="aspectFit"
|
||||||
|
class="pay-type-icon flex-shrink-0" style="width: 50rpx; height: 45rpx"></theme-image>
|
||||||
|
<theme-image v-else :src="item.iconUrl" mode="aspectFit" class="pay-type-icon flex-shrink-0"
|
||||||
|
style="width: 50rpx; height: 45rpx"></theme-image> -->
|
||||||
|
<view class="flex-1 flex-scenter">
|
||||||
|
<view>{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
<view style="width: 20rpx;"></view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="select-btn-check-img"
|
||||||
|
v-if="item.type === depositStore.onlinePaymentData.depositMethod">
|
||||||
|
<theme-image src="@/static/wallet/icon-btn-select-m.png" mode="scaleToFill"
|
||||||
|
style="width: 100%; height: 100%;" />
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="select-btn-container" v-if="depositStore.onlinePaymentData.depositMethodSelectItem.isGuide">
|
||||||
|
<view class="select-btn ft12 flex-acenter flex-scenter"
|
||||||
|
:style="{ color: themeStore.theme.text.highlight2 }">
|
||||||
|
<view style="text-decoration-line: underline;" @click.stop="handleHowtouseClick">
|
||||||
|
{{ $t('deposit.howtouse') }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="ptb24" v-if="false">
|
||||||
|
<DepositChannel @change="handleChannelChange" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="plr30 ptb24 ft15" :style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
{{ $t('deposit.depositEvent') }}:
|
||||||
|
</view>
|
||||||
|
<view class="flex-acenter plr30 pb30" :style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
<view class="check-radio flex-acenter flex-scenter cfff ft26"
|
||||||
|
:style="{ 'border-color': themeStore.theme.themeDarkBgColor, 'background': themeStore.theme.themeDarkBgColor }"
|
||||||
|
@click.stop="handleDepositEventCheckClick">
|
||||||
|
|
||||||
|
<image v-if="depositStore.isTypeB" src="@/static/images/check-2.png" mode="aspectFit"
|
||||||
|
style="width: 30rpx; height: 30rpx;" />
|
||||||
|
</view>
|
||||||
|
<view class="ft13">
|
||||||
|
{{ `+${(depositStore.typeB.gift || 0) * 100}%` }} {{ $t('deposit.bonus') }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="depositStore.fillOrderSwitch" class="plr30 ptb24 ft15"
|
||||||
|
:style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
{{ $t('deposit.depositService') }}:
|
||||||
|
</view>
|
||||||
|
<view v-if="depositStore.fillOrderSwitch" class="plr30">
|
||||||
|
<SelfServiceUtrItem />
|
||||||
|
</view>
|
||||||
|
<view class="plr30 ptb24 ft15" :style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
{{ $t('deposit.depositTips') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ft10 plr30" :style="{ 'color': themeStore.theme.text.light }">
|
||||||
|
<view>
|
||||||
|
{{ $t('deposit.message.tips1') }}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
{{ $t('deposit.message.tips2') }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="noraml-bottom-action-container" :style="{ 'background': themeStore.theme.deposit.bgColor }"
|
||||||
|
@click.stop="handleConfirmClick">
|
||||||
|
<view class="normal-theme-btn-radius"
|
||||||
|
:style="{ 'background': `top / cover no-repeat ${themeStore.theme.deposit.bgImage}`, 'color': themeStore.theme.deposit.button.textColor }">
|
||||||
|
<text>
|
||||||
|
{{ $t('deposit.button.depositNow') }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<DepositSuccessPopup ref="depositSuccessPopupRef" />
|
||||||
|
<TipsPopup ref="depositEventPopupRef" :text="$t('deposit.message.tips3')" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import MoneyInput from '@/components/input/MoneyInput.vue'
|
||||||
|
import DepositChannel from './DepositChannel.vue'
|
||||||
|
import SelfServiceUtrItem from './SelfServiceUtrItem.vue'
|
||||||
|
import { useDepositStore } from '@/store/useDepositStore.js'
|
||||||
|
import { requestCreateRechargeOrder } from '@/api/deposit'
|
||||||
|
import Toast from '@/module/toast/toast.js'
|
||||||
|
import DepositSuccessPopup from './DepositSuccessPopup.vue'
|
||||||
|
import TipsPopup from '@/components/popup/TipsPopup.vue'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { useThemeStore } from '@/store/useThemeStore'
|
||||||
|
import { useAppStore } from '@/store/useAppStore'
|
||||||
|
import { openUrl } from '@/module/utils/openUrl'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
const themeStore = useThemeStore()
|
||||||
|
const depositStore = useDepositStore()
|
||||||
|
const appStore = useAppStore()
|
||||||
|
const depositType = ref('bank')
|
||||||
|
const depositSuccessPopupRef = ref(null)
|
||||||
|
const depositEventPopupRef = ref(null)
|
||||||
|
const walletTab = [
|
||||||
|
{
|
||||||
|
key: 'bank',
|
||||||
|
value: t('deposit.payType.bank')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'wallet',
|
||||||
|
value: t('deposit.payType.wallet')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const tabStyle = computed(() => {
|
||||||
|
return {
|
||||||
|
background: depositType.value === 'bank' ? themeStore.theme.wallet.normal : themeStore.theme.wallet.bgColor,
|
||||||
|
color: depositType.value === 'bank' ? themeStore.theme.wallet.light : themeStore.theme.wallet.textColor
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const payMethod = computed(() => {
|
||||||
|
return depositStore.onlinePaymentData.depositMethodList.filter(item => item.type == depositStore.activeType)
|
||||||
|
})
|
||||||
|
const handleHistoryClick = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/wallet/DepositHistory'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const toPoster = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/activity/Poster',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleSelect = (type) => {
|
||||||
|
depositType.value = type
|
||||||
|
}
|
||||||
|
const handleChannelChange = (channel) => {
|
||||||
|
depositStore.onlinePaymentData.payType = channel
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlePayMethodSelect = (item) => {
|
||||||
|
console.log(item);
|
||||||
|
|
||||||
|
if (item.disable) { return }
|
||||||
|
depositStore.onlinePaymentData.depositMethod = item.type
|
||||||
|
depositStore.onlinePaymentData.depositMethodName = item.name
|
||||||
|
depositStore.onlinePaymentData.depositMethodSelectItem = item
|
||||||
|
depositStore.onlinePaymentData.rechargeName = item.name
|
||||||
|
depositStore.onlinePaymentData.payType = item.payType?.split(',')[0]
|
||||||
|
depositStore.payType = item.payType
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAmountSelect = (item) => {
|
||||||
|
depositStore.onlinePaymentData.depositAmount = item + ''
|
||||||
|
depositStore.computeMethodList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAmountInput = () => {
|
||||||
|
depositStore.computeMethodList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDepositEventCheckClick = () => {
|
||||||
|
depositStore.isTypeB = !depositStore.isTypeB
|
||||||
|
if (depositStore.isTypeB) {
|
||||||
|
depositEventPopupRef.value.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleHowtouseClick = () => {
|
||||||
|
let url = depositStore.onlinePaymentData.depositMethodSelectItem.isGuide
|
||||||
|
if (!url) { return }
|
||||||
|
openUrl(url)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleConfirmClick = async () => {
|
||||||
|
if (!depositStore.onlinePaymentData.depositAmount) {
|
||||||
|
Toast.show(t('deposit.toast.text1'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (Number(depositStore.onlinePaymentData.depositAmount) < depositStore.onlineDepositMin || Number(depositStore.onlinePaymentData.depositAmount) > depositStore.onlineDepositMax) {
|
||||||
|
Toast.show(`${t('deposit.toast.text2')} ${depositStore.onlineDepositMin} - ${depositStore.onlineDepositMax}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Toast.showLoading('Loading')
|
||||||
|
let params = {}
|
||||||
|
if (appStore.phoneNumberPrefix === '+91') {
|
||||||
|
params = {
|
||||||
|
amount: depositStore.onlinePaymentData.depositAmount,
|
||||||
|
channelId: depositStore.onlinePaymentData.depositChannel,
|
||||||
|
rechargeType: depositStore.onlinePaymentData.depositMethod === 5 ? 'H' : depositStore.onlineDepositType.rechargeType,
|
||||||
|
accountType: depositStore.onlinePaymentData.depositMethod,
|
||||||
|
rechargeName: depositStore.onlinePaymentData.rechargeName,
|
||||||
|
payType: depositStore.onlinePaymentData.payType,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
params = {
|
||||||
|
amount: depositStore.onlinePaymentData.depositAmount,
|
||||||
|
channelId: depositStore.onlinePaymentData.depositChannel,
|
||||||
|
rechargeType: depositStore.onlinePaymentData.depositMethod === 5 ? 'H' : depositStore.onlineDepositType.rechargeType,
|
||||||
|
accountType: depositStore.onlinePaymentData.depositMethodName,
|
||||||
|
rechargeName: depositStore.onlinePaymentData.rechargeName,
|
||||||
|
payType: depositStore.onlinePaymentData.payType,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
|
||||||
|
const { code, data } = await requestCreateRechargeOrder(params)
|
||||||
|
Toast.hideLoading()
|
||||||
|
if (code !== 200) { return }
|
||||||
|
if (data.url) {
|
||||||
|
// window.open("/test.html", "_blank")
|
||||||
|
openUrl(data.url)
|
||||||
|
depositSuccessPopupRef.value.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.online-deposit-container {
|
||||||
|
padding-bottom: 220rpx;
|
||||||
|
.change-account-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-decoration-line: underline;
|
||||||
|
}
|
||||||
|
.change-history-text{
|
||||||
|
font-size: 26rpx;
|
||||||
|
text-decoration-line: underline;
|
||||||
|
}
|
||||||
|
.pay-type-box {
|
||||||
|
height: 88rpx;
|
||||||
|
|
||||||
|
.pay-type-item {
|
||||||
|
height: 88rpx;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pay-method {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-gap: 20rpx;
|
||||||
|
padding: 0 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-btn-container {
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
padding: 8rpx 12rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-min {
|
||||||
|
background: #3C9704;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-max {
|
||||||
|
background: #A40000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 85rpx;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
|
||||||
|
.nice-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
// width: 90rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
z-index: 3;
|
||||||
|
padding: 0rpx 12rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
border-bottom-right-radius: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
// .pay-type-icon {}
|
||||||
|
|
||||||
|
// .pay-type-icon.disable {
|
||||||
|
// filter: grayscale(90%);
|
||||||
|
//}
|
||||||
|
|
||||||
|
.select-btn-bg-img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-btn-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
bottom: 0rpx;
|
||||||
|
z-index: 2;
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 0rpx 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-btn-text.disable {
|
||||||
|
color: #999999;
|
||||||
|
filter: grayscale(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-btn-check-img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
bottom: 0rpx;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-radio {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
border: 1rpx solid #963333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.amount-box {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-item-container {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.badge-view {
|
||||||
|
position: absolute;
|
||||||
|
top: -12rpx;
|
||||||
|
right: 0;
|
||||||
|
min-width: 64rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
background: linear-gradient(270deg, #FF8A00 0%, #FF1200 100%);
|
||||||
|
font-size: 18rpx;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-top-left-radius: 10rpx;
|
||||||
|
border-bottom-right-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-content {
|
||||||
|
width: 219rpx;
|
||||||
|
height: 85rpx;
|
||||||
|
background: linear-gradient(360deg, #490F0E 0%, #660F0A 74%, #70130D 99%), rgba(106, 22, 27, 0.79);
|
||||||
|
border-radius: 19rpx 19rpx 19rpx 19rpx;
|
||||||
|
border: 2rpx solid #7B1C21;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.select {
|
||||||
|
background: linear-gradient(360deg, #79130D 0%, #94150C 44%, #BC0B00 99%);
|
||||||
|
border-radius: 19rpx;
|
||||||
|
border: 2rpx solid #FEBF05;
|
||||||
|
transition: all .3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-content.select {
|
||||||
|
background-color: #F37E1C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.normal-theme-btn-radius {
|
||||||
|
width: 682rpx;
|
||||||
|
height: 84rpx;
|
||||||
|
border-radius: 0;
|
||||||
|
font-size: 31rpx;
|
||||||
|
color: #7A2500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -35,7 +35,8 @@ export const useDepositStore = defineStore({
|
|||||||
depositMethodSelectItem: {},
|
depositMethodSelectItem: {},
|
||||||
depositMethodList: [],
|
depositMethodList: [],
|
||||||
rechargeName: '',
|
rechargeName: '',
|
||||||
payType: ''
|
payType: '',
|
||||||
|
payMethod: ''
|
||||||
},
|
},
|
||||||
// 渠道列表
|
// 渠道列表
|
||||||
payType: '',
|
payType: '',
|
||||||
|
@ -91,6 +91,8 @@ export default {
|
|||||||
selectLinearBgColor: 'linear-gradient( 360deg, #79130D 0%, #94150C 44%, #BC0B00 99%)',
|
selectLinearBgColor: 'linear-gradient( 360deg, #79130D 0%, #94150C 44%, #BC0B00 99%)',
|
||||||
linearBgColor: 'linear-gradient( 360deg, #490F0E 0%, #660F0A 74%, #70130D 99%), rgba(106,22,27,0.79)',
|
linearBgColor: 'linear-gradient( 360deg, #490F0E 0%, #660F0A 74%, #70130D 99%), rgba(106,22,27,0.79)',
|
||||||
},
|
},
|
||||||
|
payBg: `left / cover no-repeat url('${imgSrc}/wallet/icon-btn-bg-select.png')`,
|
||||||
|
payBg1: `left / cover no-repeat url('${imgSrc}/wallet/icon-btn-bg.png')`,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
normal: '#ffffff',
|
normal: '#ffffff',
|
||||||
@ -330,6 +332,18 @@ export default {
|
|||||||
},
|
},
|
||||||
earn: {
|
earn: {
|
||||||
gradientBtn: 'linear-gradient(0deg, #32b12f, #10740b)',
|
gradientBtn: 'linear-gradient(0deg, #32b12f, #10740b)',
|
||||||
|
light: '#ffffff',
|
||||||
|
text: '#F59094',
|
||||||
|
yellow: '#D4C534',
|
||||||
|
amount: '#FFCF4C',
|
||||||
|
tab: '#FFCE64',
|
||||||
|
dark: '#000000',
|
||||||
|
blockBg: '#2B0607',
|
||||||
|
headLinear: 'linear-gradient(180deg, #C8933E, #EFD388);',
|
||||||
|
recordBg: '#610700',
|
||||||
|
tabHeadColor: '#36070F',
|
||||||
|
success: '#1ED01E',
|
||||||
|
dismiss: '#FF0000'
|
||||||
},
|
},
|
||||||
// 个人中心相关色值
|
// 个人中心相关色值
|
||||||
account: {
|
account: {
|
||||||
|
Loading…
Reference in New Issue
Block a user