diff --git a/pages/index/index.js b/pages/index/index.js
index 8b4fd3a..0822603 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -15,10 +15,10 @@ Page({
personIntro: {},
companyIntro: {},
shareImg: '',
- phoneTxt: '',
- emailTxt: '',
- wechateTxt: '',
- addressTxt: '',
+ phoneTxt: '未录入',
+ emailTxt: '未录入',
+ wechateTxt: '未录入',
+ addressTxt: '未录入',
viewInfo: {},
forwardCount: '',
imgUrl: app.urls.baseImgUrl,
@@ -134,6 +134,52 @@ Page({
wx.stopPullDownRefresh({})
})
},
+ //获取首页基础数据 电话 微信号 地址 邮箱
+ getMainBaseUserInfo(userid) {
+ var _self = this
+ app.http.get(app.urls.getMainMoment.format({
+ configColumnId: 'de7b5e22-64f9-4c60-a1f9-6ac004dfb9a8'
+ }), {
+ header: {
+ token: app.globalData.token
+ },
+ data: {
+ userId: userid
+ }
+ })
+ .then(res => {
+ if (res.data.length > 0) {
+ res.data[0].list.forEach(it => {
+ switch (it.name) {
+ case 'phone':
+ _self.setData({
+ phoneTxt: it.value
+ })
+ break
+ case 'wechat':
+ _self.setData({
+ wechateTxt: it.value
+ })
+ break
+ case 'email':
+ _self.setData({
+ emailTxt: it.value
+ })
+ break
+ case 'address':
+ _self.setData({
+ addressTxt: it.value
+ })
+ break
+ }
+ })
+ }
+ })
+ .catch(err => {
+ console.log(err)
+ })
+ },
+ //获取首页栏目数据
getMainMoment(datas, userid, index) {
var _self = this
var count = datas.length
@@ -475,23 +521,7 @@ Page({
} else {
area[i]['templateAreaFontStyle'] = 'italic'
}
- if (area[i].templateAreaSource == 'phone') {
- self.setData({
- phoneTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'wechat') {
- self.setData({
- wechatTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'email') {
- self.setData({
- emailTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'address') {
- self.setData({
- addressTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'name') {
+ if (area[i].templateAreaSource == 'name') {
self.setData({
nameTxt: area[i].templateAreaFontValue
})
@@ -512,6 +542,7 @@ Page({
})
app.globalData.userId = res.data.creator
self.getMainColumn(res.data.creator)
+ self.getMainBaseUserInfo(res.data.creator)
}
}).catch(res => {
@@ -863,23 +894,7 @@ Page({
} else {
area[i]['templateAreaFontStyle'] = 'italic'
}
- if (area[i].templateAreaSource == 'phone') {
- self.setData({
- phoneTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'wechat') {
- self.setData({
- wechatTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'email') {
- self.setData({
- emailTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'address') {
- self.setData({
- addressTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'name') {
+ if (area[i].templateAreaSource == 'name') {
self.setData({
nameTxt: area[i].templateAreaFontValue
})
@@ -899,6 +914,7 @@ Page({
tempUserId: res.data.creator
})
self.getMainColumn(res.data.creator) //获取当前用户的栏目
+ self.getMainBaseUserInfo(res.data.creator)
}
})
},
@@ -1029,23 +1045,7 @@ Page({
} else {
area[i]['templateAreaFontStyle'] = 'italic'
}
- if (area[i].templateAreaSource == 'phone') {
- self.setData({
- phoneTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'wechat') {
- self.setData({
- wechatTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'email') {
- self.setData({
- emailTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'address') {
- self.setData({
- addressTxt: area[i].templateAreaFontValue
- })
- } else if (area[i].templateAreaSource == 'name') {
+ if (area[i].templateAreaSource == 'name') {
self.setData({
nameTxt: area[i].templateAreaFontValue
})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index b53c7a7..49e6d62 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -60,28 +60,28 @@
拨打电话
- {{phoneTxt}}
+ {{phoneTxt}}
添加微信
- {{wechateTxt}}
+ {{wechateTxt}}
邮箱
- {{emailTxt}}
+ {{emailTxt}}
地址
- {{addressTxt}}
+ {{addressTxt}}
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 94be826..32f3cdb 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -474,14 +474,17 @@ page {
width: 100%;
padding-bottom: 0px;
}
-.image-32{
+
+.image-32 {
width: 64rpx;
height: 64rpx;
}
-.image-64{
+
+.image-64 {
width: 128rpx;
height: 128rpx;
}
+
.avatar-list {
width: 45rpx;
height: 45rpx;
@@ -572,7 +575,8 @@ page {
.mid-btn-title {
display: flex;
flex-direction: row;
- justify-content: center;
+ justify-content: flex-start;
+ flex: 3;
align-items: center;
}
diff --git a/pages/mine/columnlist/columnlist.wxml b/pages/mine/columnlist/columnlist.wxml
index fcca931..817b35d 100644
--- a/pages/mine/columnlist/columnlist.wxml
+++ b/pages/mine/columnlist/columnlist.wxml
@@ -9,7 +9,7 @@
-
+
diff --git a/pages/mine/index/index.js b/pages/mine/index/index.js
index 984f061..a5bdd3e 100644
--- a/pages/mine/index/index.js
+++ b/pages/mine/index/index.js
@@ -173,11 +173,8 @@ Page({
//跳转设置页面
showSetting() {
wx.navigateTo({
- url: '/pages/mine/shop/addshop',
+ url: '../../mine/setting/columnsetting'
})
- // wx.navigateTo({
- // url: '../../mine/setting/columnsetting'
- // })
},
imgHeight(e) {
var winWid = wx.getSystemInfoSync().windowWidth; //获取当前屏幕的宽度
diff --git a/pages/mine/index/index.wxss b/pages/mine/index/index.wxss
index fe7ccfa..a9f1ff6 100644
--- a/pages/mine/index/index.wxss
+++ b/pages/mine/index/index.wxss
@@ -130,7 +130,7 @@ map,
right: 20rpx;
bottom: 20rpx;
padding: 20rpx;
- background: #0054bd;
+ background: #E6B980;
border-radius: 50%;
box-sizing: border-box;
align-items: center;
diff --git a/utils/api.js b/utils/api.js
index a6c467b..d4c3eb3 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -1,7 +1,7 @@
var apis = {
- url: 'http://192.168.0.111:8091/systemcard/',
- userCenter: 'http://192.168.0.111:8091/systemcard/',
- baseImgUrl: 'http://192.168.0.111:8091/systemcard/route/file/download/true/',
+ url: 'http://192.168.0.115:8091/systemcard/',
+ userCenter: 'http://192.168.0.115:8091/systemcard/',
+ baseImgUrl: 'http://192.168.0.115:8091/systemcard/route/file/download/true/',
doSaveUserInfo: `app/miniapp/user/update-info`, //保存微信头像与名称
doUpdatePhone: `app/miniapp/update-phone`, //绑定手机号 token, {phone:''} put
doUploadImg: `app/file/uploadimage`, //上传图片