|
@@ -15,8 +15,10 @@
|
|
|
<uni-forms-item label="收货地址:" name="receiveAddress" required>
|
|
|
<textarea v-model="form.receiveAddress" placeholder="请输入收货地址" />
|
|
|
</uni-forms-item>
|
|
|
- <button @click="getSubmit" :disabled="disabled">确认</button>
|
|
|
</uni-forms>
|
|
|
+ <view class="submit">
|
|
|
+ <button @click="getSubmit" :disabled="disabled">确认</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -69,9 +71,9 @@ export default {
|
|
|
|
|
|
// 确定
|
|
|
getSubmit() {
|
|
|
- this.disabled = true
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (!valid) {
|
|
|
+ this.disabled = true
|
|
|
receive(getApp().globalData.userInfo, this.form).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
uni.showToast({
|
|
@@ -81,11 +83,12 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.getBack()
|
|
|
}, 3000)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
icon: 'error',
|
|
|
title: res.data.message,
|
|
|
})
|
|
|
+ this.disabled = false
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -139,11 +142,18 @@ export default {
|
|
|
.form-item {
|
|
|
margin: 32rpx 0 0 0;
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ .submit {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 100rpx;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%);
|
|
|
|
|
|
button {
|
|
|
background: linear-gradient(180deg, #72cdae 0%, #599f82 100%);
|
|
|
color: #fff;
|
|
|
- // width: 480rpx;
|
|
|
+ width: 480rpx;
|
|
|
height: 80rpx;
|
|
|
line-height: 80rpx;
|
|
|
border-radius: 50rpx;
|