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
723301ff
Commit
723301ff
authored
Dec 12, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化功能
parent
ce6d52b6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
33 deletions
+67
-33
app.js
src/app.js
+32
-3
index.js
src/config/index.js
+3
-3
userCenter.js
src/pages/userCenter/userCenter.js
+1
-0
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+2
-1
project.config.json
src/project.config.json
+1
-1
college.wxml
src/shoppingGuid/page/pages/college/college.wxml
+3
-3
qrcode.js
src/shoppingGuid/page/pages/qrcode/qrcode.js
+18
-19
wxService.js
src/utils/wxService.js
+7
-3
No files found.
src/app.js
View file @
723301ff
...
...
@@ -16,6 +16,7 @@ App({
// 默认 false
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
try
{
this
.
checkForUpdate
();
let
res
=
wx
.
getSystemInfoSync
();
// 获取当前运行环境
config
.
pixelRate
=
res
.
windowWidth
/
750
;
config
.
platform
=
res
.
platform
;
...
...
@@ -37,12 +38,40 @@ App({
}
catch
(
e
)
{
console
.
log
(
err
);
}
},
//检查新版本
checkForUpdate
(){
const
updateManager
=
wx
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
// 请求完新版本信息的回调
console
.
log
(
res
.
hasUpdate
)
});
updateManager
.
onUpdateReady
(
function
()
{
wx
.
showModal
({
title
:
'更新提示'
,
content
:
'已有小程序新版本,是否重启应用?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager
.
applyUpdate
()
}
}
})
})
updateManager
.
onUpdateFailed
(
function
()
{
// 新版本下载失败
})
},
onShow
:
function
(
options
=
{})
{
console
.
log
(
'场景值 ========'
,
options
.
scene
)
console
.
log
(
'场景值1 ========'
,
options
.
scene
)
let
scene
=
wx
.
getLaunchOptionsSync
().
scene
;
console
.
log
(
'场景值2 ========'
,
scene
)
//判断是不是在企业微信中通过工作台打开的
if
(
options
.
scene
==
1119
){
if
(
options
.
scene
==
1119
||
scene
==
1119
){
wx
.
redirectTo
({
url
:
'/shoppingGuid/page/pages/welcomGuider/welcomGuider'
,
});
...
...
src/config/index.js
View file @
723301ff
...
...
@@ -5,7 +5,7 @@
// 组件plus 中数据请求 token 修改
// app.js 中brandId 修改为对应
const
PROJECT_ENV
=
'
test
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
PROJECT_ENV
=
'
prod
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
needMock
=
''
//
// 舞象联系我 :766c50920993bf9c41c6c3d2761a2df5
//泰华 联系我 :6e4314d558e55fbc64fe2e757e24d61f
...
...
@@ -54,7 +54,7 @@ const needMock = '' //
* appId = wx40fec8944623c8b3
* tunnel-token = 8724303981a00b56869f3d26f7a6c643
* brandId= 2006
* contactUspluginId =
6e4314d558e55fbc64fe2e757e24d61f
联系我插件id
* contactUspluginId =
a6ea55b56eb09ced8f9aeeaa14383b52
联系我插件id
*/
...
...
@@ -119,7 +119,7 @@ const envInfo = (() => {
imgCtx
:
imgConfig
[
PROJECT_ENV
],
tunnelToken
:
token
[
PROJECT_ENV
],
appId
:
appId
[
PROJECT_ENV
],
brandId
:
1002
,
// 1001 1002 3001 3002 //2711 711生产brandId,
brandId
:
3001
,
// 1001 1002 3001 3002 //2711 711生产brandId,
plusIsOpen
:
true
,
//是否开启plus
}
})()
...
...
src/pages/userCenter/userCenter.js
View file @
723301ff
...
...
@@ -200,6 +200,7 @@ wxService.page({
})
}
},
// 查询积分信息
getMemberPointInfo
()
{
wx
.
showLoading
({
...
...
src/pages/userCenter/userCenter.wxml
View file @
723301ff
...
...
@@ -59,7 +59,7 @@
bind:completemessage="completemessage"
plugid='766c50920993bf9c41c6c3d2761a2df5' />
<!-- 766c50920993bf9c41c6c3d2761a2df5 -->
<!-- 泰华
6e4314d558e55fbc64fe2e757e24d61f
-->
<!-- 泰华
a6ea55b56eb09ced8f9aeeaa14383b52
-->
</view>
<!-- 联系我点击成功之后的回调 -->
<contact-us-modal contactShow="{{contactUsModal}}"/>
\ No newline at end of file
src/project.config.json
View file @
723301ff
...
...
@@ -13,7 +13,7 @@
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.8.2"
,
"appid"
:
"wx
ac09792264c49b5c
"
,
"appid"
:
"wx
313ec36b710125d4
"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
...
...
src/shoppingGuid/page/pages/college/college.wxml
View file @
723301ff
...
...
@@ -26,7 +26,7 @@
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{guidCollege.
noData
}}">暂无数据~</view>
<view class='empty' wx:if="{{guidCollege.
list.length == 0
}}">暂无数据~</view>
</view>
<!-- 品牌营销 -->
<view class='guid' wx:if="{{current == 2}}">
...
...
@@ -42,7 +42,7 @@
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{brandPromotions.
noData
}}">暂无数据~</view>
<view class='empty' wx:if="{{brandPromotions.
list.length == 0
}}">暂无数据~</view>
</view>
<!-- 产品素材 -->
<view class='guid' wx:if="{{current == 3}}">
...
...
@@ -58,7 +58,7 @@
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{productFiles.
noData
}}">暂无数据~</view>
<view class='empty' wx:if="{{productFiles.
list.length == 0
}}">暂无数据~</view>
</view>
</view>
<!-- tabbar -->
...
...
src/shoppingGuid/page/pages/qrcode/qrcode.js
View file @
723301ff
...
...
@@ -123,13 +123,13 @@ wxService.page({
//改变二位方式
onTapChangeType
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
;
if
(
index
==
0
){
wx
.
showToast
({
title
:
'对不起,暂不支持此功能'
,
icon
:
'none'
});
return
;
}
//
if(index == 0){
//
wx.showToast({
//
title: '对不起,暂不支持此功能',
//
icon : 'none'
//
});
//
return ;
//
}
this
.
data
.
bottomTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
...
...
@@ -148,7 +148,6 @@ wxService.page({
//根据类型切换qrcode
changeQrcode
(){
console
.
log
(
this
.
data
.
currentBottomType
)
if
(
this
.
data
.
currentBottomType
==
2
){
//企业二维码
this
.
getEnterpriseQrcode
();
}
...
...
@@ -164,19 +163,19 @@ wxService.page({
getOpenCardPageQrcode
(){
//先生成触点对象信息
let
currentUserInfo
=
wx
.
getStorageSync
(
'guidBaseInfo'
);
// if (!currentUserInfo) { //未登录成功
// wx.redirectTo({
// url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider',
// });
// return;
// }
currentUserInfo
=
{
member
:
{
id
:
'588024219670024192'
}
if
(
!
currentUserInfo
)
{
//未登录成功
wx
.
redirectTo
({
url
:
'/shoppingGuid/page/pages/welcomGuider/welcomGuider'
,
});
return
;
}
// currentUserInfo = {
// member : {
// id: '588024219670024192'
// }
// }
wx
.
showLoading
({
title
:
'触点生成中..'
,
});
...
...
src/utils/wxService.js
View file @
723301ff
...
...
@@ -604,17 +604,21 @@ class WXService extends Http {
pageIsFromShare
=
true
;
let
idParam
=
decodeURIComponent
(
item
[
'scene'
]).
split
(
'&'
)[
0
];
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
;
console
.
log
(
shareId
)
console
.
log
(
idParam
)
//处理pageId的
if
(
idParam
.
indexOf
(
'pageId'
)
>
-
1
){
item
[
'pageId'
]
=
shareId
;
}
//
item
[
'id'
]
=
Integer
.
digit
(
shareId
,
64
,
10
)
id
=
item
[
'id'
];
if
(
shareId
&&
shareId
!=
0
){
item
[
'id'
]
=
Integer
.
digit
(
shareId
,
64
,
10
)
id
=
item
[
'id'
];
}
}
});
//如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中
if
(
pageIsFromShare
)
{
if
(
pageIsFromShare
&&
id
)
{
//调用接口
_self
.
getTentacleContentByTentacleId
(
id
);
}
...
...
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