|
@@ -517,30 +517,30 @@
|
|
|
uni.getUserProfile({
|
|
|
desc: '用于展示',
|
|
|
success: async function(res) {
|
|
|
- let parmas = {
|
|
|
- openid: that.openid,
|
|
|
- icon: [{
|
|
|
- url: res.userInfo.avatarUrl
|
|
|
- }],
|
|
|
- name: res.userInfo.nickName + moment().valueOf()
|
|
|
- }
|
|
|
uni.getStorage({
|
|
|
key: 'shop',
|
|
|
- success: async function(res) {
|
|
|
- parmas.shop = res.data
|
|
|
+ success: async function(aee) {
|
|
|
+ let parmas = {
|
|
|
+ openid: that.openid,
|
|
|
+ icon: [{
|
|
|
+ url: res.userInfo.avatarUrl
|
|
|
+ }],
|
|
|
+ shop: aee.data,
|
|
|
+ name: res.userInfo.nickName + moment().valueOf()
|
|
|
+ }
|
|
|
+ const arr = await that.$api(`/user`, 'POST', parmas);
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ that.$set(that, `user`, arr.data);
|
|
|
+ // 打开弹框
|
|
|
+ that.diaShow();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- const arr = await that.$api(`/user`, 'POST', parmas);
|
|
|
- if (arr.errcode == '0') {
|
|
|
- that.$set(that, `user`, arr.data);
|
|
|
- // 打开弹框
|
|
|
- that.diaShow();
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: arr.errmsg,
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
fail: function(err) {
|
|
|
console.log(err);
|