forked from angelo/web-retail-h5
feat(pickArea): 提货专区放开
This commit is contained in:
parent
5234d19fea
commit
ba8680b392
|
@ -0,0 +1,68 @@
|
|||
<template>
|
||||
<u-popup :show="isPw" mode="center" closeable @close="closePw">
|
||||
<view class="t_tit mt-20">{{ '支付验证' }}</view>
|
||||
<view class="box">
|
||||
<view class="mt-20" v-if="isBank">请输入短信验证码</view>
|
||||
<view class="mt-20" v-else>请输入密码</view>
|
||||
<u--input v-if="isBank" border="surround" v-model="codeValue"></u--input>
|
||||
<u--input
|
||||
v-else
|
||||
border="surround"
|
||||
type="password"
|
||||
v-model="codeValue"
|
||||
></u--input>
|
||||
<u-button
|
||||
type="success"
|
||||
class="mt-20"
|
||||
shape="circle"
|
||||
:loading="isLoading"
|
||||
loadingText="支付中"
|
||||
@tap="payPw()"
|
||||
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||
>{{ '立即支付' }}
|
||||
</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PayModal',
|
||||
props: {
|
||||
isBank: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isPw: false,
|
||||
codeValue: '',
|
||||
isLoading: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .u-popup__content {
|
||||
width: 80%;
|
||||
}
|
||||
.box {
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.t_tit {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mt-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
|
@ -277,6 +277,13 @@ export default {
|
|||
menuKey: 'wallet',
|
||||
ifshow: false,
|
||||
},
|
||||
{
|
||||
url: '/pages/pickupArea/pickupArea',
|
||||
name: '提货专区',
|
||||
imgurl: '../../static/images/my_icon3.png',
|
||||
menuKey: 'pickGoods',
|
||||
ifshow: true,
|
||||
},
|
||||
{
|
||||
url: '/pages/bonus/index',
|
||||
name: '奖金明细',
|
||||
|
|
|
@ -1,223 +1,245 @@
|
|||
<template>
|
||||
<view>
|
||||
<u-popup :show="addShow"
|
||||
closeable
|
||||
:round="10"
|
||||
mode="center"
|
||||
@close="closeTap">
|
||||
<view class="height-auto">
|
||||
<view style="padding: 0 40rpx;">
|
||||
<view>{{'购买数量'}}</view>
|
||||
<view class="sum-view">
|
||||
<input class="inputs" v-model="form.carryNum" placeholder="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<view class="btn" @click="closeTap">{{'取消'}}</view>
|
||||
<view class="btn" style="border-right: none;color: #005BAC;" @click="pickSubmit">{{'确定'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="goods">
|
||||
<view class="pick-up" v-for="item in dataList">
|
||||
<view class="banner">
|
||||
<image :src="item.pickCover">
|
||||
|
||||
</image>
|
||||
<view class="sum">
|
||||
{{'数量'}}:{{item.usableQuantity}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="time" v-if="item.receiveTime">{{'截止时间'}}:{{item.receiveTime}}</view>
|
||||
<view class="button" v-if="item.pickFlag==0" @click="pickSubmitShow(item)">
|
||||
{{'申请提货'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-popup
|
||||
:show="addShow"
|
||||
closeable
|
||||
:round="10"
|
||||
mode="center"
|
||||
@close="closeTap"
|
||||
>
|
||||
<view class="height-auto">
|
||||
<view style="padding: 0 40rpx">
|
||||
<view>{{ '提货数量' }}</view>
|
||||
<view class="sum-view">
|
||||
<input class="inputs" v-model="form.carryNum" placeholder="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<view class="btn" @click="closeTap">{{ '取消' }}</view>
|
||||
<view
|
||||
class="btn"
|
||||
style="border-right: none; color: #005bac"
|
||||
@click="pickSubmit"
|
||||
>{{ '确定' }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="goods">
|
||||
<view class="pick-up" v-for="item in dataList">
|
||||
<view class="banner">
|
||||
<image :src="item.pickCover"> </image>
|
||||
</view>
|
||||
<view class="sum-wrapper">
|
||||
<view>可提数量:</view>
|
||||
<view>{{ item.usableQuantity }}</view>
|
||||
</view>
|
||||
<view class="time" v-if="item.receiveTime"
|
||||
>{{ '截止时间' }}:{{ item.receiveTime }}</view
|
||||
>
|
||||
<view
|
||||
class="button"
|
||||
v-if="item.pickFlag == 0"
|
||||
@click="pickSubmitShow(item)"
|
||||
>
|
||||
{{ '申请提货' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as apis from '@/config/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addShow:false,
|
||||
form: {carryNum:''},
|
||||
query:{
|
||||
pageNum:1,
|
||||
pageSize:50,
|
||||
},
|
||||
rules: {
|
||||
carryNum: [
|
||||
{required: true, message: '请输入', trigger: "blur"},
|
||||
],
|
||||
},
|
||||
dataList:[]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserPickUpList()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/pickupList/index"
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
closeTap(){
|
||||
this.addShow = false
|
||||
},
|
||||
pickSubmit() {
|
||||
if(this.form.carryNum<1){
|
||||
uni.showToast({
|
||||
title:'提货数量不能小于1',
|
||||
icon:"none",
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.carryGoodsItem.baseQuantity>1){
|
||||
if(this.form.carryNum%this.carryGoodsItem.baseQuantity !== 0){
|
||||
uni.showToast({
|
||||
title:'提货数量必须是'+this.carryGoodsItem.baseQuantity+'的基数',
|
||||
icon:"none",
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
if(this.form.carryNum > this.carryGoodsItem.usableQuantity){
|
||||
uni.showToast({
|
||||
title:'提货数量大于可提数量',
|
||||
icon:"none",
|
||||
})
|
||||
return
|
||||
}
|
||||
this.addShow = false;
|
||||
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/thOrder/index?pkId='+ this.carryGoodsItem.pkId
|
||||
+'&num='+this.form.carryNum ,
|
||||
})
|
||||
},
|
||||
pickSubmitShow(item) {
|
||||
if(item.pickFlag==1){
|
||||
// 跳转到支付
|
||||
uni.navigateTo({
|
||||
url: '/pages/thOrder/index?pkId='+ item.pkId
|
||||
+'&num='+this.form.carryNum ,
|
||||
})
|
||||
return
|
||||
}
|
||||
this.form.carryNum = item.baseQuantity
|
||||
this.form.carryNum1 = item.baseQuantity
|
||||
this.form.usableQuantity = item.usableQuantity
|
||||
this.addShow = true;
|
||||
this.carryGoodsItem = item;
|
||||
// this.$refs['form'].validate(valid => {
|
||||
// if (!valid) {
|
||||
// return false
|
||||
// }else{
|
||||
// console.error("11")
|
||||
// }
|
||||
// })
|
||||
},
|
||||
getUserPickUpList(){
|
||||
apis.pickList(this.query).then((res)=>{
|
||||
this.dataList = res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
import * as apis from '@/config/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addShow: false,
|
||||
form: { carryNum: '' },
|
||||
query: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
},
|
||||
rules: {
|
||||
carryNum: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||
},
|
||||
dataList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserPickUpList()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pickupList/index',
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
closeTap() {
|
||||
this.addShow = false
|
||||
},
|
||||
pickSubmit() {
|
||||
if (this.form.carryNum < 1) {
|
||||
uni.showToast({
|
||||
title: '提货数量不能小于1',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.carryGoodsItem.baseQuantity > 1) {
|
||||
if (this.form.carryNum % this.carryGoodsItem.baseQuantity !== 0) {
|
||||
uni.showToast({
|
||||
title:
|
||||
'提货数量必须是' + this.carryGoodsItem.baseQuantity + '的基数',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.form.carryNum > this.carryGoodsItem.usableQuantity) {
|
||||
uni.showToast({
|
||||
title: '提货数量大于可提数量',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
this.addShow = false
|
||||
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/thOrder/index?pkId=' +
|
||||
this.carryGoodsItem.pkId +
|
||||
'&num=' +
|
||||
this.form.carryNum,
|
||||
})
|
||||
},
|
||||
pickSubmitShow(item) {
|
||||
if (item.pickFlag == 1) {
|
||||
// 跳转到支付
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/thOrder/index?pkId=' +
|
||||
item.pkId +
|
||||
'&num=' +
|
||||
this.form.carryNum,
|
||||
})
|
||||
return
|
||||
}
|
||||
this.form.carryNum = item.baseQuantity
|
||||
this.form.carryNum1 = item.baseQuantity
|
||||
this.form.usableQuantity = item.usableQuantity
|
||||
this.addShow = true
|
||||
this.carryGoodsItem = item
|
||||
// this.$refs['form'].validate(valid => {
|
||||
// if (!valid) {
|
||||
// return false
|
||||
// }else{
|
||||
// console.error("11")
|
||||
// }
|
||||
// })
|
||||
},
|
||||
getUserPickUpList() {
|
||||
apis.pickList(this.query).then(res => {
|
||||
this.dataList = res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.inputs{
|
||||
padding-left: 30rpx ;
|
||||
padding-top: 8rpx;
|
||||
text-align: center;
|
||||
width: 360rpx;
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
border-top: 1rpx solid #ddd;
|
||||
}
|
||||
.btn{
|
||||
width: 330rpx;
|
||||
height: 88rpx;
|
||||
// background: #DDDDDD;
|
||||
line-height: 88rpx;
|
||||
border-right: 1px solid #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
.sum-view{
|
||||
width: 440rpx;
|
||||
height: 64rpx;
|
||||
background: #FFFFFF;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
border-radius: 32rpx;
|
||||
line-height: 64rpx;
|
||||
margin: 30rpx auto;
|
||||
}
|
||||
.height-auto{
|
||||
|
||||
padding: 40rpx 0;
|
||||
width: 525rpx;
|
||||
height: 220rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
.button{
|
||||
width: 182rpx;
|
||||
height: 52rpx;
|
||||
background: #005BAC;
|
||||
border-radius: 26rpx;
|
||||
text-align: center;
|
||||
line-height: 52rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
margin: 30rpx auto auto auto;
|
||||
}
|
||||
.time{
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.banner{
|
||||
position: relative;
|
||||
image{
|
||||
width: 295rpx;
|
||||
height: 180rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.sum{
|
||||
position: absolute;
|
||||
right: 15rpx;
|
||||
z-index: 1;
|
||||
bottom: 20rpx;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
page{
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.goods{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.pick-up{
|
||||
// width: 330rpx;
|
||||
// height: 413rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 5rpx 5rpx 0px rgba(0,0,0,0.05);
|
||||
border-radius: 15rpx;
|
||||
margin-left: 30rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.inputs {
|
||||
padding-left: 30rpx;
|
||||
padding-top: 8rpx;
|
||||
text-align: center;
|
||||
width: 360rpx;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
border-top: 1rpx solid #ddd;
|
||||
}
|
||||
.btn {
|
||||
width: 330rpx;
|
||||
height: 88rpx;
|
||||
// background: #DDDDDD;
|
||||
line-height: 88rpx;
|
||||
border-right: 1px solid #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
.sum-view {
|
||||
width: 440rpx;
|
||||
height: 64rpx;
|
||||
background: #ffffff;
|
||||
border: 1rpx solid #dddddd;
|
||||
border-radius: 32rpx;
|
||||
line-height: 64rpx;
|
||||
margin: 30rpx auto;
|
||||
}
|
||||
.height-auto {
|
||||
padding: 40rpx 0;
|
||||
width: 525rpx;
|
||||
height: 220rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
.sum-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
.button {
|
||||
width: 100%;
|
||||
height: 52rpx;
|
||||
background: #005bac;
|
||||
border-radius: 26rpx;
|
||||
text-align: center;
|
||||
line-height: 52rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
margin: 30rpx auto auto auto;
|
||||
}
|
||||
.time {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.banner {
|
||||
position: relative;
|
||||
image {
|
||||
width: 295rpx;
|
||||
height: 295rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.sum {
|
||||
position: absolute;
|
||||
right: 15rpx;
|
||||
z-index: 1;
|
||||
bottom: 20rpx;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.goods {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.pick-up {
|
||||
// width: 330rpx;
|
||||
// height: 413rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 5rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 15rpx;
|
||||
margin-left: 30rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,95 +1,93 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="pickList">
|
||||
<view class="pick" v-for="item in dataList">
|
||||
<view class="pick-content">
|
||||
<view class="pick-flex">
|
||||
<view>
|
||||
<view class="pickList">
|
||||
<view class="pick" v-for="item in dataList">
|
||||
<view class="pick-content">
|
||||
<!-- <view class="pick-flex">
|
||||
<view class="size">{{'提货卡来源'}}</view>
|
||||
<view class="right">{{item.pickTypeVal}}</view>
|
||||
</view>
|
||||
<view class="pick-flex">
|
||||
<view class="size">{{'提货数量'}}</view>
|
||||
<view class="right">{{item.pickQuantity}}</view>
|
||||
</view>
|
||||
<view class="pick-flex">
|
||||
<view class="size">{{'订单编号'}}</view>
|
||||
<view class="right">{{item.pickOrder}}</view>
|
||||
</view>
|
||||
<view class="lines">
|
||||
|
||||
</view>
|
||||
<view class="time-right">{{item.pickTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="pick-flex">
|
||||
<view class="size">{{ '提货数量' }}</view>
|
||||
<view class="right">{{ item.pickQuantity }}</view>
|
||||
</view>
|
||||
<view class="pick-flex">
|
||||
<view class="size">{{ '订单编号' }}</view>
|
||||
<view class="right">{{ item.pickOrder }}</view>
|
||||
</view>
|
||||
<view class="lines"> </view>
|
||||
<view class="time-right">{{ item.pickTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as apis from '@/config/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
pageNum:1,
|
||||
pageSize:50,
|
||||
},
|
||||
dataList:[]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserPickUpList()
|
||||
},
|
||||
methods: {
|
||||
getUserPickUpList(){
|
||||
apis.pickLogList(this.query).then((res)=>{
|
||||
if (res.total>0) {
|
||||
this.dataList.push(...res.rows)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.query.pageNum+=1
|
||||
this.getUserPickUpList()
|
||||
}
|
||||
}
|
||||
import * as apis from '@/config/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
},
|
||||
dataList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserPickUpList()
|
||||
},
|
||||
methods: {
|
||||
getUserPickUpList() {
|
||||
apis.pickLogList(this.query).then(res => {
|
||||
if (res.total > 0) {
|
||||
this.dataList.push(...res.rows)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.query.pageNum += 1
|
||||
this.getUserPickUpList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.time-right{
|
||||
text-align: right;
|
||||
margin: 20rpx 0 0 0;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.lines{
|
||||
height: 1rpx;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
.pick-flex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
page{
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.pickList{
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.pick{
|
||||
background-color: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
/* height: 300rpx; */
|
||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||
}
|
||||
.size{
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
.right{
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.time-right {
|
||||
text-align: right;
|
||||
margin: 20rpx 0 0 0;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.lines {
|
||||
height: 1rpx;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.pick-flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.pickList {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.pick {
|
||||
background-color: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
/* height: 300rpx; */
|
||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||
}
|
||||
.size {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
.right {
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,22 +1,28 @@
|
|||
|
||||
<template>
|
||||
<view class="main">
|
||||
<u-popup :show="pswShow"
|
||||
class="pspopup"
|
||||
mode="center"
|
||||
closeable
|
||||
@close="pswShow=false">
|
||||
<u-popup
|
||||
:show="pswShow"
|
||||
class="pspopup"
|
||||
mode="center"
|
||||
closeable
|
||||
@close="pswShow = false"
|
||||
>
|
||||
<view class="t_tit">二级密码</view>
|
||||
<view class="box">
|
||||
<u--input border="surround"
|
||||
type="password"
|
||||
v-model="password"></u--input>
|
||||
<u-button type="success"
|
||||
class="uBtn"
|
||||
shape="circle"
|
||||
loadingText="支付中"
|
||||
@tap="surePsw"
|
||||
color="linear-gradient(to right, #005BAC, #005BAC )">{{'立即支付'}} </u-button>
|
||||
<u--input
|
||||
border="surround"
|
||||
type="password"
|
||||
v-model="password"
|
||||
></u--input>
|
||||
<u-button
|
||||
type="success"
|
||||
class="uBtn"
|
||||
shape="circle"
|
||||
loadingText="支付中"
|
||||
@tap="surePsw"
|
||||
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||
>{{ '立即支付' }}
|
||||
</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="contents">
|
||||
|
@ -24,128 +30,141 @@
|
|||
<view class="lines"></view>
|
||||
<view class="text">收货信息</view>
|
||||
</view>
|
||||
<u-form :model="addressForm"
|
||||
labelWidth="auto"
|
||||
ref="uForm">
|
||||
<u-form :model="addressForm" labelWidth="auto" ref="uForm">
|
||||
<view class="view-class">
|
||||
<u-form-item :label="'收货人'"
|
||||
label-width="100px"
|
||||
prop="recName">
|
||||
<u-input v-model="addressForm.recName"
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
placeholder="请输入收货人姓名" />
|
||||
|
||||
<u-form-item :label="'收货人'" label-width="100px" prop="recName">
|
||||
<u-input
|
||||
v-model="addressForm.recName"
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
placeholder="请输入收货人姓名"
|
||||
/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="view-class">
|
||||
<u-form-item :label="'联系方式'"
|
||||
label-width="100px"
|
||||
prop="recPhone">
|
||||
<u-input v-model="addressForm.recPhone"
|
||||
:maxlength="userInfo.pkSettleCountry == 1?11:20"
|
||||
type="number"
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
placeholder="请输入联系方式" />
|
||||
|
||||
<u-form-item :label="'联系方式'" label-width="100px" prop="recPhone">
|
||||
<u-input
|
||||
v-model="addressForm.recPhone"
|
||||
:maxlength="userInfo.pkSettleCountry == 1 ? 11 : 20"
|
||||
type="number"
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
placeholder="请输入联系方式"
|
||||
/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="view-class"
|
||||
@click="getDiqu"
|
||||
style="height: 110rpx;display: flex;align-items: center;">
|
||||
<u-form-item :label="'收货地址'"
|
||||
label-width="100px"
|
||||
prop="recProvince">
|
||||
<view v-if="address"
|
||||
style="font-size: 28rpx;color: #333;margin-left: 20rpx;">{{address}}</view>
|
||||
<view style="margin-left: 20rpx;font-size: 28rpx;color: rgb(192, 196, 204);"
|
||||
v-else>请选择</view>
|
||||
<view
|
||||
class="view-class"
|
||||
@click="getDiqu"
|
||||
style="height: 110rpx; display: flex; align-items: center"
|
||||
>
|
||||
<u-form-item
|
||||
:label="'收货地址'"
|
||||
label-width="100px"
|
||||
prop="recProvince"
|
||||
>
|
||||
<view
|
||||
v-if="address"
|
||||
style="font-size: 28rpx; color: #333; margin-left: 20rpx"
|
||||
>{{ address }}</view
|
||||
>
|
||||
<view
|
||||
style="
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: rgb(192, 196, 204);
|
||||
"
|
||||
v-else
|
||||
>请选择</view
|
||||
>
|
||||
</u-form-item>
|
||||
<view class="drop">
|
||||
<image src="../../static/images/drop.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-class">
|
||||
<u-form-item :label="'详细地址'"
|
||||
class="label-style"
|
||||
label-width="100px"
|
||||
prop="recAddress">
|
||||
<u-input v-model="addressForm.recAddress"
|
||||
placeholder-class="place-class"
|
||||
maxlength="200"
|
||||
class="border-color"
|
||||
:placeholder="'请输入详细地址'" />
|
||||
|
||||
<u-form-item
|
||||
:label="'详细地址'"
|
||||
class="label-style"
|
||||
label-width="100px"
|
||||
prop="recAddress"
|
||||
>
|
||||
<u-input
|
||||
v-model="addressForm.recAddress"
|
||||
placeholder-class="place-class"
|
||||
maxlength="200"
|
||||
class="border-color"
|
||||
:placeholder="'请输入详细地址'"
|
||||
/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="view-class">
|
||||
<u-form-item :label="'备注'"
|
||||
label-width="100px"
|
||||
prop="address">
|
||||
<u-input v-model="addressForm.remark"
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
placeholder="" />
|
||||
<u-form-item :label="'备注'" label-width="100px" prop="address">
|
||||
<u-input
|
||||
v-model="addressForm.remark"
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
placeholder=""
|
||||
/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;">
|
||||
<view style="margin-top: 20rpx">
|
||||
<view class="height-auto bgcolors">
|
||||
<view class="lines color-styles"></view>
|
||||
<view class="text"
|
||||
style="color: #333;">商品信息</view>
|
||||
<view class="text" style="color: #333">商品信息</view>
|
||||
</view>
|
||||
<view style="background-color: #fff;">
|
||||
<view class="goods-info1"
|
||||
v-for="item in allData">
|
||||
<view style="background-color: #fff">
|
||||
<view class="goods-info1" v-for="item in allData">
|
||||
<view class="goods-infot">
|
||||
<img :src="item.cover"
|
||||
class="cover"
|
||||
alt="">
|
||||
<img :src="item.cover" class="cover" alt="" />
|
||||
<view class="disFlex">
|
||||
<view style="color: #333;font-size: 28rpx;">{{ item.productName }}</view>
|
||||
<view style="color: #999;font-size: 22rpx;">X{{item.quantity}}</view>
|
||||
<view style="color: #333; font-size: 28rpx">{{
|
||||
item.productName
|
||||
}}</view>
|
||||
<view style="color: #999; font-size: 22rpx"
|
||||
>X{{ item.quantity }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods_infob" style="color: #999;font-size: 28rpx;">产品规格:{{ item.specsName }}</view>
|
||||
<view class="goods_infob" style="color: #999; font-size: 28rpx"
|
||||
>产品规格:{{ item.specsName }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="goods-info"
|
||||
style="border: none;">
|
||||
<view style="color: #333;font-size: 28rpx;">{{'邮费'}}</view>
|
||||
<view style="color: #333;font-size: 24rpx;">¥{{postage}}</view>
|
||||
<view class="goods-info" style="border: none">
|
||||
<view style="color: #333; font-size: 28rpx">{{ '邮费' }}</view>
|
||||
<view style="color: #333; font-size: 24rpx">¥{{ postage }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 成功 -->
|
||||
<u-modal :show="showSucce"
|
||||
showConfirmButton
|
||||
:content='content'
|
||||
confirmColor='#DE3932'
|
||||
@confirm="reset"
|
||||
ref="uModal"
|
||||
:asyncClose="true"></u-modal>
|
||||
<u-modal
|
||||
:show="showSucce"
|
||||
showConfirmButton
|
||||
:content="content"
|
||||
confirmColor="#DE3932"
|
||||
@confirm="reset"
|
||||
ref="uModal"
|
||||
:asyncClose="true"
|
||||
></u-modal>
|
||||
<!-- 二维码 -->
|
||||
<u-popup :show="wxPopup"
|
||||
mode="center"
|
||||
closeable
|
||||
@close="closewxPopup">
|
||||
<view class="t_tits">{{'微信支付'}}</view>
|
||||
<u-popup :show="wxPopup" mode="center" closeable @close="closewxPopup">
|
||||
<view class="t_tits">{{ '微信支付' }}</view>
|
||||
<view class="pay_code">
|
||||
<div ref="qrCodeUrlWx"
|
||||
class="qrcode"></div>
|
||||
<div ref="qrCodeUrlWx" class="qrcode"></div>
|
||||
</view>
|
||||
</u-popup>
|
||||
<v-address ref="address"
|
||||
@getAddressData="AddressData"
|
||||
:defaultCode="defaultCode"
|
||||
@addressData="addressData"></v-address>
|
||||
<u-button type="success"
|
||||
shape="circle"
|
||||
class="btn"
|
||||
@click="paySubmit">购 买</u-button>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<v-address
|
||||
ref="address"
|
||||
@getAddressData="AddressData"
|
||||
:defaultCode="defaultCode"
|
||||
@addressData="addressData"
|
||||
></v-address>
|
||||
<u-button type="success" shape="circle" class="btn" @click="paySubmit"
|
||||
>购 买</u-button
|
||||
>
|
||||
<view style="height: 20rpx"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -217,14 +236,15 @@ export default {
|
|||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
return this.$u.test.mobile(value);
|
||||
return this.$u.test.mobile(value)
|
||||
},
|
||||
message: "手机号格式不正确",
|
||||
trigger: ["blur"],
|
||||
message: '手机号格式不正确',
|
||||
trigger: ['blur'],
|
||||
},
|
||||
],
|
||||
},
|
||||
allData: [],
|
||||
orderCode: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -251,20 +271,19 @@ export default {
|
|||
quantity: allData[2].split('#')[0],
|
||||
pkId: allData[1].split('&')[0],
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
if (res.code == '200') {
|
||||
this.allData = res.data.detailList
|
||||
}
|
||||
})
|
||||
},
|
||||
getGenerate() {
|
||||
api.generate().then((res) => {
|
||||
api.generate().then(res => {
|
||||
uni.setStorageSync('mToken', res.msg)
|
||||
})
|
||||
},
|
||||
paySubmit() {
|
||||
this.$refs.uForm.validate().then((res) => {
|
||||
// this.pswShow = true
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
let allData = decodeURIComponent(window.location.href).split('=')
|
||||
let obj = {
|
||||
quantity: allData[2].split('#')[0],
|
||||
|
@ -277,24 +296,20 @@ export default {
|
|||
recAddress: this.addressForm.recAddress,
|
||||
remark: this.addressForm.remark,
|
||||
}
|
||||
api.payPickOrder(obj).then((res) => {
|
||||
// this.pswShow = true
|
||||
api.payPickOrder(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
// this.scanPayBfWx(8)
|
||||
this.pswShow = false
|
||||
let paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/pay/index?paramsPost=' +
|
||||
JSON.stringify(paramsPost) +
|
||||
'&businessType=1',
|
||||
})
|
||||
|
||||
this.orderCode = res.data
|
||||
this.pswShow = true
|
||||
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.$store.dispatch('GetInfo').then((res) => {
|
||||
this.$store.dispatch('GetInfo').then(res => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
|
@ -311,7 +326,7 @@ export default {
|
|||
this.wxPopup = false
|
||||
this.showSucce = true
|
||||
} else {
|
||||
api.payStatus(data).then((res) => {
|
||||
api.payStatus(data).then(res => {
|
||||
that.sucPay = res.data
|
||||
})
|
||||
}
|
||||
|
@ -329,7 +344,7 @@ export default {
|
|||
payChannel: val,
|
||||
payType: 2,
|
||||
}
|
||||
api.unifiedorder(params).then((res) => {
|
||||
api.unifiedorder(params).then(res => {
|
||||
this.wxPopup = true
|
||||
this.$nextTick(() => {
|
||||
new QRCode(
|
||||
|
@ -350,7 +365,7 @@ export default {
|
|||
this.checkPayStatus(params)
|
||||
},
|
||||
getPostAge(data) {
|
||||
apis.pickPostAge(data).then((res) => {
|
||||
apis.pickPostAge(data).then(res => {
|
||||
this.postage = res.data
|
||||
// this.totalAmont =
|
||||
// parseFloat(this.allGoodsData.priceAmount) +
|
||||
|
@ -362,37 +377,43 @@ export default {
|
|||
.checkPwd({
|
||||
pwd: this.password,
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
let allData = decodeURIComponent(window.location.href).split('=')
|
||||
let obj = {
|
||||
quantity: allData[2].split('#')[0],
|
||||
pkId: allData[1].split('&')[0],
|
||||
recName: this.addressForm.recName,
|
||||
recPhone: this.addressForm.recPhone,
|
||||
recProvince: this.addressForm.recProvince,
|
||||
recCity: this.addressForm.recCity,
|
||||
recCounty: this.addressForm.recCounty,
|
||||
recAddress: this.addressForm.recAddress,
|
||||
remark: this.addressForm.remark,
|
||||
orderCode: this.orderCode,
|
||||
specialArea: 8,
|
||||
payPwd: this.password,
|
||||
pkSettleCountry: this.pkCountry || 1,
|
||||
pkCountry: this.pkCountry || 1,
|
||||
}
|
||||
api
|
||||
.payPickOrder(obj)
|
||||
.then((res) => {
|
||||
.payOthOrder(obj)
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
// this.scanPayBfWx(8)
|
||||
this.pswShow = false
|
||||
let paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/pay/index?paramsPost=' +
|
||||
JSON.stringify(paramsPost) +
|
||||
'&businessType=1',
|
||||
uni.showToast({
|
||||
title: '提货成功',
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/mine/order/index',
|
||||
})
|
||||
}, 500)
|
||||
// this.scanPayBfWx(8)
|
||||
// this.pswShow = false
|
||||
// let paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||
// uni.navigateTo({
|
||||
// url:
|
||||
// '/pages/pay/index?paramsPost=' +
|
||||
// JSON.stringify(paramsPost) +
|
||||
// '&businessType=1',
|
||||
// })
|
||||
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(err => {
|
||||
this.isLoading.close()
|
||||
})
|
||||
}
|
||||
|
@ -480,10 +501,10 @@ export default {
|
|||
padding: 0 30rpx;
|
||||
// width: 750rpx;
|
||||
margin: 0 20rpx;
|
||||
.goods-infot{
|
||||
.goods-infot {
|
||||
display: flex;
|
||||
}
|
||||
.goods_infob{
|
||||
.goods_infob {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.cover {
|
||||
|
@ -511,7 +532,7 @@ export default {
|
|||
}
|
||||
.height-auto {
|
||||
height: 94rpx;
|
||||
background: #005BAC;
|
||||
background: #005bac;
|
||||
line-height: 94rpx;
|
||||
padding: 0 25rpx;
|
||||
display: flex;
|
||||
|
@ -611,7 +632,7 @@ page {
|
|||
background-color: #fff;
|
||||
}
|
||||
.btn {
|
||||
background-color: #005BAC;
|
||||
background-color: #005bac;
|
||||
border: none;
|
||||
height: 92rpx;
|
||||
line-height: 92rpx;
|
||||
|
@ -619,4 +640,4 @@ page {
|
|||
margin: 100rpx auto auto auto;
|
||||
width: 690rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue