diff --git a/src/manifest.json b/src/manifest.json
index 0aac863..e53f73f 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -17,6 +17,7 @@
"scope.userLocation": {
"desc": "你的位置信息将用于当前事件发生地点"
}
- }
+ },
+ "requiredPrivateInfos" : ["getLocation"]
}
}
diff --git a/src/project/tianfuxing/AppHome/Activity.vue b/src/project/tianfuxing/AppHome/Activity.vue
index 1f38164..9cc2bab 100644
--- a/src/project/tianfuxing/AppHome/Activity.vue
+++ b/src/project/tianfuxing/AppHome/Activity.vue
@@ -17,11 +17,30 @@
进场打卡
-
{{ info.intoBegintime }} 至 {{ info.intoEndtime }}
+
+
{{ info.intoBegintime }} 至
+
{{ info.intoEndtime }}
+
离场打卡
-
{{ info.exitBegintime }} 至 {{ info.exitEndtime }}
+
+
{{ info.exitBegintime }} 至
+
{{ info.exitEndtime }}
+
+
+
+
+
+
打卡信息
+
+
+
进场打卡时间
+ {{ info.intoClock.clockTime || '-' }}
+
+
+
离场打卡时间
+ {{ info.exitClock.clockTime || '-' }}
@@ -37,6 +56,7 @@
@@ -146,7 +143,7 @@
.wrapper {
position: relative;
z-index: 11;
- padding-top: 208px;
+ padding-top: 30px;
}
.back-wrapper {
@@ -260,11 +257,13 @@
color: #999999;
}
- span {
+ div {
flex: 1;
- text-align: justify;
- font-size: 28px;
- color: #333333;
+
+ p {
+ font-size: 28px;
+ color: #333333;
+ }
}
}
}
diff --git a/src/project/tianfuxing/AppHome/Culture.vue b/src/project/tianfuxing/AppHome/Culture.vue
index 1a3bef7..34f0e12 100644
--- a/src/project/tianfuxing/AppHome/Culture.vue
+++ b/src/project/tianfuxing/AppHome/Culture.vue
@@ -120,7 +120,7 @@ export default {
uploadFile (img, total, type) {
uni.uploadFile({
- url: this.$instance.defaults.baseURL + '/api/file/add',
+ url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
filePath: img,
name: 'file',
header: {
@@ -139,7 +139,7 @@ export default {
complete: () => {
this.$nextTick(() => {
if (this.imgList.length === total && this.hideStatus) {
- this.$instance.post(`/appwechatescalation/addOrUpdate`, {
+ this.$instance.post(`/api/appwechatescalation/addOrUpdate`, {
type: type,
openId: this.user.openId,
accessUrl: this.imgList[0]
@@ -162,7 +162,7 @@ export default {
getList () {
if (this.isMore) return
- this.$instance.post(`/appwechatescalation/list`, null, {
+ this.$instance.post(`/api/appwechatescalation/list`, null, {
params: {
current: this.current,
size: 10,
diff --git a/src/project/tianfuxing/AppHome/PhotoReport.vue b/src/project/tianfuxing/AppHome/PhotoReport.vue
index dde7505..b7337ca 100644
--- a/src/project/tianfuxing/AppHome/PhotoReport.vue
+++ b/src/project/tianfuxing/AppHome/PhotoReport.vue
@@ -118,7 +118,7 @@
uploadFile (img, total) {
uni.uploadFile({
- url: this.$instance.defaults.baseURL + '/api/file/add',
+ url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
filePath: img,
name: 'file',
header: {
@@ -137,7 +137,7 @@
complete: () => {
this.$nextTick(() => {
if (this.imgList.length === total && this.hideStatus) {
- this.$instance.post(`/appwechatescalation/addOrUpdate`, {
+ this.$instance.post(`/api/appwechatescalation/addOrUpdate`, {
type: 0,
listType: 0,
openId: this.user.openId,
@@ -166,7 +166,7 @@
getList () {
if (this.isMore) return
- this.$instance.post(`/appwechatescalation/list`, null, {
+ this.$instance.post(`/api/appwechatescalation/list`, null, {
params: {
current: this.current,
size: 10,
diff --git a/src/project/tianfuxing/AppMy/AppMy.vue b/src/project/tianfuxing/AppMy/AppMy.vue
index e5f3900..c50c858 100644
--- a/src/project/tianfuxing/AppMy/AppMy.vue
+++ b/src/project/tianfuxing/AppMy/AppMy.vue
@@ -14,12 +14,12 @@
积分总额
- {{ user.integral }}
+ {{ user.integral || 0 }}
积分排名
- {{ user.integralOrder }}
+ {{ user.integralOrder || 0 }}
@@ -69,7 +69,22 @@
if (this.token) {
this.getUserInfo()
this.getList()
+ } else {
+ this.autoLogin()
}
+
+ uni.$on('updateUserInfo', () => {
+ this.getUserInfo()
+ })
+ },
+
+ onShow () {
+ this.isMore = false
+ this.current = 1
+
+ this.$nextTick(() => {
+ this.getList()
+ })
},
methods: {
@@ -85,7 +100,10 @@
toLogin () {
if (!this.token) {
- this.autoLogin()
+ this.autoLogin().then(() => {
+ this.getList()
+ this.getUserInfo()
+ })
} else {
this.getUserInfo()
}
@@ -94,10 +112,11 @@
getList () {
if (this.isMore) return
- this.$instance.post(`/appwechatintegraldetail/list`, null, {
+ this.$instance.post(`/api/appwechatintegraldetail/list`, null, {
params: {
current: this.current,
- size: 10
+ size: 10,
+ openId: this.user.openId
}
}).then(res => {
if (res.code === 0) {
@@ -124,9 +143,9 @@
}
},
- onReachBottom () {
- this.getList()
- }
+ onReachBottom () {
+ this.getList()
+ }
}
@@ -158,12 +177,12 @@
}
p {
+ margin-top: 18px;
color: #8891A1;
font-size: 26px;
}
h2 {
- margin-bottom: 18px;
font-weight: 600;
font-size: 34px;
color: #1D2229;
diff --git a/src/project/tianfuxing/AppMy/UserInfo.vue b/src/project/tianfuxing/AppMy/UserInfo.vue
index f36e850..980626a 100644
--- a/src/project/tianfuxing/AppMy/UserInfo.vue
+++ b/src/project/tianfuxing/AppMy/UserInfo.vue
@@ -16,10 +16,16 @@
+
@@ -57,10 +63,41 @@
})
},
+ save () {
+ if (!this.userInfo.avatarUrl) {
+ return this.$toast('请上传头像')
+ }
+
+ if (!this.userInfo.nickName) {
+ return this.$toast('请输入昵称')
+ }
+
+ if (!this.userInfo.phone) {
+ return this.$toast('请输入手机号')
+ }
+
+ this.$loading()
+ this.$instance.post('/api/appwechatuser/update-nickName', null, {
+ params: {
+ ...this.userInfo
+ }
+ }).then(res => {
+ if (res.code === 0) {
+ this.$toast('保存成功')
+
+ uni.$emit('updateUserInfo')
+
+ setTimeout(() => {
+ wx.navigateBack()
+ }, 600)
+ }
+ })
+ },
+
onChooseAvatar (e) {
this.$loading()
uni.uploadFile({
- url: this.$instance.defaults.baseURL + '/api/file/add',
+ url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
filePath: e.detail.avatarUrl,
name: 'file',
header: {
@@ -92,19 +129,6 @@
success: res => {
}
})
- },
-
- save () {
- this.$loading()
- this.$http.post('/app/editUserInfo', null, {
- params: {
- ...this.userInfo
- }
- }).then(res => {
- if (res.code === 0) {
- this.$toast('保存成功')
- }
- })
}
}
}
diff --git a/src/utils/axios.js b/src/utils/axios.js
index 1189fef..45ee765 100644
--- a/src/utils/axios.js
+++ b/src/utils/axios.js
@@ -6,8 +6,8 @@ import instance from "dvcp-wui/utils/http";
instance.defaults.baseURL = setting.baseUrl
instance.interceptors.request.use(config => {
- if (config.baseURL === 'http://192.168.1.87:12421') {
- config.url = '/api' + config.url.replace(/(app|auth|admin)\//, "")
+ if (config.baseURL === 'http://192.168.1.87:59998') {
+ config.url = config.url.replace(/(app|auth|admin|api)\//, "")
}
return config
diff --git a/src/utils/config.js b/src/utils/config.js
index c5da9df..f686029 100644
--- a/src/utils/config.js
+++ b/src/utils/config.js
@@ -16,7 +16,7 @@ const configs = {
dev: {
areaId: '341021104000',
areaName: '郑村镇',
- baseUrl: 'http://192.168.1.87:12421'
+ baseUrl: 'http://192.168.1.87:59998'
}
}
// 当前选中配置