Commit 146fe6ae authored by Facius's avatar Facius

feat: 名片编辑

parent cb9e41f4
Pipeline #2912 canceled with stages
...@@ -115,7 +115,9 @@ ...@@ -115,7 +115,9 @@
</view> </view>
</u-form> </u-form>
</view> </view>
<view class="loading-view" v-if="loading"><u-loading mode="flower"></u-loading></view> <view class="loading-view" v-if="loading"
><u-loading mode="flower"></u-loading
></view>
<view class="bottom-view"> <view class="bottom-view">
<u-button <u-button
:custom-style="customConFirm" :custom-style="customConFirm"
...@@ -127,6 +129,7 @@ ...@@ -127,6 +129,7 @@
</u-button> </u-button>
</view> </view>
<PopImage :visible.sync="visible" :images="currentImages" /> <PopImage :visible.sync="visible" :images="currentImages" />
<u-toast ref="uToast" />
</view> </view>
</template> </template>
...@@ -304,8 +307,15 @@ export default { ...@@ -304,8 +307,15 @@ export default {
if (res.data) { if (res.data) {
this.buttonLoading = false this.buttonLoading = false
uni.$emit('card-refresh') uni.$emit('card-refresh')
this.$u.route({ this.$refs.uToast.show({
type: 'back', title: this.cardId ? '编辑成功' : '创建成功',
type: 'success',
duration: 1500,
callback: () => {
this.$u.route({
type: 'back',
})
},
}) })
} }
}) })
...@@ -324,7 +334,7 @@ export default { ...@@ -324,7 +334,7 @@ export default {
this.$refs.uForm.validate((valid) => { this.$refs.uForm.validate((valid) => {
if (valid) { if (valid) {
console.log('验证通过') console.log('验证通过')
this.editbusinessCard() this.editBusinessCard()
} else { } else {
console.log('验证失败') console.log('验证失败')
} }
...@@ -458,15 +468,15 @@ export default { ...@@ -458,15 +468,15 @@ export default {
font-size: 32rpx; font-size: 32rpx;
} }
} }
.loading-view { .loading-view {
width: 100%; width: 100%;
background-color: transparent; background-color: transparent;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
top: 50%; top: 50%;
left: 0; left: 0;
position: fixed; position: fixed;
} }
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment