NVUE页面调试经常报错,不知道为什么

This commit is contained in:
2022-02-11 14:43:22 +08:00
parent 8aebe0eef5
commit efcfa00545
12 changed files with 315 additions and 145 deletions

48
pages/im/group/create.vue Normal file
View File

@@ -0,0 +1,48 @@
<template>
<view>
<u--input placeholder="请输入内容" border="surround" v-model="group_name"></u--input>
<u-button type="primary" text="确定" @click="onCreate"></u-button>
</view>
</template>
<script>
import {
createGroup
} from '@/apis/interfaces/im.js'
export default {
data() {
return {
group_name: '',
}
},
onLoad() {
},
methods: {
onCreate() {
console.log('阿斯利康');
createGroup({
name: this.group_name
}).then(res => {
console.log(res);
uni.showToast({
title: '创建成功'
})
uni.navigateBack()
}).catch(err => {
console.log(err);
uni.showToast({
icon: 'none',
title: err
})
})
}
}
}
</script>
<style>
</style>