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
422e4d34
Commit
422e4d34
authored
Jul 12, 2021
by
程默
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nativehome_tst' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into nativehome_tst
parents
e06b2bda
f3da56a4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
5 deletions
+52
-5
src/pages/home/index.vue
+33
-0
src/pages/index/index.vue
+1
-0
src/pages/login/index.vue
+17
-4
src/pages/wxArticle/index.vue
+1
-1
src/utils/themeModule.js
+0
-0
No files found.
src/pages/home/index.vue
View file @
422e4d34
...
@@ -136,6 +136,7 @@ import couponPopup from '@/components/couponPopup.vue'
...
@@ -136,6 +136,7 @@ import couponPopup from '@/components/couponPopup.vue'
import
NewUser
from
"../../components/newCustomer/newUser"
;
import
NewUser
from
"../../components/newCustomer/newUser"
;
import
NewPolite
from
"../../components/newCustomer/newPolite"
;
import
NewPolite
from
"../../components/newCustomer/newPolite"
;
import
{
setTabBarActive
,
checkTabbarPage
,
themeColor
}
from
"../../utils/mayi.js"
;
import
{
setTabBarActive
,
checkTabbarPage
,
themeColor
}
from
"../../utils/mayi.js"
;
import
indexApi
from
"@/api/index.js"
;
import
{
throttle
,
concatUrl
}
from
"../../utils/index.js"
import
{
throttle
,
concatUrl
}
from
"../../utils/index.js"
const
app
=
getApp
();
const
app
=
getApp
();
...
@@ -237,6 +238,38 @@ export default {
...
@@ -237,6 +238,38 @@ export default {
data
:
JSON
.
stringify
(
options
)
data
:
JSON
.
stringify
(
options
)
});
});
}
}
if
(
options
.
scene
){
//新二维码扫码进入
wx
.
nextTick
(()
=>
{
indexApi
.
getShareSceneRecord
(
options
.
scene
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
'200'
){
this
.
page
=
res
.
data
.
data
.
pageUri
;
let
paramsObj
=
JSON
.
parse
(
res
.
data
.
data
.
scene
);
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
paramsObj
.
attractingCustomerChannelId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
,
paramsObj
.
sellerId
);
console
.
log
(
res
.
data
.
data
)
console
.
log
(
wx
.
getStorageSync
(
"openid"
))
console
.
log
(
333333
)
if
(
wx
.
getStorageSync
(
"openid"
))
{
indexApi
.
addRecord
(
{
attractingCustomersChannelId
:
paramsObj
.
attractingCustomerChannelId
,
miniOpenId
:
wx
.
getStorageSync
(
"openid"
),
registerFlag
:
1
,
newRegisterFlag
:
0
,
}
).
then
(
ele
=>
{
//清空引客渠道id
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
''
);
})
}
}
}).
catch
((
err
)
=>
{
})
});
}
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
if
(
options
.
from
&&
options
.
from
==
"logout"
)
{
if
(
options
.
from
&&
options
.
from
==
"logout"
)
{
//来自用户登出
//来自用户登出
...
...
src/pages/index/index.vue
View file @
422e4d34
...
@@ -204,6 +204,7 @@ export default {
...
@@ -204,6 +204,7 @@ export default {
let
paramsObj
=
JSON
.
parse
(
res
.
data
.
data
.
scene
);
let
paramsObj
=
JSON
.
parse
(
res
.
data
.
data
.
scene
);
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
paramsObj
.
attractingCustomerChannelId
);
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
paramsObj
.
attractingCustomerChannelId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
,
paramsObj
.
sellerId
);
console
.
log
(
res
.
data
.
data
)
console
.
log
(
res
.
data
.
data
)
console
.
log
(
wx
.
getStorageSync
(
"openid"
))
console
.
log
(
wx
.
getStorageSync
(
"openid"
))
console
.
log
(
333333
)
console
.
log
(
333333
)
...
...
src/pages/login/index.vue
View file @
422e4d34
...
@@ -77,7 +77,8 @@ export default {
...
@@ -77,7 +77,8 @@ export default {
test_isHaveUnion
:
""
,
test_isHaveUnion
:
""
,
test_unionId
:
""
,
test_unionId
:
""
,
fromType
:
''
,
//来源类型 mini:小程序跳转到当前登录页
fromType
:
''
,
//来源类型 mini:小程序跳转到当前登录页
scene
:
''
//场景
scene
:
''
,
//场景
ossLink
:
''
//第三方点击进入链接
};
};
},
},
onShow
()
{
onShow
()
{
...
@@ -105,8 +106,8 @@ export default {
...
@@ -105,8 +106,8 @@ export default {
})
})
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
login
.
getShopUserProtocol
().
then
(
res
=>
{
login
.
getShopUserProtocol
().
then
(
res
=>
{
console
.
log
(
res
,
777888999
)
if
(
res
.
data
.
code
==
'200'
)
{
if
(
res
.
data
.
code
==
'200'
)
{
this
.
content
=
res
.
data
.
data
;
this
.
content
=
res
.
data
.
data
;
}
}
...
@@ -122,6 +123,9 @@ export default {
...
@@ -122,6 +123,9 @@ export default {
let
params
=
JSON
.
parse
(
options
.
params
);
let
params
=
JSON
.
parse
(
options
.
params
);
this
.
fromType
=
params
.
fromType
;
this
.
fromType
=
params
.
fromType
;
}
}
if
(
options
.
ossLink
)
{
this
.
ossLink
=
decodeURIComponent
(
options
.
ossLink
)
}
this
.
getshop
();
this
.
getshop
();
},
},
methods
:
{
methods
:
{
...
@@ -331,9 +335,13 @@ export default {
...
@@ -331,9 +335,13 @@ export default {
wx
.
navigateBack
({
wx
.
navigateBack
({
delta
:
1
delta
:
1
});
});
}
else
if
(
this
.
scene
==
'sso'
||
this
.
backPath
.
includes
(
'scene=sso'
))
{
}
else
if
(
this
.
scene
==
'sso'
||
this
.
backPath
.
includes
(
'scene=sso'
)
||
this
.
ossLink
.
indexOf
(
'scene=sso'
)
>-
1
)
{
let
backPath
=
this
.
backPath
;
if
(
this
.
ossLink
)
{
backPath
+=
'?'
+
this
.
ossLink
}
wx
.
redirectTo
({
wx
.
redirectTo
({
url
:
`../wxArticle/main?link=
${
this
.
backPath
}
`
,
url
:
`../wxArticle/main?link=
${
encodeURIComponent
(
backPath
)
}
`
,
});
});
}
else
{
}
else
{
let
parseLink
=
decodeURIComponent
(
this
.
backPath
);
let
parseLink
=
decodeURIComponent
(
this
.
backPath
);
...
@@ -394,6 +402,7 @@ export default {
...
@@ -394,6 +402,7 @@ export default {
city
:
this
.
userInfo
.
city
,
city
:
this
.
userInfo
.
city
,
otherPhone
:
0
,
otherPhone
:
0
,
storeId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
)
||
''
,
storeId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
)
||
''
,
sellerId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
)
||
''
,
articleId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
"articleId"
)
||
''
,
articleId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
"articleId"
)
||
''
,
customerSourceType
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
"articleId"
)?
8
:
''
,
customerSourceType
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
"articleId"
)?
8
:
''
,
customerSourceId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
"articleId"
)
||
''
customerSourceId
:
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
"articleId"
)
||
''
...
@@ -461,6 +470,10 @@ export default {
...
@@ -461,6 +470,10 @@ export default {
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'
)
}
}
//埋点导购员
if
(
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
))
{
query
.
sellerId
=
wx
.
getStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
)
}
//绑定手机号
//绑定手机号
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`../index/main?from=login&backpath=/login/wxRegister¶ms=
${
encodeURIComponent
(
url
:
`../index/main?from=login&backpath=/login/wxRegister¶ms=
${
encodeURIComponent
(
...
...
src/pages/wxArticle/index.vue
View file @
422e4d34
...
@@ -56,7 +56,6 @@ export default {
...
@@ -56,7 +56,6 @@ export default {
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"getMixId"
)
==
'1'
)
{
//第三方跳转加mixid
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"getMixId"
)
==
'1'
)
{
//第三方跳转加mixid
link
=
forUrlAddKey
(
decodeURIComponent
(
link
),{
mixid
:
this
.
$store
.
state
.
mixid
})
link
=
forUrlAddKey
(
decodeURIComponent
(
link
),{
mixid
:
this
.
$store
.
state
.
mixid
})
}
}
console
.
log
(
wx
.
getStorageSync
(
"sessionid"
),
446466777777
,
getUrlKey
(
decodeURIComponent
(
link
),
"mixid"
),
this
.
$store
.
state
.
mixid
)
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"scene"
)
==
"sso"
)
{
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"scene"
)
==
"sso"
)
{
if
(
!
wx
.
getStorageSync
(
"sessionid"
))
{
if
(
!
wx
.
getStorageSync
(
"sessionid"
))
{
wx
.
redirectTo
({
wx
.
redirectTo
({
...
@@ -133,6 +132,7 @@ export default {
...
@@ -133,6 +132,7 @@ export default {
methods
:
{
methods
:
{
setLink
(
data
)
{
setLink
(
data
)
{
this
.
link
=
data
;
this
.
link
=
data
;
console
.
log
(
this
.
link
,
89999999
)
},
},
getSsoBcakUrl
(
link
)
{
getSsoBcakUrl
(
link
)
{
let
op
=
{
let
op
=
{
...
...
src/utils/themeModule.js
View file @
422e4d34
This diff is collapsed.
Click to expand it.
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