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,9 +307,16 @@ export default { ...@@ -304,9 +307,16 @@ export default {
if (res.data) { if (res.data) {
this.buttonLoading = false this.buttonLoading = false
uni.$emit('card-refresh') uni.$emit('card-refresh')
this.$refs.uToast.show({
title: this.cardId ? '编辑成功' : '创建成功',
type: 'success',
duration: 1500,
callback: () => {
this.$u.route({ this.$u.route({
type: 'back', type: 'back',
}) })
},
})
} }
}) })
.catch((res) => { .catch((res) => {
...@@ -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('验证失败')
} }
......
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