|
@@ -33,22 +33,22 @@ const homeMiXins = {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(['login', 'logout','updateNoticeNum','updateRossShow']),
|
|
...mapMutations(['login', 'logout','updateNoticeNum','updateRossShow']),
|
|
- mallOrganizeHome() {
|
|
|
|
|
|
+ async mallOrganizeHome() {
|
|
//初始化首页数据
|
|
//初始化首页数据
|
|
- this.CommonService.mallOrganizeHome({ organizeId: 1 })
|
|
|
|
- .then(res => {
|
|
|
|
- let data = res.data
|
|
|
|
- this.bannerList = data.bannerList
|
|
|
|
- this.mainmenu = data.mainmenu
|
|
|
|
- this.floorList = data.floorList
|
|
|
|
- // if (this.hasLogin) {
|
|
|
|
- // // this.initShoppingCartCount()
|
|
|
|
- // }
|
|
|
|
- this.skeletonShow = true
|
|
|
|
- })
|
|
|
|
- .catch(error => {
|
|
|
|
- this.$util.msg(error.msg, 2000)
|
|
|
|
- })
|
|
|
|
|
|
+ try{
|
|
|
|
+ const res = await this.CommonService.mallOrganizeHome({ organizeId: 1 })
|
|
|
|
+ let data = res.data
|
|
|
|
+ this.bannerList = data.bannerList
|
|
|
|
+ this.mainmenu = data.mainmenu
|
|
|
|
+ this.floorList = data.floorList
|
|
|
|
+ // if (this.hasLogin) {
|
|
|
|
+ // // this.initShoppingCartCount()
|
|
|
|
+ // }
|
|
|
|
+ this.skeletonShow = true
|
|
|
|
+ }catch(error){
|
|
|
|
+ //TODO handle the exception
|
|
|
|
+ console.log('error',error)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async GetWxAuthorize() {
|
|
async GetWxAuthorize() {
|
|
const wechatCode = await authorize.getCode('weixin') // 根据微信的code获取用户登录状态:1已登录过 -1未登录过
|
|
const wechatCode = await authorize.getCode('weixin') // 根据微信的code获取用户登录状态:1已登录过 -1未登录过
|