Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
6303967c
Commit
6303967c
authored
Jan 04, 2022
by
柳士祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序日志添加
parent
0db371a5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
117 additions
and
63 deletions
+117
-63
src/components/basicTool/transverse-label/index.vue
+9
-6
src/main.js
+2
-1
src/pages/index/index.vue
+37
-35
src/pages/login/index.vue
+18
-17
src/utils/log.js
+34
-0
static/nativeComponents/GoodsList/GoodsItem/index.js
+13
-2
static/nativeComponents/GoodsList/index.js
+1
-1
static/vant/tabs/index.wxs
+3
-1
No files found.
src/components/basicTool/transverse-label/index.vue
View file @
6303967c
...
@@ -569,8 +569,11 @@ export default {
...
@@ -569,8 +569,11 @@ export default {
.tabStyle1
{
.tabStyle1
{
.van-tabs__line
{
.van-tabs__line
{
height
:
30px
;
height
:
auto
;
bottom
:
6px
;
bottom
:
4px
;
top
:
4px
;
left
:
8px
;
right
:
8px
;
border-radius
:
38px
;
border-radius
:
38px
;
}
}
}
}
...
@@ -611,8 +614,8 @@ export default {
...
@@ -611,8 +614,8 @@ export default {
content
:
""
;
content
:
""
;
position
:
absolute
;
position
:
absolute
;
bottom
:
4px
;
bottom
:
4px
;
left
:
0
;
left
:
8px
;
right
:
0
;
right
:
8px
;
top
:
4px
;
top
:
4px
;
border-radius
:
34px
;
border-radius
:
34px
;
background
:
var
(
--default-tab-background-bolor
);
background
:
var
(
--default-tab-background-bolor
);
...
@@ -632,8 +635,8 @@ export default {
...
@@ -632,8 +635,8 @@ export default {
content
:
""
;
content
:
""
;
position
:
absolute
;
position
:
absolute
;
bottom
:
4px
;
bottom
:
4px
;
left
:
0
;
left
:
8px
;
right
:
0
;
right
:
8px
;
height
:
4px
;
height
:
4px
;
background
:
var
(
--default-tab-underline-color
);
background
:
var
(
--default-tab-underline-color
);
z-index
:
-1
;
z-index
:
-1
;
...
...
src/main.js
View file @
6303967c
...
@@ -11,6 +11,7 @@ import cartApi from './api/cart'
...
@@ -11,6 +11,7 @@ import cartApi from './api/cart'
import
classificationApi
from
"./api/classification"
;
import
classificationApi
from
"./api/classification"
;
import
spokesmanApi
from
'./api/spokesman'
import
spokesmanApi
from
'./api/spokesman'
import
{
DFSImg
,
concatUrl
}
from
"@/utils/index"
;
import
{
DFSImg
,
concatUrl
}
from
"@/utils/index"
;
var
log
=
require
(
'./utils/log'
)
import
fenxiaoModel
from
"@/utils/fenxiaoModel"
;
import
fenxiaoModel
from
"@/utils/fenxiaoModel"
;
import
{
import
{
$themeAddToCard
,
$themeAddToCard
,
...
@@ -133,7 +134,7 @@ mpApp.spokesmanApi = spokesmanApi
...
@@ -133,7 +134,7 @@ mpApp.spokesmanApi = spokesmanApi
mpApp
.
getThemePage
=
getThemePage
mpApp
.
getThemePage
=
getThemePage
mpApp
.
themeColor
=
{}
mpApp
.
themeColor
=
{}
mpApp
.
log
=
log
function
getThemePage
({
mixid
,
shopid
})
{
function
getThemePage
({
mixid
,
shopid
})
{
shop
shop
...
...
src/pages/index/index.vue
View file @
6303967c
This diff is collapsed.
Click to expand it.
src/pages/login/index.vue
View file @
6303967c
...
@@ -46,6 +46,7 @@ import shop from "@/api/shop";
...
@@ -46,6 +46,7 @@ import shop from "@/api/shop";
import
indexApi
from
"@/api/index.js"
;
import
indexApi
from
"@/api/index.js"
;
import
{
createdUserJWTApi
}
from
"@/api/daoke"
;
import
{
createdUserJWTApi
}
from
"@/api/daoke"
;
const
app
=
getApp
();
const
app
=
getApp
();
const
{
log
}
=
app
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -116,7 +117,7 @@ export default {
...
@@ -116,7 +117,7 @@ export default {
})
})
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
,
'----------------------login-options'
)
log
.
info
(
options
,
'----------------------login-options'
)
login
.
getShopUserProtocol
().
then
(
res
=>
{
login
.
getShopUserProtocol
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
'200'
)
{
if
(
res
.
data
.
code
==
'200'
)
{
this
.
content
=
res
.
data
.
data
;
this
.
content
=
res
.
data
.
data
;
...
@@ -196,9 +197,9 @@ export default {
...
@@ -196,9 +197,9 @@ export default {
});
});
},
},
addRecord
(
flag
)
{
addRecord
(
flag
)
{
console
.
log
(
wx
.
getStorageSync
(
'attractingCustomerChannelId'
))
log
.
info
(
wx
.
getStorageSync
(
'attractingCustomerChannelId'
))
console
.
log
(
this
.
openid
)
log
.
info
(
this
.
openid
)
console
.
log
(
99999
)
log
.
info
(
99999
)
//埋点引客渠道
//埋点引客渠道
if
(
wx
.
getStorageSync
(
'attractingCustomerChannelId'
))
{
if
(
wx
.
getStorageSync
(
'attractingCustomerChannelId'
))
{
indexApi
.
addRecord
(
indexApi
.
addRecord
(
...
@@ -241,9 +242,9 @@ export default {
...
@@ -241,9 +242,9 @@ export default {
try
{
try
{
wx
.
setStorageSync
(
'openid'
,
res
.
data
.
data
.
openid
)
wx
.
setStorageSync
(
'openid'
,
res
.
data
.
data
.
openid
)
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'存入openid失败'
,
e
)
log
.
info
(
'存入openid失败'
,
e
)
}
}
console
.
log
(
this
.
$store
.
state
.
mixid
,
'mixid------230'
)
log
.
info
(
this
.
$store
.
state
.
mixid
,
'mixid------230'
)
//冬奥会测试赛(mixid=CL)定制一键登录直接返回不用手机号
//冬奥会测试赛(mixid=CL)定制一键登录直接返回不用手机号
let
isCertified
=
false
;
let
isCertified
=
false
;
// this.mpApp.globalData.shopInfo.outCode正式环境提审测试赛项目 这个值后台改为1 审核通过改为空
// this.mpApp.globalData.shopInfo.outCode正式环境提审测试赛项目 这个值后台改为1 审核通过改为空
...
@@ -295,7 +296,7 @@ export default {
...
@@ -295,7 +296,7 @@ export default {
this
.
checkLogin
(
e
);
this
.
checkLogin
(
e
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
"err"
,
err
);
log
.
info
(
"err"
,
err
);
wx
.
hideLoading
();
wx
.
hideLoading
();
wx
.
showToast
({
title
:
err
,
icon
:
"none"
});
wx
.
showToast
({
title
:
err
,
icon
:
"none"
});
});
});
...
@@ -361,7 +362,7 @@ export default {
...
@@ -361,7 +362,7 @@ export default {
// 是否跳转h5或小程序
// 是否跳转h5或小程序
pushPageType
(){
pushPageType
(){
//绑定上下级关系
//绑定上下级关系
console
.
log
(
this
.
scene
,
'this.scene===='
,
this
.
backPath
)
log
.
info
(
this
.
scene
,
'this.scene===='
,
this
.
backPath
)
app
.
fenxiaoModel
.
becomeRelation
(
wx
.
getStorageSync
(
"becomeInfo"
)?
JSON
.
parse
(
wx
.
getStorageSync
(
"becomeInfo"
)):
''
).
then
(
res
=>
{
app
.
fenxiaoModel
.
becomeRelation
(
wx
.
getStorageSync
(
"becomeInfo"
)?
JSON
.
parse
(
wx
.
getStorageSync
(
"becomeInfo"
)):
''
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
wx
.
removeStorage
({
wx
.
removeStorage
({
...
@@ -371,7 +372,7 @@ export default {
...
@@ -371,7 +372,7 @@ export default {
})
})
let
parseLink
=
decodeURIComponent
(
this
.
backPath
);
let
parseLink
=
decodeURIComponent
(
this
.
backPath
);
console
.
log
(
this
.
backPath
,
parseLink
,
'---------------------------325'
)
log
.
info
(
this
.
backPath
,
parseLink
,
'---------------------------325'
)
if
(
parseLink
.
includes
(
'/pages/'
)){
if
(
parseLink
.
includes
(
'/pages/'
)){
wx
.
reLaunch
({
wx
.
reLaunch
({
url
:
parseLink
url
:
parseLink
...
@@ -384,14 +385,14 @@ export default {
...
@@ -384,14 +385,14 @@ export default {
// 动态表单
// 动态表单
createdUserJWTApi
().
then
(
res
=>
{
createdUserJWTApi
().
then
(
res
=>
{
this
.
backParams
+=
`&token=
${
res
}
`
;
this
.
backParams
+=
`&token=
${
res
}
`
;
console
.
log
(
this
.
backParams
,
`
${
this
.
backPath
}${
this
.
backParams
}
`
,
"-------------------------355"
)
log
.
info
(
this
.
backParams
,
`
${
this
.
backPath
}${
this
.
backParams
}
`
,
"-------------------------355"
)
wx
.
reLaunch
({
wx
.
reLaunch
({
url
:
`../wxArticle/main?link=
${
this
.
backPath
+
this
.
backParams
}
`
url
:
`../wxArticle/main?link=
${
this
.
backPath
+
this
.
backParams
}
`
});
});
})
})
}
else
if
(
this
.
scene
==
'sso'
||
this
.
backPath
.
includes
(
'scene=sso'
)
||
this
.
ossLink
.
indexOf
(
'scene=sso'
)
>-
1
)
{
}
else
if
(
this
.
scene
==
'sso'
||
this
.
backPath
.
includes
(
'scene=sso'
)
||
this
.
ossLink
.
indexOf
(
'scene=sso'
)
>-
1
)
{
let
backPath
=
this
.
backPath
;
let
backPath
=
this
.
backPath
;
console
.
log
(
decodeURIComponent
(
backPath
),
600000
)
log
.
info
(
decodeURIComponent
(
backPath
),
600000
)
if
(
this
.
ossLink
)
{
if
(
this
.
ossLink
)
{
backPath
+=
'?'
+
this
.
ossLink
backPath
+=
'?'
+
this
.
ossLink
}
}
...
@@ -434,7 +435,7 @@ export default {
...
@@ -434,7 +435,7 @@ export default {
e
.
mp
.
detail
.
encryptedData
,
e
.
mp
.
detail
.
encryptedData
,
e
.
mp
.
detail
.
iv
+
""
e
.
mp
.
detail
.
iv
+
""
).
phoneNumber
;
).
phoneNumber
;
console
.
log
(
"生命周期一直"
,
this
.
phoneNumber
);
log
.
info
(
"生命周期一直"
,
this
.
phoneNumber
);
this
.
bindUser
();
this
.
bindUser
();
}
}
},
},
...
@@ -468,7 +469,7 @@ export default {
...
@@ -468,7 +469,7 @@ export default {
query
.
spokesmanShopId
=
this
.
$store
.
state
.
spokesmanShopId
;
query
.
spokesmanShopId
=
this
.
$store
.
state
.
spokesmanShopId
;
}
}
console
.
log
(
query
,
"query"
);
log
.
info
(
query
,
"query"
);
login
login
.
bindUser
(
query
)
.
bindUser
(
query
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -493,7 +494,7 @@ export default {
...
@@ -493,7 +494,7 @@ export default {
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
,
"bindusererr"
);
log
.
info
(
err
,
"bindusererr"
);
});
});
},
},
backMainHandle
()
{
backMainHandle
()
{
...
@@ -512,7 +513,7 @@ export default {
...
@@ -512,7 +513,7 @@ export default {
});
});
},
},
handbindHandle
()
{
handbindHandle
()
{
console
.
log
(
this
.
queryOptions
,
'---------------options'
)
log
.
info
(
this
.
queryOptions
,
'---------------options'
)
const
query
=
{
const
query
=
{
openId
:
this
.
openid
,
openId
:
this
.
openid
,
unionId
:
this
.
unionId
,
unionId
:
this
.
unionId
,
...
@@ -525,8 +526,8 @@ export default {
...
@@ -525,8 +526,8 @@ export default {
param
:
this
.
queryOptions
.
param
,
param
:
this
.
queryOptions
.
param
,
back
:
this
.
queryOptions
.
back
,
back
:
this
.
queryOptions
.
back
,
};
};
console
.
log
(
query
,
'-------------------519'
)
log
.
info
(
query
,
'-------------------519'
)
console
.
log
(
serialize
(
query
),
'------------------- serialize(query)'
)
log
.
info
(
serialize
(
query
),
'------------------- serialize(query)'
)
if
(
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
))
{
if
(
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
))
{
query
.
storeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
)
query
.
storeId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
)
}
}
...
...
src/utils/log.js
0 → 100644
View file @
6303967c
var
log
=
wx
.
getRealtimeLogManager
?
wx
.
getRealtimeLogManager
()
:
null
module
.
exports
=
{
debug
()
{
if
(
!
log
)
return
log
.
debug
.
apply
(
log
,
arguments
)
},
info
()
{
console
.
log
(
'日志log级别'
);
if
(
!
log
)
return
log
.
info
.
apply
(
log
,
arguments
)
},
warn
()
{
if
(
!
log
)
return
log
.
warn
.
apply
(
log
,
arguments
)
},
error
()
{
if
(
!
log
)
return
log
.
error
.
apply
(
log
,
arguments
)
},
setFilterMsg
(
msg
)
{
// 从基础库2.7.3开始支持
if
(
!
log
||
!
log
.
setFilterMsg
)
return
if
(
typeof
msg
!==
'string'
)
return
log
.
setFilterMsg
(
msg
)
},
addFilterMsg
(
msg
)
{
// 从基础库2.8.1开始支持
if
(
!
log
||
!
log
.
addFilterMsg
)
return
if
(
typeof
msg
!==
'string'
)
return
log
.
addFilterMsg
(
msg
)
}
}
\ No newline at end of file
static/nativeComponents/GoodsList/GoodsItem/index.js
View file @
6303967c
const
app
=
getApp
();
const
app
=
getApp
();
const
{
goodsApi
,
DFSImg
,
$themeToLink
,
$themeAddToCard
}
=
app
;
const
{
goodsApi
,
DFSImg
,
$themeToLink
,
$themeAddToCard
,
log
}
=
app
;
const
componentOptions
=
{
const
componentOptions
=
{
// 组件选项
// 组件选项
options
:
{
options
:
{
...
@@ -26,7 +27,17 @@ const componentOptions = {
...
@@ -26,7 +27,17 @@ const componentOptions = {
observers
:
{},
observers
:
{},
// 组件方法
// 组件方法
methods
:
{
methods
:
{
init
()
{},
init
()
{
let
datas
=
this
.
data
.
datas
if
(
datas
.
componentData
.
angleSignImg
&&
datas
.
componentData
.
angleSignImg
.
lenght
!=
0
){
datas
.
componentData
.
angleSignImg
=
DFSImg
(
datas
.
componentData
.
angleSignImg
,
150
,
150
,
1
)
}
this
.
setData
({
datas
})
log
.
info
(
'datas'
);
},
getSaleTime
(
val
)
{
getSaleTime
(
val
)
{
return
new
Date
(
val
.
replace
(
/-/g
,
"/"
)).
getTime
()
-
new
Date
().
getTime
();
return
new
Date
(
val
.
replace
(
/-/g
,
"/"
)).
getTime
()
-
new
Date
().
getTime
();
},
},
...
...
static/nativeComponents/GoodsList/index.js
View file @
6303967c
...
@@ -68,7 +68,7 @@ const componentOptions = {
...
@@ -68,7 +68,7 @@ const componentOptions = {
angleSignImg
,
angleSignImg
,
titleIcon
titleIcon
}
=
this
.
data
.
datas
.
componentData
;
}
=
this
.
data
.
datas
.
componentData
;
angleSignImg
=
DFSImg
(
angleSignImg
);
angleSignImg
=
DFSImg
(
angleSignImg
,
150
,
150
,
1
);
if
(
titleIcon
)
{
if
(
titleIcon
)
{
titleIcon
=
DFSImg
(
titleIcon
);
titleIcon
=
DFSImg
(
titleIcon
);
}
}
...
...
static/vant/tabs/index.wxs
View file @
6303967c
...
@@ -59,7 +59,7 @@ function trackStyle(data) {
...
@@ -59,7 +59,7 @@ function trackStyle(data) {
function lineStyle(data) {
function lineStyle(data) {
return style({
return style({
width: utils.addUnit(data.lineWidth),
width: utils.addUnit(data.lineWidth
- 16
),
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
'background-color': data.color,
'background-color': data.color,
...
@@ -80,3 +80,5 @@ module.exports = {
...
@@ -80,3 +80,5 @@ module.exports = {
lineStyle: lineStyle,
lineStyle: lineStyle,
navStyle: navStyle,
navStyle: navStyle,
};
};
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