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
81dda8fe
Commit
81dda8fe
authored
Jun 19, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.0.1' into feature-zyw
parents
94387461
2837db5d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
19 deletions
+31
-19
app.js
src/app.js
+6
-11
index.js
src/config/index.js
+15
-2
activateCardCallback.json
src/pages/activateCard/activateCardCallback.json
+5
-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
-3
No files found.
src/app.js
View file @
81dda8fe
...
@@ -35,18 +35,16 @@ App({
...
@@ -35,18 +35,16 @@ App({
},
},
onShow
:
function
(
options
=
{})
{
onShow
:
function
(
options
=
{})
{
console
.
log
(
'app-onshow'
,
options
)
console
.
log
(
'app-onshow'
,
options
)
// 是不是第一次进入小程序
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
baseUserInfo
)
{
// wxService.getUserInfo()
}
if
(
options
.
referrerInfo
.
extraData
!=
null
){
if
(
options
.
referrerInfo
.
extraData
!=
null
){
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
let
url
=
urlData
[
0
];
let
url
=
urlData
[
0
];
let
parmas
=
urlData
[
1
];
let
parmas
=
urlData
[
1
];
// wxService.router(`${url}`).search(parmas);
// encodeURIComponent
// decodeURIComponent
wxService
.
router
(
`
${
url
}
`
).
search
({
wxService
.
router
(
`
${
url
}
`
).
search
({
activate_ticket
:
encodeURIComponent
(
activate_ticket
),
activate_ticket
:
encodeURIComponent
(
activate_ticket
),
card_id
,
card_id
,
...
@@ -54,8 +52,6 @@ App({
...
@@ -54,8 +52,6 @@ App({
errCode
,
errCode
,
wx_activate_after_submit_url
:
parmas
wx_activate_after_submit_url
:
parmas
});
});
// encodeURIComponent
// decodeURIComponent
// 激活成功 变更 _baseUserInfo
// 激活成功 变更 _baseUserInfo
baseUserInfo
.
wechatCardId
=
card_id
baseUserInfo
.
wechatCardId
=
card_id
...
@@ -70,7 +66,7 @@ App({
...
@@ -70,7 +66,7 @@ App({
console
.
log
(
res
.
status
)
// loaded
console
.
log
(
res
.
status
)
// loaded
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
console
.
log
(
res
.
status
)
// error
console
.
log
(
res
.
status
)
// error
}
}
})
})
...
@@ -91,7 +87,6 @@ App({
...
@@ -91,7 +87,6 @@ App({
checkFullSucreen
()
{
checkFullSucreen
()
{
const
self
=
this
const
self
=
this
wxService
.
getSystemInfo
().
then
(
res
=>
{
wxService
.
getSystemInfo
().
then
(
res
=>
{
debugger
if
((
res
.
screenHeight
-
res
.
windowHeight
-
res
.
statusBarHeight
-
32
)
>
72
)
{
if
((
res
.
screenHeight
-
res
.
windowHeight
-
res
.
statusBarHeight
-
32
)
>
72
)
{
// 处理相关逻辑
// 处理相关逻辑
self
.
globalData
.
isFullSucreen
=
true
self
.
globalData
.
isFullSucreen
=
true
...
@@ -110,7 +105,7 @@ App({
...
@@ -110,7 +105,7 @@ App({
storeId
:
''
,
storeId
:
''
,
storeName
:
''
,
storeName
:
''
,
loginFirst
:
false
,
loginFirst
:
false
,
imageUrl
:
""
,
//图片地址
imageUrl
:
envInfo
.
imgCtx
,
//图片地址
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
commonFunc
:
commonFunc
,
commonFunc
:
commonFunc
,
// brandId: 2711,
// brandId: 2711,
...
...
src/config/index.js
View file @
81dda8fe
...
@@ -9,10 +9,15 @@ const needMock = '' //
...
@@ -9,10 +9,15 @@ const needMock = '' //
// const devCtx = 'http://111.231.86.64'
// const devCtx = 'http://111.231.86.64'
const
devCtx
=
'http://buyer.devapi.bigaka.net'
// 开发环境
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
preCtx
=
'https://crm-b.bigaka.com/api'
// 发预生产时解开此注释
const
prodCtx
=
'https://crm-b.bigaka.com/api'
// 发生产时解开此注释
const
prodCtx
=
'https://crm-b.bigaka.com/api'
// 发生产时解开此注释
const
devImgCtx
=
'http://testimg3.bigaka.com'
// 开发环境图片地址
const
testImgCtx
=
'http://testimg3.bigaka.com'
// 测试环境图片地址
const
preImgCtx
=
'http://testimg3.bigaka.com'
// 预生产环境图片地址
const
prodImgCtx
=
'http://testimg3.bigaka.com'
// 生产环境图片地址
const
config
=
{
const
config
=
{
dev
:
devCtx
,
dev
:
devCtx
,
test
:
testCtx
,
test
:
testCtx
,
...
@@ -20,10 +25,18 @@ const config = {
...
@@ -20,10 +25,18 @@ const config = {
prod
:
prodCtx
prod
:
prodCtx
}
}
const
imgConfig
=
{
dev
:
devImgCtx
,
test
:
testImgCtx
,
pre
:
preImgCtx
,
prod
:
prodImgCtx
}
const
envInfo
=
(()
=>
{
const
envInfo
=
(()
=>
{
return
{
return
{
ctx
:
config
[
PROJECT_ENV
],
ctx
:
config
[
PROJECT_ENV
],
env
:
PROJECT_ENV
env
:
PROJECT_ENV
,
imgCtx
:
imgConfig
[
PROJECT_ENV
]
}
}
})()
})()
...
...
src/pages/activateCard/activateCardCallback.json
View file @
81dda8fe
{}
{
\ No newline at end of file
"navigationBarTitleText"
:
"激活卡面"
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/pages/userCenter/userCenter.js
View file @
81dda8fe
...
@@ -68,6 +68,7 @@ wxService.page({
...
@@ -68,6 +68,7 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
console
.
log
(
'---'
,
app
.
globalData
.
imageUrl
)
// 取会员卡号
// 取会员卡号
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
cardMember
=
wx
.
getStorageSync
(
'_cardMember'
)
const
cardMember
=
wx
.
getStorageSync
(
'_cardMember'
)
...
...
src/pages/userCenter/userCenter.wxml
View file @
81dda8fe
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
<view class='user-center'>
<view class='user-center'>
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}-->
<!--{{pItem.type}}-->
<!-- 轮播 -->
<!-- 轮播 -->
<view class="pd1530" wx:if="{{pItem.type == 1}}">
<view class="pd1530" wx:if="{{pItem.type == 1}}">
...
...
src/utils/util.js
View file @
81dda8fe
...
@@ -2,6 +2,7 @@ const wxService = require('./wxService')
...
@@ -2,6 +2,7 @@ const wxService = require('./wxService')
const
moment
=
require
(
'../lib/moment.min'
)
const
moment
=
require
(
'../lib/moment.min'
)
const
Promise
=
require
(
'../lib/bluebird'
)
const
Promise
=
require
(
'../lib/bluebird'
)
const
_
=
require
(
'../lib/underscore.min'
)
const
_
=
require
(
'../lib/underscore.min'
)
const
envInfo
=
require
(
'../config/index'
).
envInfo
const
formatTime
=
date
=>
{
const
formatTime
=
date
=>
{
const
year
=
date
.
getFullYear
()
const
year
=
date
.
getFullYear
()
const
month
=
date
.
getMonth
()
+
1
const
month
=
date
.
getMonth
()
+
1
...
@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() {
...
@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() {
var
url
=
currentPage
.
route
// 当前页面url
var
url
=
currentPage
.
route
// 当前页面url
var
options
=
currentPage
.
options
// 如果要获取url中所带的参数可以查看options
var
options
=
currentPage
.
options
// 如果要获取url中所带的参数可以查看options
// 拼接url的参数
/**
* 拼接url的参数
*/
var
urlWithArgs
=
url
+
'?'
var
urlWithArgs
=
url
+
'?'
for
(
var
key
in
options
)
{
for
(
var
key
in
options
)
{
var
value
=
options
[
key
]
var
value
=
options
[
key
]
...
@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() {
...
@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() {
return
urlWithArgs
return
urlWithArgs
}
}
/**
/**
* 获取当前帐号信息
* 获取当前帐号信息
*/
*/
...
@@ -278,7 +280,6 @@ function getUserInfoByBtn(userInfo) {
...
@@ -278,7 +280,6 @@ function getUserInfoByBtn(userInfo) {
},
(
err
)
=>
{
},
(
err
)
=>
{
return
Promise
.
reject
(
err
)
return
Promise
.
reject
(
err
)
}).
then
(
response
=>
{
}).
then
(
response
=>
{
console
.
log
(
JSON
.
stringify
(
response
))
logger
.
log
(
'getCrmUserInfo response'
,
response
)
logger
.
log
(
'getCrmUserInfo response'
,
response
)
if
(
response
.
data
.
data
.
rspCode
===
-
1
)
{
if
(
response
.
data
.
data
.
rspCode
===
-
1
)
{
return
Promise
.
reject
(
response
.
data
.
data
)
return
Promise
.
reject
(
response
.
data
.
data
)
...
...
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