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
82163235
Commit
82163235
authored
Dec 09, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改内容
parent
8806fba4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
57 additions
and
35 deletions
+57
-35
app.js
src/app.js
+2
-7
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+1
-0
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+3
-1
plus.js
src/component/plus/plus.js
+2
-4
tabSort.wxml
src/component/tabSort/tabSort.wxml
+12
-6
index.js
src/config/index.js
+18
-1
openCard.js
src/shoppingGuid/page/pages/openCard/openCard.js
+6
-6
qrcode.js
src/shoppingGuid/page/pages/qrcode/qrcode.js
+8
-0
scanCoupon.js
src/subPackage/page/pages/scanCoupon/scanCoupon.js
+1
-1
scanCoupon.wxml
src/subPackage/page/pages/scanCoupon/scanCoupon.wxml
+1
-1
Http.js
src/utils/Http.js
+2
-7
wxService.js
src/utils/wxService.js
+1
-1
No files found.
src/app.js
View file @
82163235
...
@@ -118,7 +118,7 @@ App({
...
@@ -118,7 +118,7 @@ App({
systemInfo
:
wx
.
getSystemInfoSync
(),
systemInfo
:
wx
.
getSystemInfoSync
(),
ctx
:
envInfo
.
ctx
,
ctx
:
envInfo
.
ctx
,
openCard
:
false
,
openCard
:
false
,
appId
:
'wxc3b64b09b1d3dfc2'
,
appId
:
envInfo
.
appId
,
userNo
:
null
,
userNo
:
null
,
storeId
:
''
,
storeId
:
''
,
storeName
:
''
,
storeName
:
''
,
...
@@ -129,11 +129,6 @@ App({
...
@@ -129,11 +129,6 @@ App({
contants
:
contants
,
contants
:
contants
,
isPlusVip
:
isPlusVip
,
isPlusVip
:
isPlusVip
,
cityJson
:
cityJson
,
cityJson
:
cityJson
,
// brandId: 2711,
brandId
:
envInfo
.
brandId
,
// brandId: 2005,
brandId
:
1001
,
// brandId: 1002,
// brandId: 3001,
// brandId: 3002,
}
}
})
})
src/component/bottomTabs/bottomTabs.js
View file @
82163235
...
@@ -32,6 +32,7 @@ Component({
...
@@ -32,6 +32,7 @@ Component({
let
currentTab
=
tabBar
.
images
let
currentTab
=
tabBar
.
images
currentTab
.
forEach
(
item
=>
{
currentTab
.
forEach
(
item
=>
{
// 存在 row 处理数据 8 商品 9 分类
// 存在 row 处理数据 8 商品 9 分类
// 1. 外部小程序_url 2. 内部动态页面_pageId 3.预览 4. 内部页面 5. 卡券__1_卡包 2_激活领卡
let
newRow
=
null
let
newRow
=
null
if
(
item
.
link
)
{
if
(
item
.
link
)
{
if
(
item
.
link
.
type
==
2
)
{
if
(
item
.
link
.
type
==
2
)
{
...
...
src/component/bottomTabs/bottomTabs.wxml
View file @
82163235
<!--component/bottomTabs/bottomTabs.wxml-->
<!--component/bottomTabs/bottomTabs.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<wxs src="../../wxs/utils.wxs" module="utils" />
<!--<wxs src="./handlerData.wxs" module="tools" />-->
<!--<wxs src="./handlerData.wxs" module="tools" />-->
<view class='bgc fixed-bottom0' style="background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});" wx:if="{{tabBar.num == 4}}">
<view class='bgc fixed-bottom0'
style="background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});"
wx:if="{{tabBar.num == 4}}">
<block wx:for="{{tabBarList}}" wx:key="{{index}}" wx:for-item="tab">
<block wx:for="{{tabBarList}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab">
<view class="tab">
<!--当前页面需要授权 且未授权-->
<!--当前页面需要授权 且未授权-->
...
...
src/component/plus/plus.js
View file @
82163235
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
const
app
=
getApp
()
const
app
=
getApp
()
const
wxService
=
require
(
'../../utils/wxService'
)
const
wxService
=
require
(
'../../utils/wxService'
)
const
utils
=
require
(
'../../utils/util'
)
const
utils
=
require
(
'../../utils/util'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
Component
({
Component
({
/**
/**
...
@@ -44,10 +45,7 @@ Component({
...
@@ -44,10 +45,7 @@ Component({
wxService
.
request
({
wxService
.
request
({
url
:
app
.
globalData
.
ctx
+
'/sale/premium/query'
,
url
:
app
.
globalData
.
ctx
+
'/sale/premium/query'
,
header
:
{
header
:
{
// 'tunnel-token' : 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD' // 测试
'tunnel-token'
:
envInfo
.
tunnelToken
,
'tunnel-token'
:
'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8'
,
// 生产
// 'tunnel-token' : 'brand1001', // 开发
// 'tunnel-token' : 'brand1002', // 测试
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
...
...
src/component/tabSort/tabSort.wxml
View file @
82163235
...
@@ -7,8 +7,12 @@
...
@@ -7,8 +7,12 @@
wx:for-item="navItem"
wx:for-item="navItem"
wx:key="idx"
wx:key="idx"
>
>
<view wx:if="{{navItem.needAuth}}" class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%">
<view wx:if="{{navItem.needAuth}}"
<view wx:if="{{!currentHasUserInfo}}" class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width: {{navItemWidth}}%;height: 80rpx;display: flex;">
style="width:{{navItemWidth}}%"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<view wx:if="{{!currentHasUserInfo}}"
style="width: {{navItemWidth}}%;height: 80rpx;display: flex;"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<button
<button
bindgetuserinfo="_getUserInfo"
bindgetuserinfo="_getUserInfo"
data-jflag="false"
data-jflag="false"
...
@@ -19,7 +23,9 @@
...
@@ -19,7 +23,9 @@
{{navItem.title}}
{{navItem.title}}
</button>
</button>
</view>
</view>
<view wx:else class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%">
<view wx:else
style="width:{{navItemWidth}}%"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<view
<view
data-current="{{idx}}"
data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}"
data-redirectId="{{navItem.redirectId}}"
...
@@ -29,8 +35,9 @@
...
@@ -29,8 +35,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:else
<view wx:else class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%">
style="width:{{navItemWidth}}%"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
<view
<view
data-current="{{idx}}"
data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}"
data-redirectId="{{navItem.redirectId}}"
...
@@ -39,7 +46,6 @@
...
@@ -39,7 +46,6 @@
>{{navItem.title}}
>{{navItem.title}}
</view>
</view>
</view>
</view>
</block>
</block>
</scroll-view>
</scroll-view>
<!-- showQrcode 2 购物车 1 会员码 0 隐藏 -->
<!-- showQrcode 2 购物车 1 会员码 0 隐藏 -->
...
...
src/config/index.js
View file @
82163235
...
@@ -36,6 +36,13 @@ const config = {
...
@@ -36,6 +36,13 @@ const config = {
prod
:
prodCtx
prod
:
prodCtx
}
}
const
appId
=
{
dev
:
'wxc3b64b09b1d3dfc2'
,
//appid_dev_wx
test
:
'wxac09792264c49b5c'
,
//appid_test_wx 1002商城
pre
:
'wxac09792264c49b5c'
,
//appid_test_wx 1002商城
prod
:
'wx313ec36b710125d4'
,
//appid_prod_3001 3001商城
}
const
imgConfig
=
{
const
imgConfig
=
{
dev
:
devImgCtx
,
dev
:
devImgCtx
,
test
:
testImgCtx
,
test
:
testImgCtx
,
...
@@ -43,11 +50,21 @@ const imgConfig = {
...
@@ -43,11 +50,21 @@ const imgConfig = {
prod
:
prodImgCtx
prod
:
prodImgCtx
}
}
const
token
=
{
dev
:
'brand1001'
,
//开发
test
:
'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD'
,
//测试
pre
:
'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD'
,
//预生产
prod
:
'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8'
,
// 生产
}
const
envInfo
=
(()
=>
{
const
envInfo
=
(()
=>
{
return
{
return
{
ctx
:
config
[
PROJECT_ENV
],
ctx
:
config
[
PROJECT_ENV
],
env
:
PROJECT_ENV
,
env
:
PROJECT_ENV
,
imgCtx
:
imgConfig
[
PROJECT_ENV
]
imgCtx
:
imgConfig
[
PROJECT_ENV
],
tunnelToken
:
token
[
PROJECT_ENV
],
appId
:
appId
[
PROJECT_ENV
],
brandId
:
'1001'
,
// 1001 1002 3001 3002 //2711 711生产brandId
}
}
})()
})()
...
...
src/shoppingGuid/page/pages/openCard/openCard.js
View file @
82163235
...
@@ -27,12 +27,12 @@ wxService.page({
...
@@ -27,12 +27,12 @@ wxService.page({
onShow
:
function
()
{
onShow
:
function
()
{
//判断用户是不是已经登录了
//判断用户是不是已经登录了
let
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
let
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
//
if (userInfo) {
if
(
userInfo
)
{
//
wx.reLaunch({
wx
.
reLaunch
({
//
url: '/pages/userCenter/userCenter',
url
:
'/pages/userCenter/userCenter'
,
//
});
});
//
return;
return
;
//
}
}
//未登录 需要授权登录 弹出设置的开卡图片
//未登录 需要授权登录 弹出设置的开卡图片
this
.
setData
({
this
.
setData
({
...
...
src/shoppingGuid/page/pages/qrcode/qrcode.js
View file @
82163235
...
@@ -123,6 +123,14 @@ wxService.page({
...
@@ -123,6 +123,14 @@ wxService.page({
//改变二位方式
//改变二位方式
onTapChangeType
(
e
){
onTapChangeType
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
;
let
index
=
e
.
currentTarget
.
dataset
.
index
;
if
(
index
==
0
){
wx
.
showToast
({
title
:
'对不起,暂不支持此功能'
,
icon
:
'none'
});
return
;
}
this
.
data
.
bottomTypeArr
.
map
(
item
=>
{
this
.
data
.
bottomTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
item
.
active
=
false
;
});
});
...
...
src/subPackage/page/pages/scanCoupon/scanCoupon.js
View file @
82163235
...
@@ -19,7 +19,7 @@ wxService.page({
...
@@ -19,7 +19,7 @@ wxService.page({
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
'options'
,
options
)
console
.
log
(
'options'
,
options
)
options
.
id
=
'651730112529698816'
;
//
options.id = '651730112529698816';
this
.
setData
({
this
.
setData
({
id
:
options
.
id
id
:
options
.
id
},()
=>
{
},()
=>
{
...
...
src/subPackage/page/pages/scanCoupon/scanCoupon.wxml
View file @
82163235
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<button class='positionAbs' bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
<button class='positionAbs' bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
立即领取
立即领取
</view>
</view>
<view class="title-btn"bindtap="handelGet" wx:if="{{currentHasUserInfo}}">立即领取</view>
<view class="title-btn"
bindtap="handelGet" wx:if="{{currentHasUserInfo}}">立即领取</view>
<view class="title-name">{{couponDetail.couponName}}</view>
<view class="title-name">{{couponDetail.couponName}}</view>
<view class="title-desc">{{couponDetail.title}}</view>
<view class="title-desc">{{couponDetail.title}}</view>
<view class="title-others">{{couponDetail.remark}}</view>
<view class="title-others">{{couponDetail.remark}}</view>
...
...
src/utils/Http.js
View file @
82163235
...
@@ -102,7 +102,7 @@ class Http {
...
@@ -102,7 +102,7 @@ class Http {
// 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token'
:
'brand1001'
,
// 开发
'tunnel-token'
:
envInfo
.
tunnelToken
,
// 开发
'tentacle-content'
:
this
.
getTentacle
(),
'tentacle-content'
:
this
.
getTentacle
(),
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
...
@@ -116,9 +116,6 @@ class Http {
...
@@ -116,9 +116,6 @@ class Http {
post
(
url
,
parmas
,
channel
)
{
post
(
url
,
parmas
,
channel
)
{
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
guideUserInfo
=
wx
.
getStorageSync
(
'guidBaseInfo'
);
let
guideUserInfo
=
wx
.
getStorageSync
(
'guidBaseInfo'
);
// console.log('getTentacle------',this.getTentacle())
// console.log('--------------header-----------------', this.getTentacle())
// console.log('--------------token-----------------', this.getToken())
if
(
baseUserInfo
||
guideUserInfo
){
if
(
baseUserInfo
||
guideUserInfo
){
return
this
.
request
({
return
this
.
request
({
...
@@ -127,7 +124,6 @@ class Http {
...
@@ -127,7 +124,6 @@ class Http {
header
:
{
header
:
{
'buyer-token'
:
this
.
getToken
(),
'buyer-token'
:
this
.
getToken
(),
'tentacle-content'
:
this
.
getTentacle
()
'tentacle-content'
:
this
.
getTentacle
()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
},
},
data
:
parmas
,
data
:
parmas
,
channel
:
channel
channel
:
channel
...
@@ -140,9 +136,8 @@ class Http {
...
@@ -140,9 +136,8 @@ class Http {
// 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
'tunnel-token'
:
'brand1001'
,
// 开发
'tunnel-token'
:
envInfo
.
tunnelToken
,
// 开发
'tentacle-content'
:
this
.
getTentacle
()
'tentacle-content'
:
this
.
getTentacle
()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
},
},
data
:
parmas
,
data
:
parmas
,
channel
:
channel
channel
:
channel
...
...
src/utils/wxService.js
View file @
82163235
...
@@ -642,7 +642,7 @@ class WXService extends Http {
...
@@ -642,7 +642,7 @@ class WXService extends Http {
console
.
log
(
'premiumExpireStorage'
,
premiumExpireStorage
)
console
.
log
(
'premiumExpireStorage'
,
premiumExpireStorage
)
console
.
log
(
'当前时间 < 到期时间为vip'
,
vipFlag
)
console
.
log
(
'当前时间 < 到期时间为vip'
,
vipFlag
)
if
(
baseUserInfo
)
{
if
(
baseUserInfo
&&
wx
.
getStorageSync
(
'token'
)
)
{
page
.
setData
({
page
.
setData
({
currentHasUserInfo
:
true
,
currentHasUserInfo
:
true
,
isVip
:
vipFlag
isVip
:
vipFlag
...
...
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