|
@@ -20,6 +20,7 @@
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: authUser } = createNamespacedHelpers('authUser');
|
|
|
+const { mapActions: mapMarket } = createNamespacedHelpers('market');
|
|
|
export default {
|
|
|
name: 'followbind',
|
|
|
props: {},
|
|
@@ -48,9 +49,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...authUser(['create']),
|
|
|
+ ...mapMarket({ userFetch: 'fetch', userCreate: 'create', userUpdate: 'update' }),
|
|
|
async bindBtn() {
|
|
|
let obj = { ...JSON.parse(JSON.stringify(this.info)), role: '4', openid: this.openid };
|
|
|
- let res = await this.create(obj);
|
|
|
+ let res = await this.userCreate(obj);
|
|
|
if (res.errcode == '0') {
|
|
|
this.$message.success('注册成功');
|
|
|
WeixinJSBridge.call('closeWindow');
|