Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
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
高淑倩
7-Eleven
Commits
776dfd1f
Commit
776dfd1f
authored
Jun 19, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: imageUrl_globalData
parent
c7b2c4b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
6 deletions
+21
-6
app.js
src/app.js
+1
-1
index.js
src/config/index.js
+15
-2
userCenter.js
src/pages/userCenter/userCenter.js
+1
-0
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+0
-1
util.js
src/utils/util.js
+4
-2
No files found.
src/app.js
View file @
776dfd1f
...
...
@@ -105,7 +105,7 @@ App({
storeId
:
''
,
storeName
:
''
,
loginFirst
:
false
,
imageUrl
:
""
,
//图片地址
imageUrl
:
envInfo
.
imgCtx
,
//图片地址
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
commonFunc
:
commonFunc
,
// brandId: 2711,
...
...
src/config/index.js
View file @
776dfd1f
...
...
@@ -9,10 +9,15 @@ const needMock = '' //
// const devCtx = 'http://111.231.86.64'
const
devCtx
=
'http://buyer.devapi.bigaka.net'
// 开发环境
const
testCtx
=
'https://crm-b.bigaka.net/api'
// 发
预生产
时解开此注释
const
testCtx
=
'https://crm-b.bigaka.net/api'
// 发
测试
时解开此注释
const
preCtx
=
'https://crm-b.bigaka.com/api'
// 发预生产时解开此注释
const
prodCtx
=
'https://crm-b.bigaka.com/api'
// 发生产时解开此注释
const
devImgCtx
=
'http://testimg3.bigaka.com'
// 开发环境图片地址
const
testImgCtx
=
'http://testimgww.bigaka.com'
// 测试环境图片地址
const
preImgCtx
=
'http://testimgpp.bigaka.com'
// 预生产环境图片地址
const
prodImgCtx
=
'http://testimgoooo.bigaka.com'
// 生产环境图片地址
const
config
=
{
dev
:
devCtx
,
test
:
testCtx
,
...
...
@@ -20,10 +25,18 @@ const config = {
prod
:
prodCtx
}
const
imgConfig
=
{
dev
:
devImgCtx
,
test
:
testImgCtx
,
pre
:
preImgCtx
,
prod
:
prodImgCtx
}
const
envInfo
=
(()
=>
{
return
{
ctx
:
config
[
PROJECT_ENV
],
env
:
PROJECT_ENV
env
:
PROJECT_ENV
,
imgCtx
:
imgConfig
[
PROJECT_ENV
]
}
})()
...
...
src/pages/userCenter/userCenter.js
View file @
776dfd1f
...
...
@@ -68,6 +68,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
()
{
console
.
log
(
'---'
,
app
.
globalData
.
imageUrl
)
// 取会员卡号
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
cardMember
=
wx
.
getStorageSync
(
'_cardMember'
)
...
...
src/pages/userCenter/userCenter.wxml
View file @
776dfd1f
...
...
@@ -2,7 +2,6 @@
<view class='user-center'>
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}-->
<!-- 轮播 -->
<view class="pd1530" wx:if="{{pItem.type == 1}}">
...
...
src/utils/util.js
View file @
776dfd1f
...
...
@@ -2,6 +2,7 @@ const wxService = require('./wxService')
const
moment
=
require
(
'../lib/moment.min'
)
const
Promise
=
require
(
'../lib/bluebird'
)
const
_
=
require
(
'../lib/underscore.min'
)
const
envInfo
=
require
(
'../config/index'
).
envInfo
const
formatTime
=
date
=>
{
const
year
=
date
.
getFullYear
()
const
month
=
date
.
getMonth
()
+
1
...
...
@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() {
var
url
=
currentPage
.
route
// 当前页面url
var
options
=
currentPage
.
options
// 如果要获取url中所带的参数可以查看options
// 拼接url的参数
/**
* 拼接url的参数
*/
var
urlWithArgs
=
url
+
'?'
for
(
var
key
in
options
)
{
var
value
=
options
[
key
]
...
...
@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() {
return
urlWithArgs
}
/**
* 获取当前帐号信息
*/
...
...
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