Merge branch 'lx-test' of gitee.com:cabbage_qd/web-base-h5 into lx-online

This commit is contained in:
woody 2025-07-09 10:45:01 +08:00
commit dec948420f
6 changed files with 1402 additions and 996 deletions

View File

@ -0,0 +1,156 @@
<template>
<u-modal
:show="show"
:showConfirmButton="true"
:showCancelButton="false"
confirmText="我知道了"
@confirm="handleConfirm"
:closeOnClickOverlay="false"
width="640rpx"
:customStyle="{ 'border-radius': '16rpx' }"
>
<view class="withdrawal-guide-content">
<view class="guide-title">提现绑定操作指南</view>
<view class="guide-text">
<text>尊敬的经销商伙伴们</text>
<text
>为了让大家顺利快捷地提现符合法律法规的要求现需完成提现绑定操作步骤如下按序操作即可</text
>
</view>
<view class="guide-steps">
<view class="step-item">
<text class="step-number">1.</text>
<text class="step-text"
>微信扫码后用实际收款人本人手机号登录</text
>
</view>
<view class="step-item">
<text class="step-number">2.</text>
<text class="step-text"
>点击 "继续签约"上传本人身份证照片完成实名认证</text
>
</view>
<view class="step-item">
<text class="step-number">3.</text>
<text class="step-text"
>进入合同页面选择 "默认印章"输入收到的验证码完成签约</text
>
</view>
<view class="step-item">
<text class="step-number">4.</text>
<text class="step-text"
>返回首页点击 "提现"若显示 "开户"下拉刷新页面即可</text
>
</view>
<view class="step-item">
<text class="step-number">5.</text>
<text class="step-text"
>进入绑卡页面完成银行卡绑定后即可操作提现</text
>
</view>
</view>
<view class="guide-footer">
<text>请大家尽快办理有疑问可随时联系我们感谢配合</text>
</view>
<view class="qr-code-section">
<image
class="qr-code-image"
src="/static/images/with-drawal-mini-code.png"
mode="aspectFit"
/>
</view>
</view>
</u-modal>
</template>
<script>
export default {
name: 'WithdrawalGuide',
props: {
show: {
type: Boolean,
default: false,
},
},
methods: {
handleConfirm() {
this.$emit('confirm')
},
},
}
</script>
<style lang="scss" scoped>
.withdrawal-guide-content {
padding: 0rpx 32rpx 32rpx;
.guide-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
text-align: center;
margin-bottom: 32rpx;
}
.guide-text {
font-size: 26rpx;
color: #666666;
line-height: 40rpx;
margin-bottom: 24rpx;
text {
display: block;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.guide-steps {
margin-bottom: 24rpx;
.step-item {
display: flex;
align-items: flex-start;
margin-bottom: 16rpx;
.step-number {
color: #005bac;
font-size: 26rpx;
font-weight: bold;
width: 32rpx;
flex-shrink: 0;
}
.step-text {
font-size: 26rpx;
color: #666666;
line-height: 40rpx;
flex: 1;
}
}
}
.guide-footer {
font-size: 26rpx;
color: #666666;
line-height: 40rpx;
margin-bottom: 32rpx;
text-align: center;
}
.qr-code-section {
display: flex;
justify-content: center;
align-items: center;
.qr-code-image {
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
}
}
}
</style>

View File

@ -61,7 +61,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="isEmpty(goodsList.recommendSpecialAreaList) == false"> <!-- <view v-if="isEmpty(goodsList.recommendSpecialAreaList) == false">
<view <view
class="more" class="more"
@click="more" @click="more"
@ -88,7 +88,6 @@
<view class="padding_s goods-info"> <view class="padding_s goods-info">
<view class="goods-name">{{ item.waresName }}</view> <view class="goods-name">{{ item.waresName }}</view>
<view class="goods-sales-wrapper"> <view class="goods-sales-wrapper">
<!-- <view class="goods-sales">累计销量{{ formatSales(item.sales) }}</view> -->
<view <view
class="goods-price" class="goods-price"
v-if="item.specialArea == 31 && userInfo.isMakerSpace == 1" v-if="item.specialArea == 31 && userInfo.isMakerSpace == 1"
@ -117,7 +116,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
<cl-tabbar :current="0"></cl-tabbar> <cl-tabbar :current="0"></cl-tabbar>
<div> <div>

View File

@ -1,46 +1,116 @@
<template> <template>
<view class="content"> <view class="content">
<view class="theform"> <view class="theform">
<u--form labelPosition="left" :model="dataForm" :rules="rules" ref="uForm"> <u--form
<u-form-item label-width="200rpx" :label="'银行卡号'" prop="cardNumber" borderBottom ref="item1"> labelPosition="left"
<u--input v-if="bankData.cardNumber" v-model="bankData.cardNumber" disabled disabledColor="#F5F5F5;" :model="dataForm"
border="none"></u--input> :rules="rules"
ref="uForm"
>
<!-- <u-form-item
label-width="200rpx"
:label="'银行卡号'"
prop="cardNumber"
borderBottom
ref="item1"
>
<u--input
v-if="bankData.cardNumber"
v-model="bankData.cardNumber"
disabled
disabledColor="#F5F5F5;"
border="none"
></u--input>
<view v-else style="color: red" @click="goBindbank"> <view v-else style="color: red" @click="goBindbank">
{{ '请先绑定银行卡' }} {{ '请先绑定银行卡' }}
</view> </view>
</u-form-item> -->
<u-form-item
label-width="200rpx"
:label="`${'提现金额'}(${isLocaled()})`"
prop="cashAmount"
borderBottom
ref="item1"
>
<u--input
type="number"
v-model="dataForm.cashAmount"
:placeholder="'请输入'"
border="none"
></u--input>
</u-form-item> </u-form-item>
<u-form-item label-width="200rpx" :label="`${'提现金额'}(${isLocaled()})`" prop="cashAmount" <u-form-item
borderBottom ref="item1"> label-width="200rpx"
<u--input type='number' v-model="dataForm.cashAmount" :placeholder="'请输入'" :label="'二级密码'"
border="none"></u--input> prop="payPwd"
</u-form-item> borderBottom
<u-form-item label-width="200rpx" :label="'二级密码'" prop="payPwd" borderBottom ref="item1"> ref="item1"
>
<template v-if="!ifeye"> <template v-if="!ifeye">
<u--input type='password' v-model="dataForm.payPwd" :placeholder="'请输入'" <u--input
border="none"></u--input> type="password"
<image @click="ifeye=!ifeye" slot="right" style="width: 38rpx; v-model="dataForm.payPwd"
height: 25rpx;" src="../../../static/images/my_eye.png" mode=""></image> :placeholder="'请输入'"
border="none"
></u--input>
<image
@click="ifeye = !ifeye"
slot="right"
style="width: 38rpx; height: 25rpx"
src="../../../static/images/my_eye.png"
mode=""
></image>
</template> </template>
<template v-if="ifeye"> <template v-if="ifeye">
<u--input v-model="dataForm.payPwd" :placeholder="'请输入'" border="none"></u--input> <u--input
<image @click="ifeye=!ifeye" slot="right" style="width: 38rpx; v-model="dataForm.payPwd"
height: 30rpx;" src="../../../static/images/my_eye2.png" mode=""></image> :placeholder="'请输入'"
border="none"
></u--input>
<image
@click="ifeye = !ifeye"
slot="right"
style="width: 38rpx; height: 30rpx"
src="../../../static/images/my_eye2.png"
mode=""
></image>
</template> </template>
</u-form-item> </u-form-item>
<u-form-item label-width="200rpx" :label="'备注'" prop="remarks" borderBottom ref="item1"> <u-form-item
label-width="200rpx"
:label="'备注'"
prop="remarks"
borderBottom
ref="item1"
>
<u--input v-model="dataForm.remarks" border="none"></u--input> <u--input v-model="dataForm.remarks" border="none"></u--input>
</u-form-item> </u-form-item>
<u-form-item label-width="200rpx" :label="'提现账户'" prop="pkAccountName" <u-form-item
@click="showAmount = true; " ref="item1"> label-width="200rpx"
<u--input v-model="dataForm.pkAccountName" disabled disabledColor="#ffffff" :label="'提现账户'"
:placeholder="'请选择'" border="none"></u--input> prop="pkAccountName"
@click="showAmount = true"
ref="item1"
>
<u--input
v-model="dataForm.pkAccountName"
disabled
disabledColor="#ffffff"
:placeholder="'请选择'"
border="none"
></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<u-picker @cancel='showAmount=false' :show="showAmount" ref="uPicker" :columns="pkBdAccountList" <u-picker
@confirm="confirm" keyName='accountName'></u-picker> @cancel="showAmount = false"
:show="showAmount"
ref="uPicker"
:columns="pkBdAccountList"
@confirm="confirm"
keyName="accountName"
></u-picker>
</u--form> </u--form>
<view class="contentbox"> <view class="contentbox">
<view class="linebox"> <view class="linebox">
<view>{{ '可提现金额' }}()</view> <view>{{ '可提现金额' }}()</view>
@ -59,67 +129,80 @@
<view>{{ widthDrwaData.minAmount || '0.00' }}</view> <view>{{ widthDrwaData.minAmount || '0.00' }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="btnbox"> <view class="btnbox">
<u-button :disabled="canbind" class="subbtn" @click="submit">{{'提现'}}</u-button> <u-button class="subbtn" @click="submit">{{ '提现' }}</u-button>
</view> </view>
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>
<!-- 提现引导弹窗 -->
<WithdrawalGuide
:show="showWithdrawalGuide"
@confirm="onWithdrawalGuideConfirm"
/>
</view> </view>
</template> </template>
<script> <script>
import * as bal from "@/config/balance.js" import * as bal from '@/config/balance.js'
import { import { isLocaled } from '@/util/numberToCurrency'
isLocaled import WithdrawalGuide from '@/components/withdrawalGuide/index.vue'
} from '@/util/numberToCurrency'
export default { export default {
components: {
WithdrawalGuide,
},
data() { data() {
return { return {
showAmount: false, showAmount: false,
dataForm: { dataForm: {
cardNumber: "", cardNumber: '',
cashAmount: "", cashAmount: '',
payPwd: "", payPwd: '',
remarks: "", remarks: '',
pkAccountName: "", pkAccountName: '',
pkAccount: "", pkAccount: '',
pkBank: "" pkBank: '',
}, },
pkBdAccountList: [], pkBdAccountList: [],
rules: { rules: {
cashAmount: [{ cashAmount: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
payPwd: [{ ],
payPwd: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
pkAccountName: [{ ],
pkAccountName: [
{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: ['change'] trigger: ['change'],
}], },
],
}, },
bankData: {}, bankData: {},
widthDrwaData: {}, widthDrwaData: {},
ifeye: false, ifeye: false,
canbind:false canbind: false,
showWithdrawalGuide: false,
} }
}, },
watch: { watch: {
'dataForm.cashAmount': 'checkAccount' 'dataForm.cashAmount': 'checkAccount',
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/mine/balance/withdrawlDetail' url: '/pages/mine/balance/withdrawlDetail',
}) })
}, },
onLoad() { onLoad() {
@ -130,13 +213,15 @@
// //
goBindbank() { goBindbank() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/mine/bindBank/bindBank' url: '/pages/mine/bindBank/bindBank',
}) })
}, },
getList() { getList() {
bal.getPkBdAccountList({ bal
accountProperty: 3 .getPkBdAccountList({
}).then(res => { accountProperty: 3,
})
.then(res => {
res.data.forEach(ele => { res.data.forEach(ele => {
ele.name = ele.accountName ele.name = ele.accountName
}) })
@ -146,12 +231,11 @@
this.dataForm.pkAccountName = res.data[0].accountName this.dataForm.pkAccountName = res.data[0].accountName
this.dataForm.pkAccount = res.data[0].pkId this.dataForm.pkAccount = res.data[0].pkId
} }
}) })
bal.getDefaultBank().then((res) => { bal.getDefaultBank().then(res => {
this.bankData = res.data; this.bankData = res.data
this.dataForm.pkBank = res.data.pkId; this.dataForm.pkBank = res.data.pkId
}); })
// //
bal.checkIsbindBank().then(res => { bal.checkIsbindBank().then(res => {
if (res.flag == 'Y') { if (res.flag == 'Y') {
@ -160,34 +244,33 @@
this.canbind = true this.canbind = true
} }
}) })
}, },
submit() { submit() {
this.$refs.uForm.validate().then(res => { this.$refs.uForm
.validate()
.then(res => {
bal.addWithdraw(this.dataForm).then(res => { bal.addWithdraw(this.dataForm).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
message: res.msg, message: res.msg,
type: 'success' type: 'success',
}) })
//
setTimeout(() => { setTimeout(() => {
uni.navigateBack() this.showWithdrawalGuide = true
}, 1000); }, 300)
} }
}) })
})
.catch(errors => {
}).catch(errors => {
uni.$u.toast('校验失败') uni.$u.toast('校验失败')
}) })
}, },
confirm(e) { confirm(e) {
this.dataForm.pkAccountName = e.value[0].accountName this.dataForm.pkAccountName = e.value[0].accountName
this.dataForm.pkAccount = e.value[0].pkId this.dataForm.pkAccount = e.value[0].pkId
this.showAmount = false this.showAmount = false
this.checkAccount() this.checkAccount()
}, },
checkAccount() { checkAccount() {
if (!this.dataForm.cashAmount) { if (!this.dataForm.cashAmount) {
@ -197,24 +280,31 @@
uni.$u.toast('请先选择账户') uni.$u.toast('请先选择账户')
return return
} }
bal.getWidthdrawShow({ bal
.getWidthdrawShow({
pkAccount: this.dataForm.pkAccount, pkAccount: this.dataForm.pkAccount,
cashAmount: this.dataForm.cashAmount, cashAmount: this.dataForm.cashAmount,
}).then(res => { })
.then(res => {
this.widthDrwaData = res.data this.widthDrwaData = res.data
}) })
} },
} //
onWithdrawalGuideConfirm() {
this.showWithdrawalGuide = false
uni.navigateBack()
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
background: #F2F2F2; background: #f2f2f2;
.theform { .theform {
margin-top: 6rpx; margin-top: 6rpx;
background: #FFFFFF; background: #ffffff;
padding: 20rpx 23rpx 48rpx 23rpx; padding: 20rpx 23rpx 48rpx 23rpx;
.contentbox { .contentbox {
@ -234,7 +324,6 @@
margin-top: 8rpx; margin-top: 8rpx;
} }
} }
} }
.btnbox { .btnbox {
@ -242,15 +331,13 @@
padding: 0 20rpx; padding: 0 20rpx;
.subbtn { .subbtn {
background: #005BAC; background: #005bac;
border-radius: 46rpx; border-radius: 46rpx;
font-size: 30rpx; font-size: 30rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
} }
} }
} }
</style> </style>

View File

@ -1,25 +1,33 @@
<template> <template>
<view class="content"> <view class="content">
<view class="contentList" v-for="item,index in tableList" :key="index"> <view class="contentList" v-for="(item, index) in tableList" :key="index">
<view class="linebox"> <view class="linebox">
<view class="line_title">{{ '钱包类型' }}</view> <view class="line_title">{{ '钱包类型' }}</view>
<view class="line_content">{{ item.pkAccountVal }}</view> <view class="line_content">{{ item.pkAccountVal }}</view>
</view> </view>
<view class="linebox"> <view class="linebox">
<view class="line_title">{{ '提现金额' }}</view> <view class="line_title">{{ '提现金额' }}</view>
<view class="line_content">{{item.cashAmount| toThousandthAndKeepDecimal}}</view> <view class="line_content">{{
item.cashAmount | toThousandthAndKeepDecimal
}}</view>
</view> </view>
<view class="linebox"> <view class="linebox">
<view class="line_title">{{ '手续费' }}</view> <view class="line_title">{{ '手续费' }}</view>
<view class="line_content">{{item.serviceCharge| toThousandthAndKeepDecimal}}</view> <view class="line_content">{{
item.serviceCharge | toThousandthAndKeepDecimal
}}</view>
</view> </view>
<view class="linebox"> <view class="linebox">
<view class="line_title">{{ '个税' }}</view> <view class="line_title">{{ '个税' }}</view>
<view class="line_content">{{item.incomeTax| toThousandthAndKeepDecimal}}</view> <view class="line_content">{{
item.incomeTax | toThousandthAndKeepDecimal
}}</view>
</view> </view>
<view class="linebox"> <view class="linebox">
<view class="line_title">{{ '实发金额' }}</view> <view class="line_title">{{ '实发金额' }}</view>
<view class="line_content">{{item.issuedAmount| toThousandthAndKeepDecimal}}</view> <view class="line_content">{{
item.issuedAmount | toThousandthAndKeepDecimal
}}</view>
</view> </view>
<view class="linebox"> <view class="linebox">
<view class="line_title">{{ '银行名称' }}</view> <view class="line_title">{{ '银行名称' }}</view>
@ -49,31 +57,46 @@
<view class="line_title">{{ '状态' }}</view> <view class="line_title">{{ '状态' }}</view>
<view class="line_content">{{ item.statusVal }}</view> <view class="line_content">{{ item.statusVal }}</view>
</view> </view>
<view v-if="item.approveState == 4" class="linebox">
<view class="line_title">驳回原因</view>
<view class="line_content">{{ item.approveRemarks }}</view>
</view>
<view class="linebox" style="border-bottom: none;"> <view class="linebox" style="border-bottom: none">
<view class="line_title">{{ '操作' }}</view> <view class="line_title">{{ '操作' }}</view>
<view class="line_content thesuccess" v-if="item.status==0&&item.approveState==1" @click="revoke(item)">{{'撤销'}}</view> <view
class="line_content thesuccess"
v-if="item.status == 0 && item.approveState == 1"
@click="revoke(item)"
>{{ '撤销' }}</view
>
</view> </view>
</view> </view>
<u-modal :show="revokeShow" showCancelButton @cancel="revokeShow = false" cancelText="取消" <u-modal
confirmText="确定" @confirm='confirmRevoke' :content='content'></u-modal> :show="revokeShow"
showCancelButton
@cancel="revokeShow = false"
cancelText="取消"
confirmText="确定"
@confirm="confirmRevoke"
:content="content"
></u-modal>
</view> </view>
</template> </template>
<script> <script>
import * as bal from "@/config/balance.js" import * as bal from '@/config/balance.js'
export default { export default {
data() { data() {
return { return {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
}, },
tableList: [], tableList: [],
revokeShow: false, revokeShow: false,
content: '是否确认操作?', content: '是否确认操作?',
thepkId:"" thepkId: '',
} }
}, },
onLoad() { onLoad() {
@ -90,7 +113,7 @@
bal.cancelWithdraw({ pkId: this.thepkId }).then(res => { bal.cancelWithdraw({ pkId: this.thepkId }).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: res.msg title: res.msg,
}) })
this.revokeShow = false this.revokeShow = false
this.getSearch() this.getSearch()
@ -101,8 +124,8 @@
bal.getWithdrawList(this.queryParams).then(res => { bal.getWithdrawList(this.queryParams).then(res => {
this.tableList = res.rows this.tableList = res.rows
}) })
} },
} },
} }
</script> </script>
@ -112,7 +135,7 @@
} }
.content { .content {
background: #F2F2F2; background: #f2f2f2;
padding: 10rpx 24rpx; padding: 10rpx 24rpx;
.contentList { .contentList {
@ -140,11 +163,9 @@
} }
.thesuccess { .thesuccess {
color: #005BAC; color: #005bac;
} }
} }
} }
} }
</style> </style>

