This commit is contained in:
学习很差啦
2023-04-07 10:12:01 +08:00
32 changed files with 469 additions and 301 deletions

View File

@@ -46,3 +46,17 @@ export function payCallback (params) {
params
});
}
/**
* 支付结果查询
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
* @param sn 订单编号
*/
export function withdrawalSettingVO (params) {
return request({
url: `/buyer/wallet/wallet/withdrawalSettingVO`,
needToken: true,
method: Method.GET,
params
});
}

View File

@@ -49,35 +49,35 @@
class="goods-show-info"
v-for="(item, index) in goodsList"
:key="index"
@click="goGoodsDetail(item.id, item.content.goodsId)"
@click="goGoodsDetail(item.id, item.goodsId)"
>
<div class="goods-show-img">
<img width="220" height="220" :src="item.content.thumbnail" />
<img width="220" height="220" :src="item.thumbnail" />
</div>
<div class="goods-show-price">
<span>
<span class="seckill-price text-danger">{{
item.content.price | unitPrice("¥")
item.price | unitPrice("¥")
}}</span>
</span>
</div>
<div class="goods-show-detail">
<Tag
v-if="item.content.salesModel === 'WHOLESALE'"
v-if="item.salesModel === 'WHOLESALE'"
class="goods-show-tag"
color="purple"
>
批发
</Tag>
<span>{{ item.content.goodsName }}</span>
<span>{{ item.goodsName }}</span>
</div>
<div class="goods-show-num">
已有<span>{{ item.content.commentNum || 0 }}</span
已有<span>{{ item.commentNum || 0 }}</span
>人评价
</div>
<div class="goods-show-seller">
<span class="text-bottom" style="color: #e4393c">{{
item.content.storeName
item.storeName
}}</span>
</div>
@@ -85,21 +85,21 @@
<Tag
class="goods-show-tag"
color="red"
v-if="item.content.selfOperated"
v-if="item.selfOperated"
>
自营
</Tag>
<Tag
class="goods-show-tag"
color="blue"
v-if="item.content.goodsType == 'VIRTUAL_GOODS'"
v-if="item.goodsType === 'VIRTUAL_GOODS'"
>
虚拟
</Tag>
<Tag
class="goods-show-tag"
color="blue"
v-else-if="item.content.goodsType == 'PHYSICAL_GOODS'"
v-else-if="item.goodsType === 'PHYSICAL_GOODS'"
>
实物
</Tag>
@@ -146,7 +146,6 @@ export default {
],
goodsList: [], // 商品列表
loading: false, // 加载状态
goodsListType: "",
total: 0, // 列表总数
params: {
// 请求参数
@@ -230,11 +229,8 @@ export default {
.then((res) => {
this.loading = false;
if (res.success) {
this.goodsList = res.result.content;
this.total = res.result.totalElements;
for (var i = 0; i < this.goodsList.length; i++) {
this.goodsListType = this.goodsList[i];
}
this.goodsList = res.result.records;
this.total = res.result.total;
}
})
.catch(() => {

View File

@@ -7,14 +7,14 @@
<div class="shop-logo">
<div>
<p>{{ storeMsg.storeName || 'xx店铺' }}</p>
<p class="ellipsis" :alt="storeMsg.storeDesc" v-html="storeMsg.storeDesc"></p>
<p :alt="storeMsg.storeDesc" class="ellipsis" v-html="storeMsg.storeDesc"></p>
</div>
<div>
<span class="hover-pointer" @click="collect"><Icon type="ios-heart"
:color="storeCollected ? '#ed3f14' : '#fff'"/>{{
<span class="hover-pointer" @click="collect"><Icon :color="storeCollected ? '#ed3f14' : '#fff'"
type="ios-heart"/>{{
storeCollected ? '已收藏店铺' : '收藏店铺'
}}</span>
<span style="width:80px" class="hover-pointer ml_10" @click="IMService(storeMsg.storeId)"><Icon
<span class="hover-pointer ml_10" style="width:80px" @click="IMService(storeMsg.storeId)"><Icon
custom="icomoon icon-customer-service"/>联系客服</span>
</div>
</div>
@@ -26,7 +26,7 @@
>
首页
</li>
<li class="cate-item" v-for="(cate, index) in cateList" :key="index">
<li v-for="(cate, index) in cateList" :key="index" class="cate-item">
<Dropdown v-if="cate.children.length">
<div @click.self="searchByCate(cate)">
{{ cate.labelName }}
@@ -34,10 +34,10 @@
</div>
<DropdownMenu slot="list">
<DropdownItem
@click.native="searchByCate(sec)"
:name="sec.id"
v-for="sec in cate.children"
:key="sec.id"
:name="sec.id"
@click.native="searchByCate(sec)"
>{{ sec.labelName }}
</DropdownItem
>
@@ -63,38 +63,38 @@
<empty v-if="goodsList.length === 0"/>
<div
v-else
class="goods-show-info"
v-for="(item, index) in goodsList"
v-else
:key="index"
@click="goGoodsDetail(item.content.id, item.content.goodsId)"
class="goods-show-info"
@click="goGoodsDetail(item.id, item.goodsId)"
>
<div class="goods-show-img">
<img width="220" height="220" :src="item.content.thumbnail"/>
<img :src="item.thumbnail" height="220" width="220" alt=""/>
</div>
<div class="goods-show-price">
<span>
<span class="seckill-price text-danger">{{
item.content.price | unitPrice("¥")
item.price | unitPrice("¥")
}}</span>
</span>
</div>
<div class="goods-show-detail">
<span>{{ item.content.goodsName }}</span>
<span>{{ item.goodsName }}</span>
</div>
<div class="goods-show-num">
已有<span>{{ item.content.commentNum || 0 }}</span
已有<span>{{ item.commentNum || 0 }}</span
>人评价
</div>
</div>
</div>
<div class="goods-page">
<Page
:page-size="params.pageSize"
:total="total"
show-sizer
@on-change="changePageNum"
@on-page-size-change="changePageSize"
:total="total"
:page-size="params.pageSize"
></Page>
</div>
@@ -107,15 +107,14 @@
<script>
import {getDetailById, getCateById} from "@/api/shopentry";
import {cancelStoreCollect, collectStore, isStoreCollection} from "@/api/member";
import {getCateById, getDetailById} from "@/api/shopentry";
import {cancelStoreCollect, collectStore} from "@/api/member";
import {goodsList} from "@/api/goods";
import Search from "@/components/Search";
import ModelForm from "@/components/indexDecorate/ModelForm";
import HoverSearch from "@/components/header/hoverSearch";
import storage from "@/plugins/storage";
import {getFloorStoreData} from "@/api/index.js";
import {seckillByDay} from "@/api/promotion";
import imTalk from '@/components/mixes/talkIm'
export default {
@@ -165,8 +164,8 @@ export default {
let dataJson = JSON.parse(res.result.pageData);
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
// 轮播图根据不同轮播,样式不同
for (let i = 0; i < dataJson.list.length; i++) {
let type = dataJson.list[i].type;
for (const element of dataJson.list) {
let type = element.type;
if (type === "carousel2") {
this.carouselLarge = true;
} else if (type === "carousel1") {
@@ -255,8 +254,8 @@ export default {
goodsList(this.params)
.then((res) => {
if (res.success) {
this.goodsList = res.result.content;
this.total = res.result.totalElements;
this.goodsList = res.result;
this.total = res.result.total;
}
})
.catch(() => {
@@ -313,7 +312,7 @@ export default {
};
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
@import "../assets/styles/goodsList.scss";
.merchant {

View File

@@ -1,13 +1,13 @@
<template>
<div class="wrapper">
<card _Title="资金管理" />
<card _Title="资金管理"/>
<div class="box">
<div class="mb_20 account-price">
<span class="subTips">账户余额</span>
<span class="global_color mr_10" style="font-size:26px">{{ memberDeposit | unitPrice }}</span>
<span class="subTips">冻结金额</span>
<span class="">{{ frozenDeposit | unitPrice}}</span>
<span class="">{{ frozenDeposit | unitPrice }}</span>
</div>
<div class="account-btns">
<Button type="primary" @click="recharge">在线充值</Button>
@@ -22,19 +22,19 @@
<div>
<Form
ref="formData"
:model="formData"
label-position="left"
:label-width="100"
:model="formData"
:rules="formValidate"
label-position="left"
>
<FormItem label="充值金额" prop="price">
<Input v-model="formData.price" size="large" number maxlength="9"
><span slot="append"></span></Input>
<Input v-model="formData.price" maxlength="9" number size="large"
><span slot="append"></span></Input>
</FormItem>
</Form>
</div>
<div slot="footer" style="text-align: center">
<Button type="success" size="large" @click="rechargePrice">充值</Button>
<Button size="large" type="success" @click="rechargePrice">充值</Button>
</div>
</Modal>
<!-- 提现申请 -->
@@ -46,23 +46,45 @@
<div>
<Form
ref="withdrawApplyFormData"
:label-width="120"
:model="withdrawApplyFormData"
label-position="left"
:label-width="100"
:rules="withdrawApplyFormValidate"
>
<FormItem label="提现类型" prop="type">
<Select v-model="withdrawApplyFormData.type" disabled>
<Option value="ALI">支付宝</Option>
<Option value="WECHAT">微信</Option>
</Select>
</FormItem>
<FormItem label="提现金额" prop="price">
<Input
v-model="withdrawApplyFormData.price"
size="large"
number
maxlength="9"
><span slot="append"></span></Input>
number
size="large"
><span slot="append"></span></Input>
<span style="color: red">最低提现金额 {{ withdrawApplyFormData.minPrice }}</span>
</FormItem>
<FormItem v-if="withdrawApplyFormData.type === 'ALI'" label="真实姓名" prop="realName">
<Input
v-model="withdrawApplyFormData.realName"
maxlength="9"
number
size="large"
></Input>
</FormItem>
<FormItem v-if="withdrawApplyFormData.type === 'ALI'" label="第三方登录账号" prop="connectNumber">
<Input
v-model="withdrawApplyFormData.connectNumber"
maxlength="9"
number
size="large"
></Input>
</FormItem>
</Form>
</div>
<div slot="footer" style="text-align: center">
<Button type="success" size="large" @click="withdrawal">提现</Button>
<Button size="large" type="success" @click="withdrawal">提现</Button>
</div>
</Modal>
<!-- 余额日志 -->
@@ -73,15 +95,15 @@
<div class="page-size">
<Page
:current="walletForm.pageNumber"
:total="logColumnsData.total"
:page-size="walletForm.pageSize"
:page-size-opts="[10, 20, 50]"
:total="logColumnsData.total"
show-sizer
show-total
size="small"
transfer
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-sizer
transfer
></Page>
</div>
</TabPane>
@@ -95,15 +117,15 @@
<div class="page-size">
<Page
:current="rechargeForm.pageNumber"
:total="rechargeListData.total"
:page-size="rechargeForm.pageSize"
:page-size-opts="[10, 20, 50]"
:total="rechargeListData.total"
show-sizer
show-total
size="small"
transfer
@on-change="rechargeChangePage"
@on-page-size-change="rechargeChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-sizer
transfer
></Page>
</div>
</TabPane>
@@ -117,15 +139,15 @@
<div class="page-size">
<Page
:current="withdrawApplyForm.pageNumber"
:total="withdrawApplyColumnsListData.total"
:page-size="withdrawApplyForm.pageSize"
:page-size-opts="[10, 20, 50]"
:total="withdrawApplyColumnsListData.total"
show-sizer
show-total
size="small"
transfer
@on-change="withdrawChangePage"
@on-page-size-change="withdrawChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-sizer
transfer
></Page>
</div>
</TabPane>
@@ -134,17 +156,12 @@
</template>
<script>
import {
getMembersWallet,
getDepositLog,
getRecharge,
getWithdrawApply,
recharge,
withdrawalApply
} from '@/api/member';
import {getDepositLog, getMembersWallet, getRecharge, getWithdrawApply, recharge, withdrawalApply} from '@/api/member';
import {withdrawalSettingVO} from "@/api/pay";
export default {
name: 'MoneyManagement',
data () {
data() {
return {
frozenDeposit: 0, // 冻结余额
memberDeposit: 0, // 余额
@@ -157,7 +174,11 @@ export default {
},
// 提现金额
withdrawApplyFormData: {
price: 1
price: 1,
minPrice: 1,
type: '',
realName: '',
connectNumber: '',
},
// 余额日志
walletForm: {
@@ -180,17 +201,23 @@ export default {
// 提现申请校验
withdrawApplyFormValidate: {
price: [
{ required: true, message: '请输入大于0小于9999的合法提现金额' },
{required: true, message: '请输入大于0小于9999的合法提现金额'},
{
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
message: '请输入大于0小于9999的合法提现金额',
trigger: 'change'
}
]
],
realName: [
{required: true, message: '请输入真实姓名'},
],
connectNumber: [
{required: true, message: '请输入第三方登录账号'},
],
},
formValidate: {
price: [
{ required: true, message: '请输入大于等于1小于9999的合法充值金额' },
{required: true, message: '请输入大于等于1小于9999的合法充值金额'},
{
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
message: '请输入大于等于1小于9999的合法充值金额',
@@ -362,12 +389,12 @@ export default {
withdrawApplyColumnsListData: {} // 提现记录
};
},
mounted () {
mounted() {
this.init();
},
methods: {
// 初始化数据
init () {
init() {
getMembersWallet().then((res) => {
this.frozenDeposit = res.result.memberFrozenWallet;
this.memberDeposit = res.result.memberWallet;
@@ -378,7 +405,7 @@ export default {
}
});
},
tabPaneChange (v) {
tabPaneChange(v) {
// 如果查询充值记录
if (v === 'recharge') {
this.getRechargeData();
@@ -393,7 +420,7 @@ export default {
}
},
// 充值记录
getRechargeData () {
getRechargeData() {
getRecharge(this.rechargeForm).then((res) => {
if (res.message === 'success') {
this.rechargeListData = res.result;
@@ -401,7 +428,7 @@ export default {
});
},
// 提现记录
getWithdrawApplyData () {
getWithdrawApplyData() {
getWithdrawApply(this.withdrawApplyForm).then((res) => {
if (res.message === 'success') {
this.withdrawApplyColumnsListData = res.result;
@@ -409,49 +436,49 @@ export default {
});
},
// 余额日志
changePage (v) {
changePage(v) {
this.walletForm.pageNumber = v;
this.init();
},
changePageSize (v) {
changePageSize(v) {
this.walletForm.pageNumber = 1;
this.walletForm.pageSize = v;
this.init();
},
// 充值记录
rechargeChangePage (v) {
rechargeChangePage(v) {
this.rechargeForm.pageNumber = v;
this.getRechargeData();
},
rechargeChangePageSize (v) {
rechargeChangePageSize(v) {
this.rechargeForm.pageNumber = 1;
this.rechargeForm.pageSize = v;
this.getRechargeData();
},
// 提现记录
withdrawChangePage (v) {
withdrawChangePage(v) {
this.withdrawApplyForm.pageNumber = v;
this.getWithdrawApplyData();
},
withdrawChangePageSize (v) {
withdrawChangePageSize(v) {
this.withdrawApplyForm.pageNumber = 1;
this.withdrawApplyForm.pageSize = v;
this.getWithdrawApplyData();
},
// 弹出在线充值框
recharge () {
recharge() {
this.formData.price = 1;
this.modal = true;
},
// 在线充值
rechargePrice () {
rechargePrice() {
this.$refs['formData'].validate((valid) => {
if (valid) {
recharge(this.formData).then((res) => {
if (res.message === 'success') {
this.$router.push({
path: '/payment',
query: { orderType: 'RECHARGE', sn: res.result.rechargeSn }
query: {orderType: 'RECHARGE', sn: res.result.rechargeSn}
});
}
});
@@ -459,12 +486,23 @@ export default {
});
},
// 申请提现弹出框
withdrawalApply () {
this.withdrawApplyFormData.price = 1;
withdrawalApply() {
this.withdrawApplyModal = true;
this.withdrawApplyFormData.minPrice = 1;
this.withdrawApplyFormData.price = 1;
this.withdrawApplyFormData.type = '';
this.withdrawApplyFormData.realName = '';
this.withdrawApplyFormData.connectNumber = '';
withdrawalSettingVO().then((res) => {
if (res.code === 200) {
this.withdrawApplyFormData.minPrice = res.result.minPrice;
this.withdrawApplyFormData.type = res.result.type;
this.withdrawApplyFormData.price = 1;
}
});
},
// 提现
withdrawal () {
withdrawal() {
this.$refs['withdrawApplyFormData'].validate((valid) => {
if (valid) {
withdrawalApply(this.withdrawApplyFormData).then((res) => {
@@ -482,25 +520,30 @@ export default {
};
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.box {
margin: 20px 0;
}
.page-size {
margin: 15px 0px;
display: flex;
justify-content: flex-end;
align-items: center;
}
.account-price {
font-weight: bold;
}
.subTips {
margin-left: 10px;
}
.account-btns {
margin: 10px 0;
}
.ivu-btn {
margin: 0 4px;
}

View File

@@ -22,6 +22,7 @@
<span v-if="storeDisable == 'REFUSED'">审核未通过,请修改资质信息如有疑问请联系管理员</span>
</div>
<Button v-if="currentIndex === 3" @click="$router.push('/')">返回</Button>
&nbsp;
<Button type="primary" @click='currentIndex = 0'
v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button>
</div>
@@ -162,7 +163,7 @@ export default {
padding: 10px 20px;
h1 {
margin-top: 20px;
}
}