Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
XiTianSenMall
Project
Project
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
leiqingsong
XiTianSenMall
Commits
e1abf1ac
Commit
e1abf1ac
authored
4 years ago
by
leiqingsong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_lqs' into 'master'
Dev lqs See merge request
!144
parents
7429f700
f3f3b9f9
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
174 additions
and
70 deletions
+174
-70
App.vue
H5/src/App.vue
+3
-2
base.js
H5/src/api/base.js
+12
-0
BaseNavBar.vue
H5/src/components/BaseNavBar.vue
+0
-1
index.js
H5/src/router/index.js
+0
-27
bridgeToAppFun.js
H5/src/utils/bridgeToAppFun.js
+40
-13
airDropPool.vue
H5/src/views/airDropPool.vue
+3
-1
bank.vue
H5/src/views/bank.vue
+8
-4
canCashOut.vue
H5/src/views/canCashOut.vue
+2
-2
cash-out.vue
H5/src/views/cashOut/cash-out.vue
+1
-1
customer-service.vue
H5/src/views/customer-service.vue
+6
-2
invite.vue
H5/src/views/invite.vue
+38
-15
settings.vue
H5/src/views/settings.vue
+60
-1
vue.config.js
H5/vue.config.js
+1
-1
No files found.
H5/src/App.vue
View file @
e1abf1ac
...
...
@@ -27,11 +27,12 @@ export default {
this
.
$bridgeToAppFun
.
getAuthToken
()
.
then
(
res
=>
{
console
.
log
(
"获取token成功"
,
res
);
console
.
log
(
"获取到token成功"
,
res
);
localStorage
.
setItem
(
"token"
,
res
);
this
.
saveUser
(
res
);
})
.
catch
(
err
=>
{
console
.
log
(
"获取token失败"
,
err
);
console
.
log
(
"获取token失败
123
"
,
err
);
});
},
methods
:
{
...
...
This diff is collapsed.
Click to expand it.
H5/src/api/base.js
View file @
e1abf1ac
...
...
@@ -30,3 +30,15 @@ export function uploadImage(params, file) {
data
:
file
});
}
/**
* 版本检查
* @param {*} version
* @returns
*/
export
function
versionUpdate
(
version
)
{
return
request
({
url
:
`/account/version?version=
${
version
}
`
,
method
:
"get"
});
}
This diff is collapsed.
Click to expand it.
H5/src/components/BaseNavBar.vue
View file @
e1abf1ac
...
...
@@ -23,7 +23,6 @@ export default {
const
currentPage
=
this
.
$router
.
currentRoute
.
name
;
console
.
log
(
"router"
,
currentPage
);
const
whiteList
=
[
"MyStatus"
,
"Publish"
,
"FastestProgress"
,
"MonthAward"
,
...
...
This diff is collapsed.
Click to expand it.
H5/src/router/index.js
View file @
e1abf1ac
...
...
@@ -162,31 +162,4 @@ const router = new VueRouter({
routes
});
// router.beforeEach((to, from, next) => {
// console.log('to', to);
// const whiteList = [
// "MyStatus",
// "Publish",
// "FastestProgress",
// "MonthAward",
// "Settings",
// "Grade",
// "AirDrop",
// "Invite",
// "AboutUs",
// "customerService",
// "Wallet"
// ];
// const token = localStorage.getItem("token");
// if (whiteList.indexOf(to.name) > -1) {
// if (token) {
// next()
// } else {
// console.log('未登录');
// }
// } else {
// next()
// }
// })
export
default
router
;
This diff is collapsed.
Click to expand it.
H5/src/utils/bridgeToAppFun.js
View file @
e1abf1ac
...
...
@@ -18,30 +18,28 @@ class bridgeToAppFun {
}
// 获取Token
getAuthToken
()
{
console
.
log
(
'系统:'
,
this
.
userAgent
);
console
.
log
(
"系统:"
,
this
.
userAgent
);
if
(
this
.
userAgent
===
"android"
)
{
// android
let
token
=
null
;
try
{
token
=
window
.
android
.
getAuthToken
();
localStorage
.
setItem
(
"token"
,
token
);
}
catch
{
console
.
log
(
"token获取失败"
);
}
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
"版本"
,
window
.
android
.
getAppVersion
());
console
.
log
(
"接收"
,
window
.
android
.
getToken
());
token
=
window
.
android
.
getToken
();
console
.
log
(
"token"
,
token
);
if
(
token
)
{
resolve
(
token
);
}
else
{
reject
(
"
失败
"
);
reject
(
"
没有token
"
);
}
});
}
else
if
(
this
.
userAgent
===
"ios"
)
{
// ios
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
'调ios的方法'
);
console
.
log
(
"调ios的方法"
);
jsBridge
.
callhandler
(
"getAuthToken"
,
null
,
data
=>
{
localStorage
.
setItem
(
"token"
,
data
);
if
(
data
)
{
// localStorage.setItem("token", data);
resolve
(
data
);
}
else
{
console
.
log
(
"调用失败"
);
...
...
@@ -66,9 +64,10 @@ class bridgeToAppFun {
console
.
log
(
"返回"
);
if
(
this
.
userAgent
===
"android"
)
{
try
{
const
home_url
=
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7"
;
location
.
href
=
home_url
;
// const home_url =
// "https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7";
// location.href = home_url;
window
.
android1
.
navigateBack
();
}
catch
{
console
.
log
(
"返回调用失败,都不行"
);
}
...
...
@@ -95,6 +94,34 @@ class bridgeToAppFun {
jsBridge
.
callhandler
(
"redirectToLogin"
);
}
}
// 保存图片
saveImage
(
url
)
{
console
.
log
(
"调用App保存图片, 图片地址"
,
url
);
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
window
.
android
.
appSaveImage
(
url
);
}
else
{
jsBridge
.
callhandler
(
"appSaveImage"
,
url
,
response
=>
{
if
(
response
)
{
console
.
log
(
"保存成功"
);
}
});
}
}
getAppVersion
()
{
let
version
=
""
;
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
version
=
window
.
android
.
getAppVersion
();
}
else
{
jsBridge
.
callhandler
(
"getAppVersion"
,
null
,
response
=>
{
if
(
response
)
{
version
=
response
;
}
});
}
return
version
;
}
}
export
default
bridgeToAppFun
;
This diff is collapsed.
Click to expand it.
H5/src/views/airDropPool.vue
View file @
e1abf1ac
...
...
@@ -32,7 +32,7 @@
>
<p
v-for=
"(item, index) in userPoolVos"
:key=
"index"
:key=
"index
+ 'down'
"
@
click=
"openUserInfo(item)"
>
用户
{{
item
.
userId
}}
进入空投池
...
...
@@ -89,9 +89,11 @@ export default {
methods
:
{
onCloseUser
()
{
this
.
userInfoDialog
=
false
;
this
.
canScroll
=
true
;
},
openUserInfo
(
item
)
{
console
.
log
(
123
);
this
.
canScroll
=
false
;
this
.
userInfoDialog
=
true
;
this
.
currentUser
=
item
;
this
.
currentUser
.
avatar
=
process
.
env
.
VUE_APP_BASE_URL
+
item
.
headImage
;
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/bank.vue
View file @
e1abf1ac
...
...
@@ -106,13 +106,17 @@ export default {
this
.
$toast
.
fail
(
"请输入身份证号"
);
return
;
}
if
(
!
/^
[
1-9
]\d{5}(
18|19|20|
(
3
\d))\d{2}((
0
[
1-9
])
|
(
1
[
0-2
]))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
.
test
(
this
.
form
.
idCardNo
))
{
if
(
!
/^
[
1-9
]\d{5}(
18|19|20|
(
3
\d))\d{2}((
0
[
1-9
])
|
(
1
[
0-2
]))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
.
test
(
this
.
form
.
idCardNo
)
)
{
this
.
$toast
.
fail
(
"请输入正确的身份证号"
);
return
;
}
if
(
!
/^
[
a-zA-Z
\u
4e00-
\u
9fa5
]
+$/
.
test
(
this
.
form
.
name
))
{
this
.
$toast
.
fail
(
"姓名仅支持中文或英文"
);
return
;
if
(
!
/^
[
a-zA-Z
\u
4e00-
\u
9fa5
]
+$/
.
test
(
this
.
form
.
name
))
{
this
.
$toast
.
fail
(
"姓名仅支持中文或英文"
);
return
;
}
const
params
=
this
.
form
;
if
(
this
.
form
.
id
)
{
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/canCashOut.vue
View file @
e1abf1ac
...
...
@@ -41,8 +41,8 @@ export default {
name
:
"CanCashOut"
,
data
()
{
return
{
preNum
:
"
125
"
,
currentNum
:
"
325
"
,
preNum
:
"
0
"
,
currentNum
:
"
0
"
,
rules
:
"提现规则:"
,
rulesMent
:
"1、结算:所有购买及推广产生的佣金实时结算,月度肥料及进步奖每月1号结算上个月收益,在APP我的收益页面可随时查询收益情况。"
,
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/cashOut/cash-out.vue
View file @
e1abf1ac
...
...
@@ -246,7 +246,7 @@ export default {
const
params
=
{
code
:
this
.
validCode
,
money
:
this
.
money
,
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
};
cashOut
(
params
)
.
then
(
res
=>
{
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/customer-service.vue
View file @
e1abf1ac
...
...
@@ -16,9 +16,9 @@
<div
class=
"save-code"
>
<p>
保存二维码
</p>
<p>
打开微信扫一扫添加客服
</p>
<
p>
请截图保存!
</p
>
<
!--
<p>
请截图保存!
</p>
--
>
</div>
<
!--
<van-button>
保存
</van-button>
--
>
<
van-button
@
click=
"onSave"
>
保存
</van-button
>
</div>
</div>
</div>
...
...
@@ -39,6 +39,10 @@ export default {
},
mounted
()
{},
methods
:
{
onSave
()
{
const
url
=
this
.
imageUrl
;
this
.
$bridgeToAppFun
.
saveImage
(
url
);
},
handlerBack
()
{
try
{
this
.
$bridgeToAppFun
.
navigateBack
();
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/invite.vue
View file @
e1abf1ac
<
template
>
<div
class=
"invite-code"
>
<div
class=
"invite-code"
:style=
"
`background-image: url($
{imgSrc});background-size: 100% 100%;background-repeat: no-repeat;`
"
>
<div
class=
"nav"
>
<van-icon
name=
"arrow-left"
...
...
@@ -8,12 +13,13 @@
color=
"#ffffff"
@
click=
"handlerBack"
/>
<
img
:src=
"imgSrc"
alt=
""
class=
"imgCode"
/
>
<
!--
<img
:src=
"imgSrc"
alt=
""
class=
"imgCode"
/>
--
>
</div>
<van-button
type
@
click=
"onSave"
>
保存
</van-button>
</div>
</
template
>
<
script
>
import
{
inviteCode
}
from
"@/api/invite"
;
//
import { inviteCode } from "@/api/invite";
export
default
{
name
:
"Invite"
,
data
()
{
...
...
@@ -25,6 +31,10 @@ export default {
this
.
inviteCode
();
},
methods
:
{
onSave
()
{
const
url
=
this
.
imgSrc
;
this
.
$bridgeToAppFun
.
saveImage
(
url
);
},
handlerBack
()
{
try
{
this
.
$bridgeToAppFun
.
navigateBack
();
...
...
@@ -34,16 +44,17 @@ export default {
}
},
inviteCode
()
{
const
_this
=
this
;
let
loading
=
_this
.
$toast
.
loading
({
forbidClick
:
true
,
message
:
"加载中..."
});
//
const _this = this;
//
let loading = _this.$toast.loading({
//
forbidClick: true,
//
message: "加载中..."
//
});
const
userId
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
;
inviteCode
(
userId
).
then
(
res
=>
{
if
(
loading
)
_this
.
$toast
.
clear
();
_this
.
imgSrc
=
_this
.
getUserPhoto
(
res
);
});
// inviteCode(userId).then(res => {
// if (loading) _this.$toast.clear();
// _this.imgSrc = _this.getUserPhoto(res);
// });
this
.
imgSrc
=
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/shop-mall/api/user/registerByQrCode?height=150&userId=
${
userId
}
&width=150`
;
},
getUserPhoto
(
res
)
{
let
uInt8Array
=
new
Uint8Array
(
res
);
...
...
@@ -64,9 +75,21 @@ export default {
.invite-code
{
width
:
100%
;
height
:
100vh
;
background
:
url("../assets/images/invite_1.png")
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
.van-button
{
position
:
absolute
;
left
:
50%
;
bottom
:
100px
;
transform
:
translateX
(
-50%
);
width
:
160px
;
height
:
36px
;
font-size
:
18px
;
color
:
#ffffff
;
background-color
:
#88c678
;
border
:
none
;
border-radius
:
4px
;
}
.imgCode
{
position
:
absolute
;
width
:
60px
;
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/settings.vue
View file @
e1abf1ac
...
...
@@ -14,7 +14,12 @@
:value=
"inviteeCode"
@
click=
"fillInviterCode"
/>
<van-cell
is-link
title=
"软件更新"
value=
"版本v1.2"
/>
<van-cell
is-link
title=
"软件更新"
:value=
"version"
@
click=
"updateVersion"
/>
<van-cell
is-link
title=
"用户协议"
@
click=
"jumpToInstructions"
/>
</van-cell-group>
...
...
@@ -42,10 +47,22 @@
/>
</div>
</base-dialog>
<base-dialog
base-dialog-title=
"版本更新"
:base-dialog-show=
"versionShow"
:base-dialog-btn=
"updateBtn"
@
onClick=
"onUpdateVersion"
>
<div
slot=
"content"
class=
"update-content"
>
<span
class=
"update-tip"
>
{{
updateResult
}}
</span>
</div>
</base-dialog>
</div>
</
template
>
<
script
>
import
{
versionUpdate
}
from
"@/api/base"
;
import
{
getUserInfo2
}
from
"@/api/user"
;
import
{
logout
}
from
"@/api/user"
;
import
{
fillInviteCode
}
from
"@/api/user"
;
...
...
@@ -55,6 +72,12 @@ export default {
name
:
"Settings"
,
data
()
{
return
{
downAppUrl
:
""
,
needUpdate
:
false
,
updateBtn
:
"关闭"
,
updateResult
:
""
,
versionShow
:
false
,
version
:
""
,
userName
:
""
,
imageBaseUrl
:
""
,
headImage
:
""
,
...
...
@@ -68,8 +91,33 @@ export default {
mounted
()
{
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
this
.
getAppVersion
();
},
methods
:
{
onUpdateVersion
()
{
if
(
this
.
needUpdate
)
{
location
.
href
=
this
.
downAppUrl
;
}
else
{
this
.
versionShow
=
false
;
}
},
updateVersion
()
{
versionUpdate
(
this
.
version
).
then
(
res
=>
{
this
.
versionShow
=
true
;
if
(
res
.
data
===
"当前已是最新版本!"
)
{
this
.
updateResult
=
res
.
data
;
this
.
needUpdate
=
false
;
}
else
{
this
.
downAppUrl
=
res
.
data
;
this
.
updateResult
=
"最新版App下载地址:"
+
res
.
data
;
this
.
updateBtn
=
"下载最新版App"
;
this
.
needUpdate
=
true
;
}
});
},
getAppVersion
()
{
this
.
version
=
"版本"
+
this
.
$bridgeToAppFun
.
getAppVersion
();
},
getUser
()
{
const
params
=
{
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
...
...
@@ -188,4 +236,15 @@ export default {
background-color
:
#f9f9f9
;
border-radius
:
20px
;
}
.update-content
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
}
.update-tip
{
width
:
90%
;
font-size
:
18px
;
word-break
:
break-all
;
}
</
style
>
This diff is collapsed.
Click to expand it.
H5/vue.config.js
View file @
e1abf1ac
...
...
@@ -4,7 +4,7 @@ const name = "西田森App";
module
.
exports
=
{
publicPath
:
"/front"
,
//
outputDir: "front",
outputDir
:
"front"
,
devServer
:
{
proxy
:
{
'/shop-mall'
:
{
...
...
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