View File

@ -13,46 +13,91 @@
<view class="shareImg" v-if="specialArea == 7" @click="goShare"> <view class="shareImg" v-if="specialArea == 7" @click="goShare">
<u-icon name="share-square" size="24" color="#005BAC"> </u-icon> <u-icon name="share-square" size="24" color="#005BAC"> </u-icon>
</view> </view>
<view class="shareImg1" v-if="specialArea == 1" @tap="changeCountry">
<img :src="pkCountryImg" alt="" /> <u-scroll-list
<u-icon name="arrow-down" color="#999"></u-icon> :indicator="false"
</view> v-if="itemChildren.length > 1"
<u-scroll-list :indicator="false" v-if="itemChildren.length > 1" class="tabList_a"> class="tabList_a"
>
<view class="tab"> <view class="tab">
<view v-for="(item, index) in itemChildren" :key="index" @click="setSpecial(item)" v-show="item.isShow" <view
:class="[specialArea == item.value ? 'actTab' : 'tab_i']"> v-for="(item, index) in itemChildren"
:key="index"
@click="setSpecial(item)"
v-show="item.isShow"
:class="[specialArea == item.value ? 'actTab' : 'tab_i']"
>
<view>{{ item.label }}</view> <view>{{ item.label }}</view>
</view> </view>
</view> </view>
</u-scroll-list> </u-scroll-list>
<view class="index_btm"> <view class="index_btm">
<view class="index_l"> <view class="index_l">
<view v-for="item in oneList" :class="['classIfy', oneId == item.pkId ? 'actOne' : '']" @click=" <view
(oneId = item.pkId), v-for="item in oneList"
:class="['classIfy', oneId == item.pkId ? 'actOne' : '']"
@click="
((oneId = item.pkId),
getAllGoods(item.pkId), getAllGoods(item.pkId),
getClassIfyTwo(item.pkId) getClassIfyTwo(item.pkId))
" :key="item.pkId">{{ item.classifyName }}</view> "
:key="item.pkId"
>{{ item.classifyName }}</view
>
</view> </view>
<view class="index_r"> <view class="index_r">
<u-scroll-list :indicator="false" class="tabList"> <u-scroll-list :indicator="false" class="tabList">
<view class="tab"> <view class="tab">
<view v-for="(item, index) in twoList" :key="index" <view
@click="(twoId = item.pkId), getAllGoods1(item.pkId)" v-for="(item, index) in twoList"
:class="[twoId == item.pkId ? 'actTab' : 'tab_i']"> :key="index"
@click="((twoId = item.pkId), getAllGoods1(item.pkId))"
:class="[twoId == item.pkId ? 'actTab' : 'tab_i']"
>
<view>{{ item.classifyName }}</view> <view>{{ item.classifyName }}</view>
<!-- <view :class="[twoId == item.pkId ? 'heng' : 'heng1']"></view> --> <!-- <view :class="[twoId == item.pkId ? 'heng' : 'heng1']"></view> -->
</view> </view>
</view> </view>
</u-scroll-list> </u-scroll-list>
<view class="search"> <view class="search">
<u--input placeholder="请输入商品名称" placeholderStyle="font-size:14px;" prefixIcon="search" <u--input
shape="circle" v-model="waresName" border="none" @confirm="getAllGoods1()" placeholder="请输入商品名称"
prefixIconStyle="font-size: 22px;color: #909399"></u--input> placeholderStyle="font-size:14px;"
prefixIcon="search"
shape="circle"
v-model="waresName"
border="none"
@confirm="getAllGoods1()"
prefixIconStyle="font-size: 22px;color: #909399"
></u--input>
</view> </view>
<view class="goodList"> <view class="goodList">
<view v-for="item in goodList" :key="item.waresCode" class="goodList_i" @tap="goDetails(item)"> <view
<view class="fly" v-show="item.preSaleStatus == 3 || item.isSale == 1"></view> v-for="item in goodList"
<img :src="item.cover1" class="cover" alt="" /> :key="item.waresCode"
class="goodList_i"
@tap="goDetails(item)"
>
<view
class="fly"
v-show="item.preSaleStatus == 3 || item.isSale == 1"
></view>
<view class="image-container">
<img :src="item.cover || item.cover1" class="cover" alt="" />
<!-- 三角形角标 -->
<view class="triangle-badge" v-if="item.warnMessage">
<view
class="triangle-badge-text"
:class="{
'text-2': item.warnMessage.length === 2,
'text-3': item.warnMessage.length === 3,
'text-4': item.warnMessage.length === 4,
}"
>
{{ item.warnMessage }}
</view>
</view>
</view>
<view class="goodList_ir"> <view class="goodList_ir">
<view> <view>
<span class="qzbq" v-if="item.prefixLabelTarget != undefined">{{ <span class="qzbq" v-if="item.prefixLabelTarget != undefined">{{
@ -60,14 +105,24 @@
}}</span> }}</span>
{{ item.waresName }} {{ item.waresName }}
</view> </view>
<view class="pv" <view
v-if="specialArea != 18 && specialArea != 13&& specialArea != 31&& specialArea != 10"> class="pv"
v-if="
specialArea != 18 &&
specialArea != 13 &&
specialArea != 31 &&
specialArea != 10
"
>
业绩:{{ item.waresAchieve | numberToCurrency }} 业绩:{{ item.waresAchieve | numberToCurrency }}
</view> </view>
<view class="pv" v-if="specialArea == 10"> <view class="pv" v-if="specialArea == 10">
积分可抵扣:{{ item.deductMoney | numberToCurrency }} 积分可抵扣:{{ item.deductMoney | numberToCurrency }}
</view> </view>
<view class="pv" v-if="specialArea == 31&&userInfo.isMakerSpace == 0"> <view
class="pv"
v-if="specialArea == 31 && userInfo.isMakerSpace == 0"
>
业绩:{{ item.waresAchieve | numberToCurrency }} 业绩:{{ item.waresAchieve | numberToCurrency }}
</view> </view>
<view class="pv" v-if="specialArea == 13"> <view class="pv" v-if="specialArea == 13">
@ -78,15 +133,35 @@
<view v-if="specialArea == 31 && userInfo.isMakerSpace == 1"> <view v-if="specialArea == 31 && userInfo.isMakerSpace == 1">
{{ item.vipPrice | numberToCurrency }} {{ item.vipPrice | numberToCurrency }}
</view> </view>
<view v-if="(specialArea == 31&&userInfo.isMakerSpace == 0)||specialArea !=31"> <view
v-if="
(specialArea == 31 && userInfo.isMakerSpace == 0) ||
specialArea != 31
"
>
{{ item.waresPrice | numberToCurrency }} {{ item.waresPrice | numberToCurrency }}
</view> </view>
<img @click.stop="addCar(item)" <img
v-show="item.preSaleStatus != 3 && item.isSale != 1&&specialArea != 31" @click.stop="addCar(item)"
src="@/static/images/cart.png" alt="" /> v-show="
<img @click.stop="addCar(item)" item.preSaleStatus != 3 &&
v-show="item.preSaleStatus != 3 && item.isSale != 1&&specialArea == 31&&userInfo.isMakerSpace == 0" item.isSale != 1 &&
src="@/static/images/cart.png" alt="" /> specialArea != 31
"
src="@/static/images/cart.png"
alt=""
/>
<img
@click.stop="addCar(item)"
v-show="
item.preSaleStatus != 3 &&
item.isSale != 1 &&
specialArea == 31 &&
userInfo.isMakerSpace == 0
"
src="@/static/images/cart.png"
alt=""
/>
</view> </view>
<!-- <view class="pv" v-show="specialArea == 31"> 统一零售价:{{ item.retailPrice| numberToCurrency | isLocal}} </view> --> <!-- <view class="pv" v-show="specialArea == 31"> 统一零售价:{{ item.retailPrice| numberToCurrency | isLocal}} </view> -->
</view> </view>
@ -95,27 +170,33 @@
</view> </view>
</view> </view>
</view> </view>
<u-picker :show="isCountry" @cancel="isCountry = false" @confirm="sureCountry" :columns="countryList" <u-picker
keyName="label"></u-picker> :show="isCountry"
@cancel="isCountry = false"
@confirm="sureCountry"
:columns="countryList"
keyName="label"
></u-picker>
<selSpaceGoods ref="selSpaceGoods" @getCar="getCatLength"></selSpaceGoods> <selSpaceGoods ref="selSpaceGoods" @getCar="getCatLength"></selSpaceGoods>
<cartBall ref="cart" :carLength="shopCarLength" :specialArea="specialArea"></cartBall> <cartBall
ref="cart"
:carLength="shopCarLength"
:specialArea="specialArea"
></cartBall>
</view> </view>
</template> </template>
<script> <script>
import backIcon from "@/components/backIcon.vue"; import backIcon from '@/components/backIcon.vue'
import cartBall from "@/components/cartBall.vue"; import cartBall from '@/components/cartBall.vue'
import { import { mapGetters, mapActions } from 'vuex'
mapGetters, import * as api from '@/config/goods'
mapActions import clTabbar from '@/components/cl-tabbar.vue'
} from "vuex"; import selSpaceGoods from '@/components/selSpaceGoods.vue'
import * as api from "@/config/goods";
import clTabbar from "@/components/cl-tabbar.vue";
import selSpaceGoods from "@/components/selSpaceGoods.vue";
export default { export default {
components: { components: {
"cl-tabbar": clTabbar, 'cl-tabbar': clTabbar,
backIcon, backIcon,
cartBall, cartBall,
selSpaceGoods, selSpaceGoods,
@ -124,9 +205,9 @@
filters: { filters: {
seles(value) { seles(value) {
if (value > 999) { if (value > 999) {
return 999 + "+"; return 999 + '+'
} else { } else {
return value; return value
} }
}, },
}, },
@ -134,88 +215,98 @@
return { return {
specialArea: 1, specialArea: 1,
oneList: [], oneList: [],
oneId: "", oneId: '',
twoList: [], twoList: [],
twoId: "", twoId: '',
goodList: [], goodList: [],
titLabel: "", titLabel: '',
itemChildren: [], itemChildren: [],
diff: 0, diff: 0,
shopCarLength: false, shopCarLength: false,
userInfo: {}, userInfo: {},
pkCountry: 1, pkCountry: 1,
pkCountryLabel: "", pkCountryLabel: '',
pkCountryImg: "", pkCountryImg: '',
countryList: [], countryList: [],
isCountry: false, isCountry: false,
waresName: "", waresName: '',
}; }
}, },
onLoad(options) { onLoad(options) {
console.log('%c [ options ]-25', 'font-size:13px; background:#cb38d2; color:#ff7cff;', options) console.log(
'%c [ options ]-25',
'font-size:13px; background:#cb38d2; color:#ff7cff;',
options
)
if (JSON.parse(options.children).length > 0) { if (JSON.parse(options.children).length > 0) {
let arr = []; let arr = []
if (options.childArea) { if (options.childArea) {
this.specialArea = options.childArea; this.specialArea = options.childArea
// this.diff = 1 // this.diff = 1
} else { } else {
JSON.parse(options.children).forEach((item) => { JSON.parse(options.children).forEach(item => {
if (item.isShow) { if (item.isShow) {
arr.push(item.value); arr.push(item.value)
} }
}); })
this.specialArea = arr[0]; this.specialArea = arr[0]
// this.diff = 0 // this.diff = 0
} }
if (options.diff) { if (options.diff) {
this.diff = options.diff; this.diff = options.diff
} }
} else { } else {
this.specialArea = options.specialArea; this.specialArea = options.specialArea
} }
this.titLabel = options.label; this.titLabel = options.label
let tempArr = JSON.parse(options.children); let tempArr = JSON.parse(options.children)
if (this.specialArea != 18) { if (this.specialArea != 18) {
api.menuList().then((res) => { api.menuList().then(res => {
tempArr = tempArr.filter(item => res.data.find(ctem => ctem.menuKey == item.name)); tempArr = tempArr.filter(item =>
this.itemChildren = tempArr; res.data.find(ctem => ctem.menuKey == item.name)
}); )
this.itemChildren = tempArr
})
} }
// //
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.titLabel, title: this.titLabel,
success: () => {}, success: () => {},
}); })
// //
// this.getClassIfy() // this.getClassIfy()
this.userInfo = uni.getStorageSync("User"); this.userInfo = uni.getStorageSync('User')
console.log('%c [ this.userInfo ]-242', 'font-size:13px; background:#cb38d2; color:#ff7cff;', this.userInfo) console.log(
'%c [ this.userInfo ]-242',
'font-size:13px; background:#cb38d2; color:#ff7cff;',
this.userInfo
)
if (this.specialArea == 1) { if (this.specialArea == 1) {
if (uni.getStorageSync("pkCountry")) { if (uni.getStorageSync('pkCountry')) {
this.pkCountry = uni.getStorageSync("pkCountry"); this.pkCountry = uni.getStorageSync('pkCountry')
} else { } else {
this.pkCountry = this.userInfo.pkSettleCountry; this.pkCountry = this.userInfo.pkSettleCountry
uni.setStorageSync("pkCountry", this.pkCountry + ""); uni.setStorageSync('pkCountry', this.pkCountry + '')
} }
} else { } else {
this.pkCountry = this.userInfo.pkSettleCountry; this.pkCountry = this.userInfo.pkSettleCountry
} }
this.setSpecial({ this.setSpecial({
value: this.specialArea value: this.specialArea,
}); })
}, },
onShow() { onShow() {
let that = this; let that = this
uni.$on("returnData", function(data) { uni.$on('returnData', function (data) {
that.specialArea = data.value; that.specialArea = data.value
that.setSpecial({ that.setSpecial({
value: data.value value: data.value,
}); })
}); })
// //
this.getJScountry(); this.getJScountry()
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.cart.getCar() this.$refs.cart.getCar()
}) })
@ -231,43 +322,41 @@
methods: { methods: {
...mapActions(['setSmallCarLength', 'setShopCarLength']), ...mapActions(['setSmallCarLength', 'setShopCarLength']),
changeCountry() { changeCountry() {
this.isCountry = true; this.isCountry = true
}, },
sureCountry(e) { sureCountry(e) {
const { const { value } = e
value this.pkCountry = value[0].id
} = e; this.pkCountryLabel = value[0].label
this.pkCountry = value[0].id; this.pkCountryImg = value[0].img
this.pkCountryLabel = value[0].label; this.isCountry = false
this.pkCountryImg = value[0].img; uni.setStorageSync('pkCountry', this.pkCountry + '')
this.isCountry = false;
uni.setStorageSync("pkCountry", this.pkCountry + "");
// //
this.getClassIfy(); this.getClassIfy()
this.$refs.cart.getCar(); this.$refs.cart.getCar()
}, },
getJScountry() { getJScountry() {
api.currencyList().then((res) => { api.currencyList().then(res => {
let data = res.data.map((item) => { let data = res.data.map(item => {
return { return {
img: item.nationalFlag2, img: item.nationalFlag2,
id: item.pkId, id: item.pkId,
label: item.shortName, label: item.shortName,
};
});
this.countryList = [data];
this.countryList[0].forEach((item) => {
if (item.id == this.pkCountry) {
this.pkCountryLabel = item.label;
this.pkCountryImg = item.img;
} }
}); })
}); this.countryList = [data]
this.countryList[0].forEach(item => {
if (item.id == this.pkCountry) {
this.pkCountryLabel = item.label
this.pkCountryImg = item.img
}
})
})
}, },
goShare() { goShare() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/specialArea/share?specialArea=7", url: '/pages/specialArea/share?specialArea=7',
}); })
}, },
setSpecial(item) { setSpecial(item) {
if (item.value == 21) { if (item.value == 21) {
@ -279,8 +368,8 @@
// JSON.stringify(this.itemChildren), // JSON.stringify(this.itemChildren),
// }) // })
} else { } else {
this.specialArea = item.value; this.specialArea = item.value
this.getClassIfy(); this.getClassIfy()
} }
}, },
addCar(item) { addCar(item) {
@ -290,35 +379,36 @@
number: 1, number: 1,
waresCode: item.waresCode, waresCode: item.waresCode,
productGroup: item.productGroup, productGroup: item.productGroup,
}; }
if ( if (
item.isMakerGift == 2 && item.isMakerGift == 2 &&
(item.specialArea == 1 || item.specialArea == 3) (item.specialArea == 1 || item.specialArea == 3)
) { ) {
this.$refs.selSpaceGoods.getData(carList); this.$refs.selSpaceGoods.getData(carList)
} else { } else {
api.addShopping(carList).then((res) => { api.addShopping(carList).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '购物车添加成功', title: '购物车添加成功',
icon: "success", icon: 'success',
mask: true, mask: true,
}); duration: 500,
})
setTimeout(() => { setTimeout(() => {
this.$store this.$store
.dispatch("getCarLength", this.specialArea) .dispatch('getCarLength', this.specialArea)
.then((res) => { .then(res => {
this.shopCarLength = res.data.smallCount; this.shopCarLength = res.data.smallCount
}); })
}, 200); }, 200)
} }
}); })
} }
}, },
getCatLength() { getCatLength() {
this.$store.dispatch("getCarLength", this.specialArea).then((res) => { this.$store.dispatch('getCarLength', this.specialArea).then(res => {
this.shopCarLength = res.data.smallCount; this.shopCarLength = res.data.smallCount
}); })
}, },
getClassIfy() { getClassIfy() {
api api
@ -327,16 +417,16 @@
specialArea: this.specialArea, specialArea: this.specialArea,
hierarchy: 0, hierarchy: 0,
}) })
.then((res) => { .then(res => {
res.data.unshift({ res.data.unshift({
classifyName: '全部', classifyName: '全部',
pkId: "", pkId: '',
}); })
this.oneList = res.data; this.oneList = res.data
this.oneId = this.oneList[0]?this.oneList[0].pkId : ''; this.oneId = this.oneList[0] ? this.oneList[0].pkId : ''
this.getClassIfyTwo(this.oneList[0].pkId); this.getClassIfyTwo(this.oneList[0].pkId)
this.getAllGoods(this.oneList[0].pkId); this.getAllGoods(this.oneList[0].pkId)
}); })
}, },
// //
getClassIfyTwo(pkId) { getClassIfyTwo(pkId) {
@ -347,30 +437,30 @@
hierarchy: 1, hierarchy: 1,
pkCountry: this.pkCountry, pkCountry: this.pkCountry,
}) })
.then((res) => { .then(res => {
res.data.unshift({ res.data.unshift({
classifyName: '全部', classifyName: '全部',
pkId: pkId, pkId: pkId,
}); })
this.twoList = res.data; this.twoList = res.data
this.twoId = pkId; this.twoId = pkId
}); })
}, },
getAllGoods(id) { getAllGoods(id) {
api api
.getAllGoods({ .getAllGoods({
pkCountry: this.pkCountry, pkCountry: this.pkCountry,
specialArea: Number(this.specialArea), specialArea: Number(this.specialArea),
pkAreaClassify: id ? id : "", pkAreaClassify: id ? id : '',
}) })
.then((res) => { .then(res => {
this.goodList = res.data; this.goodList = res.data
this.goodList.forEach((item) => { this.goodList.forEach(item => {
if (item.waresName.length > 11) { if (item.waresName.length > 11) {
item.waresName = item.waresName.substring(0, 11) + "..."; item.waresName = item.waresName.substring(0, 11) + '...'
} }
}); })
}); })
}, },
getAllGoods1(id) { getAllGoods1(id) {
api api
@ -380,34 +470,37 @@
waresName: this.waresName, waresName: this.waresName,
pkAreaClassify: id ? id : this.oneId, pkAreaClassify: id ? id : this.oneId,
}) })
.then((res) => { .then(res => {
this.goodList = res.data; this.goodList = res.data
this.goodList.forEach((item) => { this.goodList.forEach(item => {
if (item.waresName.length > 11) { if (item.waresName.length > 11) {
item.waresName = item.waresName.substring(0, 11) + "..."; item.waresName = item.waresName.substring(0, 11) + '...'
} }
}); })
}); })
}, },
goDetails(item) { goDetails(item) {
if (item.preSaleStatus != 3 && item.isSale != 1) { if (item.preSaleStatus != 3 && item.isSale != 1) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/specialArea/details?waresCode=" + url:
'/pages/specialArea/details?waresCode=' +
item.waresCode + item.waresCode +
"&specialArea=" + '&specialArea=' +
item.specialArea, item.specialArea,
}); })
} }
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.index_header { .index_header {
background: #fff; background: #fff;
font-size: 18px; font-size: 18px;
font-family: PingFang SC-Semibold, PingFang SC; font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
text-align: center; text-align: center;
@ -422,7 +515,8 @@
overflow: hidden; overflow: hidden;
} }
.tabList_a {} .tabList_a {
}
.index_btm { .index_btm {
flex: 1; // display: flex; flex: 1; // display: flex;
@ -431,7 +525,9 @@
width: 198rpx; width: 198rpx;
padding: 10rpx 0; padding: 10rpx 0;
font-size: 11px; font-size: 11px;
font-family: PingFang SC-Regular, PingFang SC; font-family:
PingFang SC-Regular,
PingFang SC;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
overflow-y: auto; overflow-y: auto;
@ -457,13 +553,12 @@
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
} }
.actOne { .actOne {
// border-left: 6rpx solid #005BAC; // border-left: 6rpx solid #005BAC;
color: #fff; color: #fff;
background: #005BAC; background: #005bac;
} }
.tab { .tab {
@ -471,7 +566,6 @@
align-items: center; align-items: center;
padding: 0 24rpx; padding: 0 24rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.tab_i { .tab_i {
@ -501,10 +595,12 @@
// width: 120rpx; // width: 120rpx;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
font-family: PingFang SC-Semibold, PingFang SC; font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600; font-weight: 600;
// color: #005BAC; // color: #005BAC;
background-color: #005BAC; background-color: #005bac;
color: #fff; color: #fff;
margin-right: 28rpx; margin-right: 28rpx;
white-space: nowrap; white-space: nowrap;
@ -524,7 +620,7 @@
.heng { .heng {
width: 24px; width: 24px;
height: 2px; height: 2px;
background: #005BAC; background: #005bac;
border-radius: 1px 1px 1px 1px; border-radius: 1px 1px 1px 1px;
margin-top: 4rpx; margin-top: 4rpx;
} }
@ -659,4 +755,51 @@
border-radius: 20px; border-radius: 20px;
font-size: 14px; font-size: 14px;
} }
.image-container {
position: relative;
}
.triangle-badge {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
border-top: 90rpx solid #005bac;
border-right: 90rpx solid transparent;
border-radius: 10rpx 0 0 0;
z-index: 10;
}
.triangle-badge-text {
position: absolute;
color: #ffffff;
font-weight: 600;
line-height: 1;
transform: rotate(-45deg);
transform-origin: center;
white-space: nowrap;
text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
}
/* 2个字样式 */
.triangle-badge-text.text-2 {
top: -68rpx;
left: 10rpx;
font-size: 22rpx;
}
/* 3个字样式 */
.triangle-badge-text.text-3 {
top: -68rpx;
left: 4rpx;
font-size: 20rpx;
}
/* 4个字样式 */
.triangle-badge-text.text-4 {
top: -64rpx;
left: 0rpx;
font-size: 18rpx;
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB