Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-app
Commits
e383c323
Commit
e383c323
authored
Jan 03, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将图片基础路径放到了vuex里
parent
0a4ba165
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
58 additions
and
54 deletions
+58
-54
login.vue
components/login/login.vue
+1
-1
main.js
main.js
+16
-31
Item.vue
pages/components/article/Item.vue
+1
-1
List.vue
pages/components/article/List.vue
+1
-1
activity.vue
pages/tab/activity.vue
+1
-1
article.vue
pages/tab/article.vue
+1
-1
index.vue
pages/tab/index.vue
+1
-1
my.vue
pages/tab/my.vue
+1
-1
rank.vue
pages/tab/rank.vue
+1
-1
index.vue
pages2/components/elm/index.vue
+1
-1
activityDetail.vue
pagesActivity/activityDetail.vue
+1
-1
articleDetail.vue
pagesArticle/articleDetail.vue
+1
-1
articleItem.vue
pagesArticle/components/articleItem.vue
+1
-1
userInfo.vue
pagesUser/userInfo.vue
+1
-1
index.vue
pageslogin/index.vue
+1
-1
index.vue
pagesme/components/elm/index.vue
+1
-1
doubleauth.vue
pagesme/me/doubleauth.vue
+1
-1
identityauthentication.vue
pagesme/me/identityauthentication.vue
+1
-1
likeList.vue
pagesme/me/likeList.vue
+1
-1
updateInformation.vue
pagesme/me/updateInformation.vue
+1
-1
aboutme.vue
pagesme/set/aboutme.vue
+1
-1
contact.vue
pagesme/set/contact.vue
+1
-1
set.vue
pagesme/set/set.vue
+1
-1
preference.vue
pagespreference/preference/preference.vue
+1
-1
index.js
store/index.js
+19
-0
No files found.
components/login/login.vue
View file @
e383c323
...
...
@@ -42,7 +42,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
};
},
methods
:
{
...
...
main.js
View file @
e383c323
import
App
from
'./App'
// #ifndef VUE3
import
Vue
from
'vue'
Vue
.
config
.
productionTip
=
false
App
.
mpType
=
'app'
const
app
=
new
Vue
({
...
App
})
app
.
$mount
()
// #endif
// 引入全局uView
import
uView
from
'@/uni_modules/uview-ui'
Vue
.
use
(
uView
)
import
{
request
,
BASE_URL
,
getId
,
}
from
'util/api.js'
;
// 导入并挂载全局的分享方法
import
share
from
'@/common/share.js'
import
Vue
from
'vue'
// 引入全局uView
import
uView
from
'@/uni_modules/uview-ui'
import
store
from
'./store/index'
Vue
.
config
.
productionTip
=
false
App
.
mpType
=
'app'
Vue
.
use
(
uView
)
Vue
.
prototype
.
$myRequest
=
request
;
// 接口请求
Vue
.
prototype
.
$BASE_URL
=
BASE_URL
;
//正式接口
Vue
.
prototype
.
$getId
=
getId
;
// 获取缓存用户信息
Vue
.
prototype
.
$store
=
store
;
//正式接口
// 导入并挂载全局的分享方法
import
share
from
'@/common/share.js'
Vue
.
mixin
(
share
)
// #ifdef VUE3
import
{
createSSRApp
}
from
'vue'
export
function
createApp
()
{
const
app
=
createSSRApp
(
App
)
return
{
app
}
}
// #endif
const
app
=
new
Vue
({
store
,
...
App
})
app
.
$mount
()
pages/components/article/Item.vue
View file @
e383c323
...
...
@@ -155,7 +155,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
tagStyle
:
{
text
:
'line-height:1em'
},
...
...
pages/components/article/List.vue
View file @
e383c323
...
...
@@ -38,7 +38,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
// v-model绑定的这个变量不要在分页请求结束中自己赋值!!!
dataList
:
[],
// 当前组件是否已经加载过了
...
...
pages/tab/activity.vue
View file @
e383c323
...
...
@@ -50,7 +50,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//分页查询参数
queryParam
:{
page
:
1
,
...
...
pages/tab/article.vue
View file @
e383c323
...
...
@@ -61,7 +61,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//tab标签
list
:
[{
name
:
'关注'
...
...
pages/tab/index.vue
View file @
e383c323
...
...
@@ -84,7 +84,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
// 商家列表
notice
:{},
//banner列表
...
...
pages/tab/my.vue
View file @
e383c323
...
...
@@ -194,7 +194,7 @@ import {setUserProfile} from '../../api/login/index'
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
tipsShow
:
false
,
//授权弹窗
nologin
:
''
,
//登录标志
userInfo
:{},
//用户信息
...
...
pages/tab/rank.vue
View file @
e383c323
...
...
@@ -121,7 +121,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
subList
:
[
{
name
:
'女生榜'
...
...
pages2/components/elm/index.vue
View file @
e383c323
...
...
@@ -23,7 +23,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
show
:
false
,
info
:
this
.
dataInfo
};
...
...
pagesActivity/activityDetail.vue
View file @
e383c323
...
...
@@ -55,7 +55,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
show
:
false
,
//报名弹窗
activityDetail
:
{},
//活动详情
activityId
:
''
,
// 活动id
...
...
pagesArticle/articleDetail.vue
View file @
e383c323
...
...
@@ -200,7 +200,7 @@ export default{
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
item
:{
createTime
:
'2024-12-28 15:02:01'
,
headPortrait
:
'http://192.168.1.80/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg'
,
//头像
...
...
pagesArticle/components/articleItem.vue
View file @
e383c323
...
...
@@ -81,7 +81,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
tagStyle
:
{
text
:
'line-height:1em'
},
...
...
pagesUser/userInfo.vue
View file @
e383c323
...
...
@@ -261,7 +261,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//用户信息
userData
:
{
result
:
true
,
...
...
pageslogin/index.vue
View file @
e383c323
...
...
@@ -18,7 +18,7 @@
export
default
{
data
()
{
return
{
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//用户初始化登录 (可能用户类型传参错误)
initLoginError
:
false
,
tipMsg
:
''
,
...
...
pagesme/components/elm/index.vue
View file @
e383c323
...
...
@@ -23,7 +23,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
show
:
false
,
info
:
this
.
dataInfo
};
...
...
pagesme/me/doubleauth.vue
View file @
e383c323
...
...
@@ -38,7 +38,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
userInfo
:
{},
tipMsg
:
''
,
isConfirm
:
false
...
...
pagesme/me/identityauthentication.vue
View file @
e383c323
...
...
@@ -17,7 +17,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
updatezImg
:
""
,
updatefImg
:
""
,
newImageSrc
:
""
,
...
...
pagesme/me/likeList.vue
View file @
e383c323
...
...
@@ -38,7 +38,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//用户列表
userList
:[
{
...
...
pagesme/me/updateInformation.vue
View file @
e383c323
...
...
@@ -242,7 +242,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
//用户资料
userInfo
:
{
waitApprovedStatus
:
''
,
...
...
pagesme/set/aboutme.vue
View file @
e383c323
...
...
@@ -21,7 +21,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
}
},
methods
:
{
...
...
pagesme/set/contact.vue
View file @
e383c323
...
...
@@ -13,7 +13,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
};
},
onLoad
()
{
...
...
pagesme/set/set.vue
View file @
e383c323
...
...
@@ -24,7 +24,7 @@
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
list
:
[{
name
:
"推荐设置"
,
url
:
"/pagespreference/preference/preference"
...
...
pagespreference/preference/preference.vue
View file @
e383c323
...
...
@@ -53,7 +53,7 @@ export default {
data
()
{
return
{
//图片路径
baseUrl
:
'http://192.168.1.80/static/images'
,
baseUrl
:
this
.
$store
.
state
.
imgUrl
,
falg
:
false
,
minValue
:
1
,
maxValue
:
100
,
...
...
store/index.js
0 → 100644
View file @
e383c323
import
Vue
from
'vue'
import
Vuex
from
'vuex'
Vue
.
use
(
Vuex
)
const
store
=
new
Vuex
.
Store
({
state
:
{
imgUrl
:
'http://192.168.1.80/static/images'
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
},
mutations
:
{
//相当于同步的操作
},
actions
:
{
//相当于异步的操作,不能直接改变state的值,只能通过触发mutations的方法才能改变
}
})
export
default
store
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment