Merge branch 'master' of https://gitee.com/sheepjs/shopro-uniapp
commit
0c9c0c4dc3
7
env
7
env
|
@ -1,3 +1,6 @@
|
||||||
|
# 版本号
|
||||||
|
SHOPRO_VERSION = v1.8.1
|
||||||
|
|
||||||
# 正式环境接口域名
|
# 正式环境接口域名
|
||||||
SHOPRO_BASE_URL = https://api.shopro.sheepjs.com
|
SHOPRO_BASE_URL = https://api.shopro.sheepjs.com
|
||||||
|
|
||||||
|
@ -13,7 +16,5 @@ SHOPRO_API_PATH = /shop/api/
|
||||||
# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀
|
# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀
|
||||||
SHOPRO_STATIC_URL = https://file.sheepjs.com
|
SHOPRO_STATIC_URL = https://file.sheepjs.com
|
||||||
|
|
||||||
SHOPRO_VERSION = v1.8.1
|
# 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启)
|
||||||
|
|
||||||
# 是否开启直播 1 开启直播 | 0 关闭直播
|
|
||||||
SHOPRO_MPLIVE_ON = 0
|
SHOPRO_MPLIVE_ON = 0
|
|
@ -151,6 +151,7 @@
|
||||||
cart.delete(cartItem.id);
|
cart.delete(cartItem.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(cartItem.goods_num === e) return;
|
||||||
cartItem.goods_num = e;
|
cartItem.goods_num = e;
|
||||||
cart.update({
|
cart.update({
|
||||||
goods_id: cartItem.goods_id,
|
goods_id: cartItem.goods_id,
|
||||||
|
|
|
@ -3,13 +3,9 @@
|
||||||
<s-layout title="申请售后">
|
<s-layout title="申请售后">
|
||||||
<!-- 售后商品 -->
|
<!-- 售后商品 -->
|
||||||
<view class="goods-box">
|
<view class="goods-box">
|
||||||
<s-goods-item
|
<s-goods-item :img="state.goodsItem.goods_image" :title="state.goodsItem.goods_title"
|
||||||
:img="state.goodsItem.goods_image"
|
:skuText="state.goodsItem.goods_sku_text" :price="state.goodsItem.goods_price"
|
||||||
:title="state.goodsItem.goods_title"
|
:num="state.goodsItem.goods_num"></s-goods-item>
|
||||||
:skuText="state.goodsItem.goods_sku_text"
|
|
||||||
:price="state.goodsItem.goods_price"
|
|
||||||
:num="state.goodsItem.goods_num"
|
|
||||||
></s-goods-item>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<uni-forms ref="form" v-model="formData" :rules="rules" label-position="top">
|
<uni-forms ref="form" v-model="formData" :rules="rules" label-position="top">
|
||||||
|
@ -18,17 +14,9 @@
|
||||||
<view class="item-title ss-m-b-20">售后类型</view>
|
<view class="item-title ss-m-b-20">售后类型</view>
|
||||||
<view class="ss-flex-col">
|
<view class="ss-flex-col">
|
||||||
<radio-group @change="onRefundChange">
|
<radio-group @change="onRefundChange">
|
||||||
<label
|
<label class="ss-flex ss-col-center ss-p-y-10" v-for="(item, index) in state.refundTypeList" :key="index">
|
||||||
class="ss-flex ss-col-center ss-p-y-10"
|
<radio :checked="formData.type === item.value" color="var(--ui-BG-Main)" style="transform: scale(0.8)"
|
||||||
v-for="(item, index) in state.refundTypeList"
|
:value="item.value" />
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<radio
|
|
||||||
:checked="formData.type === item.value"
|
|
||||||
color="var(--ui-BG-Main)"
|
|
||||||
style="transform: scale(0.8)"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
<view class="item-value ss-m-l-8">{{ item.text }}</view>
|
<view class="item-value ss-m-l-8">{{ item.text }}</view>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
|
@ -47,13 +35,8 @@
|
||||||
<view class="refund-item u-m-b-20">
|
<view class="refund-item u-m-b-20">
|
||||||
<view class="item-title ss-m-b-20">联系方式</view>
|
<view class="item-title ss-m-b-20">联系方式</view>
|
||||||
<view class="input-box u-flex">
|
<view class="input-box u-flex">
|
||||||
<uni-easyinput
|
<uni-easyinput :inputBorder="false" type="number" v-model="formData.mobile" placeholder="请输入您的联系电话"
|
||||||
:inputBorder="false"
|
paddingLeft="10" />
|
||||||
type="number"
|
|
||||||
v-model="formData.mobile"
|
|
||||||
placeholder="请输入您的联系电话"
|
|
||||||
paddingLeft="10"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -61,23 +44,11 @@
|
||||||
<view class="refund-item">
|
<view class="refund-item">
|
||||||
<view class="item-title ss-m-b-20">相关描述</view>
|
<view class="item-title ss-m-b-20">相关描述</view>
|
||||||
<view class="describe-box">
|
<view class="describe-box">
|
||||||
<uni-easyinput
|
<uni-easyinput :inputBorder="false" class="describe-content" type="textarea" maxlength="120" autoHeight
|
||||||
:inputBorder="false"
|
v-model="formData.content" placeholder="客官~请描述您遇到的问题,建议上传照片"></uni-easyinput>
|
||||||
class="describe-content"
|
|
||||||
type="textarea"
|
|
||||||
maxlength="120"
|
|
||||||
autoHeight
|
|
||||||
v-model="formData.content"
|
|
||||||
placeholder="客官~请描述您遇到的问题,建议上传照片"
|
|
||||||
></uni-easyinput>
|
|
||||||
<view class="upload-img">
|
<view class="upload-img">
|
||||||
<s-uploader
|
<s-uploader v-model:url="formData.images" fileMediatype="image" limit="9" mode="grid"
|
||||||
v-model:url="formData.images"
|
:imageStyles="{ width: '168rpx', height: '168rpx' }" />
|
||||||
fileMediatype="image"
|
|
||||||
limit="9"
|
|
||||||
mode="grid"
|
|
||||||
:imageStyles="{ width: '168rpx', height: '168rpx' }"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -86,9 +57,7 @@
|
||||||
<su-fixed bottom placeholder>
|
<su-fixed bottom placeholder>
|
||||||
<view class="foot-wrap">
|
<view class="foot-wrap">
|
||||||
<view class="foot_box ss-flex ss-col-center ss-row-between ss-p-x-30">
|
<view class="foot_box ss-flex ss-col-center ss-row-between ss-p-x-30">
|
||||||
<button class="ss-reset-button contcat-btn" @tap="sheep.$router.go('/pages/chat/index')"
|
<button class="ss-reset-button contcat-btn" @tap="sheep.$router.go('/pages/chat/index')">联系客服</button>
|
||||||
>联系客服</button
|
|
||||||
>
|
|
||||||
<button class="ss-reset-button ui-BG-Main-Gradient sub-btn" @tap="submit">提交</button>
|
<button class="ss-reset-button ui-BG-Main-Gradient sub-btn" @tap="submit">提交</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -97,29 +66,17 @@
|
||||||
|
|
||||||
<su-popup :show="state.showModal" round="10" :showClose="true" @close="state.showModal = false">
|
<su-popup :show="state.showModal" round="10" :showClose="true" @close="state.showModal = false">
|
||||||
<view class="modal-box page_box">
|
<view class="modal-box page_box">
|
||||||
<view class="modal-head item-title head_box ss-flex ss-row-center ss-col-center"
|
<view class="modal-head item-title head_box ss-flex ss-row-center ss-col-center">申请原因</view>
|
||||||
>申请原因</view
|
|
||||||
>
|
|
||||||
<view class="modal-content content_box">
|
<view class="modal-content content_box">
|
||||||
<radio-group @change="onChange">
|
<radio-group @change="onChange">
|
||||||
<label
|
<label class="radio ss-flex ss-col-center" v-for="item in state.refundReasonList" :key="item.value">
|
||||||
class="radio ss-flex ss-col-center"
|
|
||||||
v-for="item in state.refundReasonList"
|
|
||||||
:key="item.value"
|
|
||||||
>
|
|
||||||
<view class="ss-flex-1 ss-p-20">{{ item.title }}</view>
|
<view class="ss-flex-1 ss-p-20">{{ item.title }}</view>
|
||||||
<radio
|
<radio :value="item.value" color="var(--ui-BG-Main)" :checked="item.value === state.currentValue" />
|
||||||
:value="item.value"
|
|
||||||
color="var(--ui-BG-Main)"
|
|
||||||
:checked="item.value === state.currentValue"
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
<view class="modal-foot foot_box ss-flex ss-row-center ss-col-center">
|
<view class="modal-foot foot_box ss-flex ss-row-center ss-col-center">
|
||||||
<button class="ss-reset-button close-btn ui-BG-Main-Gradient" @tap="onReason"
|
<button class="ss-reset-button close-btn ui-BG-Main-Gradient" @tap="onReason">确定</button>
|
||||||
>确定</button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</su-popup>
|
</su-popup>
|
||||||
|
@ -127,15 +84,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { reactive, ref, unref } from 'vue';
|
import { reactive, ref, unref } from 'vue';
|
||||||
const form = ref(null);
|
const form = ref(null);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
showModal: false,
|
showModal: false,
|
||||||
currentValue: 0,
|
currentValue: 0,
|
||||||
goodsItem: {},
|
goodsItem: {},
|
||||||
// showSuccess: false,
|
|
||||||
reasonText: '',
|
reasonText: '',
|
||||||
//售后类型
|
//售后类型
|
||||||
refundTypeList: [
|
refundTypeList: [
|
||||||
|
@ -178,18 +134,21 @@
|
||||||
title: '我不想要了',
|
title: '我不想要了',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
type: '',
|
type: '',
|
||||||
reason: '',
|
reason: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
content: '',
|
content: '',
|
||||||
images: [],
|
images: [],
|
||||||
});
|
});
|
||||||
const rules = reactive({});
|
const rules = reactive({});
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
async function submit() {
|
async function submit() {
|
||||||
|
// #ifdef MP
|
||||||
|
sheep.$platform.useProvider('wechat').subscribeMessage('order_aftersale_change');
|
||||||
|
// #endif
|
||||||
let data = {
|
let data = {
|
||||||
...formData,
|
...formData,
|
||||||
order_id: state.goodsItem.order_id,
|
order_id: state.goodsItem.order_id,
|
||||||
|
@ -200,56 +159,57 @@
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
});
|
});
|
||||||
// state.showSuccess = true;
|
|
||||||
sheep.$router.go('/pages/order/aftersale/list');
|
sheep.$router.go('/pages/order/aftersale/list');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//选择售后类型
|
//选择售后类型
|
||||||
function onRefundChange(e) {
|
function onRefundChange(e) {
|
||||||
formData.type = e.detail.value;
|
formData.type = e.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
//选择申请原因
|
//选择申请原因
|
||||||
function onChange(e) {
|
function onChange(e) {
|
||||||
state.currentValue = e.detail.value;
|
state.currentValue = e.detail.value;
|
||||||
state.refundReasonList.forEach((item) => {
|
state.refundReasonList.forEach((item) => {
|
||||||
if (item.value === e.detail.value) {
|
if (item.value === e.detail.value) {
|
||||||
state.reasonText = item.title;
|
state.reasonText = item.title;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//确定
|
//确定
|
||||||
function onReason() {
|
function onReason() {
|
||||||
formData.reason = state.reasonText;
|
formData.reason = state.reasonText;
|
||||||
state.showModal = false;
|
state.showModal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTitle(e, title) {
|
function onTitle(e, title) {
|
||||||
state.currentValue = e;
|
state.currentValue = e;
|
||||||
state.reasonText = title;
|
state.reasonText = title;
|
||||||
}
|
}
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
state.goodsItem = JSON.parse(options.item);
|
state.goodsItem = JSON.parse(options.item);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item-title {
|
.item-title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
// margin-bottom: 20rpx;
|
// margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 售后项目
|
// 售后项目
|
||||||
.refund-item {
|
.refund-item {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-bottom: 1rpx solid #f5f5f5;
|
border-bottom: 1rpx solid #f5f5f5;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 留言
|
// 留言
|
||||||
.describe-box {
|
.describe-box {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
|
@ -272,20 +232,20 @@
|
||||||
background: rgba(249, 250, 251, 1);
|
background: rgba(249, 250, 251, 1);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-box {
|
.goods-box {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot-wrap {
|
.foot-wrap {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foot_box {
|
.foot_box {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
|
@ -306,9 +266,9 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-box {
|
.modal-box {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
// height: 680rpx;
|
// height: 680rpx;
|
||||||
border-radius: 30rpx 30rpx 0 0;
|
border-radius: 30rpx 30rpx 0 0;
|
||||||
|
@ -331,9 +291,9 @@
|
||||||
color: rgba(#fff, 0.9);
|
color: rgba(#fff, 0.9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.success-box {
|
.success-box {
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
padding: 90rpx 0 64rpx 0;
|
padding: 90rpx 0 64rpx 0;
|
||||||
|
|
||||||
|
@ -354,5 +314,5 @@
|
||||||
background: linear-gradient(90deg, var(--ui-BG-Main-gradient), var(--ui-BG-Main));
|
background: linear-gradient(90deg, var(--ui-BG-Main-gradient), var(--ui-BG-Main));
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -394,7 +394,7 @@
|
||||||
success: async function (res) {
|
success: async function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
sheep.$platform.useProvider('wechat').subscribeMessage('order_apply_refund');
|
sheep.$platform.useProvider('wechat').subscribeMessage('order_refund');
|
||||||
// #endif
|
// #endif
|
||||||
const { error, data } = await sheep.$api.order.applyRefund(orderId);
|
const { error, data } = await sheep.$api.order.applyRefund(orderId);
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
|
|
|
@ -1,53 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="充值" class="withdraw-wrap" navbar="inner">
|
<s-layout title="充值" class="withdraw-wrap" navbar="inner">
|
||||||
<view
|
<view class="wallet-num-box ss-flex ss-col-center ss-row-between" :style="[
|
||||||
class="wallet-num-box ss-flex ss-col-center ss-row-between"
|
|
||||||
:style="[
|
|
||||||
{
|
{
|
||||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||||
paddingTop: Number(statusBarHeight + 108) + 'rpx',
|
paddingTop: Number(statusBarHeight + 108) + 'rpx',
|
||||||
},
|
},
|
||||||
]"
|
]">
|
||||||
>
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="num-title">当前余额(元)</view>
|
<view class="num-title">当前余额(元)</view>
|
||||||
<view class="wallet-num">{{ userInfo.money }}</view>
|
<view class="wallet-num">{{ userInfo.money }}</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/recharge-log')"
|
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/recharge-log')">充值记录</button>
|
||||||
>充值记录</button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="recharge-box">
|
<view class="recharge-box">
|
||||||
<view class="recharge-card-box" v-if="state.data.status">
|
<view class="recharge-card-box" v-if="state.data.status">
|
||||||
<view class="input-label ss-m-b-50">充值金额</view>
|
<view class="input-label ss-m-b-50">充值金额</view>
|
||||||
<view class="input-box ss-flex border-bottom ss-p-b-20" v-if="state.data.custom_status">
|
<view class="input-box ss-flex border-bottom ss-p-b-20" v-if="state.data.custom_status">
|
||||||
<view class="unit">¥</view>
|
<view class="unit">¥</view>
|
||||||
<uni-easyinput
|
<uni-easyinput v-model="state.recharge_money" type="digit" placeholder="请输入充值金额" :inputBorder="false">
|
||||||
v-model="state.recharge_money"
|
|
||||||
type="digit"
|
|
||||||
placeholder="请输入充值金额"
|
|
||||||
:inputBorder="false"
|
|
||||||
>
|
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view class="face-value-box ss-flex ss-flex-wrap ss-m-y-40">
|
<view class="face-value-box ss-flex ss-flex-wrap ss-m-y-40">
|
||||||
<button
|
<button class="ss-reset-button face-value-btn" v-for="item in state.faceValueList" :key="item.money"
|
||||||
class="ss-reset-button face-value-btn"
|
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]" @tap="onCard(item.money)">
|
||||||
v-for="item in state.faceValueList"
|
|
||||||
:key="item.money"
|
|
||||||
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]"
|
|
||||||
@tap="onCard(item.money)"
|
|
||||||
>
|
|
||||||
<text class="face-value-title">{{ item.money }}</text>
|
<text class="face-value-title">{{ item.money }}</text>
|
||||||
<view v-if="item.gift" class="face-value-tag">
|
<view v-if="item.gift" class="face-value-tag">
|
||||||
送{{ item.gift }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view
|
送{{ item.gift }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view>
|
||||||
>
|
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<button
|
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main" @tap="onConfirm">
|
||||||
class="ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main"
|
|
||||||
@tap="onConfirm"
|
|
||||||
>
|
|
||||||
确认充值
|
确认充值
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
@ -57,58 +38,61 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||||
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
|
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
recharge_money: '',
|
recharge_money: '',
|
||||||
data: {},
|
data: {},
|
||||||
faceValueList: [],
|
faceValueList: [],
|
||||||
});
|
});
|
||||||
// 点击卡片
|
// 点击卡片
|
||||||
|
|
||||||
function onCard(e) {
|
function onCard(e) {
|
||||||
state.recharge_money = e;
|
state.recharge_money = e;
|
||||||
}
|
}
|
||||||
async function getRechargeTabs() {
|
async function getRechargeTabs() {
|
||||||
const res = await sheep.$api.trade.rechargeRules();
|
const res = await sheep.$api.trade.rechargeRules();
|
||||||
if (res.error === 0) {
|
if (res.error === 0) {
|
||||||
state.data = res.data;
|
state.data = res.data;
|
||||||
state.data.status = res.data.status;
|
state.data.status = res.data.status;
|
||||||
state.faceValueList = res.data.quick_amounts;
|
state.faceValueList = res.data.quick_amounts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onChange(e) {
|
function onChange(e) {
|
||||||
state.data.gift_type = e.detail.value;
|
state.data.gift_type = e.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onConfirm() {
|
async function onConfirm() {
|
||||||
const { error, data } = await sheep.$api.trade.recharge({
|
const { error, data } = await sheep.$api.trade.recharge({
|
||||||
recharge_money: state.recharge_money,
|
recharge_money: state.recharge_money,
|
||||||
});
|
});
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
|
// #ifdef MP
|
||||||
|
sheep.$platform.useProvider('wechat').subscribeMessage('money_change');
|
||||||
|
// #endif
|
||||||
sheep.$router.go('/pages/pay/index', { orderSN: data.order_sn, type: 'recharge' });
|
sheep.$router.go('/pages/pay/index', { orderSN: data.order_sn, type: 'recharge' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getRechargeTabs();
|
getRechargeTabs();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep() {
|
:deep() {
|
||||||
.uni-input-input {
|
.uni-input-input {
|
||||||
font-family: OPPOSANS !important;
|
font-family: OPPOSANS !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wallet-num-box {
|
.wallet-num-box {
|
||||||
padding: 0 40rpx 80rpx;
|
padding: 0 40rpx 80rpx;
|
||||||
background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat;
|
background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat;
|
||||||
border-radius: 0 0 5% 5%;
|
border-radius: 0 0 5% 5%;
|
||||||
|
@ -138,22 +122,22 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: $white;
|
color: $white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.recharge-box {
|
.recharge-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
margin-top: -60rpx;
|
margin-top: -60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.save-btn {
|
.save-btn {
|
||||||
width: 620rpx;
|
width: 620rpx;
|
||||||
height: 86rpx;
|
height: 86rpx;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recharge-card-box {
|
.recharge-card-box {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
background: var(--ui-BG);
|
background: var(--ui-BG);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
@ -262,5 +246,5 @@
|
||||||
font-family: OPPOSANS;
|
font-family: OPPOSANS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -135,7 +135,7 @@ export default class SheepPay {
|
||||||
const { error, data } = await this.prepay();
|
const { error, data } = await this.prepay();
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
const redirect_url = `${getRootUrl()}pages/pay/result?orderSN=${this.orderSN}&payment=${this.payment
|
const redirect_url = `${getRootUrl()}pages/pay/result?orderSN=${this.orderSN}&payment=${this.payment
|
||||||
}`;
|
}&orderType=${this.orderType}`;
|
||||||
location.href = `${data.pay_data.h5_url}&redirect_url=${encodeURIComponent(redirect_url)}`;
|
location.href = `${data.pay_data.h5_url}&redirect_url=${encodeURIComponent(redirect_url)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ export default class SheepPay {
|
||||||
let { error, data } = await this.prepay();
|
let { error, data } = await this.prepay();
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
const redirect_url = `${getRootUrl()}pages/pay/result?orderSN=${this.orderSN}&payment=${this.payment
|
const redirect_url = `${getRootUrl()}pages/pay/result?orderSN=${this.orderSN}&payment=${this.payment
|
||||||
}`;
|
}&orderType=${this.orderType}`;
|
||||||
location.href = data.pay_data + encodeURIComponent(redirect_url);
|
location.href = data.pay_data + encodeURIComponent(redirect_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import uni from '@dcloudio/vite-plugin-uni';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
// import viteCompression from 'vite-plugin-compression';
|
// import viteCompression from 'vite-plugin-compression';
|
||||||
import uniReadPagesV3Plugin from './sheep/router/utils/uni-read-pages-v3';
|
import uniReadPagesV3Plugin from './sheep/router/utils/uni-read-pages-v3';
|
||||||
import mpliveMainfestPlugin from './sheep/libs/mpLive-manifest-plugin';
|
import mpliveMainfestPlugin from './sheep/libs/mplive-manifest-plugin';
|
||||||
|
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
|
|
Loading…
Reference in New Issue