水滴兑换模块开发完成
This commit is contained in:
@@ -156,19 +156,22 @@ Page({
|
|||||||
* 创建订单
|
* 创建订单
|
||||||
*/
|
*/
|
||||||
payFound() {
|
payFound() {
|
||||||
|
this.setData({
|
||||||
|
disabled : true
|
||||||
|
})
|
||||||
wx.$api.index.skinOrder().then(res => {
|
wx.$api.index.skinOrder().then(res => {
|
||||||
this.setData({
|
|
||||||
disabled : true
|
|
||||||
})
|
|
||||||
this.payBtn(res.data.order_id)
|
this.payBtn(res.data.order_id)
|
||||||
}).catch(err => {})
|
}).catch(err => {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认支付1元
|
* 确认支付1元
|
||||||
*/
|
*/
|
||||||
payBtn(orderid) {
|
payBtn(orderid) {
|
||||||
|
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '支付中...',
|
title: '支付中...',
|
||||||
mask : true
|
mask : true
|
||||||
@@ -190,6 +193,7 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
|
disabled : false,
|
||||||
payStatus: false
|
payStatus: false
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
console.log(options)
|
||||||
if(options.invite != undefined) {
|
if(options.invite != undefined) {
|
||||||
getApp().globalData.inviteText = options.invite
|
getApp().globalData.inviteText = options.invite
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Page({
|
|||||||
paySuccess : false, // 兑换成功显示
|
paySuccess : false, // 兑换成功显示
|
||||||
maxcoupon : '', //拥有兑换券数量
|
maxcoupon : '', //拥有兑换券数量
|
||||||
coupon_qty : 1, //兑换券数量
|
coupon_qty : 1, //兑换券数量
|
||||||
checked : false//兑换券
|
checked : false, //兑换券
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -169,6 +169,10 @@ Page({
|
|||||||
* 产品确认购买
|
* 产品确认购买
|
||||||
*/
|
*/
|
||||||
buyTap() {
|
buyTap() {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
|
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
})
|
})
|
||||||
@@ -181,9 +185,6 @@ Page({
|
|||||||
coupon_qty : this.data.coupon_qty
|
coupon_qty : this.data.coupon_qty
|
||||||
}
|
}
|
||||||
wx.$api.mall.mallAffirm(data).then(res => {
|
wx.$api.mall.mallAffirm(data).then(res => {
|
||||||
this.setData({
|
|
||||||
disabled: false
|
|
||||||
})
|
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
|
|
||||||
if(res.data.can_pay) {
|
if(res.data.can_pay) {
|
||||||
@@ -201,7 +202,8 @@ Page({
|
|||||||
mask:true,
|
mask:true,
|
||||||
success: function () {
|
success: function () {
|
||||||
that.setData({
|
that.setData({
|
||||||
paySuccess: true
|
paySuccess: true,
|
||||||
|
disabled: true
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|||||||
@@ -1,315 +1,333 @@
|
|||||||
page {
|
page {
|
||||||
background-color: #f5f6f8;
|
background-color: #f5f6f8;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 地址 */
|
/* 地址 */
|
||||||
.address {
|
.address {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-arrow {
|
.address-arrow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 15rpx;
|
right: 15rpx;
|
||||||
top: 78rpx;
|
top: 78rpx;
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-cont {
|
.address-cont {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-top {
|
.address-top {
|
||||||
width: calc(100% - 80rpx);
|
width: calc(100% - 80rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-area {
|
.address-area {
|
||||||
color: #585866;
|
color: #585866;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-text {
|
.address-text {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-name text {
|
.address-name text {
|
||||||
color: #585866;
|
color: #585866;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-img {
|
.address-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-add {
|
.address-add {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 30rpx 30rpx 0;
|
padding: 30rpx 30rpx 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-go {
|
.address-go {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 68rpx;
|
line-height: 68rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
color: #df723a;
|
color: #df723a;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 商品 */
|
/* 商品 */
|
||||||
|
|
||||||
.list-goods {
|
.list-goods {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-img {
|
.list-goods-img {
|
||||||
width: 184rpx;
|
width: 184rpx;
|
||||||
height: 184rpx;
|
height: 184rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-cont {
|
.list-goods-cont {
|
||||||
width: calc(100% - 214rpx);
|
width: calc(100% - 214rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-name {
|
.list-goods-name {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-text {
|
.list-goods-text {
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-text text {
|
.list-goods-text text {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-parice {
|
.list-goods-parice {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-goods-parice text {
|
.list-goods-parice text {
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 规格 */
|
/* 规格 */
|
||||||
.label {
|
.label {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-item {
|
.label-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
color: #585866;
|
color: #585866;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: 2rpx solid rgb(243, 243, 243);
|
border-bottom: 2rpx solid rgb(243, 243, 243);
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-item:last-child {
|
.label-item:last-child {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-integral {
|
.label-integral {
|
||||||
color: #3b7cff;
|
color: #3b7cff;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-name {
|
.label-name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons {
|
.coupons {
|
||||||
border-bottom: 2rpx solid rgb(243, 243, 243);
|
border-bottom: 2rpx solid rgb(243, 243, 243);
|
||||||
padding: 0 30rpx 30rpx;
|
padding: 0 30rpx 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-item {
|
.coupons-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
color: #585866;
|
color: #585866;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-checked {
|
.coupon-checked {
|
||||||
background-color: #fff3ea;
|
background-color: #fff3ea;
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-checked-name {
|
.coupon-checked-name {
|
||||||
color: #ff9951;
|
color: #ff9951;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-checked-number {
|
.coupon-checked-number {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0rpx;
|
right: 0rpx;
|
||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color:transparent;
|
background-color:transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-checked-btn {
|
.coupon-checked-btn {
|
||||||
color: #db6815;
|
color: #db6815;
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
line-height: 78rpx;
|
line-height: 78rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-checked-input {
|
.coupon-checked-input {
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
border: 2rpx solid #bd5e1b;
|
border: 2rpx solid #bd5e1b;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #dd620a;
|
color: #dd620a;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
min-height: 36rpx;
|
min-height: 36rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*checkbox选中后样式 */
|
/*checkbox选中后样式 */
|
||||||
.label-text-checkbox {
|
.label-text-checkbox {
|
||||||
margin-right: -14rpx;
|
margin-right: -14rpx;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-text-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
.label-text-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
background: #ff9951;
|
background: #ff9951;
|
||||||
border-color: #ff9951;
|
border-color: #ff9951;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-text-checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
.label-text-checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
transform: translate(-50%, -50%) scale(1);
|
transform: translate(-50%, -50%) scale(1);
|
||||||
-webkit-transform: translate(-50%, -50%) scale(1);
|
-webkit-transform: translate(-50%, -50%) scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-price {
|
.label-price {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 0 30rpx 5rpx;
|
padding: 0 30rpx 5rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-price text {
|
.label-price text {
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-number {
|
.label-number {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 25rpx;
|
margin-top: 25rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number-btn {
|
.number-btn {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
line-height: 46rpx;
|
line-height: 46rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number-input {
|
.number-input {
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 底部 */
|
/* 底部 */
|
||||||
.footer {
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
background-color: #272e4f;
|
background-color: #272e4f;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number text {
|
.number text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
padding-top: 5rpx;
|
padding-top: 5rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number-price {
|
.number-price {
|
||||||
padding: 0 5rpx;
|
padding: 0 5rpx;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number-vip {
|
.number-vip {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
color: #8d97a1;
|
color: #8d97a1;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #ff9951;
|
background-color: #ff9951;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
padding: 0 70rpx;
|
padding: 0 70rpx;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn.active {
|
.btn-disabled {
|
||||||
background-color: #cacaca;
|
line-height: 60px;
|
||||||
}
|
text-align: center;
|
||||||
|
border: none;
|
||||||
.detailsBrief-back{
|
border-radius:0;
|
||||||
width: 100%;
|
background-color: #ff9951;
|
||||||
}
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
.grey {
|
}
|
||||||
background-color: #f9f9f9;
|
|
||||||
z-index: 99999;
|
button[disabled]{
|
||||||
|
padding: 0;
|
||||||
|
padding: 0;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.active {
|
||||||
|
background-color: #cacaca;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detailsBrief-back{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grey {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
z-index: 99999;
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@ Page({
|
|||||||
inviteText : '', // 自己的邀请码
|
inviteText : '', // 自己的邀请码
|
||||||
isParent : false, // 绑定邀请码
|
isParent : false, // 绑定邀请码
|
||||||
nameValue : '', // 上级邀请码
|
nameValue : '', // 上级邀请码
|
||||||
|
disabled : false
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -64,7 +65,14 @@ Page({
|
|||||||
buyTap() {
|
buyTap() {
|
||||||
// 获取登录状态
|
// 获取登录状态
|
||||||
if(wx.getStorageSync("token") != ''){
|
if(wx.getStorageSync("token") != ''){
|
||||||
|
this.setData({
|
||||||
|
disabled: true
|
||||||
|
})
|
||||||
|
|
||||||
if(this.data.mallData.is_parent == true) {
|
if(this.data.mallData.is_parent == true) {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall/confirm/confirm?goodsid=' + this.data.mallData.goods_id + '&skuid=' + this.data.mallData.skus[0].sku_id + '&qty=1',
|
url: '/pages/mall/confirm/confirm?goodsid=' + this.data.mallData.goods_id + '&skuid=' + this.data.mallData.skus[0].sku_id + '&qty=1',
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<view class="number-price">{{mallData.is_vip ? mallData.price.vip : mallData.price.price}}</view>
|
<view class="number-price">{{mallData.is_vip ? mallData.price.vip : mallData.price.price}}</view>
|
||||||
<view class="number-vip">{{mallData.is_vip ? 'VIP会员价' : '市场指导价'}}</view>
|
<view class="number-vip">{{mallData.is_vip ? 'VIP会员价' : '市场指导价'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view bindtap="buyTap" class="btn">确认购买</view>
|
<button class="btn btn-disabled" disabled="{{disabled}}" bindtap="buyTap">确认购买</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 产品图 -->
|
<!-- 产品图 -->
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,9 @@ Page({
|
|||||||
* 确认支付
|
* 确认支付
|
||||||
*/
|
*/
|
||||||
payBtn() {
|
payBtn() {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '支付中...',
|
title: '支付中...',
|
||||||
mask : true
|
mask : true
|
||||||
@@ -31,9 +34,6 @@ Page({
|
|||||||
let that = this
|
let that = this
|
||||||
wx.$api.mall.mallPay(this.data.orderNo,{type: 'miniapp', openid: wx.getStorageSync("openid")}).then(res=>{
|
wx.$api.mall.mallPay(this.data.orderNo,{type: 'miniapp', openid: wx.getStorageSync("openid")}).then(res=>{
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
this.setData({
|
|
||||||
disabled: false
|
|
||||||
})
|
|
||||||
let payInfo = JSON.parse(res.data.wechat)
|
let payInfo = JSON.parse(res.data.wechat)
|
||||||
wx.requestPayment({
|
wx.requestPayment({
|
||||||
timeStamp: payInfo.timeStamp,
|
timeStamp: payInfo.timeStamp,
|
||||||
@@ -51,7 +51,8 @@ Page({
|
|||||||
mask:true,
|
mask:true,
|
||||||
success: function () {
|
success: function () {
|
||||||
that.setData({
|
that.setData({
|
||||||
paySuccess: true
|
paySuccess: true,
|
||||||
|
disabled: true
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
@@ -71,7 +72,8 @@ Page({
|
|||||||
mask:true,
|
mask:true,
|
||||||
success: function () {
|
success: function () {
|
||||||
that.setData({
|
that.setData({
|
||||||
paySuccess: true
|
paySuccess: true,
|
||||||
|
disabled: true
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
@@ -82,6 +84,10 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(err => {});
|
}).catch(err => {
|
||||||
|
that.setData({
|
||||||
|
disabled: true
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ Page({
|
|||||||
address : '', // 地址
|
address : '', // 地址
|
||||||
addressId : '', // 地址id
|
addressId : '', // 地址id
|
||||||
dataShow : '', // 数据
|
dataShow : '', // 数据
|
||||||
exchangesHide: false
|
exchangesHide: false,
|
||||||
|
disabled : false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,6 +57,9 @@ Page({
|
|||||||
* 水滴兑换提交
|
* 水滴兑换提交
|
||||||
*/
|
*/
|
||||||
createGo (){
|
createGo (){
|
||||||
|
this.setData({
|
||||||
|
disabled: true
|
||||||
|
})
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title : '兑换提示',
|
title : '兑换提示',
|
||||||
content : '尊敬的用户,是否确认兑换此商品',
|
content : '尊敬的用户,是否确认兑换此商品',
|
||||||
@@ -65,9 +69,18 @@ Page({
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
wx.$api.recruit.exchangesPost({address_id: this.data.addressId}).then(res => {
|
wx.$api.recruit.exchangesPost({address_id: this.data.addressId}).then(res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
disabled: false,
|
||||||
exchangesHide: true
|
exchangesHide: true
|
||||||
})
|
})
|
||||||
}).catch(err => { })
|
}).catch(err => {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view class="recruit-btn" bindtap="createGo">
|
<view class="recruit-btn" bindtap="createGo">
|
||||||
<image class="recruit-btn-img" src="https://cdn.shuiganying.com/images/2023/07/21/76a01a5c46aa872e37c6af02ab2f6ace.png" mode="widthFix"></image>
|
<image class="recruit-btn-img" src="https://cdn.shuiganying.com/images/2023/07/21/76a01a5c46aa872e37c6af02ab2f6ace.png" mode="widthFix"></image>
|
||||||
<view class="recruit-btn-text">兑换水感应喷雾一瓶</view>
|
<button class="recruit-btn-text recruit-btn-disabled" disabled="{{disabled}}">兑换水感应喷雾一瓶</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,28 @@
|
|||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.recruit-btn-disabled {
|
||||||
|
line-height: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
width: 100% !important;
|
||||||
|
text-align: center;
|
||||||
|
border: none;
|
||||||
|
border-radius:0;
|
||||||
|
background-color:transparent;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button[disabled]{
|
||||||
|
padding: 0;
|
||||||
|
padding: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
color: white !important;
|
||||||
|
opacity: .8;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
.siteTop {
|
.siteTop {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ Page({
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
name : value.name,
|
name : value.name,
|
||||||
address : value.address,
|
address : value.address,
|
||||||
@@ -154,7 +153,8 @@ Page({
|
|||||||
})
|
})
|
||||||
wx.$api.recruit.recruitAdd(data).then(res => {
|
wx.$api.recruit.recruitAdd(data).then(res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
checkStatus: true
|
checkStatus: true,
|
||||||
|
disabled: false
|
||||||
})
|
})
|
||||||
}).catch(() =>{
|
}).catch(() =>{
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ Page({
|
|||||||
})
|
})
|
||||||
wx.$api.recruit.EditPut(this.data.enrollData.experience_area_enroll_id,data).then(res => {
|
wx.$api.recruit.EditPut(this.data.enrollData.experience_area_enroll_id,data).then(res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
checkStatus: true
|
checkStatus: true,
|
||||||
|
disabled: false
|
||||||
})
|
})
|
||||||
}).catch(() =>{
|
}).catch(() =>{
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@@ -126,14 +126,13 @@ Page({
|
|||||||
* 签到提交
|
* 签到提交
|
||||||
*/
|
*/
|
||||||
tapSign() {
|
tapSign() {
|
||||||
this.setData({
|
|
||||||
disabled: true
|
|
||||||
})
|
|
||||||
let newPictures = []
|
let newPictures = []
|
||||||
for (let pictures of this.data.albumArr){
|
for (let pictures of this.data.albumArr){
|
||||||
newPictures.push(pictures.path)
|
newPictures.push(pictures.path)
|
||||||
}
|
}
|
||||||
|
this.setData({
|
||||||
|
disabled: true
|
||||||
|
})
|
||||||
wx.$api.recruit.signLabor({
|
wx.$api.recruit.signLabor({
|
||||||
experience_id : this.data.experienceId,
|
experience_id : this.data.experienceId,
|
||||||
describe : this.data.etciData,
|
describe : this.data.etciData,
|
||||||
@@ -143,8 +142,13 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
refertoStatus: true,
|
refertoStatus: true,
|
||||||
signDayNumber: res.data.signDayNumber,
|
signDayNumber: res.data.signDayNumber,
|
||||||
signWaterNumber: res.data.signWaterNumber
|
signWaterNumber: res.data.signWaterNumber,
|
||||||
|
disabled: false
|
||||||
})
|
})
|
||||||
}).catch(err => {})
|
}).catch(err => {
|
||||||
|
this.setData({
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user