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 payConfig = params => http.get('/pay/config', { params })
//查询订单明细 //查询订单明细
export const orderInfo = 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 => export const orderStatus = params =>
http.get('/system/pub/enums/order-status-api', { params }) http.get('/system/pub/enums/order-status-api', { params })
@ -45,3 +45,7 @@ export const selfRevokeOrder = params =>
// 获取可升级级别 // 获取可升级级别
export const getUpgradeLevel = params => export const getUpgradeLevel = params =>
http.post('/sale/api/retail-order/valid-mem-level', { 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 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 //宝付确认支付h5
export const baoFuPay = (params) => http.post('/pay/baofu-code/order', params) export const baoFuPay = params => http.post('/pay/baofu-code/order', params)
//汇付确认支付h5 //汇付确认支付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 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 //获取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' }, export const specialExport = params =>
responseType: 'blob',}) 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 //#ifdef DEV_SERVER
console.log('DEV_SERVER') console.log('DEV_SERVER')
config.baseURL = 'http://localhost:8080' config.baseURL = 'http://192.168.0.100:8080'
//#endif //#endif
//#ifdef QA_SERVER //#ifdef QA_SERVER

View File

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

View File

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

View File

@ -53,83 +53,26 @@
<u-form-item :label="'推荐编号'" required borderBottom prop="parent"> <u-form-item :label="'推荐编号'" required borderBottom prop="parent">
<u-input <u-input
v-model="form.parent" v-model="form.parent"
@blur="isClick == 0 ? getQuickReg() : getValidPcode()" @blur="getValidPcode()"
border="none" border="none"
/> />
</u-form-item> </u-form-item>
<u-form-item :label="'推荐姓名'" borderBottom prop="parentName"> <u-form-item :label="'推荐姓名'" borderBottom prop="parentName">
<u-input v-model="form.parentName" disabled border="none" /> <u-input v-model="form.parentName" disabled border="none" />
</u-form-item> </u-form-item>
<u-form-item
:label="'安置编号'" <u-form-item label="会员昵称" required borderBottom prop="memberName">
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-input :maxlength="40" v-model="form.memberName" border="none" /> <u-input :maxlength="40" v-model="form.memberName" border="none" />
</u-form-item> </u-form-item>
<u-form-item <u-form-item :label="'联系方式'" required borderBottom prop="phone">
v-if="userInfo.specialRegistration == 1"
:label="'联系方式'"
required
borderBottom
prop="phone"
>
<u-input <u-input
v-if="pkCountry == 1"
v-model="form.phone" v-model="form.phone"
maxlength="11" maxlength="11"
type="number" type="number"
border="none" 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>
<u-form-item <u-form-item
:label="'证件号码'" :label="'证件号码'"
borderBottom borderBottom
@ -174,75 +117,7 @@
> >
<u-input v-model="form.idCard" border="none" /> <u-input v-model="form.idCard" border="none" />
</u-form-item> </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="subTxt" v-if="isDeliveryWay">
<view class="subTxt1">{{ '收货人信息' }}</view> <view class="subTxt1">{{ '收货人信息' }}</view>
<span <span
@ -559,7 +434,12 @@ import address from '@/components/address.vue'
import mustAgreeMent from '@/components/mustAgreeMent.vue' import mustAgreeMent from '@/components/mustAgreeMent.vue'
import * as api from '@/config/regiest' import * as api from '@/config/regiest'
import agreement from '@/components/agreement.vue' import agreement from '@/components/agreement.vue'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
export default { export default {
components: { components: {
'v-address': address, 'v-address': address,
@ -737,7 +617,6 @@ export default {
onLoad(options) { onLoad(options) {
const user = uni.getStorageSync('User') const user = uni.getStorageSync('User')
this.pkCountry = user.pkSettleCountry this.pkCountry = user.pkSettleCountry
console.log(this.pkCountry, '....pkCountry')
this.specialArea = options.specialArea this.specialArea = options.specialArea
this.shoppingArr = JSON.parse(options.shoppArr) this.shoppingArr = JSON.parse(options.shoppArr)
if (options.selTable) { if (options.selTable) {
@ -774,12 +653,25 @@ export default {
this.getGenerate() this.getGenerate()
// //
this.userInfo = uni.getStorageSync('User') this.userInfo = uni.getStorageSync('User')
this.setPageTitle(this.specialArea)
}, },
onShow() { onShow() {
// //
this.getAddressList() this.getAddressList()
}, },
methods: { 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() { toAgree() {
// agreeMent // agreeMent
this.$refs.agreement.openDig() this.$refs.agreement.openDig()
@ -855,9 +747,9 @@ export default {
// //
this.getCountry() this.getCountry()
// //
this.getTransList() // this.getTransList()
// //
this.getDeliveryList() // this.getDeliveryList()
// //
this.getBank() this.getBank()
@ -876,8 +768,6 @@ export default {
// //
this.form.parentName = this.userInfo.memberName this.form.parentName = this.userInfo.memberName
this.pt = false this.pt = false
//
this.getQuickReg()
} else { } else {
} }
if (this.pkCountry == 1) { if (this.pkCountry == 1) {
@ -906,77 +796,38 @@ export default {
}) })
}, },
getMember() { getMember() {
let deleteList = [] // let deleteList = []
this.shoppingArr.forEach(item => { // this.shoppingArr.forEach(item => {
deleteList.push({ // deleteList.push({
shoppingId: item, // 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,
}
}),
}) })
}) .then(res => {
this.allGoodsData.deleteList = deleteList
api.memLevel(this.allGoodsData).then(res => {
this.form.pkGradeVal = res.data.pkGradeVal this.form.pkGradeVal = res.data.pkGradeVal
}) })
}, },
checkAddress() {}, 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() { getValidPcode() {
api api
.validPcode({ .validPcode({
parent: this.form.parent, parent: this.form.parent,
pkSettleCountry: this.pkCountry,
}) })
.then(res => { .then(res => {
if (res.code == 200) { if (res.code == 200) {
this.form.parentName = res.data.parentName 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.deleteList = deleteList
this.allGoodsData.shopList = deleteList
api api
.queryPostage( .queryPostage(
Object.assign( Object.assign(
@ -1314,14 +1166,6 @@ export default {
}, },
goBuy() { goBuy() {
this.$refs.uForm.validate().then(res => { this.$refs.uForm.validate().then(res => {
// if (this.agreementShow.length == 0) {
// uni.showToast({
// title: '',
// icon: "none",
// duration: 1500,
// });
// return;
// }
this.isLoading = true this.isLoading = true
let deleteList = [] let deleteList = []
this.shoppingArr.forEach(item => { this.shoppingArr.forEach(item => {
@ -1333,6 +1177,8 @@ export default {
.confirmRegOrder( .confirmRegOrder(
Object.assign({}, this.form, this.allGoodsData, { Object.assign({}, this.form, this.allGoodsData, {
deleteList: deleteList, deleteList: deleteList,
shopList: deleteList,
parentCode: this.form.parent,
}) })
) )
.then(res => { .then(res => {
@ -1342,10 +1188,7 @@ export default {
url: url:
'/pages/pay/index?paramsPost=' + '/pages/pay/index?paramsPost=' +
JSON.stringify( JSON.stringify(
Object.assign( Object.assign({ specialArea: this.specialArea }, res.data)
{ makerSpaceMember: this.form.makerSpaceMember },
res.data
)
) + ) +
'&businessType=1', '&businessType=1',
}) })

View File

@ -17,41 +17,74 @@
<img :src="pkCountryImg" alt="" /> <img :src="pkCountryImg" alt="" />
<u-icon name="arrow-down" color="#999"></u-icon> <u-icon name="arrow-down" color="#999"></u-icon>
</view> </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 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"
: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="" /> <img :src="item.cover1" class="cover" alt="" />
<view class="goodList_ir"> <view class="goodList_ir">
<view> <view>
@ -60,14 +93,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 +121,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 +158,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 +193,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 +203,93 @@
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)
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 +305,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 +351,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 +362,35 @@
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,
}); })
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 +399,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 +419,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 +452,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 +497,8 @@
overflow: hidden; overflow: hidden;
} }
.tabList_a {} .tabList_a {
}
.index_btm { .index_btm {
flex: 1; // display: flex; flex: 1; // display: flex;
@ -431,7 +507,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 +535,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 +548,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 +577,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 +602,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;
} }