feat(share): 分享注册联调

This commit is contained in:
woody 2025-09-16 17:21:20 +08:00
parent b3c7456503
commit 8d221af93d
12 changed files with 1391 additions and 1087 deletions

View File

@ -1,262 +1,282 @@
<template> <template>
<u-popup :show="sucShow" closeable :round="10" mode="center" @close="sucShow= false"> <u-popup
<view class="pop_a"> :show="sucShow"
<view class="tit"> closeable
<u-icon name="checkmark-circle-fill" color="#029B00"></u-icon> :round="10"
<view>{{'注册成功'}}</view> mode="center"
</view> @close="sucShow = false"
>
<view class="pop_a">
<view class="tit">
<u-icon name="checkmark-circle-fill" color="#029B00"></u-icon>
<view>{{ '注册成功' }}</view>
</view>
<view class="getCode" @tap="onCopy">{{'复制'}}</view> <view class="getCode" @tap="onCopy">{{ '复制' }}</view>
<view class="form"> <view class="form">
<u--form labelPosition="left" labelWidth="80px" :model="allData" ref="uForm"> <u--form
<u-form-item :label="'会员姓名'+':'" borderBottom> labelPosition="left"
<u--input v-model="allData.memberName" border="none"></u--input> labelWidth="80px"
</u-form-item> :model="allData"
<u-form-item :label="'会员编号'+':'" borderBottom> ref="uForm"
<u--input v-model="allData.memberCode" border="none"></u--input> >
</u-form-item> <u-form-item :label="'会员姓名' + ':'" borderBottom>
<u-form-item :label="'会员电话'+':'" borderBottom> <u--input v-model="allData.memberName" border="none"></u--input>
<u--input v-model="allData.phone" border="none"></u--input> </u-form-item>
</u-form-item> <u-form-item :label="'会员编号' + ':'" borderBottom>
<u-form-item :label="'登录密码'+':'" borderBottom> <u--input v-model="allData.memberCode" border="none"></u--input>
<u--input v-model="allData.loginPassword" border="none"> </u-form-item>
</u--input> <u-form-item :label="'会员电话' + ':'" borderBottom>
</u-form-item> <u--input v-model="allData.phone" border="none"></u--input>
<u-form-item :label="'支付密码'+':'" borderBottom> </u-form-item>
<u--input v-model="allData.payPassword" border="none"> <u-form-item :label="'登录密码' + ':'" borderBottom>
</u--input> <u--input v-model="allData.loginPassword" border="none"> </u--input>
</u-form-item> </u-form-item>
<u-form-item :label="'登录网址'+':'" borderBottom> <u-form-item :label="'支付密码' + ':'" borderBottom>
<u--input v-model="allData.urlAddress" border="none"></u--input> <u--input v-model="allData.payPassword" border="none"> </u--input>
</u-form-item> </u-form-item>
</u--form> <u-form-item :label="'登录网址' + ':'" borderBottom>
<view class="disflx"> <u--input v-model="allData.urlAddress" border="none"></u--input>
<u-button </u-form-item>
type="success" </u--form>
class="uBtn" <view class="disflx">
shape="circle" <u-button
color="linear-gradient(to right, #005BAC, #005BAC )" type="success"
@tap="handleClose" class="uBtn"
> shape="circle"
确定 color="linear-gradient(to right, #005BAC, #005BAC )"
</u-button> @tap="handleClose"
</view> >
</view> 确定
<img class="yh" v-show="bia" src="@/static/images/yh.gif" alt=""> </u-button>
<img class="cd" v-show="bia" src="@/static/images/cd.gif" alt=""> </view>
</view> </view>
</u-popup> <img class="yh" v-show="bia" src="@/static/images/yh.gif" alt="" />
<img class="cd" v-show="bia" src="@/static/images/cd.gif" alt="" />
</view>
</u-popup>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
sucShow: false, sucShow: false,
bia: false, bia: false,
allData: '', allData: '',
} }
}, },
methods: { methods: {
showSuccess(data) { showSuccess(data) {
this.allData = data this.allData = data
// this.allData.gzh = '' // this.allData.gzh = ''
// this.allData.ios = 'http://yxydl.hzs413.com/q2efum' // this.allData.ios = 'http://yxydl.hzs413.com/q2efum'
// this.allData.android = 'https://cn.hzs413.com/' // this.allData.android = 'https://cn.hzs413.com/'
this.sucShow = true this.sucShow = true
this.bia = true this.bia = true
let that = this let that = this
setTimeout(() => { setTimeout(() => {
that.bia = false that.bia = false
}, 3000) }, 3000)
}, },
handleClose() { handleClose() {
this.sucShow = false this.sucShow = false
this.$emit('successClose') this.$emit('successClose', this.allData)
}, },
payPw() {}, payPw() {},
onCopy() { onCopy() {
let text = let text =
'会员姓名' + ':' + '会员姓名' +
this.allData.memberName + ':' +
'\n' + this.allData.memberName +
'会员编号' + ':' + '\n' +
this.allData.memberCode + '会员编号' +
'\n' + ':' +
'会员电话' + ':' + this.allData.memberCode +
this.allData.phone + '\n' +
'\n' + '会员电话' +
'登录密码' + ':' + ':' +
this.allData.loginPassword + this.allData.phone +
'\n' + '\n' +
'支付密码' + ':' + '登录密码' +
this.allData.payPassword + ':' +
'\n' + this.allData.loginPassword +
'登录网址' + ':' + '\n' +
this.allData.urlAddress '支付密码' +
// + ':' +
// '\n' + this.allData.payPassword +
// ''+':' + '\n' +
// this.allData.gzh+ '登录网址' +
// '\n' + ':' +
// 'APP'+`(${''})` + this.allData.urlAddress
// ':' + // +
// this.allData.ios+ // '\n' +
// '\n' + // ''+':' +
// 'APP'+`(${''})` + // this.allData.gzh+
// ':' + // '\n' +
// this.allData.android // 'APP'+`(${''})` +
this.$copyText(text).then((res) => { // ':' +
uni.showToast({ // this.allData.ios+
title: '复制成功', // '\n' +
icon: 'none', // 'APP'+`(${''})` +
}) // ':' +
}) // this.allData.android
}, this.$copyText(text).then(res => {
}, uni.showToast({
} title: '复制成功',
icon: 'none',
})
})
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-footer { .dialog-footer {
display: flex; display: flex;
} }
.btn { .btn {
line-height: 50px; line-height: 50px;
width: 120px; width: 120px;
height: 50px; height: 50px;
background: #d5251d; background: #d5251d;
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
margin: 25px auto; margin: 25px auto;
cursor: pointer; cursor: pointer;
} }
.hui { .hui {
line-height: 50px; line-height: 50px;
width: 120px; width: 120px;
height: 50px; height: 50px;
background: #ccc; background: #ccc;
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
margin: 25px auto; margin: 25px auto;
cursor: pointer; cursor: pointer;
} }
::v-deep .el-dialog { ::v-deep .el-dialog {
border-radius: 10px; border-radius: 10px;
} }
::v-deep .el-dialog__body { ::v-deep .el-dialog__body {
padding: 0; padding: 0;
} }
.tit { .tit {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 30rpx; font-size: 30rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
// border-bottom: 1px solid #f2f2f2; // border-bottom: 1px solid #f2f2f2;
// padding-bottom: 15px; // padding-bottom: 15px;
margin-top: 20px; margin-top: 20px;
} }
.tit1 { .tit1 {
font-size: 30rpx; font-size: 30rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: bold; font-weight: bold;
color: #005BAC; color: #005bac;
text-align: center; text-align: center;
} }
.digBody { .digBody {
margin-top: 30px; margin-top: 30px;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
font-family: PingFang SC-Regular, PingFang SC; font-family:
font-weight: 400; PingFang SC-Regular,
color: #666666; PingFang SC;
font-weight: 400;
color: #666666;
.red { .red {
font-size: 20px; font-size: 20px;
font-family: PingFang SC-Regular, PingFang SC; font-family:
font-weight: 400; PingFang SC-Regular,
color: #f43c3a; PingFang SC;
position: relative; font-weight: 400;
line-height: 30px; color: #f43c3a;
height: 30px; position: relative;
line-height: 30px;
height: 30px;
.copy { .copy {
position: absolute; position: absolute;
right: 0; right: 0;
transform: translateX(-100%); transform: translateX(-100%);
top: 0; top: 0;
font-size: 14px; font-size: 14px;
line-height: 30px; line-height: 30px;
height: 30px; height: 30px;
color: #333; color: #333;
cursor: pointer; cursor: pointer;
} }
} }
view { view {
margin-bottom: 5px; margin-bottom: 5px;
} }
} }
.yh { .yh {
width: 262px; width: 262px;
height: 262px; height: 262px;
position: absolute; position: absolute;
top: -100px; top: -100px;
left: 0; left: 0;
right: 0; right: 0;
margin: 0 auto; margin: 0 auto;
} }
.cd { .cd {
width: 496px; width: 496px;
height: 496px; height: 496px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
} }
.getCode { .getCode {
text-align: right; text-align: right;
margin: 48rpx 24rpx 0 0; margin: 48rpx 24rpx 0 0;
font-size: 10px; font-size: 10px;
font-family: PingFang SC-Regular, PingFang SC; font-family:
font-weight: 400; PingFang SC-Regular,
color: #18acff; PingFang SC;
} font-weight: 400;
color: #18acff;
}
.pop_a { .pop_a {
padding: 40rpx 40rpx; padding: 40rpx 40rpx;
} }
.uBtn { .uBtn {
margin: 20rpx; margin: 20rpx;
} }
::v-deep .u-popup__content { ::v-deep .u-popup__content {
width: 90%; width: 90%;
} }
::v-deep .u-form-item__body__left__content__label { ::v-deep .u-form-item__body__left__content__label {
font-size: 24rpx; font-size: 24rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
</style> </style>

View File

@ -5,83 +5,115 @@
* @Date: 2022-11-23 11:10:29 * @Date: 2022-11-23 11:10:29
*/ */
/* /*
* @Descripttion: * @Descripttion:
* @version: * @version:
* @Author: kBank * @Author: kBank
* @Date: 2022-11-23 11:10:29 * @Date: 2022-11-23 11:10:29
*/ */
const http = uni.$u.http const http = uni.$u.http
//商品列表 //商品列表
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 waresDetail = (params) => http.post('/sale/api/retail-wares/wares-detail', params) export const waresDetail = params =>
http.post('/sale/api/retail-wares/wares-detail', params)
//嗨粉海粉短信 //嗨粉海粉短信
export const verification = (params) => http.get('/member/api/sms/fans-verification', { params }) export const verification = params =>
http.get('/member/api/sms/fans-verification', { params })
//嗨粉选择省市区 //嗨粉选择省市区
export const getAllAreaList = (params) => http.get('system/api/area/provinceList', { params }) export const getAllAreaList = params =>
http.get('system/api/area/provinceList', { params })
//嗨粉选择国家 //嗨粉选择国家
export const getCountry = (params) => http.get('system/api/country/list', { params }) export const getCountry = params =>
http.get('system/api/country/list', { params })
//海粉注册 //海粉注册
export const regShareMember = (params) => http.post('/member/api/member/reg-share-member', params) export const regShareMember = params =>
http.post('/member/api/member/reg-share-member', params)
//hi粉注册 //hi粉注册
export const hiRegister = (params) => http.post('/member/api/fans/register', params) export const hiRegister = params =>
http.post('/member/api/fans/register', 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 deliveryList = (params) => http.get('/system/pub/enums/delivery-list', { params }) export const deliveryList = params =>
http.get('/system/pub/enums/delivery-list', { params })
//海粉渠道 //海粉渠道
export const jxhhSource = (params) => http.get('/sale/api/t-source/list/' + params) export const jxhhSource = params =>
http.get('/sale/api/t-source/list/' + params)
//海粉分类 //海粉分类
export const optionList = (params) => http.post('/sale/api/twares-category-category/option-list', params ) export const optionList = params =>
http.post('/sale/api/twares-category-category/option-list', params)
//海粉商品 //海粉商品
export const sharingWares = (params) => http.get('/sale/api/wares/sharing-zone-wares', { params }) export const sharingWares = params =>
http.get('/sale/api/wares/sharing-zone-wares', { params })
//分享邮费查询 //分享邮费查询
export const queryAdressPostage = (params) => http.post('/sale/api/order/self-order-postage', params) export const queryAdressPostage = params =>
http.post('/sale/api/order/self-order-postage', params)
//嗨粉分享确认订单 //嗨粉分享确认订单
export const confirmFunShareOrder = (params) => http.post('/sale/api/order/confirm-self-fun-order', params) export const confirmFunShareOrder = params =>
http.post('/sale/api/order/confirm-self-fun-order', params)
//海粉商品详情 //海粉商品详情
export const sharingWaresDetail = (params) => http.get('/sale/api/wares/query-spe-sharing-wares-detail', { params }) export const sharingWaresDetail = params =>
http.get('/sale/api/wares/query-spe-sharing-wares-detail', { params })
//海粉订单确认 //海粉订单确认
export const confirmShareOrder = (params) => http.post('/sale/api/order/confirm-share-order', params) export const confirmShareOrder = params =>
http.post('/sale/api/order/confirm-share-order', params)
//获取购物车 //获取购物车
export const getShopping = (params) => http.get('/sale/api/shopping/getShopping', { params }) export const getShopping = params =>
http.get('/sale/api/shopping/getShopping', { params })
//分类列表 //分类列表
export const classifyList = (params) => http.get('/sale/api/area-classify/list', { params }) export const classifyList = params =>
http.get('/sale/api/area-classify/list', { params })
//加减购物车 //加减购物车
export const plusReduceShopping = (params) => http.post('/sale/api/shopping/plusReduceShopping', params) export const plusReduceShopping = params =>
http.post('/sale/api/shopping/plusReduceShopping', params)
//多删购物车 //多删购物车
export const batchDelShopping = (params) => http.post('/sale/api/shopping/batchDelShopping', params) export const batchDelShopping = params =>
http.post('/sale/api/shopping/batchDelShopping', params)
//添加购物车 //添加购物车
export const addShopping = (params) => http.post('/sale/api/shopping/addShopping', params) export const addShopping = params =>
http.post('/sale/api/shopping/addShopping', params)
//菜单权限 //菜单权限
export const menuList = (params) => http.get('/system/api/menu/list', { params }) export const menuList = params => http.get('/system/api/menu/list', { params })
//海粉分享 //海粉分享
export const shareCode = (params) => http.get('/member/api/share/share-code-h5', { params }) export const shareCode = params =>
http.get('/member/api/share/share-code-h5', { params })
//嗨粉分享 //嗨粉分享
export const fansCode = (params) => http.get('/member/api/share/fans-code-h5', { params }) export const fansCode = params =>
http.get('/member/api/share/fans-code-h5', { params })
//获取购物车数量 //获取购物车数量
export const getShoppingCount = (params) => http.get('/sale/api/shopping/getShoppingCount', { params }) export const getShoppingCount = params =>
http.get('/sale/api/shopping/getShoppingCount', { params })
//获取购物车数小 //获取购物车数小
export const getSmallCount = (params) => http.get('/sale/api/shopping/getAreaShoppingCount', { params }) export const getSmallCount = params =>
http.get('/sale/api/shopping/getAreaShoppingCount', { params })
//获取分享前缀 //获取分享前缀
export const prefix = (params) => http.get('/member/api/member/query-country-prefix/' + params, ) export const prefix = params =>
http.get('/member/api/member/query-country-prefix/' + params)
//校验分享编号 //校验分享编号
export const validateMember = (params) => http.get('/member/api/member/validate-share-member/' + params, ) export const validateMember = params =>
http.get('/member/api/member/validate-share-member/' + params)
//获取国家 //获取国家
export const currencyList = (params) => http.get('/system/api/country/list' , {params} ) export const currencyList = params =>
http.get('/system/api/country/list', { params })
//0元注册时 //0元注册时
export const checkShare = (params) => http.get('/member/api/share/check-share-code' , {params} ) export const checkShare = params =>
http.get('/member/api/share/check-share-code', { 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)
//hi粉确认订单 export const fansConfirm = params =>
export const fansConfirm = (params) => http.post('/sale/api/order/fans-confirm-order', params) http.post('/sale/api/retail-order/fans-confirm-order', params)
//购物车注册下单校验弹框 //购物车注册下单校验弹框
export const energyShop = (params) => http.post('/sale/api/wares/query-energy-silo', params) export const energyShop = params =>
http.post('/sale/api/wares/query-energy-silo', params)
//hi粉确认订单 //hi粉确认订单
export const energyShopSilo = (params) => http.post('/sale/api/order/valid-silo', params) export const energyShopSilo = params =>
http.post('/sale/api/order/valid-silo', params)

View File

@ -99,12 +99,16 @@ export const indexPopScreen = params =>
export const getMenuList = params => export const getMenuList = params =>
http.get('/system/api/menu/list', { params }) http.get('/system/api/menu/list', { params })
//海粉默认登录H5扫码使用
export const autoLogin = params => export const autoLogin = params =>
http.post('/retail-member/auth/api/auto-login', params) http.post('/member/api/retail-auth/auto-login', params)
// 分享注册后自动登录
// registered-auto-login
export const registeredAutoLogin = params =>
http.post('/member/api/retail-auth/registered-auto-login', params)
//海粉商品 //海粉商品
export const queryWares = params => export const queryWares = params =>
http.post('/sale/api/wares/query-spe-wares-copy', params) http.get('/sale/api/wares/list-wares-share', { params })
//保存礼品地址 //保存礼品地址
export const saveGiftAddress = params => export const saveGiftAddress = params =>
http.post('/retail-member/api/retail-member-gift/update-gift', params) http.post('/retail-member/api/retail-member-gift/update-gift', params)
@ -117,7 +121,7 @@ export const getUserAwards = params =>
//获取安置人编号 //获取安置人编号
export const fansConvertCode = params => export const fansConvertCode = params =>
http.get('/retail-member/api/retail-member/fans-convert-code/' + params) http.get('/member/api/member/fans-convert-code/' + params)
//获取荣誉奖衔 //获取荣誉奖衔
export const getIndexAwards = params => export const getIndexAwards = params =>

View File

@ -72,10 +72,9 @@ export const payPickOrder = 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 => export const registerInfo = params =>
http.get('/member/api/member/register-order/' + params) http.get('/member/api/member/fans-order/' + params)
// 升级支付 // 升级支付
export const upgradePay = params => export const upgradePay = 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://t-app.beida777.com/prod-api' config.baseURL = 'http://192.168.0.86:8080'
//#endif //#endif
//#ifdef QA_SERVER //#ifdef QA_SERVER

View File

@ -49,7 +49,7 @@
ref="child2" ref="child2"
@childMethodTrigger="callChildMethod" @childMethodTrigger="callChildMethod"
></znNewsPopup> ></znNewsPopup>
<RegionSelect v-if="userInfo.memberCode != 'BF66886688'" /> <!-- <RegionSelect v-if="userInfo.memberCode != 'BF66886688'" /> -->
<!-- 直推排行弹窗 <!-- 直推排行弹窗
<directrank-popup <directrank-popup
@callznMethodTrigger="callznMethod" @callznMethodTrigger="callznMethod"
@ -92,14 +92,12 @@ import {
REPURCHASE_AREA, REPURCHASE_AREA,
} from '@/util/specialAreaMap' } from '@/util/specialAreaMap'
import { MEMBER_SIGN } from '@/util/common.js' import { MEMBER_SIGN } from '@/util/common.js'
import RegionSelect from '@/components/region-select/index.vue'
export default { export default {
components: { components: {
noticePopup, noticePopup,
znNewsPopup, znNewsPopup,
'cl-tabbar': clTabbar, 'cl-tabbar': clTabbar,
'special-area-wrapper': SpecialAreaWrapper, 'special-area-wrapper': SpecialAreaWrapper,
RegionSelect,
}, },
filters: { filters: {
seles(value) { seles(value) {

View File

@ -55,7 +55,7 @@
</view> </view>
<!-- 新增信息展示 --> <!-- 新增信息展示 -->
<view <!-- <view
class="extra-info-card" class="extra-info-card"
v-if=" v-if="
[MEMBER_SIGN.NORMAL_LEVEL, MEMBER_SIGN.ZERO_LEVEL].includes( [MEMBER_SIGN.NORMAL_LEVEL, MEMBER_SIGN.ZERO_LEVEL].includes(
@ -86,9 +86,9 @@
</view> </view>
</template> </template>
</view> </view>
</view> </view> -->
<!-- 市场动态 --> <!-- 市场动态 -->
<view class="my_order" v-if="marketWrapperVisible && isNormal"> <!-- <view class="my_order" v-if="marketWrapperVisible && isNormal">
<view class="my_title"> <view class="my_title">
<text class="thetitle">{{ '市场动态' }}</text> <text class="thetitle">{{ '市场动态' }}</text>
</view> </view>
@ -160,14 +160,10 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<view class="my_order"> <view class="my_order">
<view class="my_title"> <view class="my_title">
<text class="thetitle">{{ '我的订单' }}</text> <text class="thetitle">{{ '我的订单' }}</text>
<!-- <view class="findallorder" @click="goTo('/pages/mine/order/index')">
<text>{{ '全部订单' }}</text>
<u-icon name="arrow-right" color="#999999" size="16rpx"></u-icon>
</view> -->
</view> </view>
<view class="order_flex thepadding" style="justify-content: center"> <view class="order_flex thepadding" style="justify-content: center">
<view <view
@ -338,11 +334,11 @@
</u-button> </u-button>
</view> </view>
</u-popup> </u-popup>
<RegionSelect <!-- <RegionSelect
v-if="isNormal" v-if="isNormal"
ref="regionSelect" ref="regionSelect"
@success="getRegionSelect" @success="getRegionSelect"
/> /> -->
<!-- <talentList :drShow="drShow" @closeShow="closeShow"></talentList> --> <!-- <talentList :drShow="drShow" @closeShow="closeShow"></talentList> -->
</view> </view>
</template> </template>
@ -480,9 +476,9 @@ export default {
return return
} }
this.isNormal = isNormal this.isNormal = isNormal
this.getRegionSelect() // this.getRegionSelect()
this.getMemberBoxCount() // this.getMemberBoxCount()
this.getMarketDynamicBoxCount() // this.getMarketDynamicBoxCount()
// this.getUserAwardss() // this.getUserAwardss()
}) })
}, },

View File

@ -11,164 +11,247 @@
<template> <template>
<view class="tit">{{ '待支付金额' }}</view> <view class="tit">{{ '待支付金额' }}</view>
<view class="tit1"> <view class="tit1">
{{ paramsPost.orderAmount | numberToCurrency }} {{ paramsPost.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 v-if="false" class="kuang"> <view class="kuang">
<u-collapse <view>
:value="activeNames" <view slot="title" class="pf">
ref="collapse" <img src="@/static/images/under_pay.png" alt="" />
@open="change" <view>{{ '在线支付' }}</view>
@close="close" </view>
accordion <view
:border="false" class="flex_ac"
> v-show="payList[PAY_AUTH[PAY_TYPE.BAO_FU_WECHAT]]"
<u-collapse-item name="1"> >
<view slot="title" class="pf"> <view class="flex_ac_i">
<img src="@/static/images/under_pay.png" alt="" /> <img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '在线支付' }}</view> <view>{{ '宝付微信支付' }}</view>
</view> </view>
<view class="flex_ac" v-show="this.payList.pay11"> <u-radio-group v-model="whatPay">
<view class="flex_ac_i"> <u-radio
<img src="@/static/images/pay_i2.png" alt="" /> activeColor="#005BAC"
<view>{{ '宝付微信支付' }}</view> size="18"
</view> label=""
<u-radio-group v-model="whatPay"> :name="PAY_TYPE.BAO_FU_WECHAT"
<u-radio activeColor="red" size="14" label="" :name="11"> >
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view>
<view
class="flex_ac"
v-show="payList[PAY_AUTH[PAY_TYPE.BAO_FU_WECHAT_SCAN]]"
>
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '宝付微信扫码' }}</view>
</view> </view>
<view class="flex_ac" v-show="this.payList.pay12"> <u-radio-group v-model="whatPay">
<view class="flex_ac_i"> <u-radio
<img src="@/static/images/pay_i2.png" alt="" /> activeColor="#005BAC"
<view>{{ '宝付微信扫码' }}</view> size="18"
</view> label=""
<u-radio-group v-model="whatPay"> :name="PAY_TYPE.BAO_FU_WECHAT_SCAN"
<u-radio activeColor="red" size="14" label="" :name="12"> >
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view>
<view
class="flex_ac"
v-show="payList[PAY_AUTH[PAY_TYPE.HUI_FU_WECHAT]]"
>
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '汇付微信支付' }}</view>
</view> </view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="#005BAC"
size="18"
label=""
:name="PAY_TYPE.HUI_FU_WECHAT"
>
</u-radio>
</u-radio-group>
</view>
<!-- 微信支付 -->
<view class="flex_ac" v-show="payList[PAY_AUTH[PAY_TYPE.WECHAT_PAY]]">
<view class="flex_ac_i">
<img src="@/static/images/pay_i2.png" alt="" />
<view>{{ '微信支付' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="#005BAC"
size="18"
label=""
:name="PAY_TYPE.WECHAT_PAY"
>
</u-radio>
</u-radio-group>
</view>
<!-- 支付宝支付 -->
<view class="flex_ac" v-show="payList[PAY_AUTH[PAY_TYPE.ALI_PAY]]">
<view class="flex_ac_i">
<img src="@/static/images/pay_i3.png" alt="" />
<view>{{ '支付宝支付' }}</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="#005BAC"
size="18"
label=""
:name="PAY_TYPE.ALI_PAY"
>
</u-radio>
</u-radio-group>
</view>
<view
class="flex_ac1"
v-show="payList[PAY_AUTH[PAY_TYPE.HUI_FU_BANK_CARD]]"
>
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '汇付银行卡' }} </view>
</view>
<view class="pad">
<view
v-for="(item, index) in hfList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('hf' + index)"
>
<view class="flax_i">
<view>{{ item.bankName }} ({{ item.bankNo }})</view>
<view class="fixBind" @click="fixBind(item)">解绑</view>
</view>
<view class="flex_ac" v-show="this.payList.pay13"> <u-radio-group v-model="whatPay">
<view class="flex_ac_i"> <u-radio
<img src="@/static/images/pay_i2.png" alt="" /> activeColor="#005BAC"
<view>{{ '汇付微信支付' }}</view> size="18"
label=""
:name="PAY_TYPE.HUI_FU_BANK_CARD + index"
>
</u-radio>
</u-radio-group>
</view> </view>
<u-radio-group v-model="whatPay"> <view class="pay_flax flax_i" @click="bindBank('hf')">
<u-radio activeColor="red" size="14" label="" :name="13"> <img class="img1" src="@/static/images/addto.png" alt="" />
</u-radio> <view>{{ '绑定银行卡' }}</view>
</u-radio-group>
</view>
<view class="flex_ac1" v-show="this.payList.pay15">
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '汇付银行卡' }} ({{ '暂不支持信用卡' }})</view>
</view>
<view class="pad">
<view
v-for="(item, index) in hfList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('hf' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="red"
size="14"
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>{{ '绑定银行卡' }}</view>
</view>
</view> </view>
</view> </view>
<view class="flex_ac" v-show="this.payList.pay32"> </view>
<view class="flex_ac_i"> <view
<img src="@/static/images/pay_i2.png" alt="" /> class="flex_ac"
<view>通联微信支付</view> v-show="payList[PAY_AUTH[PAY_TYPE.TONG_LIAN_WECHAT]]"
</view> >
<u-radio-group v-model="whatPay"> <view class="flex_ac_i">
<u-radio activeColor="red" size="14" label="" :name="32"> <img src="@/static/images/pay_i2.png" alt="" />
</u-radio> <view>通联微信支付</view>
</u-radio-group>
</view> </view>
<view class="flex_ac1" v-show="this.payList.pay33"> <u-radio-group v-model="whatPay">
<view class="flex_ac_i"> <u-radio
<img src="@/static/images/jdBank.jpg" alt="" /> activeColor="#005BAC"
<view>{{ '通联银行卡' }} ({{ '暂不支持信用卡' }})</view> size="18"
label=""
:name="PAY_TYPE.TONG_LIAN_WECHAT"
>
</u-radio>
</u-radio-group>
</view>
<view
class="flex_ac1"
v-show="payList[PAY_AUTH[PAY_TYPE.JING_DONG_BANK_CARD]]"
>
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '京东银行卡' }}</view>
</view>
<view class="pad">
<view
v-for="(item, index) in jdList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('jd' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="#005BAC"
size="18"
label=""
:name="PAY_TYPE.JING_DONG_BANK_CARD + index"
>
</u-radio>
</u-radio-group>
</view> </view>
<view class="pad"> <view class="pay_flax flax_i" @click="bindBank('jd')">
<view <img class="img1" src="@/static/images/addto.png" alt="" />
v-for="(item, index) in tlList" <view>{{ '绑定银行卡' }}</view>
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('tl' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="red"
size="14"
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>{{ '绑定银行卡' }}</view>
</view>
</view> </view>
</view> </view>
<view class="flex_ac1" v-show="this.payList.pay4"> </view>
<view class="flex_ac_i"> <view
<img src="@/static/images/jdBank.jpg" alt="" /> class="flex_ac"
<view>{{ '京东银行卡' }} ({{ '暂不支持信用卡' }})</view> v-show="payList[PAY_AUTH[PAY_TYPE.JING_DONG_H5]]"
>
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg" alt="" />
<view>京东收银台</view>
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="#005BAC"
size="18"
label=""
:name="PAY_TYPE.JING_DONG_H5"
>
</u-radio>
</u-radio-group>
</view>
<view
class="flex_ac1"
v-show="payList[PAY_AUTH[PAY_TYPE.TONG_LIAN_BANK_CARD]]"
>
<view class="flex_ac_i">
<img src="@/static/images/jdBank.jpg" alt="" />
<view>{{ '通联银行卡' }}</view>
</view>
<view class="pad">
<view
v-for="(item, index) in tlList"
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('tl' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="#005BAC"
size="18"
label=""
:name="PAY_TYPE.TONG_LIAN_BANK_CARD + index"
>
</u-radio>
</u-radio-group>
</view> </view>
<view class="pad"> <view class="pay_flax flax_i" @click="bindBank('tl')">
<view <img class="img1" src="@/static/images/addto.png" alt="" />
v-for="(item, index) in jdList" <view>{{ '绑定银行卡' }}</view>
:key="index"
class="pay_flax flex_bet"
@click.prevent="selPayRadio('jd' + index)"
>
<view class="flax_i">
{{ item.bankName }} ({{ item.bankNo }})
</view>
<u-radio-group v-model="whatPay">
<u-radio
activeColor="red"
size="14"
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>{{ '绑定银行卡' }}</view>
</view>
</view> </view>
</view> </view>
</u-collapse-item> </view>
</u-collapse> </view>
</view> </view>
</view> </view>
<!-- 底部 --> <!-- 底部 -->
@ -225,7 +308,10 @@
<div ref="qrCodeUrlWx" class="qrcode"></div> <div ref="qrCodeUrlWx" class="qrcode"></div>
</view> </view>
</u-popup> </u-popup>
<hiSuccess @successClose="successClose" ref="hiSuccess"></hiSuccess> <successDialog
@successClose="successClose"
ref="successDialog"
></successDialog>
</view> </view>
</template> </template>
@ -234,15 +320,24 @@ import * as api from '@/config/pay.js'
import QRCode from 'qrcodejs2' import QRCode from 'qrcodejs2'
import { removeToken } from '@/config/auth.js' import { removeToken } from '@/config/auth.js'
import hiSuccess from '@/components/hiSuccess.vue' import successDialog from '@/components/successDialog.vue'
import * as act from '@/config/activity.js' import * as act from '@/config/activity.js'
import {
PAY_REDIRECT_URL,
PAY_TYPE,
PAY_CHANEL,
PAY_AUTH,
} from '@/util/constant.js'
var payStatus var payStatus
let getRegisterInfoTimeoutFlag = null
export default { export default {
components: { components: {
hiSuccess, successDialog,
}, },
data() { data() {
return { return {
PAY_TYPE,
PAY_AUTH,
payList: {}, payList: {},
isLoading: false, isLoading: false,
clockTime: '', clockTime: '',
@ -257,12 +352,12 @@ export default {
}, },
paramsPost: '', paramsPost: '',
isShare: false, // isShare: false, //
userInfo: '', userInfo: uni.getStorageSync('User'),
activeNames: 1, activeNames: 1,
whatPay: '', whatPay: '',
hfList: [], hfList: [],
jdList: [], jdList: [],
businessType: '', businessType: 1,
isBank: '', isBank: '',
isPw: false, isPw: false,
codeValue: '', codeValue: '',
@ -271,9 +366,7 @@ export default {
sucPay: 0, sucPay: 0,
content: '支付成功', content: '支付成功',
wxPopup: false, wxPopup: false,
luckydrawData: {},
isRecharge: false, isRecharge: false,
czJe: '',
tlList: [], tlList: [],
} }
}, },
@ -286,74 +379,22 @@ export default {
) )
this.pkCountry = uni.getStorageSync('pkCountry') this.pkCountry = uni.getStorageSync('pkCountry')
// if (this.paramsPost.isRecharge) {
// this.isRecharge = this.paramsPost.isRecharge
// this.businessType = 3
// uni.setNavigationBarTitle({
// title: ''
// });
// } else {
// uni.setNavigationBarTitle({
// title: ''
// });
// this.isRecharge = false
// if (JSON.parse(options.paramsPost).orderType == 4) {
this.orderCode = this.paramsPost.orderCode this.orderCode = this.paramsPost.orderCode
// this.luckydrawData = this.paramsPost.luckydrawData
// //
// this.businessType = 4 //
// this.specialArea = this.paramsPost.specialArea
// this.getLuckdrawDetail()
// } else {
// this.userInfo = uni.getStorageSync('User')
// if (
// this.userInfo.registerFans == 0
// ) {
// this.isShare = true
// }
// this.specialArea =
// this.paramsPost.specialArea || this.paramsPost.orderType
// this.orderCode = this.paramsPost.orderCode
// this.businessType = options.businessType
// // this.getInfo()
// //
// this.getOrderInfo()
// if (!this.isShare) {
// //
// this.getSpendInfo()
// }
// }
// }
// //
this.getPayConfig() this.getPayConfig()
this.downTime()
// clearInterval(this.clockTime)
}, },
onShow() { onShow() {
// //
// this.getBankList() // this.getBankList()
}, },
onUnload() {
clearTimeout(getRegisterInfoTimeoutFlag)
clearInterval(payStatus)
},
methods: { methods: {
//
getLuckdrawDetail() {
//
act
.getLuckdrawDetail({
pkBaseId: this.luckydrawData.pkBaseId,
payNum: this.luckydrawData.payNum,
})
.then(res => {
if (res.code == 200) {
this.orderData.orderAmount = res.data.toBePaidMoney
this.payDetail = res.data
// this.downTime()
}
})
},
closewxPopup() { closewxPopup() {
this.wxPopup = false this.wxPopup = false
this.$refs.qrCodeUrlWx.innerHTML = '' this.$refs.qrCodeUrlWx.innerHTML = ''
@ -384,10 +425,18 @@ export default {
}, },
fansOrder() { fansOrder() {
api.fansOrder(this.orderCode).then(res => { api.fansOrder(this.orderCode).then(res => {
this.isLoading = false if (res.data) {
this.isPw = false this.isLoading = false
removeToken() this.isPw = false
this.$refs.hiSuccess.showSuccess(res.data) uni.hideLoading()
removeToken()
this.$refs.successDialog.showSuccess(res.data)
} else {
getRegisterInfoTimeoutFlag = setTimeout(() => {
this.fansOrder()
}, 3000)
}
}) })
}, },
payPw() { payPw() {
@ -411,7 +460,7 @@ export default {
url(obj).then(res => { url(obj).then(res => {
if (res.code == 200) { if (res.code == 200) {
// this.isPw = false // this.isPw = false
// this.$refs.hiSuccess.showSuccess(res.data) // this.$refs.successDialog.showSuccess(res.data)
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
@ -431,66 +480,50 @@ export default {
} }
}) })
}, },
quickPay(cz) { async quickPay() {
// if (
if (typeof this.whatPay == 'number') { ![
if (this.whatPay == 12) { PAY_TYPE.HUI_FU_BANK_CARD,
this.scanPayBfWx(5) PAY_TYPE.JING_DONG_BANK_CARD,
} else if (this.whatPay == 13) { PAY_TYPE.TONG_LIAN_BANK_CARD,
this.scanPayBfWx(6) ].includes(this.whatPay.slice(0, 2))
} else if (this.whatPay == 11) { ) {
this.scanPayBfWxJump(5) if ([PAY_TYPE.JING_DONG_H5].includes(this.whatPay)) {
} else if (this.whatPay == 32) { this.redirectPay(PAY_CHANEL[this.whatPay])
this.scanPayTlWxJump(3) } else if (
[PAY_TYPE.BAO_FU_WECHAT_SCAN, PAY_TYPE.HUI_FU_WECHAT].includes(
this.whatPay
)
) {
this.scanPayBfWx(PAY_CHANEL[this.whatPay])
} else if (this.whatPay == PAY_TYPE.WECHAT_PAY) {
this.scanPayWx(PAY_CHANEL[this.whatPay])
} else if (this.whatPay == PAY_TYPE.ALI_PAY) {
this.scanPayAl(PAY_CHANEL[this.whatPay])
} }
} else { } else {
if (this.whatPay.slice(0, 2) == 'hf') { const indexed = this.whatPay.slice(2, 4)
let indexed = this.whatPay.slice(2, 4) const payTypeEnum = this.whatPay.slice(0, 2)
let params = { const bankListMap = {
businessType: 1, // [PAY_TYPE.HUI_FU_BANK_CARD]: this.hfList[indexed].bindCode,
businessCode: this.orderCode, [PAY_TYPE.JING_DONG_BANK_CARD]: this.jdList[indexed].bindCode,
payChannel: 6, // [PAY_TYPE.TONG_LIAN_BANK_CARD]: this.tlList[indexed].bindCode,
payType: 3, //
bindCode: this.hfList[indexed].bindCode,
}
api.unifiedorder(params).then(response => {
this.isBank = 'hf'
this.bindCode = this.hfList[indexed].bindCode
this.isPw = true
})
this.checkPayStatus(params)
} else if (this.whatPay.slice(0, 2) == 'jd') {
let indexed = this.whatPay.slice(2, 4)
let params = {
businessType: 1, //
businessCode: this.orderCode,
payChannel: 4, //
payType: 3, //
bindCode: this.jdList[indexed].bindCode,
}
api.unifiedorder(params).then(response => {
this.isBank = 'jd'
this.bindCode = this.jdList[indexed].bindCode
this.isPw = true
})
this.checkPayStatus(params)
} else if (this.whatPay.slice(0, 2) == 'tl') {
let indexed = this.whatPay.slice(2, 4)
let params = {
businessType: 1, //
businessCode: this.orderCode,
payChannel: 3, //
payType: 3, //
bindCode: this.tlList[indexed].bindCode,
}
api.unifiedorder(params).then(response => {
this.isBank = 'tl'
this.bindCode = this.tlList[indexed].bindCode
this.isPw = true
})
this.checkPayStatus(params)
} }
this.bindCode = bankListMap[payTypeEnum]
const params = {
businessType: this.businessType, //
payChannel: PAY_CHANEL[payTypeEnum],
payType: 3, //
bindCode: bankListMap[payTypeEnum],
}
Object.assign(params, {
businessCode: this.orderCode,
})
api.unifiedorder(params).then(response => {
this.isBank = this.whatPay.slice(0, 2)
this.isPw = true
this.checkPayStatus(params)
})
} }
}, },
// //
@ -527,6 +560,47 @@ export default {
}) })
this.checkPayStatus(params) this.checkPayStatus(params)
}, },
redirectPay(payChannel) {
this.getPayAuthToken(payChannel).then(url => {
if (navigator.userAgent.includes('MicroMessenger')) {
window.location.href = url
} else {
window.open(url)
}
})
},
getPayAuthToken(payChannel) {
return new Promise((resolve, reject) => {
const extParam = {
isRecharge: false,
orderCode: this.orderCode,
specialArea: 1,
isSharePay: true,
}
// extParamJSONbase64
const extParamBase64 = btoa(JSON.stringify(extParam))
const params = {
payChannel: payChannel,
payType: 2,
appletFlag: 0,
businessType: this.businessType,
businessCode: this.orderCode,
extParam: extParamBase64,
}
api.unifiedorder(params).then(res => {
if (res.code === 200) {
resolve(res.data)
this.checkPayStatus(params)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
})
reject(res.msg)
}
})
})
},
scanPayBfWx(val) { scanPayBfWx(val) {
let params = { let params = {
businessType: 1, businessType: 1,
@ -566,10 +640,18 @@ export default {
}, },
getPayConfig() { getPayConfig() {
api.payConfig().then(res => { api.payConfig().then(res => {
this.payList = res.data if (res.code == 200) {
this.$nextTick(() => { this.payList = res.data || {}
this.$refs.collapse.init() const firstPayAuth =
}) Object.keys(this.payList).find(key => this.payList[key] === true) ||
''
const paykey = Object.keys(PAY_AUTH).find(
key => PAY_AUTH[key] === firstPayAuth
)
this.whatPay = paykey
}
console.log(this.payList)
this.$forceUpdate() this.$forceUpdate()
}) })
}, },
@ -588,18 +670,7 @@ export default {
}) })
this.$forceUpdate() this.$forceUpdate()
}, },
getOrderInfo() {
api
.orderInfo({
specialArea: this.specialArea,
orderCode: this.orderCode,
pkSettleCountry: this.pkCountry,
})
.then(res => {
this.orderData = res.data
this.downTime()
})
},
downTime() { downTime() {
let that = this let that = this
this.clockTime = setInterval(() => { this.clockTime = setInterval(() => {
@ -639,7 +710,12 @@ export default {
clearInterval(payStatus) clearInterval(payStatus)
this.wxPopup = false this.wxPopup = false
// this.showSucce = true // this.showSucce = true
this.fansOrder() uni.showLoading({
title: '正在获取注册信息,请不要关闭当前页面',
})
setTimeout(() => {
this.fansOrder()
}, 2000)
} else { } else {
api.payStatus(data).then(res => { api.payStatus(data).then(res => {
that.sucPay = res.data that.sucPay = res.data
@ -753,10 +829,9 @@ export default {
.flex_ac { .flex_ac {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding: 18rpx 0; padding: 18rpx 20rpx;
} }
.flex_ac1 { .flex_ac1 {
@ -766,7 +841,7 @@ export default {
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding: 18rpx 0; // padding: 18rpx 0;
} }
.flex_ac_i { .flex_ac_i {
@ -786,10 +861,6 @@ export default {
} }
} }
::v-deep .u-collapse-item__content__text {
padding: 0px 15px;
}
.pad { .pad {
width: 100%; width: 100%;
display: flex; display: flex;

View File

@ -44,7 +44,7 @@
<view class="action-section"> <view class="action-section">
<view class="button-group"> <view class="button-group">
<button <button
v-if="!isRecharge" v-if="!isRecharge && !isSharePay"
class="btn btn-secondary" class="btn btn-secondary"
@click="goToOrderList" @click="goToOrderList"
> >
@ -61,8 +61,10 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { payStatus, registerInfo } from '@/config/pay.js' import { payStatus, registerInfo } from '@/config/pay.js'
import { registeredAutoLogin } from '@/config/login.js'
import successDialog from '@/components/successDialog.vue' import successDialog from '@/components/successDialog.vue'
import { setToken } from '@/config/auth.js'
import store from '@/store'
let paySetTimeoutFlag = null let paySetTimeoutFlag = null
let getRegisterInfoTimeoutFlag = null let getRegisterInfoTimeoutFlag = null
export default { export default {
@ -76,6 +78,8 @@ export default {
specialArea: null, specialArea: null,
isRecharge: undefined, isRecharge: undefined,
payStatus: 0, payStatus: 0,
isSharePay: false,
memberData: {},
} }
}, },
computed: { computed: {
@ -93,10 +97,10 @@ export default {
onLoad(options) { onLoad(options) {
// //
const extParam = JSON.parse(atob(options.extParam || '{}')) const extParam = JSON.parse(atob(options.extParam || '{}'))
console.log(extParam, '..extParam')
this.specialArea = extParam.specialArea this.specialArea = extParam.specialArea
this.isRecharge = extParam.isRecharge this.isRecharge = extParam.isRecharge
this.orderCode = extParam.orderCode || '' this.orderCode = extParam.orderCode || ''
this.isSharePay = extParam.isSharePay
if (this.orderCode) { if (this.orderCode) {
setTimeout(() => { setTimeout(() => {
this.pollingPayStatus(this.orderCode) this.pollingPayStatus(this.orderCode)
@ -116,6 +120,7 @@ export default {
registerInfo(this.orderCode).then(res => { registerInfo(this.orderCode).then(res => {
if (res.data) { if (res.data) {
uni.hideLoading() uni.hideLoading()
this.memberData = res.data
this.$refs.successDialog.showSuccess(res.data) this.$refs.successDialog.showSuccess(res.data)
} else { } else {
getRegisterInfoTimeoutFlag = setTimeout(() => { getRegisterInfoTimeoutFlag = setTimeout(() => {
@ -152,7 +157,26 @@ export default {
url: '/pages/mine/order/index', url: '/pages/mine/order/index',
}) })
}, },
successClose() { // token
getTempToken({ memberCode, loginPassword, uuid }) {
registeredAutoLogin({
username: memberCode,
password: loginPassword,
uuid,
}).then(res => {
uni.setStorageSync('username', memberCode)
setToken(res.data.access_token)
uni.removeStorageSync('regiest-login')
store.dispatch('GetInfo').then(res => {
uni.switchTab({ url: '/pages/index/index' })
})
})
},
successClose({ memberCode, loginPassword, uuid }) {
if (this.isSharePay) {
this.getTempToken({ memberCode, loginPassword, uuid })
return
}
uni.redirectTo({ uni.redirectTo({
url: '/pages/mine/order/index', url: '/pages/mine/order/index',
}) })
@ -160,6 +184,10 @@ export default {
// //
goToHome() { goToHome() {
if (this.isSharePay) {
this.getTempToken(this.memberData)
return
}
uni.switchTab({ uni.switchTab({
url: '/pages/index/index', url: '/pages/index/index',
}) })

View File

@ -1,37 +1,51 @@
<template> <template>
<view class="contain"> <view class="contain">
<view class="zhan"></view> <!-- 头部营销区域 -->
<view class="goodList"> <view class="header-section">
<view v-for="item in goodList" <view class="hero-content">
:key="item.waresCode" <view class="hero-title">
class="goodList_i" <text class="hero-main">新人专享特惠</text>
> <text class="hero-sub">精选好物·品质优选</text>
<img :src="item.cover1"
class="cover"
alt="">
<view class="goodList_ir">
<view class="tit1">
{{ item.waresName }}
</view>
<view class="sales">
销量:{{ item.sales |seles}}
</view>
<view class="goodList_ib">
<view>
{{ item.waresPrice | numberToCurrency}}
</view>
<!-- <img @click.stop="addCar(item)"
src="@/static/images/cart.png"
alt=""> -->
</view>
<view class="toBuy" @click.stop="goBuy(item)">立即购买</view>
</view>
</view>
<view class="zhan2"></view>
</view> </view>
<!-- <view class="promotion-banner">
<text class="promo-text">限时优惠·新人福利</text>
</view> -->
</view>
</view>
<view class="goods-container">
<scroll-view
class="goodList"
scroll-y="true"
enhanced
:show-scrollbar="false"
>
<view v-for="item in goodList" :key="item.waresCode" class="goodList_i">
<img :src="item.cover1" class="cover" alt="" />
<view class="goodList_ir">
<view class="tit1">
{{ item.waresName }}
</view>
<view class="goodList_ib">
<view class="price-container">
<!-- <text class="currency"></text> -->
<text class="price">{{
item.waresPrice | numberToCurrency
}}</text>
</view>
<!-- <img @click.stop="addCar(item)"
src="@/static/images/cart.png"
alt=""> -->
</view>
<view class="toBuy" @click.stop="goBuy(item)">立即购买</view>
</view>
</view>
<view class="list-bottom">
<text class="bottom-text"> 已显示全部商品 </text>
</view>
</scroll-view>
</view>
</view> </view>
</template> </template>
@ -40,138 +54,469 @@ import * as api from '@/config/login.js'
import { setToken } from '@/config/auth.js' import { setToken } from '@/config/auth.js'
export default { export default {
data(){ data() {
return{ return {
pkParent:'', pkParent: '',
goodList:[], goodList: [],
placeParent:'' placeParent: '',
} }
}, },
filters:{ filters: {
seles(value){ seles(value) {
if (value > 999) {
if(value>999){ return 999 + '+'
return 999 + '+' } else {
}else{ return value
return value }
}
}
}, },
},
onLoad(options) { onLoad(options) {
this.pkParent = options.pkParent this.pkParent = options.pkParent
this.getToken() this.getToken()
}, },
methods:{ methods: {
getToken(){ getToken() {
api.autoLogin({ api
pkParent:this.pkParent .autoLogin({
}).then(res=>{ pkParent: this.pkParent,
setToken(res.data.access_token, res.data.expires_in) })
this.getList() .then(res => {
this.getCode() setToken(res.data.access_token, res.data.expires_in)
uni.setStorageSync('regiest-login', '1')
this.getList()
this.getCode()
})
},
getCode() {
api.fansConvertCode(this.pkParent).then(res => {
this.placeParent = res.data
uni.setStorageSync('placeParent', this.placeParent)
}) })
}, },
getCode(){ getList() {
api.fansConvertCode( api
this.pkParent .queryWares({
).then(res=>{ shareMemberCode: this.pkParent,
this.placeParent = res.msg })
uni.setStorageSync('placeParent', this.placeParent) .then(res => {
this.goodList = res.data
})
},
goBuy(item) {
const params = {
...item,
pkParent: this.pkParent,
}
uni.navigateTo({
url: '/pages/shareArea/hiOrder?allData=' + JSON.stringify(item),
}) })
}, },
getList(){ },
api.queryWares({
shareMemberCode:this.pkParent
}).then(res=>{
this.goodList = res.data
})
},
goBuy(item){
uni.navigateTo({ url: '/pages/shareArea/hiOrder?allData=' + JSON.stringify(item)})
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.contain{ .contain {
background: #fff; background: linear-gradient(
height: 100vh; 135deg,
background: url('~@/static/images/hf1.jpg') no-repeat; #005bac 0%,
background-size: cover; #0066cc 50%,
padding: 0 20px; #f5f7fa 50%,
#e8f4f8 100%
);
min-height: 100vh;
display: flex;
flex-direction: column;
} }
.zhan{
height: 36%; //
.header-section {
background: linear-gradient(135deg, #005bac 0%, #0066cc 100%);
padding: 50rpx 32rpx 60rpx;
animation: slideDown 0.6s ease-out;
.hero-content {
text-align: center;
.hero-title {
margin-bottom: 24rpx;
.hero-main {
display: block;
color: #fff;
font-size: 40rpx;
font-weight: 700;
margin-bottom: 8rpx;
animation: fadeInUp 0.8s ease-out 0.2s both;
}
.hero-sub {
display: block;
color: rgba(255, 255, 255, 0.9);
font-size: 26rpx;
font-weight: 400;
animation: fadeInUp 0.8s ease-out 0.4s both;
}
}
.promotion-banner {
background: linear-gradient(
135deg,
#ff6b35 0%,
#f7931e 50%,
#ffd700 100%
);
border-radius: 30rpx;
padding: 18rpx 36rpx;
box-shadow: 0 8rpx 24rpx rgba(255, 107, 53, 0.4);
animation:
fadeInUp 0.8s ease-out 0.6s both,
promoBreathe 3s ease-in-out infinite 1s;
position: relative;
overflow: hidden;
border: 2rpx solid rgba(255, 255, 255, 0.3);
&::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.4),
transparent
);
animation: shimmer 2.5s ease-in-out infinite;
}
.promo-text {
color: #fff;
font-size: 28rpx;
font-weight: 700;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
position: relative;
z-index: 2;
}
}
}
} }
//
.goods-container {
flex: 1;
background: #f8fafc;
border-radius: 40rpx 40rpx 0 0;
margin-top: -40rpx;
position: relative;
z-index: 3;
padding: 32rpx 24rpx 0;
animation: fadeIn 0.8s ease-out 0.3s both;
.section-title {
text-align: center;
margin-bottom: 24rpx;
padding: 20rpx 0;
.title-text {
display: block;
color: #1e293b;
font-size: 32rpx;
font-weight: 600;
margin-bottom: 8rpx;
}
.title-desc {
display: block;
color: #64748b;
font-size: 24rpx;
}
}
}
//
.goodList { .goodList {
padding: 40rpx; height: calc(100vh - 400rpx);
height: 55vh; padding: 0 8rpx;
overflow-y: auto;
background: url('~@/static/images/hf2.png') no-repeat;
background-size: cover;
.goodList_i { .goodList_i {
display: flex; display: flex;
border-bottom: 1px solid #eee; background: #ffffff;
padding: 60rpx 60rpx 30rpx 60rpx; border-radius: 20rpx;
// background: url('~@/static/images/hf3.png') no-repeat; margin-bottom: 24rpx;
// background-size: cover; padding: 24rpx;
border-radius: 20rpx; box-shadow: 0 4rpx 16rpx rgba(0, 91, 172, 0.06);
background-image: linear-gradient(to bottom, #fefbf8, #fadf97); border: 1rpx solid rgba(0, 91, 172, 0.1);
margin-bottom: 20rpx; transition: all 0.3s ease;
.goodList_ir { animation: slideInUp 0.6s ease-out both;
margin-left: 40rpx; opacity: 0;
&:hover {
transform: translateY(-4rpx);
box-shadow: 0 12rpx 32rpx rgba(0, 91, 172, 0.15);
}
.cover {
width: 240rpx;
height: 240rpx;
background: #f8fafc;
border: 1rpx solid #e2e8f0;
border-radius: 16rpx;
flex-shrink: 0;
overflow: hidden;
}
.goodList_ir {
margin-left: 24rpx;
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
font-size: 24rpx;
font-family: Microsoft YaHei; .tit1 {
font-weight: 400; color: #1e293b;
color: #333333; font-size: 32rpx;
.goodList_ib {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24px;
font-family: Source Han Sans CN;
font-weight: 600; font-weight: 600;
color: #a36b28; line-height: 1.4;
margin-bottom: 16rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.sales {
color: #64748b;
font-size: 24rpx;
font-weight: 400;
margin-bottom: 16rpx;
}
.goodList_ib {
margin-bottom: 24rpx;
.price-container {
display: flex;
align-items: baseline;
.currency {
color: #ff6b35;
font-size: 24rpx;
font-weight: 600;
margin-right: 4rpx;
}
.price {
color: #ff6b35;
font-size: 36rpx;
font-weight: 700;
}
}
img { img {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
} }
.toBuy {
background: #005bac;
color: #ffffff;
padding: 20rpx 0;
text-align: center;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 600;
border: none;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
&::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.2),
transparent
);
transition: left 0.5s;
}
&:hover {
background: #0066cc;
transform: translateY(-2rpx);
box-shadow: 0 6rpx 16rpx rgba(0, 91, 172, 0.3);
&::before {
left: 100%;
}
}
&:active {
transform: scale(0.98);
}
}
} }
} }
.cover {
width: 200rpx; .list-bottom {
height: 200rpx;
background: #ffffff;
border: 1px solid #eeeeee;
border-radius: 10rpx;
margin-bottom: 40px;
}
.toBuy{
color: #fff;
background: #005BAC;
padding: 10rpx 0;
text-align: center; text-align: center;
border-radius: 10rpx; padding: 40rpx 0 60rpx;
font-size: 20px;
.bottom-text {
color: #64748b;
font-size: 24rpx;
}
} }
} }
.tit1{
color: #93561f; //
font-size: 16px; @keyframes slideDown {
font-weight: 700; from {
opacity: 0;
transform: translateY(-50rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
} }
.sales{
color: #923f32; @keyframes fadeIn {
font-size: 10px; from {
font-weight: 700; opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(40rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.02);
}
}
@keyframes promoBreathe {
0%,
100% {
transform: scale(1);
box-shadow: 0 8rpx 24rpx rgba(255, 107, 53, 0.4);
}
50% {
transform: scale(1.05);
box-shadow: 0 12rpx 32rpx rgba(255, 107, 53, 0.6);
}
}
@keyframes shimmer {
0% {
left: -100%;
}
50% {
left: -100%;
}
100% {
left: 100%;
}
}
//
.goodList_i:nth-child(1) {
animation-delay: 0.1s;
}
.goodList_i:nth-child(2) {
animation-delay: 0.2s;
}
.goodList_i:nth-child(3) {
animation-delay: 0.3s;
}
.goodList_i:nth-child(4) {
animation-delay: 0.4s;
}
.goodList_i:nth-child(5) {
animation-delay: 0.5s;
}
.goodList_i:nth-child(n + 6) {
animation-delay: 0.6s;
}
//
@media (max-width: 750rpx) {
.header-section {
padding: 40rpx 24rpx 50rpx;
.hero-content {
.hero-title .hero-main {
font-size: 36rpx;
}
}
}
.goodList {
.goodList_i {
padding: 20rpx;
.cover {
width: 200rpx;
height: 200rpx;
}
.goodList_ir {
margin-left: 20rpx;
.tit1 {
font-size: 28rpx;
}
.goodList_ib {
.price-container {
.price {
font-size: 32rpx;
}
}
}
.toBuy {
padding: 18rpx 0;
font-size: 26rpx;
}
}
}
}
} }
</style> </style>

View File

@ -1,9 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2022-11-21 15:11:22
-->
<template> <template>
<view class="content"> <view class="content">
<!-- <view class="index_header"> <!-- <view class="index_header">
@ -14,67 +8,50 @@
<view class="subTxt"> <view class="subTxt">
<view class="subTxt1">{{ '会员信息' }}</view> <view class="subTxt1">{{ '会员信息' }}</view>
</view> </view>
<u-form <u-form :model="form" labelWidth="75" :rules="rules" ref="uForm">
:model="form"
labelAlign="right"
labelWidth="75"
:rules="rules"
ref="uForm"
>
<view class="kuang"> <view class="kuang">
<u-form-item :label="'会员姓名'" prop="memberName"> <u-form-item
:label="'会员姓名'"
prop="memberName"
borderBottom
required
>
<u-input <u-input
:placeholder="'请输入会员姓名'" :placeholder="'请输入会员姓名'"
v-model.trim="form.memberName" v-model.trim="form.memberName"
border="none"
/> />
</u-form-item> </u-form-item>
<u-form-item :label="'联系方式'" prop="phone"> <u-form-item :label="'联系方式'" prop="phone" borderBottom required>
<u-input <u-input
:placeholder="'请输入联系方式'" :placeholder="'请输入联系方式'"
type="number" type="number"
v-model.trim="form.phone" v-model.trim="form.phone"
:maxlength="user.pkSettleCountry == 1 ? 11 : 20" :maxlength="user.pkSettleCountry == 1 ? 11 : 20"
border="none"
/> />
</u-form-item> </u-form-item>
<u-form-item :label="'自然国家'" @tap="changeCountry(0)"> <!-- <u-form-item
<view class="disFlex justBwn ge"> v-if="[80, 90].includes(gradeValue) && provinceList.length"
<view class="disFlex"> @click="regionSelectHandle"
<img class="countImg" :src="form.pkCountryImg" alt="" /> required
<view>{{ form.pkCountryLabel }}</view> label="会员区域"
borderBottom
prop="regionProvince"
>
<view class="disFlex justBwn">
<view v-if="regionAddress.length">
{{ regionAddress.map(item => item.name).join('-') }}
</view> </view>
<u-icon name="arrow-down"></u-icon> <view
v-else
class="uni-input-placeholder input-placeholder"
style="position: relative !important"
>请选择区域</view
>
<u-icon name="arrow-right"></u-icon>
</view> </view>
</u-form-item> </u-form-item> -->
<u-form-item :label="'结算国家'">
<view class="disFlex justBwn ge hui">
<view class="disFlex">
<img class="countImg" :src="form.pkSettleCountryImg" alt="" />
<view>{{ form.pkSettleCountryLabel }}</view>
</view>
<u-icon name="arrow-down"></u-icon>
</view>
</u-form-item>
<u-form-item :label="'运输方式'">
<view class="pickerHui">
<u-input
v-model="form.transTypeVal"
disabled
border="none"
></u-input>
<u-icon name="arrow-down"></u-icon>
</view>
</u-form-item>
<u-form-item :label="'发货方式'">
<view class="pickerHui">
<u-input
v-model="form.deliveryName"
disabled
:placeholder="'请选择发货方式'"
border="none"
></u-input>
<u-icon name="arrow-down"></u-icon>
</view>
</u-form-item>
</view> </view>
<view class="subTxt"> <view class="subTxt">
<view class="subTxt1">收货人信息</view> <view class="subTxt1">收货人信息</view>
@ -82,23 +59,35 @@
<view class="kuang"> <view class="kuang">
<view class="disFlex tit_t"> <view class="disFlex tit_t">
<view></view> <view></view>
<!-- <view class="lan" @click="addAdress">新增收货人地址</view> -->
</view> </view>
<u-form-item :label="'收货人'" prop="recName"> <u-form-item :label="'收货人'" prop="recName" borderBottom required>
<u-input <u-input
v-model.trim="form.recName" v-model.trim="form.recName"
:placeholder="'请输入收货人'" :placeholder="'请输入收货人'"
border="none"
/> />
</u-form-item> </u-form-item>
<u-form-item :label="'收货电话'" prop="recPhone"> <u-form-item
:label="'收货电话'"
prop="recPhone"
borderBottom
required
>
<u-input <u-input
v-model.trim="form.recPhone" v-model.trim="form.recPhone"
type="number" type="number"
maxlength="20" maxlength="20"
:placeholder="'请输入收货电话'" :placeholder="'请输入收货电话'"
border="none"
/> />
</u-form-item> </u-form-item>
<u-form-item :label="'收货地址'" prop="diqu" @click="getDiqu"> <u-form-item
:label="'收货地址'"
prop="diqu"
@click="getDiqu"
required
borderBottom
>
<view class="picker"> <view class="picker">
<u-input <u-input
v-model.trim="form.diqu" v-model.trim="form.diqu"
@ -108,17 +97,22 @@
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item :label="'详细地址'" prop="recAddress"> <u-form-item
required
:label="'详细地址'"
prop="recAddress"
borderBottom
>
<u--textarea <u--textarea
v-model.trim="form.recAddress" v-model.trim="form.recAddress"
maxlength="200" maxlength="200"
:placeholder="'请输入详细地址'" :placeholder="'请输入详细地址'"
></u--textarea> ></u--textarea>
</u-form-item> </u-form-item>
<u-form-item :label="'邮费'"> <u-form-item :label="'邮费'" borderBottom>
<u-input disabled v-model="form.postage" /> <u-input disabled v-model="form.postage" />
</u-form-item> </u-form-item>
<u-form-item :label="'备注'"> <u-form-item :label="'备注'" borderBottom>
<u--textarea <u--textarea
v-model="form.remark" v-model="form.remark"
:placeholder="'请输入备注'" :placeholder="'请输入备注'"
@ -126,36 +120,6 @@
</u-form-item> </u-form-item>
</view> </view>
</u-form> </u-form>
<!-- <view class="kuang">
<view class="kuang_t">
<view class="kuang_tl">
<view class="sTit">{{'商品主图'}}</view>
<img :src="allData.cover1"
alt="">
<view class="sTit">{{'商品名称'}}</view>
<view class="cTit">{{ allData.waresName }}</view>
</view>
<view class="kuang_tr">
<view class="sTit">{{'产品'}}</view>
<view v-for="item,index in allData.specsSkuParamsList"
:key="index">
<view class="cTit">
{{ item.productName }}{{ item.specsName }}*{{ item.quantity }}
</view>
</view>
</view>
</view>
<view class="kuang_t">
<view class="kuang_tl">
<view class="sTit">{{'商品价格'}}()</view>
<view class="cTit">{{ allData.waresPrice | numberToCurrency }}</view>
</view>
<view class="kuang_tr">
<view class="sTit">{{'商品数量'}}</view>
<view class="cTit">{{ allData.quantity }}</view>
</view>
</view>
</view> -->
<view class="subTxt"> <view class="subTxt">
<view class="subTxt1">商品信息</view> <view class="subTxt1">商品信息</view>
</view> </view>
@ -172,7 +136,7 @@
</view> </view>
<view class="goodList_ib"> <view class="goodList_ib">
<view class="tit2"> <view class="tit2">
{{ allData.waresPrice | numberToCurrency }} {{ allData.waresPrice | numberToCurrency }}
</view> </view>
<!-- <view class="tit3">业绩: {{ item.achieve | numberToCurrency | isLocal}}</view> --> <!-- <view class="tit3">业绩: {{ item.achieve | numberToCurrency | isLocal}}</view> -->
</view> </view>
@ -205,19 +169,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="kuang disFlex">
<u-checkbox-group
v-model="agreementShow"
shape="circle"
activeColor="#005BAC"
@change="checkboxChange"
>
<u-checkbox :name="1"> </u-checkbox>
</u-checkbox-group>
<view class="tit3">{{ '请阅读并同意' }}</view>
<view class="tit2" @click="toAgree"> {{ '购买协议' }}</view>
</view>
</view> </view>
<!-- 占空 --> <!-- 占空 -->
<view style="height: 150rpx"></view> <view style="height: 150rpx"></view>
@ -226,8 +177,8 @@
<view class="footer"> <view class="footer">
<view class="footer_l"> <view class="footer_l">
<view class="disFlex"> <view class="disFlex">
<view class="h1">{{ '总价' }}</view> <view class="h1">总价</view>
<view class="r1">¥{{ allData.waresPrice | numberToCurrency }}</view> <view class="r1">{{ allData.waresPrice | numberToCurrency }}</view>
</view> </view>
<!-- <view class="disFlex"> <!-- <view class="disFlex">
<view class="h1">{{'业绩'}}</view> <view class="h1">{{'业绩'}}</view>
@ -256,7 +207,6 @@
:columns="countryList" :columns="countryList"
keyName="label" keyName="label"
></u-picker> ></u-picker>
<agreement ref="agreement"></agreement>
<v-address <v-address
ref="address" ref="address"
:defaultCode="defaultCode" :defaultCode="defaultCode"
@ -270,14 +220,13 @@ import address from '@/components/address.vue'
import * as api from '@/config/goods' import * as api from '@/config/goods'
import * as regiest from '@/config/regiest' import * as regiest from '@/config/regiest'
import agreement from '@/components/agreement.vue'
export default { export default {
components: { components: {
'v-address': address, 'v-address': address,
agreement,
}, },
data() { data() {
return { return {
regionAddress: [],
specialArea: 7, specialArea: 7,
isCountry: false, isCountry: false,
defaultCode: [], defaultCode: [],
@ -293,6 +242,12 @@ export default {
pkCountry: '', pkCountry: '',
pkCountryLabel: '', pkCountryLabel: '',
pkCountryImg: '', pkCountryImg: '',
pkGradeVal: '',
memberName: '',
phone: '',
recName: '',
recPhone: '',
recAddress: '',
}, },
deliList: [], deliList: [],
diqu: '', diqu: '',
@ -356,6 +311,7 @@ export default {
countryList: [], countryList: [],
placeParent: '', placeParent: '',
user: '', user: '',
gradeValue: '',
} }
}, },
onLoad(options) { onLoad(options) {
@ -378,6 +334,23 @@ export default {
}, },
onShow() {}, onShow() {},
methods: { methods: {
getRegiestLevel() {
const params = {
firstCheck: 0,
specialArea: this.specialArea,
shopList: this.shoppingArr.map(id => {
return {
shoppingId: id,
}
}),
}
},
regionSelectHandle() {
this.$refs.regionAddress.setShow(this.provinceList[0].pkId)
},
setRegionAddress(area) {
this.regionAddress = area
},
phonePass(rule, value, callback) { phonePass(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error('请输入联系电话')) callback(new Error('请输入联系电话'))
@ -386,21 +359,8 @@ export default {
if (value.length < 6 || value.length > 20) { if (value.length < 6 || value.length > 20) {
callback(new Error('请输入正确联系方式')) callback(new Error('请输入正确联系方式'))
return false return false
} else {
regiest
.validPhone({
memberName: this.form.memberName,
phone: this.form.phone,
placeParent: this.placeParent,
})
.then(res => {
if (res.code == 200) {
callback()
} else {
callback(new Error(res.msg))
}
})
} }
callback()
}, },
getCountry() { getCountry() {
regiest.countryList().then(res => { regiest.countryList().then(res => {
@ -450,10 +410,7 @@ export default {
// url: '/pages/address/index', // url: '/pages/address/index',
// }) // })
// }, // },
toAgree() {
// agreeMent
this.$refs.agreement.openDig()
},
getGenerate() { getGenerate() {
api.generate().then(res => { api.generate().then(res => {
uni.setStorageSync('mToken', res.msg) uni.setStorageSync('mToken', res.msg)
@ -461,14 +418,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
api api
.fansConfirm( .fansConfirm(
@ -492,9 +441,14 @@ export default {
pkWares: this.allData.pkId, pkWares: this.allData.pkId,
skuList: [], skuList: [],
} }
this.allData.specsSkuParamsList.forEach(item => { console.log(
'%c [ carList ]-419',
'font-size:13px; background:#b131b9; color:#f575fd;',
this.allData
)
this.allData.productGroup.forEach(item => {
carList.skuList.push({ carList.skuList.push({
pkWaresSku: item.pkWaresSpecsSku, pkWaresSku: item.pkSkuId,
quantity: item.quantity, quantity: item.quantity,
}) })
}) })
@ -547,7 +501,7 @@ export default {
} }
.kuang { .kuang {
// margin-top: 20rpx; // margin-top: 20rpx;
padding: 20rpx 40rpx; // padding: 20rpx 40rpx;
background: #fff; background: #fff;
// box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.5); // box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.5);
// border-radius: 10px 10px 10px 10px; // border-radius: 10px 10px 10px 10px;
@ -573,22 +527,16 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
border-width: 0.5px !important;
border-color: #dadbde !important;
border-style: solid;
border-radius: 4px;
padding: 6px 9px; padding: 6px 9px;
} }
.pickerHui { .pickerHui {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
border-width: 0.5px !important;
border-color: #dadbde !important;
border-style: solid;
border-radius: 4px; border-radius: 4px;
padding: 6px 9px; // padding: 6px 9px;
background: #f5f7fa; // background: #f5f7fa;
} }
.kuang_t { .kuang_t {
display: flex; display: flex;
@ -784,4 +732,9 @@ export default {
background: #f6f6f6; background: #f6f6f6;
padding: 0 28rpx 28rpx 28rpx; padding: 0 28rpx 28rpx 28rpx;
} }
.u-form-item {
::v-deep .u-form-item__body {
padding: 20rpx 30rpx !important;
}
}
</style> </style>

View File

@ -10,48 +10,55 @@
<!-- <view class="index_header"> <!-- <view class="index_header">
<view>注册</view> <view>注册</view>
</view> --> </view> -->
<view class="title">欢迎注册</view>
<!-- <view class="tit" v-if="!pkCountry">{{ '嗨粉扫天下' }}</view> --> <!-- <view class="tit" v-if="!pkCountry">{{ '嗨粉扫天下' }}</view> -->
<!-- 海粉 --> <!-- 海粉 -->
<view class="formed1"> <view class="formed1">
<u-form :model="form" labelWidth="90px" ref="uForm" :rules="rules"> <u-form :model="form" labelWidth="80px" ref="uForm" :rules="rules">
<u-form-item label="推荐编号" prop="parentCode"> <u-form-item label="" prop="memberCode">
<u-input v-model="form.parentCode" disabled> </u-input> <u-input v-model="form.memberCode" type="number" disabled>
<u--text
:text="howHeader"
slot="prefix"
margin="0 3px 0 0"
type="tips"
></u--text>
</u-input>
</u-form-item> </u-form-item>
<u-form-item label="会员姓名" prop="memberName"> <u-form-item label="" prop="memberName">
<u-input <u-input
v-model="form.memberName" v-model="form.memberName"
:placeholder="'请输入会员姓名'" :placeholder="'请输入会员姓名'"
/> />
</u-form-item> </u-form-item>
<u-form-item label="联系方式" prop="phone"> <u-form-item label="" prop="phone">
<u-input <u-input
v-model="form.phone" v-model="form.phone"
@blur="setMemberCode"
:placeholder="'请输入联系方式'" :placeholder="'请输入联系方式'"
type="number" type="number"
maxlength="20" maxlength="20"
/> />
</u-form-item> </u-form-item>
<u-form-item label="登录密码" prop="loginPwd"> <u-form-item label="" prop="loginPassword">
<u-input <u-input
:password="isPwd" :password="isPwd"
:placeholder="'请输入登录密码'" :placeholder="'请输入登录密码'"
v-model="form.loginPwd" v-model="form.loginPassword"
> >
<template #suffix> <template slot="suffix">
<u-icon name="eye" @tap="isPwd = !isPwd" v-if="!isPwd"></u-icon> <u-icon name="eye" @tap="isPwd = !isPwd" v-if="!isPwd"></u-icon>
<u-icon name="eye-off" @tap="isPwd = !isPwd" v-else></u-icon> <u-icon name="eye-off" @tap="isPwd = !isPwd" v-else></u-icon>
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="支付密码" prop="payPwd"> <u-form-item label="" prop="payPassword">
<u-input <u-input
:password="isPwd2" :password="isPwd2"
:placeholder="'请输入支付密码'" :placeholder="'请输入支付密码'"
v-model="form.payPwd" v-model="form.payPassword"
> >
<template #suffix> <template slot="suffix">
<u-icon <u-icon
name="eye" name="eye"
@tap="isPwd2 = !isPwd2" @tap="isPwd2 = !isPwd2"
@ -61,9 +68,9 @@
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="验证码" prop="smsCode"> <u-form-item label="" prop="code">
<u-input v-model="form.smsCode" :placeholder="'请输入验证码'"> <u-input v-model="form.code" :placeholder="'请输入验证码'">
<template #suffix> <template slot="suffix">
<view class="getCode" @tap="getVilCode">{{ getCode }}</view> <view class="getCode" @tap="getVilCode">{{ getCode }}</view>
</template> </template>
</u-input> </u-input>
@ -130,10 +137,10 @@
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="" <u-form-item label=""
prop="loginPwd"> prop="loginPassword">
<u-input :password="isPwd1" <u-input :password="isPwd1"
:placeholder="'请输入登录密码'" :placeholder="'请输入登录密码'"
v-model="form.loginPwd"> v-model="form.loginPassword">
<template slot="suffix"> <template slot="suffix">
<u-icon name="eye" <u-icon name="eye"
@tap="isPwd1=!isPwd1" @tap="isPwd1=!isPwd1"
@ -145,10 +152,10 @@
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="" <u-form-item label=""
prop="payPwd"> prop="payPassword">
<u-input :password="isPwd2" <u-input :password="isPwd2"
:placeholder="'请输入支付密码'" :placeholder="'请输入支付密码'"
v-model="form.payPwd"> v-model="form.payPassword">
<template slot="suffix"> <template slot="suffix">
<u-icon name="eye" <u-icon name="eye"
@tap="isPwd2=!isPwd2" @tap="isPwd2=!isPwd2"
@ -176,52 +183,12 @@
</view> --> </view> -->
</view> </view>
<u-modal <view class="mask" v-if="isTrue"> </view>
:show="showSuccessModal"
title="注册成功"
:show-cancel-button="true"
cancel-text="复制"
confirm-text="自动登录"
@confirm="onModalConfirm"
@cancel="onModalCancel"
@close="showSuccessModal = false"
>
<view class="slot-content" v-if="successData">
<view class="success-item">
<text class="item-label">会员编号:</text>
<text class="item-value">{{ successData.memberCode }}</text>
</view>
<view class="success-item">
<text class="item-label">会员姓名:</text>
<text class="item-value">{{ successData.memberName }}</text>
</view>
<view class="success-item">
<text class="item-label">联系方式:</text>
<text class="item-value">{{ successData.phone }}</text>
</view>
<view class="success-item">
<text class="item-label">登录密码:</text>
<text class="item-value">{{ successData.loginPassword }}</text>
</view>
<view class="success-item">
<text class="item-label">支付密码:</text>
<text class="item-value">{{ successData.payPassword }}</text>
</view>
</view>
</u-modal>
</view> </view>
</template> </template>
<script> <script>
import * as api from '@/config/goods' import * as api from '@/config/goods'
import {
getMemberCode,
getPhoneCode,
getRegister,
autoLogin,
} from '@/config/share'
import { setToken } from '@/config/auth.js'
import store from '@/store'
export default { export default {
components: {}, components: {},
data() { data() {
@ -231,11 +198,6 @@ export default {
pkParent: '', pkParent: '',
form: { form: {
memberName: '', memberName: '',
smsCode: '',
loginPwd: '',
payPwd: '',
parentCode: '',
phone: '',
}, },
isLoading: false, isLoading: false,
getCode: '获取验证码', getCode: '获取验证码',
@ -248,13 +210,11 @@ export default {
isPwd: true, isPwd: true,
isPwd1: true, isPwd1: true,
isPwd2: true, isPwd2: true,
showSuccessModal: false,
successData: null,
rules: { rules: {
parentCode: [ memberCode: [
{ {
required: true, required: true,
message: '请输入推荐编号', asyncValidator: this.memberCodeRule,
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
@ -272,21 +232,21 @@ export default {
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
smsCode: [ code: [
{ {
required: true, required: true,
message: '请输入验证码', message: '请输入验证码',
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
loginPwd: [ loginPassword: [
{ {
required: true, required: true,
message: '请输入登录密码', message: '请输入登录密码',
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
payPwd: [ payPassword: [
{ {
required: true, required: true,
message: '请输入支付密码', message: '请输入支付密码',
@ -316,14 +276,14 @@ export default {
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
}, },
], ],
loginPwd: [ loginPassword: [
{ {
required: true, required: true,
message: '请输入登录密码', message: '请输入登录密码',
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
}, },
], ],
payPwd: [ payPassword: [
{ {
required: true, required: true,
message: '请输入支付密码', message: '请输入支付密码',
@ -336,9 +296,10 @@ export default {
onReady() {}, onReady() {},
onLoad(options) { onLoad(options) {
this.pkParent = options.code this.pkParent = options.code
this.pkCountry = options.country || '' this.pkCountry = 1
this.getGenerate()
if (this.pkCountry) { if (this.pkCountry) {
// this.getCountry() this.getCountry()
this.form.pkCountry = this.pkCountry this.form.pkCountry = this.pkCountry
uni.setStorageSync('pkCountry', this.pkCountry) uni.setStorageSync('pkCountry', this.pkCountry)
uni.redirectTo({ uni.redirectTo({
@ -354,22 +315,11 @@ export default {
}, },
onShow() {}, onShow() {},
methods: { methods: {
getUseInfo() { setMemberCode() {
getUseInfo().then(res => { // this.form.memberCode = this.form.phone
this.userInfo = res.data this.$set(this.form, 'memberCode', this.form.phone)
})
},
selCountry() {
uni.showModal({
title: '提示',
content: '确认更换自然国',
success: res => {
if (res.confirm) {
this.isCountry = true
}
},
})
}, },
memberCodeRule(rule, value, callback) { memberCodeRule(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error('请输入会员编号')) callback(new Error('请输入会员编号'))
@ -388,101 +338,44 @@ export default {
} }
}, },
getHeader() { getHeader() {
getMemberCode(this.pkParent).then(res => { api.checkShare().then(res => {
this.$set(this.form, 'parentCode', res.data) if (res.code != 200) {
console.log(this.form) this.isTrue = true
} else {
this.isTrue = false
}
}) })
// api.prefix(this.pkParent).then((res) => { // api.prefix(this.pkParent).then((res) => {
// this.howHeader = res.msg // this.howHeader = res.msg
// }) // })
}, },
getGenerate() { getGenerate() {
api.generate().then(res => { return new Promise((resolve, reject) => {
uni.setStorageSync('mToken', res.msg) api.generate().then(res => {
resolve(res)
uni.setStorageSync('mToken', res.msg)
})
}) })
}, },
toLogin() { toLogin() {
this.$refs.uForm.validate().then(() => { this.$refs.uForm.validate().then(res => {
this.isLoading = true this.isLoading = true
getRegister(Object.assign({}, this.form, { parentCode: this.pkParent })) api
.regShareMember(
Object.assign({}, this.form, { parent: this.pkParent })
)
.then(res => { .then(res => {
this.isLoading = false this.isLoading = false
if (res.code == 200) { if (res.code == 200) {
this.successData = res.data uni.redirectTo({
this.showSuccessModal = true url:
} else { '/pages/shareRegist/success?allData=' +
uni.showToast({ JSON.stringify(res.data),
title: res.msg || '注册失败',
icon: 'none',
}) })
} }
}) })
.catch(() => {
this.isLoading = false
uni.showToast({
title: '注册请求失败',
icon: 'none',
})
})
}) })
}, },
onModalConfirm() {
if (this.successData) {
this.handleAutoLogin(this.successData)
}
},
onModalCancel() {
if (this.successData) {
const modalContent = `会员编号: ${this.successData.memberCode}\n会员姓名: ${this.successData.memberName}\n联系方式: ${this.successData.phone}\n登录密码: ${this.successData.loginPassword}\n支付密码: ${this.successData.payPassword}`
uni.setClipboardData({
data: modalContent,
success: function () {
uni.showToast({
title: '复制成功',
icon: 'success',
})
},
})
}
},
handleAutoLogin(loginData) {
autoLogin({
username: loginData.memberCode,
password: loginData.loginPassword,
uuid: loginData.uuid,
})
.then(loginRes => {
if (loginRes.code === 200) {
uni.showToast({
title: '登录成功',
icon: 'success',
duration: 1500,
})
setToken(loginRes.data.access_token)
store.dispatch('GetInfo').then(res => {
uni.switchTab({ url: '/pages/index/index' })
})
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/index/index',
// })
// }, 1500)
} else {
uni.showToast({
title: loginRes.msg || '自动登录失败',
icon: 'none',
})
}
})
.catch(err => {
console.log(err)
uni.showToast({
title: '自动登录请求失败',
icon: 'none',
})
})
},
hiLogin() { hiLogin() {
this.$refs.uForm1.validate().then(res => { this.$refs.uForm1.validate().then(res => {
this.isLoading = true this.isLoading = true
@ -526,10 +419,10 @@ export default {
// //
getVilCode() { getVilCode() {
this.startTime() this.startTime()
getPhoneCode({ api
phone: this.form.phone, .verification({
parentCode: this.pkParent, phone: this.form.phone,
}) })
.then(res => {}) .then(res => {})
.catch(err => { .catch(err => {
this.beginTime = 0 this.beginTime = 0
@ -558,11 +451,10 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.content1 { .content1 {
background: linear-gradient(-45deg, #005bac, #0077c2, #0099e0, #00bfff); background-image: url('@/static/images/haiRgeiest1.jpg');
background-size: 400% 400%; background-size: 100%;
animation: gradient 15s ease infinite; background-repeat: no-repeat;
height: 100vh; height: 100vh;
overflow: auto;
} }
.content { .content {
background-image: url('@/static/images/huan.jpg'); background-image: url('@/static/images/huan.jpg');
@ -572,13 +464,14 @@ export default {
background-position: center; background-position: center;
height: 100vh; height: 100vh;
} }
.title { .tit {
font-size: 48rpx; font-size: 48px;
font-weight: bold; font-family: PangMenZhengDao-Regular, PangMenZhengDao;
color: #333; font-weight: 400;
color: #ffffff;
text-align: center; text-align: center;
padding-top: 120rpx; padding-top: 80px;
padding-bottom: 80rpx; margin-bottom: 20px;
} }
.index_header { .index_header {
background: #f9f9f9; background: #f9f9f9;
@ -597,10 +490,8 @@ export default {
padding: 0 120rpx; padding: 0 120rpx;
} }
.formed1 { .formed1 {
margin: 0 40rpx; padding: 0 120rpx;
padding: 40rpx 30rpx; padding-top: 550rpx;
background-color: rgba(255, 255, 255, 0.85);
border-radius: 16rpx;
} }
.getCode { .getCode {
font-size: 10px; font-size: 10px;
@ -634,37 +525,4 @@ export default {
height: 100vh; height: 100vh;
top: 0; top: 0;
} }
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.slot-content {
padding: 30rpx 20rpx;
font-size: 28rpx;
}
.success-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
}
.item-label {
color: #606266;
margin-right: 20rpx;
flex-shrink: 0;
}
.item-value {
color: #303133;
word-break: break-all;
text-align: right;
}
</style> </style>