|
|
@@ -26,7 +26,7 @@
|
|
|
</view>
|
|
|
</view> -->
|
|
|
<view class="" v-for="item in area">
|
|
|
- <view class="good-tit flex" >
|
|
|
+ <view class="good-tit flex">
|
|
|
<view class="tit-left flex">
|
|
|
<image src="../../static/icon/red-tit.png" mode=""></image>{{item.name}}
|
|
|
</view>
|
|
|
@@ -34,7 +34,7 @@
|
|
|
实付金额:{{item.low}} ~ {{ item.high }}
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="good-list flex" @click="status==2?goumai(item):''">
|
|
|
+ <view class="good-list flex" @click="(status==2 ||status==0) ?goumai(item): opentc()">
|
|
|
<image src="../../static/icon/red-gift.png" mode="widthFix" v-for="itemg in 35"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -47,18 +47,36 @@
|
|
|
<view class="" style="font-size: 35rpx;font-weight: bold;color: #333333;">
|
|
|
{{good.price}}
|
|
|
</view>
|
|
|
- <view class="btn" @click="zhifu">
|
|
|
- 立即支付
|
|
|
+ <view class="btn" @click="good.status == 1 ?zhifu(): goDetail()">
|
|
|
+ {{(good.status == 1 ||good.status == 0) ? '立即支付':'查看详情'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
- </uni-popup >
|
|
|
- </view>
|
|
|
-</template>
|
|
|
-
|
|
|
+ </uni-popup>
|
|
|
+ <uni-popup ref="uppass" type="center">
|
|
|
+ <view class="psw-wrapper">
|
|
|
+ <view class="psw-title">请输入支付密码</view>
|
|
|
+ <input type="password" v-model="password" class="psw-ipt"/>
|
|
|
+ <view class="psw-btn">
|
|
|
+ <text @click="cancel">取消</text>
|
|
|
+ <text class="psw-qd" @click="pswQd">确定</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
<script>
|
|
|
- import { section, purchase,zfpay,see_order } from '@/api/index.js'
|
|
|
+ import {
|
|
|
+ section,
|
|
|
+ purchase,
|
|
|
+ zfpay,
|
|
|
+ see_order
|
|
|
+ } from '@/api/index.js'
|
|
|
import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
|
|
|
- import { mapState, mapMutations } from 'vuex';
|
|
|
+ import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
export default {
|
|
|
components: {
|
|
|
uniCountdown
|
|
|
@@ -68,11 +86,12 @@
|
|
|
ccid: '',
|
|
|
area: [],
|
|
|
good: {},
|
|
|
- status: 2,//1购买了商品2未购买商品
|
|
|
+ status: 2, //1购买了商品2未购买商品
|
|
|
+ password: ''//交易密码
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState('user',['userInfo'])
|
|
|
+ ...mapState('user', ['userInfo'])
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
this.ccid = opt.id
|
|
|
@@ -87,7 +106,7 @@
|
|
|
}).then(res => {
|
|
|
console.log(res.data.status)
|
|
|
obj.status = res.data.status
|
|
|
- if(res.data.status == 1) {
|
|
|
+ if (res.data.status == 1) {
|
|
|
obj.good = res.data.order
|
|
|
}
|
|
|
})
|
|
|
@@ -108,38 +127,72 @@
|
|
|
s_id: item.id
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
+
|
|
|
obj.good = res.data
|
|
|
obj.$refs.popupyyok.open()
|
|
|
})
|
|
|
},
|
|
|
zhifu() {
|
|
|
+ let obj = this
|
|
|
+ // zfpay({
|
|
|
+ // order_id: obj.good.order_id
|
|
|
+ // }).then(res => {
|
|
|
+ // obj.$api.msg('支付成功')
|
|
|
+ // obj.$refs.popupyyok.close()
|
|
|
+ // })
|
|
|
+ obj.$refs.popupyyok.close()
|
|
|
+ obj.$refs.uppass.open()
|
|
|
+ },
|
|
|
+ opentc() {
|
|
|
+ let obj = this
|
|
|
+ obj.$refs.popupyyok.open()
|
|
|
+ },
|
|
|
+ goDetail() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: ''
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ let obj = this
|
|
|
+ obj.$refs.uppass.close()
|
|
|
+ },
|
|
|
+ pswQd() {
|
|
|
let obj = this
|
|
|
zfpay({
|
|
|
- order_id: obj.good.order_id
|
|
|
+ order_id: obj.good.order_id,
|
|
|
+ pas: obj.password
|
|
|
}).then(res => {
|
|
|
obj.$api.msg('支付成功')
|
|
|
- obj.$refs.popupyyok.close()
|
|
|
+ obj.$refs.uppass.close()
|
|
|
})
|
|
|
+
|
|
|
+ },
|
|
|
+ tishi() {
|
|
|
+ return this.$api.msg('当前商品已售罄')
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-</script>
|
|
|
-
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.changci-top {
|
|
|
background-color: #fff;
|
|
|
- padding:0 25rpx;
|
|
|
+ padding: 0 25rpx;
|
|
|
height: 100rpx;
|
|
|
+
|
|
|
.djs-wrap {
|
|
|
padding-left: 25rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.good-tit {
|
|
|
// margin-top: 20rpx;
|
|
|
background-color: #fff;
|
|
|
padding: 20rpx;
|
|
|
+
|
|
|
.tit-left {
|
|
|
flex-shrink: 0;
|
|
|
+
|
|
|
image {
|
|
|
height: 36rpx;
|
|
|
width: 36rpx;
|
|
|
@@ -147,32 +200,38 @@
|
|
|
margin-right: 10rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.tit-right {
|
|
|
text-align: right;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.good-list {
|
|
|
flex-wrap: wrap;
|
|
|
background-color: #fff;
|
|
|
padding: 20rpx;
|
|
|
+
|
|
|
// justify-content: flex-start;
|
|
|
image {
|
|
|
width: 80rpx;
|
|
|
margin-left: 15rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
.popupyyok-wrap {
|
|
|
height: 707rpx;
|
|
|
width: 551rpx;
|
|
|
background-color: #fff;
|
|
|
border-radius: 20rpx;
|
|
|
text-align: center;
|
|
|
+
|
|
|
// position: relative;
|
|
|
image {
|
|
|
width: 100%;
|
|
|
height: 429rpx;
|
|
|
}
|
|
|
+
|
|
|
.btn {
|
|
|
position: absolute;
|
|
|
bottom: 10rpx;
|
|
|
@@ -188,11 +247,68 @@
|
|
|
color: #F8DABA;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.top-bg {
|
|
|
width: 750rpx;
|
|
|
margin-bottom: 20rpx;
|
|
|
+
|
|
|
image {
|
|
|
width: 100%;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ .uppass-wrap {
|
|
|
+ width: 600rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ .up-tit {
|
|
|
+ line-height: 100rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .up-ipt {
|
|
|
+ border: 1px solid #000000;
|
|
|
+ display: block;
|
|
|
+ width: 400rpx;
|
|
|
+ background-color: #bfa;
|
|
|
+ height: 100rpx;
|
|
|
+ line-height: 100rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ margin: auto;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .psw-wrapper {
|
|
|
+ width: 548rpx;
|
|
|
+ height: 344rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 15rpx 15rpx;
|
|
|
+ .psw-title {
|
|
|
+ width: 100%;
|
|
|
+ font-size: 35rpx;
|
|
|
+ padding: 43rpx 0 49rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-weight: 800;
|
|
|
+ }
|
|
|
+ .psw-ipt {
|
|
|
+ display: block;
|
|
|
+ background-color: #dce3ed;
|
|
|
+ height: 90rpx;
|
|
|
+ width: 464rpx;
|
|
|
+ padding-left: 30rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+ font-size: 80rpx;
|
|
|
+ }
|
|
|
+ .psw-btn text{
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+ width: 50%;
|
|
|
+ padding-top: 29rpx;
|
|
|
+ font-size: 35rpx;
|
|
|
+ }
|
|
|
+ .psw-qd {
|
|
|
+ color:#5771DF;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|