feat(order): 注册专区功能实现

This commit is contained in:
woody 2025-06-09 19:50:44 +08:00
parent 42584d727a
commit 9a46dfe0ef
8 changed files with 1191 additions and 1238 deletions

View File

@ -4,7 +4,7 @@ const http = uni.$u.http
export const payConfig = params => http.get('/pay/config', { params })
//查询订单明细
export const orderInfo = params =>
http.post('/sale/api/order/query-order', params)
http.post('/sale/api/retail-order/query-order', params)
//订单状态
export const orderStatus = params =>
http.get('/system/pub/enums/order-status-api', { params })
@ -45,3 +45,7 @@ export const selfRevokeOrder = params =>
// 获取可升级级别
export const getUpgradeLevel = params =>
http.post('/sale/api/retail-order/valid-mem-level', { params })
// 下单前校验
export const validRelation = params =>
http.post('sale/api/retail-order/valid-relation', { params })

View File

@ -1,64 +1,83 @@
const http = uni.$u.http
//支付配置
export const payConfig = (params) => http.get('/pay/config', { params })
export const payConfig = params => http.get('/pay/config', { params })
//京东银行列表
export const jdBankList = (params) => http.get('/pay/jd-fast/list', { params })
export const jdBankList = params => http.get('/pay/jd-fast/list', { params })
//汇付银行列表
export const hfBankList = (params) => http.get('/pay/ada-fast/list', { params })
export const hfBankList = params => http.get('/pay/ada-fast/list', { params })
//通联银行列表
export const tlBankList = (params) => http.get('/pay/all-in-fast/list', { params })
export const tlBankList = params =>
http.get('/pay/all-in-fast/list', { params })
//查询订单明细
export const orderInfo = (params) => http.post('/sale/api/order/query-order', params)
export const orderInfo = params =>
http.post('/sale/api/retail-order/query-order', params)
//查询订单消费明细
export const spendDetails = (params) => http.post('/sale/api/order/query-spend-details', params)
export const spendDetails = params =>
http.post('/sale/api/retail-order/query-spend-details', params)
//京东绑卡短信
export const bindJd = (params) => http.post('/pay/jd-fast/bind', params)
export const bindJd = params => http.post('/pay/jd-fast/bind', params)
//通联绑卡短信
export const bindTl = (params) => http.post('/pay/all-in-fast/bind', params)
export const bindTl = params => http.post('/pay/all-in-fast/bind', params)
//汇付绑卡短信
export const bindHf = (params) => http.post('/pay/ada-fast/bind', params)
export const bindHf = params => http.post('/pay/ada-fast/bind', params)
//京东绑卡
export const bindJdConfirm = (params) => http.post('/pay/jd-fast/bind-confirm', params)
export const bindJdConfirm = params =>
http.post('/pay/jd-fast/bind-confirm', params)
//通联绑卡
export const bindTlConfirm = (params) => http.post('/pay/all-in-fast/bind-confirm', params)
export const bindTlConfirm = params =>
http.post('/pay/all-in-fast/bind-confirm', params)
//汇付绑卡
export const bindHfConfirm = (params) => http.post('/pay/ada-fast/bind-confirm', params)
export const bindHfConfirm = params =>
http.post('/pay/ada-fast/bind-confirm', params)
//银行卡支付获取验证码
export const unifiedorder = (params) => http.post('/pay/unifiedorder', params)
export const unifiedorder = params => http.post('/pay/unifiedorder', params)
//汇付银行卡确认
export const payConfirmHf = (params) => http.post('/pay/ada-fast/pay-confirm', params)
export const payConfirmHf = params =>
http.post('/pay/ada-fast/pay-confirm', params)
//京东银行卡确认
export const payConfirmJd = (params) => http.post('/pay/jd-fast/pay-confirm', params)
export const payConfirmJd = params =>
http.post('/pay/jd-fast/pay-confirm', params)
//通联银行卡确认
export const payConfirmTl = (params) => http.post('/pay/all-in-fast/pay-confirm', params)
export const payConfirmTl = params =>
http.post('/pay/all-in-fast/pay-confirm', params)
//支付状态
export const payStatus = (params) => http.get('/pay/status', { params })
export const payStatus = params => http.get('/pay/status', { params })
//幂等性
export const generate = (params) => http.get('/system/api/idempotent/generate', { params })
export const generate = params =>
http.get('/system/api/idempotent/generate', { params })
//支付注册订单
export const payRegOrder = (params) => http.post('/sale/api/order/pay-reg-order', params)
export const payRegOrder = params =>
http.post('/sale/api/retail-order/pay-reg-order', params)
//支付其他订单
export const payOthOrder = (params) => http.post('/sale/api/order/pay-oth-order', params)
export const payOthOrder = params =>
http.post('/sale/api/retail-order/pay-oth-order', params)
//宝付确认支付h5
export const baoFuPay = (params) => http.post('/pay/baofu-code/order', params)
export const baoFuPay = params => http.post('/pay/baofu-code/order', params)
//汇付确认支付h5
export const huiFuPay = (params) => http.post('/pay/ada-code/order', params)
export const huiFuPay = params => http.post('/pay/ada-code/order', params)
//在线预充值
export const preCharge = (params) => http.get('/member/api/recharge/preCharge', { params })
export const preCharge = params =>
http.get('/member/api/recharge/preCharge', { params })
//海粉注册信息
export const fansOrder = (params) => http.get('/member/api/member/fans-order/'+params)
export const fansOrder = params =>
http.get('/member/api/member/fans-order/' + params)
//抽奖下单
export const payDrawGift = (params) => http.post('/activity/api/draw/pay-draw-num', params)
export const payDrawGift = params =>
http.post('/activity/api/draw/pay-draw-num', params)
//提货下单
export const payPickOrder = (params) => http.post('/activity/api/pick/order', params)
export const payPickOrder = params =>
http.post('/activity/api/pick/order', params)
//植树查看账户
export const deductionAccount = (params) => http.post('activity/api/sa-tree-order/deductionAccount', params)
export const deductionAccount = params =>
http.post('activity/api/sa-tree-order/deductionAccount', params)
//植树活动
export const shoppingTree = (params) => http.post('activity/api/sa-tree-order/shoppingTree', params)
export const shoppingTree = params =>
http.post('activity/api/sa-tree-order/shoppingTree', params)
//解绑银行卡
export const unBind = (params) => http.post('/pay/ada-fast/un-bind', params)
export const unBind = params => http.post('/pay/ada-fast/un-bind', params)
//查询注册信息
export const registerInfo = (params) => http.get('/member/api/member/register-order/' + params,)
export const registerInfo = params =>
http.get('/member/api/member/register-order/' + params)

View File

@ -1,71 +1,109 @@
const http = uni.$u.http
//幂等性
export const generate = (params) => http.get('/system/api/idempotent/generate', { params })
export const generate = params =>
http.get('/system/api/idempotent/generate', { params })
//商品列表
export const getAllGoods = (params) => http.post('/sale/api/wares/query-spe-wares', params)
export const getAllGoods = params =>
http.post('/sale/api/wares/query-spe-wares', params)
//商品详情
export const waresDetail = (params) => http.post('/sale/api/wares/query-spe-wares-detail', params)
export const waresDetail = params =>
http.post('/sale/api/wares/query-spe-wares-detail', params)
//获取国家
export const countryList = (params) => http.get('/system/api/country/list', { params })
export const countryList = params =>
http.get('/system/api/country/list', { params })
//发货
export const deliveryList = (params) => http.get('/system/pub/enums/delivery-list', { params })
export const deliveryList = params =>
http.get('/system/pub/enums/delivery-list', { params })
//运输
export const transportList = (params) => http.get('/system/pub/enums/transport-type', { params })
export const transportList = params =>
http.get('/system/pub/enums/transport-type', { params })
//行列表输
export const bankList = (params) => http.get('/system/api/bank/list', { params })
export const bankList = params => http.get('/system/api/bank/list', { params })
//购物车商品详情
export const shoppingWaresDetail = (params) => http.post('/sale/api/shopping/get-shopping-wares-detail', params)
export const shoppingWaresDetail = params =>
http.post('/sale/api/shopping/get-shopping-wares-detail', params)
//一键注册
export const quickReg = (params) => http.post('/sale/api/order/quick-reg', params)
export const quickReg = params =>
http.post('/sale/api/retail-order/quick-reg', params)
//获取会员等级
export const memLevel = (params) => http.post('/sale/api/order/valid-mem-level', params)
export const memLevel = params =>
http.post('/sale/api/retail-order/valid-mem-level', params)
//注册页面显示权限
export const registerList = (params) => http.get('/system/api/register-page/list', { params })
export const registerList = params =>
http.get('/system/api/register-page/list', { params })
//获取地址列表
export const addressList = (params) => http.get('/member/api/member-address/list', { params })
export const addressList = params =>
http.get('/member/api/member-address/list', { params })
//查询邮费
export const queryPostage = (params) => http.post('/sale/api/order/query-order-postage', params)
export const queryPostage = params =>
http.post('/sale/api/retail-order/query-order-postage', params)
//确认注册订单-生成待支付订单
export const confirmRegOrder = (params) => http.post('/sale/api/order/confirm-reg-order', params)
export const confirmRegOrder = params =>
http.post('/sale/api/retail-order/confirm-reg-order', params)
//根据推荐人编号获取安置信息
export const validPcode = (params) => http.post('/sale/api/order/valid-p-code', params)
export const validPcode = params =>
http.post('/sale/api/retail-order/valid-p-code', params)
//注册订单验证安置人编号
export const validPPcode = (params) => http.post('/sale/api/order/valid-p-p-code', params)
export const validPPcode = params =>
http.post('/sale/api/retail-order/valid-p-p-code', params)
//注册订单验证手机号
export const validPhone = (params) => http.post('/sale/api/order/valid-phone', params)
export const validPhone = params =>
http.post('/sale/api/retail-order/valid-phone', params)
//获取name
export const upgRel = (params) => http.post('/sale/api/order/validate-upg-rel', params)
export const upgRel = params =>
http.post('/sale/api/retail-order/validate-upg-rel', params)
//升级复购单确认
export const confirmOthOrder = (params) => http.post('/sale/api/order/confirm-oth-order', params)
export const confirmOthOrder = params =>
http.post('/sale/api/retail-order/confirm-oth-order', params)
//嗨粉确认订单
export const confirmFunOrder = (params) => http.post('/sale/api/order/confirm-fun-order', params)
export const confirmFunOrder = params =>
http.post('/sale/api/retail-order/confirm-fun-order', params)
//协议
export const waresAgreement = (params) => http.post('/sale/api/wares/get-wares-agreement', params)
export const waresAgreement = params =>
http.post('/sale/api/wares/get-wares-agreement', params)
//海粉订单详情
export const waresinfo = (params) => http.post('/sale/api/wares/query-confirm-waresinfo', params)
export const waresinfo = params =>
http.post('/sale/api/wares/query-confirm-waresinfo', params)
//海粉订单确认
export const confirmShareOrder = (params) => http.post('/sale/api/order/confirm-share-order', params)
export const confirmShareOrder = params =>
http.post('/sale/api/retail-order/confirm-share-order', params)
//删除地址
export const delAddress = (data) => http.delete('/member/api/member-address/' + data)
export const delAddress = data =>
http.delete('/member/api/member-address/' + data)
//省市区
export const areaList = (params) => http.get('system/api/area/get-level-list', { params })
export const areaList = params =>
http.get('system/api/area/get-level-list', { params })
//创客空间选择
export const list_maker = (data) => http.post('/member/api/maker-space/list-maker?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize, data )
export const list_maker = data =>
http.post(
'/member/api/maker-space/list-maker?pageNum=' +
data.pageNum +
'&pageSize=' +
data.pageSize,
data
)
// 礼包获取邮费
export const queryAdressPostage = (params) => http.post('/sale/api/order/self-order-postage', params)
export const queryAdressPostage = params =>
http.post('/sale/api/retail-order/self-order-postage', params)
// 特殊会员完善信息
export const saveSpecial = (params) => http.post('/member/api/member-special/save-special', params)
export const saveSpecial = params =>
http.post('/member/api/member-special/save-special', params)
// 下载
export const specialExport = (params) => http.post('/member/api/member-special/special-export', params,{header: { 'Content-Type': 'application/x-www-form-urlencoded' },
responseType: 'blob',})
export const specialExport = params =>
http.post('/member/api/member-special/special-export', params, {
header: { 'Content-Type': 'application/x-www-form-urlencoded' },
responseType: 'blob',
})
//特殊信息列表
export const specialList = (params) => http.get('/member/api/member-special/special-list', { params })
export const specialList = params =>
http.get('/member/api/member-special/special-list', { params })
// 创客空间接口
export const queryCard = (params) => http.post('/sale/api/wares/query-cabin-card', params)
export const queryCard = params =>
http.post('/sale/api/wares/query-cabin-card', params)
//复购特殊商品列表
export const makerList = (params) => http.get('/sale/api/order/list-maker-ware', { params })
export const makerList = params =>
http.get('/sale/api/retail-order/list-maker-ware', { params })

View File

@ -20,7 +20,7 @@ module.exports = vm => {
//#ifdef DEV_SERVER
console.log('DEV_SERVER')
config.baseURL = 'http://localhost:8080'
config.baseURL = 'http://192.168.0.100:8080'
//#endif
//#ifdef QA_SERVER

View File

@ -656,6 +656,7 @@ export default {
this.agreementShow = [1]
this.$forceUpdate()
}
this.setPageTitle(this.specialArea)
},
onShow() {
//

View File

@ -1,41 +1,41 @@
<template>
<view class="content">
<view class="index_header">
</view>
<view class="index_header"> </view>
<view class="contxt">
<!-- 充值 -->
<template v-if="ifcz">
<div class="tit4">{{ '充值金额' }}</div>
<u-input class="czinputbox"
v-model="czJe"></u-input>
<u-input class="czinputbox" v-model="czJe"></u-input>
</template>
<template v-else>
<view class="tit">{{ '待支付金额' }}</view>
<view class="tit1">
{{ userInfo.currencyIcon }}{{ orderData.orderAmount | numberToCurrency }}
{{ userInfo.currencyIcon
}}{{ orderData.orderAmount | numberToCurrency }}
</view>
<view class="tit2">{{'请在'}}
<view class="tit3">{{ countDown }}</view>{{'内完成支付,否则订单将会被自动取消'}}
<view class="tit2"
>{{ '请在' }} <view class="tit3">{{ countDown }}</view
>{{ '内完成支付,否则订单将会被自动取消' }}
</view>
</template>
<view class="kuang">
<u-collapse :value="activeNames"
<u-collapse
:value="activeNames"
ref="collapse"
@open="change"
@close="close"
accordion
:border="false">
<u-collapse-item name="1"
v-if="!ifcz&&!isShare&userInfo.memberCode!='CN68880628'">
<view slot="title"
class="pf"> <img src="@/static/images/yhkzf.jpg"
alt="" />
:border="false"
>
<u-collapse-item
name="1"
v-if="!ifcz && !isShare & (userInfo.memberCode != 'CN68880628')"
>
<view slot="title" class="pf">
<img src="@/static/images/yhkzf.jpg" alt="" />
<view>{{ '钱包支付' }}</view>
</view>
<view class="quan_i"
v-if="payDetail.payAccount1 > 0">
<view class="quan_i" v-if="payDetail.payAccount1 > 0">
<view class="tTit">{{ '消费账户' }}</view>
<view class="lan">
<view>
@ -46,8 +46,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount2 > 0">
<view class="quan_i" v-show="payDetail.payAccount2 > 0">
<view class="tTit">{{ '现金账户' }}</view>
<view class="lan">
<view>
@ -58,8 +57,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount3 > 0">
<view class="quan_i" v-show="payDetail.payAccount3 > 0">
<view class="tTit">{{ '政策账户' }}</view>
<view class="lan">
<view>
@ -70,8 +68,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount4 > 0">
<view class="quan_i" v-show="payDetail.payAccount4 > 0">
<view class="tTit">{{ '奖金账户' }}</view>
<view class="lan">
<view>
@ -82,8 +79,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount5 > 0">
<view class="quan_i" v-show="payDetail.payAccount5 > 0">
<view class="tTit">{{ '重消账户' }}</view>
<view class="lan">
<view>
@ -94,8 +90,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount6 > 0">
<view class="quan_i" v-show="payDetail.payAccount6 > 0">
<view class="tTit">{{ '积分账户' }}</view>
<view class="lan">
<view>
@ -106,8 +101,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount7 > 0">
<view class="quan_i" v-show="payDetail.payAccount7 > 0">
<view class="tTit">{{ '鼓励账户' }}</view>
<view class="lan">
<view>
@ -118,8 +112,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount8 > 0">
<view class="quan_i" v-show="payDetail.payAccount8 > 0">
<view class="tTit">{{ '复购券账户' }}</view>
<view class="lan">
<view>
@ -130,8 +123,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount9 > 0">
<view class="quan_i" v-show="payDetail.payAccount9 > 0">
<view class="tTit">{{ '全球积分' }}</view>
<view class="lan">
<view>
@ -142,8 +134,7 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount10 > 0">
<view class="quan_i" v-show="payDetail.payAccount10 > 0">
<view class="tTit">{{ '车奖积分' }}</view>
<view class="lan">
<view>
@ -154,20 +145,16 @@
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount12 > 0">
<view class="quan_i" v-show="payDetail.payAccount12 > 0">
<view class="tTit">{{ '法宝券' }}</view>
<view class="lan">
<view>
</view>
<view> </view>
<view>
-{{ payDetail.payAccount12 | numberToCurrency | isLocal }}
</view>
</view>
</view>
<view class="quan_i"
v-show="payDetail.payAccount13 > 0">
<view class="quan_i" v-show="payDetail.payAccount13 > 0">
<view class="tTit">{{ '海豆账户' }}</view>
<view class="lan">
<view>
@ -180,212 +167,172 @@
</view>
</u-collapse-item>
<!-- 暂时隐藏在线支付 -->
<u-collapse-item name="2"
v-if="onlinePay && false">
<view slot="title"
class="pf"> <img src="@/static/images/under_pay.png"
alt="" />
<u-collapse-item name="2" v-if="onlinePay && false">
<view slot="title" class="pf">
<img src="@/static/images/under_pay.png" alt="" />
<view>{{ '在线支付' }}</view>
</view>
<view class="flex_ac"
v-show="this.payList.pay11">
<view class="flex_ac" v-show="this.payList.pay11">
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png"
alt="" />
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '宝付微信支付' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
size="14"
label=""
:name="11">
<u-radio activeColor="red" size="14" label="" :name="11">
</u-radio>
</u-radio-group>
</view>
<view class="flex_ac"
v-show="this.payList.pay12">
<view class="flex_ac" v-show="this.payList.pay12">
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png"
alt="" />
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '宝付微信扫码' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
size="14"
label=""
:name="12">
<u-radio activeColor="red" size="14" label="" :name="12">
</u-radio>
</u-radio-group>
</view>
<view class="flex_ac"
v-show="this.payList.pay13">
<view class="flex_ac" v-show="this.payList.pay13">
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png"
alt="" />
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '汇付微信支付' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
size="14"
label=""
:name="13">
<u-radio activeColor="red" size="14" label="" :name="13">
</u-radio>
</u-radio-group>
</view>
<!-- 微信支付 -->
<view class="flex_ac"
v-show="this.payList.pay73">
<view class="flex_ac" v-show="this.payList.pay73">
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png"
alt="" />
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '微信支付' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
size="14"
label=""
:name="73">
<u-radio activeColor="red" size="14" label="" :name="73">
</u-radio>
</u-radio-group>
</view>
<!-- 支付宝支付 -->
<view class="flex_ac"
v-show="this.payList.pay74">
<view class="flex_ac" v-show="this.payList.pay74">
<view class="flex_ac_i">
<img src="@/static/images/pay_i3.png"
alt="" />
<img src="@/static/images/pay_i3.png" alt="" />
<view>{{ '支付宝支付' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
size="14"
label=""
:name="74">
<u-radio activeColor="red" size="14" label="" :name="74">
</u-radio>
</u-radio-group>
</view>
<view class="flex_ac1"
v-show="this.payList.pay15">
<view class="flex_ac1" v-show="this.payList.pay15">
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg"
alt="" />
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '汇付银行卡' }} </view>
</view>
<view class="pad">
<view v-for="(item, index) in hfList"
<view
v-for="(item, index) in hfList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('hf' + index)">
@click.prevent="selPayRadio('hf' + index)"
>
<view class="flax_i">
<view>{{ item.bankName }} ({{ item.bankNo }})</view>
<view class="fixBind"
@click="fixBind(item)">解绑</view>
<view class="fixBind" @click="fixBind(item)">解绑</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
<u-radio
activeColor="red"
size="14"
label=''
:name="'hf' + index">
label=""
:name="'hf' + index"
>
</u-radio>
</u-radio-group>
</view>
<view class="pay_flax flax_i"
@click="bindBank('hf')">
<img class="img1"
src="@/static/images/addto.png"
alt="" />
<view class="pay_flax flax_i" @click="bindBank('hf')">
<img class="img1" src="@/static/images/addto.png" alt="" />
<view>{{ '绑定银行卡' }}</view>
</view>
</view>
</view>
<view class="flex_ac"
v-show="this.payList.pay32">
<view class="flex_ac" v-show="this.payList.pay32">
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png"
alt="" />
<img src="@/static/images/pay_i2.png" alt="" />
<view>通联微信支付</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
size="14"
label=""
:name="32">
<u-radio activeColor="red" size="14" label="" :name="32">
</u-radio>
</u-radio-group>
</view>
<view class="flex_ac1"
v-show="this.payList.pay4">
<view class="flex_ac1" v-show="this.payList.pay4">
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg"
alt="" />
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '京东银行卡' }}</view>
</view>
<view class="pad">
<view v-for="(item, index) in jdList"
<view
v-for="(item, index) in jdList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('jd' + index)">
@click.prevent="selPayRadio('jd' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
<u-radio
activeColor="red"
size="14"
label=''
:name="'jd' + index">
label=""
:name="'jd' + index"
>
</u-radio>
</u-radio-group>
</view>
<view class="pay_flax flax_i"
@click="bindBank('jd')">
<img class="img1"
src="@/static/images/addto.png"
alt="" />
<view class="pay_flax flax_i" @click="bindBank('jd')">
<img class="img1" src="@/static/images/addto.png" alt="" />
<view>{{ '绑定银行卡' }}</view>
</view>
</view>
</view>
<view class="flex_ac1"
v-show="this.payList.pay33">
<view class="flex_ac1" v-show="this.payList.pay33">
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg"
alt="" />
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '通联银行卡' }}</view>
</view>
<view class="pad">
<view v-for="(item, index) in tlList"
<view
v-for="(item, index) in tlList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('tl' + index)">
@click.prevent="selPayRadio('tl' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio activeColor="red"
<u-radio
activeColor="red"
size="14"
label=''
:name="'tl' + index">
label=""
:name="'tl' + index"
>
</u-radio>
</u-radio-group>
</view>
<view class="pay_flax flax_i"
@click="bindBank('tl')">
<img class="img1"
src="@/static/images/addto.png"
alt="" />
<view class="pay_flax flax_i" @click="bindBank('tl')">
<img class="img1" src="@/static/images/addto.png" alt="" />
<view>{{ '绑定银行卡' }}</view>
</view>
</view>
</view>
</u-collapse-item>
</u-collapse>
</view>
<view class="kuang"
v-if="!ifcz">
<view class="kuang" v-if="!ifcz">
<div v-show="specialArea == 1 || specialArea == 24">
<div class="tit4">{{ '注册会员信息' }}</div>
<div class="quan">
@ -458,7 +405,9 @@
</div>
</div>
</div>
<div v-show="specialArea == 2 || specialArea == 25|| specialArea == 27">
<div
v-show="specialArea == 2 || specialArea == 25 || specialArea == 27"
>
<div class="tit4">{{ '升级会员信息' }}</div>
<div class="quan">
<div class="kuang_i">
@ -498,7 +447,9 @@
</div>
</div>
</div>
<div v-show="specialArea == 3 || specialArea == 26 || specialArea==28">
<div
v-show="specialArea == 3 || specialArea == 26 || specialArea == 28"
>
<div class="tit4">{{ '复购会员信息' }}</div>
<div class="quan">
<div class="kuang_i">
@ -640,35 +591,35 @@
</div>
</div>
</div>
</view>
</view>
<!-- 输入验证码密码 -->
<u-popup :show="isPw"
mode="center"
closeable
@close="closePw">
<u-popup :show="isPw" mode="center" closeable @close="closePw">
<view class="t_tit">{{ '支付验证' }}</view>
<view class="box">
<view class="c_tit"
v-if="isBank">{{'请输入短信验证码'}}</view>
<view class="c_tit"
v-else>{{'请输入密码'}}</view>
<u--input v-if="isBank"
<view class="c_tit" v-if="isBank">{{ '请输入短信验证码' }}</view>
<view class="c_tit" v-else>{{ '请输入密码' }}</view>
<u--input
v-if="isBank"
border="surround"
v-model="codeValue"></u--input>
<u--input v-else
v-model="codeValue"
></u--input>
<u--input
v-else
border="surround"
type="password"
v-model="codeValue"></u--input>
<u-button type="success"
v-model="codeValue"
></u--input>
<u-button
type="success"
class="uBtn"
shape="circle"
:loading="isLoading"
loadingText="支付中"
@tap="payPw()"
color="linear-gradient(to right, #005BAC, #005BAC )">{{'立即支付'}} </u-button>
color="linear-gradient(to right, #005BAC, #005BAC )"
>{{ '立即支付' }}
</u-button>
</view>
</u-popup>
<!-- 底部 -->
@ -694,60 +645,54 @@
<u-modal
:show="showSucce"
showConfirmButton
:content='content'
confirmColor='#DE3932'
:content="content"
confirmColor="#DE3932"
@confirm="reset"
ref="uModal"
:asyncClose="true"></u-modal>
:asyncClose="true"
></u-modal>
<!-- 二维码 -->
<u-popup :show="wxPopup"
mode="center"
closeable
@close="closewxPopup">
<u-popup :show="wxPopup" mode="center" closeable @close="closewxPopup">
<view class="t_tit">{{ '微信支付' }}</view>
<view class="pay_code">
<div ref="qrCodeUrlWx"
id="qrCodeUrlWx"
class="qrcode"></div>
<div style="text-align: center;">
<img :src="qrcodeimg"
<div ref="qrCodeUrlWx" id="qrCodeUrlWx" class="qrcode"></div>
<div style="text-align: center">
<img
:src="qrcodeimg"
alt=""
width="280"
height="280"
v-show="qrcodeimg">
v-show="qrcodeimg"
/>
</div>
</view>
</u-popup>
<!-- 支付宝二维码 -->
<u-popup :show="wxPopup1"
mode="center"
closeable
@close="closewxPopup">
<u-popup :show="wxPopup1" mode="center" closeable @close="closewxPopup">
<view class="t_tit">{{ '支付宝支付' }}</view>
<view class="pay_code">
<div ref="qrCodeUrlWx"
id="qrCodeUrlWx"
class="qrcode"></div>
<div style="text-align: center;">
<img :src="qrcodeimg"
<div ref="qrCodeUrlWx" id="qrCodeUrlWx" class="qrcode"></div>
<div style="text-align: center">
<img
:src="qrcodeimg"
alt=""
width="280"
height="280"
v-show="qrcodeimg">
v-show="qrcodeimg"
/>
</div>
</view>
</u-popup>
<successDialog
@successClose="successClose"
ref="successDialog"
/>
<u-modal @confirm="toUnBind"
@cancel='isNoBind=false'
<successDialog @successClose="successClose" ref="successDialog" />
<u-modal
@confirm="toUnBind"
@cancel="isNoBind = false"
:show="isNoBind"
title="提示"
width="100%"
:showCancelButton="true"
content='是否确定解绑该银行卡'></u-modal>
content="是否确定解绑该银行卡"
></u-modal>
</view>
</template>
@ -756,6 +701,12 @@ import * as api from '@/config/pay.js'
import QRCode from 'qrcodejs2'
import successDialog from '@/components/successDialog.vue'
import * as act from '@/config/activity.js'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
var payStatus
export default {
components: {
@ -873,7 +824,7 @@ export default {
.unBind({
bindCode: this.unBindCode,
})
.then((res) => {
.then(res => {
if (res.code == 200) {
uni.showToast({
title: '解绑成功',
@ -901,7 +852,7 @@ export default {
pkBaseId: this.luckydrawData.pkBaseId,
payNum: this.luckydrawData.payNum,
})
.then((res) => {
.then(res => {
if (res.code == 200) {
this.orderData.orderAmount = res.data.toBePaidMoney
this.payDetail = res.data
@ -952,15 +903,18 @@ export default {
bindCode: this.bindCode,
specialArea: this.specialArea,
smsCode: this.codeValue,
pkSettleCountry: this.pkCountry,
pkSettleCountry: this.pkCountry || 1,
pkCountry: this.pkCountry || 1,
}
} else {
//
console.log(
'%c [ this.specialArea ]-910',
'font-size:13px; background:#777244; color:#bbb688;',
this.specialArea
)
if (
this.specialArea == 1 ||
this.specialArea == 7 ||
this.specialArea == 24
[REGIEST_AREA.id, UPGRADE_AREA.id].includes(Number(this.specialArea))
) {
url = api.payRegOrder
} else {
@ -970,7 +924,8 @@ export default {
orderCode: this.orderCode,
specialArea: this.specialArea,
payPwd: this.codeValue,
pkSettleCountry: this.pkCountry,
pkSettleCountry: this.pkCountry || 1,
pkCountry: this.pkCountry || 1,
makerSpaceMember: this.paramsPost?.makerSpaceMember || '',
}
}
@ -980,9 +935,10 @@ export default {
payPwd: this.codeValue,
payNum: this.luckydrawData.payNum,
pkBaseId: this.luckydrawData.pkBaseId,
pkSettleCountry: this.pkCountry,
pkSettleCountry: this.pkCountry || 1,
pkCountry: this.pkCountry || 1,
}
api.payDrawGift(obj).then((res) => {
api.payDrawGift(obj).then(res => {
if (res.code == 200) {
// this.$message({
// message: res.msg,
@ -998,13 +954,13 @@ export default {
}
})
} else {
url(obj).then((res) => {
url(obj).then(res => {
if (res.code == 200) {
this.isPw = false
if (
this.specialArea == 1 ||
this.specialArea == 7 ||
this.specialArea == 24
[REGIEST_AREA.id, UPGRADE_AREA.id].includes(
Number(this.specialArea)
)
) {
if (this.isBank) {
this.isPw = false
@ -1057,7 +1013,7 @@ export default {
.preCharge({
rechargeAmount: this.czJe,
})
.then((res) => {
.then(res => {
this.paramsPost = res.data
this.orderCode = res.orderCode
if (this.whatPay == 11) {
@ -1100,7 +1056,7 @@ export default {
payType: 3, //
bindCode: this.hfList[indexed].bindCode,
}
api.unifiedorder(params).then((response) => {
api.unifiedorder(params).then(response => {
this.isBank = 'hf'
this.bindCode = this.hfList[indexed].bindCode
this.isPw = true
@ -1111,7 +1067,7 @@ export default {
.preCharge({
rechargeAmount: this.czJe,
})
.then((res) => {
.then(res => {
let params = {
businessType: 3, //
businessCode: res.orderCode,
@ -1119,7 +1075,7 @@ export default {
payType: 3, //
bindCode: this.hfList[indexed].bindCode,
}
api.unifiedorder(params).then((response) => {
api.unifiedorder(params).then(response => {
this.isBank = 'hf'
this.bindCode = this.hfList[indexed].bindCode
this.orderCode = res.orderCode
@ -1139,7 +1095,7 @@ export default {
payType: 3, //
bindCode: this.jdList[indexed].bindCode,
}
api.unifiedorder(params).then((response) => {
api.unifiedorder(params).then(response => {
this.isBank = 'jd'
this.bindCode = this.jdList[indexed].bindCode
this.isPw = true
@ -1150,7 +1106,7 @@ export default {
.preCharge({
rechargeAmount: this.czJe,
})
.then((res) => {
.then(res => {
let params = {
businessType: 3, //
businessCode: res.orderCode,
@ -1158,7 +1114,7 @@ export default {
payType: 3, //
bindCode: this.jdList[indexed].bindCode,
}
api.unifiedorder(params).then((response) => {
api.unifiedorder(params).then(response => {
this.isBank = 'jd'
this.bindCode = this.jdList[indexed].bindCode
this.orderCode = res.orderCode
@ -1177,7 +1133,7 @@ export default {
payType: 3, //
bindCode: this.tlList[indexed].bindCode,
}
api.unifiedorder(params).then((response) => {
api.unifiedorder(params).then(response => {
this.isBank = 'tl'
this.bindCode = this.tlList[indexed].bindCode
this.isPw = true
@ -1188,7 +1144,7 @@ export default {
.preCharge({
rechargeAmount: this.czJe,
})
.then((res) => {
.then(res => {
let params = {
businessType: 3, //
businessCode: res.orderCode,
@ -1196,7 +1152,7 @@ export default {
payType: 3, //
bindCode: this.tlList[indexed].bindCode,
}
api.unifiedorder(params).then((response) => {
api.unifiedorder(params).then(response => {
this.isBank = 'tl'
this.bindCode = this.tlList[indexed].bindCode
this.orderCode = res.orderCode
@ -1214,7 +1170,7 @@ export default {
.preCharge({
rechargeAmount: this.czJe,
})
.then((res) => {
.then(res => {
this.paramsPost = res.data
this.orderCode = res.orderCode
if (this.whatPay == 12) {
@ -1226,7 +1182,7 @@ export default {
this.isBank = ''
this.isPw = true
} else {
api.generate().then((res) => {
api.generate().then(res => {
uni.setStorageSync('mToken', res.msg)
})
this.isBank = ''
@ -1251,7 +1207,7 @@ export default {
payType: 2,
}
}
api.unifiedorder(params).then((res) => {
api.unifiedorder(params).then(res => {
this.wxPopup = true
let that = this
this.$nextTick(() => {
@ -1295,7 +1251,7 @@ export default {
payType: 2,
}
}
api.unifiedorder(params).then((res) => {
api.unifiedorder(params).then(res => {
this.wxPopup = true
let that = this
this.$nextTick(() => {
@ -1339,7 +1295,7 @@ export default {
payType: 1,
}
}
api.unifiedorder(params).then((res) => {
api.unifiedorder(params).then(res => {
this.wxPopup1 = true
let that = this
this.$nextTick(() => {
@ -1385,10 +1341,11 @@ export default {
appletFlag: 0,
}
}
api.unifiedorder(params).then((res) => {
api.unifiedorder(params).then(res => {
let url =
'https://clooud1-5g23d3je04dda65b-1326540601.tcloudbaseapp.com/jump_mp.html?sign=20f03b022bc39e837056bdbe475632c8&t=1715569339&state=' +
res.data + '&payment=0'
res.data +
'&payment=0'
// https://clooud1-5g23d3je04dda65b-1326540601.tcloudbaseapp.com/jump_mp.html?sign=812bf9ab54292b1fb7161a3a6f7fa0f6&t=1715570889&state=' +
// res.data + '&payment=0'
window.open(url)
@ -1415,10 +1372,11 @@ export default {
appletFlag: 0,
}
}
api.unifiedorder(params).then((res) => {
api.unifiedorder(params).then(res => {
let url =
'https://clooud1-5g23d3je04dda65b-1326540601.tcloudbaseapp.com/jump_mp.html?sign=20f03b022bc39e837056bdbe475632c8&t=1715569339&state=' +
res.data+ '&payment=1'
res.data +
'&payment=1'
// https://clooud1-5g23d3je04dda65b-1326540601.tcloudbaseapp.com/jump_mp.html?sign=812bf9ab54292b1fb7161a3a6f7fa0f6&t=1715570889&state=' +
// res.data + '&payment=1'
window.open(url)
@ -1436,12 +1394,12 @@ export default {
}
},
getPayConfig() {
api.payConfig().then((res) => {
api.payConfig().then(res => {
this.payList = res.data
})
},
getBankList() {
api.jdBankList().then((res) => {
api.jdBankList().then(res => {
this.jdList = res.data
})
// api.hfBankList().then((res) => {
@ -1460,9 +1418,8 @@ export default {
.orderInfo({
specialArea: this.specialArea,
orderCode: this.orderCode,
pkSettleCountry: this.pkCountry,
})
.then((res) => {
.then(res => {
this.orderData = res.data
this.downTime()
})
@ -1482,9 +1439,8 @@ export default {
.spendDetails({
specialArea: this.specialArea,
orderCode: this.orderCode,
pkSettleCountry: this.pkCountry,
})
.then((res) => {
.then(res => {
// this.payDetail = res.data
this.$set(this, 'payDetail', res.data)
this.$nextTick(() => {
@ -1494,7 +1450,7 @@ export default {
})
},
reset() {
this.$store.dispatch('GetInfo').then((res) => {
this.$store.dispatch('GetInfo').then(res => {
uni.reLaunch({
url: '/pages/index/index',
})
@ -1509,11 +1465,11 @@ export default {
//
clearInterval(payStatus)
if (
this.specialArea == 1 ||
this.specialArea == 7 ||
this.specialArea == 24
[REGIEST_AREA.id, UPGRADE_AREA.id].includes(
Number(this.specialArea)
)
) {
api.registerInfo(this.orderCode).then((res) => {
api.registerInfo(this.orderCode).then(res => {
this.$refs.successDialog.showSuccess(res.data)
})
} else {
@ -1522,7 +1478,7 @@ export default {
this.showSucce = true
}
} else {
api.payStatus(data).then((res) => {
api.payStatus(data).then(res => {
that.sucPay = res.data
})
}
@ -1563,7 +1519,9 @@ export default {
.tit {
font-size: 24px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
text-align: center;
color: #333333;
@ -1572,7 +1530,9 @@ export default {
.tit1 {
font-size: 24px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
color: #e02b26;
text-align: center;
@ -1581,7 +1541,9 @@ export default {
.tit2 {
font-size: 11px;
font-family: PingFang SC-Regular, PingFang SC;
font-family:
PingFang SC-Regular,
PingFang SC;
font-weight: 400;
color: #666666;
display: flex;
@ -1608,7 +1570,9 @@ export default {
display: flex;
align-items: center;
font-size: 12px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
color: #333333;
@ -1646,7 +1610,9 @@ export default {
display: flex;
align-items: center;
font-size: 12px;
font-family: PingFang SC-Regular, PingFang SC;
font-family:
PingFang SC-Regular,
PingFang SC;
font-weight: 400;
color: #333333;
@ -1773,14 +1739,18 @@ export default {
justify-content: space-between;
color: #666;
font-size: 12px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
color: #999;
}
.tTit {
font-size: 12px;
font-family: PingFang SC-Semibold, PingFang SC;
font-family:
PingFang SC-Semibold,
PingFang SC;
font-weight: 600;
color: #666;
}

View File

@ -53,83 +53,26 @@
<u-form-item :label="'推荐编号'" required borderBottom prop="parent">
<u-input
v-model="form.parent"
@blur="isClick == 0 ? getQuickReg() : getValidPcode()"
@blur="getValidPcode()"
border="none"
/>
</u-form-item>
<u-form-item :label="'推荐姓名'" borderBottom prop="parentName">
<u-input v-model="form.parentName" disabled border="none" />
</u-form-item>
<u-form-item
:label="'安置编号'"
required
borderBottom
prop="placeParent"
>
<u-input v-model="form.placeParent" :disabled="pt" border="none" />
</u-form-item>
<u-form-item :label="'安置姓名'" borderBottom prop="placeParentName">
<u-input v-model="form.placeParentName" disabled border="none" />
</u-form-item>
<u-form-item
:label="'安置位置'"
required
@click="!pt ? (isPlace = true) : (isPlace = false)"
borderBottom
prop="placeDeptLabel"
>
<view class="disFlex justBwn">
<u-input
v-model="form.placeDeptLabel"
:disabled="pt"
border="none"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item
v-if="userInfo.specialRegistration == 1"
:label="'会员姓名'"
required
borderBottom
prop="memberName"
>
<u-form-item label="会员昵称" required borderBottom prop="memberName">
<u-input :maxlength="40" v-model="form.memberName" border="none" />
</u-form-item>
<u-form-item
v-if="userInfo.specialRegistration == 1"
:label="'联系方式'"
required
borderBottom
prop="phone"
>
<u-form-item :label="'联系方式'" required borderBottom prop="phone">
<u-input
v-if="pkCountry == 1"
v-model="form.phone"
maxlength="11"
type="number"
border="none"
/>
<u-input v-else v-model="form.phone" maxlength="30" border="none" />
</u-form-item>
<u-form-item
v-if="userInfo.specialRegistration == 0"
:label="'会员姓名'"
required
borderBottom
prop="memberName"
>
<u-input maxlength="40" v-model="form.memberName" border="none" />
</u-form-item>
<u-form-item
v-if="userInfo.specialRegistration == 0"
:label="'联系方式'"
required
borderBottom
prop="phone"
>
<u-input v-model="form.phone" maxlength="30" border="none" />
</u-form-item>
<u-form-item
:label="'证件号码'"
borderBottom
@ -174,75 +117,7 @@
>
<u-input v-model="form.idCard" border="none" />
</u-form-item>
<u-form-item
:label="'发货方式'"
required
borderBottom
@click="pkCountry != 1 ? (isDelivery = true) : ''"
prop="deliveryWayLabel"
>
<view class="disFlex justBwn">
<u-input
v-model="form.deliveryWayLabel"
:disabled="pkCountry == 1"
border="none"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item
:label="'运输方式'"
borderBottom
@click="pkCountry != 1 ? (isTrans = true) : ''"
:required="isDeliveryWay"
prop="transTypeLabel"
>
<view class="disFlex justBwn">
<u-input
v-model="form.transTypeLabel"
:disabled="pkCountry == 1"
border="none"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item
v-if="howSure"
:label="'创客空间'"
borderBottom
required
@click="ishowSure = true"
prop="makerSpaceMemberLabel"
>
<view class="disFlex justBwn">
<u-input v-model="form.makerSpaceMemberLabel" border="none" />
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<!-- <u-form-item
:label="'仓库'"
v-if="pkCountry != 1"
borderBottom
@click="isCk = true"
prop="pkStorehouseLabel"
>
<view class="disFlex justBwn">
<u-input v-model="form.pkStorehouseLabel" border="none" />
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item
:label="'会员店铺'"
v-if="pkCountry != 1"
borderBottom
@click="isDp = true"
prop="pkMemberStoreLabel"
>
<view class="disFlex justBwn">
<u-input v-model="form.pkMemberStoreLabel" border="none" />
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item> -->
<view class="subTxt" v-if="isDeliveryWay">
<view class="subTxt1">{{ '收货人信息' }}</view>
<span
@ -559,7 +434,12 @@ import address from '@/components/address.vue'
import mustAgreeMent from '@/components/mustAgreeMent.vue'
import * as api from '@/config/regiest'
import agreement from '@/components/agreement.vue'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
export default {
components: {
'v-address': address,
@ -737,7 +617,6 @@ export default {
onLoad(options) {
const user = uni.getStorageSync('User')
this.pkCountry = user.pkSettleCountry
console.log(this.pkCountry, '....pkCountry')
this.specialArea = options.specialArea
this.shoppingArr = JSON.parse(options.shoppArr)
if (options.selTable) {
@ -774,12 +653,25 @@ export default {
this.getGenerate()
//
this.userInfo = uni.getStorageSync('User')
this.setPageTitle(this.specialArea)
},
onShow() {
//
this.getAddressList()
},
methods: {
setPageTitle(areaId) {
const areaList = [
REGIEST_AREA,
UPGRADE_AREA,
REISSUE_AREA,
REPURCHASE_AREA,
]
const title = areaList.find(item => item.id == areaId)?.name
uni.setNavigationBarTitle({
title,
})
},
toAgree() {
// agreeMent
this.$refs.agreement.openDig()
@ -855,9 +747,9 @@ export default {
//
this.getCountry()
//
this.getTransList()
// this.getTransList()
//
this.getDeliveryList()
// this.getDeliveryList()
//
this.getBank()
@ -876,8 +768,6 @@ export default {
//
this.form.parentName = this.userInfo.memberName
this.pt = false
//
this.getQuickReg()
} else {
}
if (this.pkCountry == 1) {
@ -906,77 +796,38 @@ export default {
})
},
getMember() {
let deleteList = []
this.shoppingArr.forEach(item => {
deleteList.push({
shoppingId: item,
// let deleteList = []
// this.shoppingArr.forEach(item => {
// deleteList.push({
// shoppingId: item,
// })
// })
// this.allGoodsData.deleteList = deleteList
// console.log(this.shoppingArr, '....allGoodsData')
// return
api
.memLevel({
firstCheck: 0,
specialArea: this.specialArea,
shopList: this.shoppingArr.map(id => {
return {
shoppingId: id,
}
}),
})
})
this.allGoodsData.deleteList = deleteList
api.memLevel(this.allGoodsData).then(res => {
.then(res => {
this.form.pkGradeVal = res.data.pkGradeVal
})
},
checkAddress() {},
getQuickReg() {
api
.quickReg({
parent: this.form.parent,
specialArea: this.specialArea,
pkSettleCountry: this.pkCountry,
})
.then(res => {
if (res.code == 200) {
this.form.placeDept = res.data.placeDept
this.form.placeDeptLabel = res.data.placeDeptVal
this.$set(this.form, 'placeDeptLabel', res.data.placeDeptVal)
this.form.placeParent = res.data.placeParent
this.form.placeParentName = res.data.placeParentName
this.form.parentName = res.data.parentName
if (res.data.isFirst) {
//
this.pt = true
} else {
//
this.pt = false
}
//
if (this.howSure) {
this.getQueryCard()
}
this.$forceUpdate()
} else {
console.log(122)
this.$set(this.form, 'parentName', '')
}
})
},
getValidPcode() {
api
.validPcode({
parent: this.form.parent,
pkSettleCountry: this.pkCountry,
})
.then(res => {
if (res.code == 200) {
this.form.parentName = res.data.parentName
if (res.data.isFirst) {
//
this.pt = true
this.form.placeDept = res.data.placeDept
this.form.placeDeptLabel =
res.data.placeDept == 1 ? '左区' : '右区'
this.form.placeParent = res.data.placeParent
this.form.placeParentName = res.data.placeParentName
} else {
//
this.pt = false
}
//
if (this.howSure) {
this.getQueryCard()
}
this.$forceUpdate()
}
})
},
@ -1120,6 +971,7 @@ export default {
})
})
this.allGoodsData.deleteList = deleteList
this.allGoodsData.shopList = deleteList
api
.queryPostage(
Object.assign(
@ -1314,14 +1166,6 @@ export default {
},
goBuy() {
this.$refs.uForm.validate().then(res => {
// if (this.agreementShow.length == 0) {
// uni.showToast({
// title: '',
// icon: "none",
// duration: 1500,
// });
// return;
// }
this.isLoading = true
let deleteList = []
this.shoppingArr.forEach(item => {
@ -1333,6 +1177,8 @@ export default {
.confirmRegOrder(
Object.assign({}, this.form, this.allGoodsData, {
deleteList: deleteList,
shopList: deleteList,
parentCode: this.form.parent,
})
)
.then(res => {
@ -1342,10 +1188,7 @@ export default {
url:
'/pages/pay/index?paramsPost=' +
JSON.stringify(
Object.assign(
{ makerSpaceMember: this.form.makerSpaceMember },
res.data
)
Object.assign({ specialArea: this.specialArea }, res.data)
) +
'&businessType=1',
})

View File

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