Browse Source

登录提示

dev_czc
HolyKnightIX 2 years ago
parent
commit
026b2458d5
2 changed files with 24 additions and 23 deletions
  1. +15
    -18
      ext.json
  2. +9
    -5
      pages/index/index.js

+ 15
- 18
ext.json View File

@@ -4,26 +4,23 @@
"configUrl": "https://b.malls.iformall.com", "configUrl": "https://b.malls.iformall.com",
"datatowerurl": "https://mobile.malls.iformall.com" "datatowerurl": "https://mobile.malls.iformall.com"
}, },
"name": "吾悦广场集团版商户端",
"weappId": "ttb8a1ce1c279e948801",
"appVersion": "Btest.5.1.0"
"name": "滨江购物广场商家版",
"weappId": "tt61cc1771fef34a7701",
"appVersion": "B.5.1.0"
}, },
"debug": false, "debug": false,
"tabBar": { "tabBar": {
"list": [
{
"text": "首页",
"iconPath": "assets/images/home-n.png",
"pagePath": "pages/main/main",
"selectedIconPath": "assets/images/home-y.png"
},
{
"text": "我的",
"iconPath": "assets/images/user-n.png",
"pagePath": "pages/user/user",
"selectedIconPath": "assets/images/user-y.png"
}
],
"list": [{
"text": "首页",
"iconPath": "assets/images/home-n.png",
"pagePath": "pages/main/main",
"selectedIconPath": "assets/images/home-y.png"
}, {
"text": "我的",
"iconPath": "assets/images/user-n.png",
"pagePath": "pages/user/user",
"selectedIconPath": "assets/images/user-y.png"
}],
"color": "#9F9F9F", "color": "#9F9F9F",
"selectedColor": "#52a0fd", "selectedColor": "#52a0fd",
"backgroundColor": "#fff" "backgroundColor": "#fff"
@@ -32,7 +29,7 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#52A0FD" "navigationBarBackgroundColor": "#52A0FD"
}, },
"extAppid": "ttb8a1ce1c279e948801",
"extAppid": "tt61cc1771fef34a7701",
"extEnable": true, "extEnable": true,
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {


+ 9
- 5
pages/index/index.js View File

@@ -128,10 +128,8 @@ Page({
if (pwd != '') { if (pwd != '') {
Common.userLogin(phone, pwd, app.globalData.latitude, app.globalData.longitude) Common.userLogin(phone, pwd, app.globalData.latitude, app.globalData.longitude)
.then(res => { .then(res => {
const logined = res.data.logined
const merchantList = res.data.merchantList
// 当logined为true时,正常进入商户 // 当logined为true时,正常进入商户
if (logined) {
if (res.data && res.data.logined == true) {
if (res.code == 200) { if (res.code == 200) {
HttpBasics.setBUserId(res.data.bUserId); HttpBasics.setBUserId(res.data.bUserId);
tt.setStorageSync("phone", phone); tt.setStorageSync("phone", phone);
@@ -176,12 +174,18 @@ Page({
}) })
} }
// 当logined为false时,选择商户 // 当logined为false时,选择商户
} else {
} else if (res.data && res.data.logined == false) {
tt.setStorageSync("phone", phone); tt.setStorageSync("phone", phone);
tt.setStorageSync("pwd", pwd); tt.setStorageSync("pwd", pwd);
this.setData({ this.setData({
ifShowShop: true, ifShowShop: true,
merchantList: merchantList
merchantList: res.data.merchantList
})
} else {
tt.showToast({
image: './../../assets/images/fail.png',
title: res.message,
icon: "none"
}) })
} }
}) })


Loading…
Cancel
Save