Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
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
pseer
gxpt_wechat
Commits
8c8e281e
Commit
8c8e281e
authored
Sep 12, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能开发优化
parent
c43fb4b1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
269 additions
and
2 deletions
+269
-2
index.config.js
config/index.config.js
+2
-2
myInfo.vue
pages/my/myInfo.vue
+1
-0
userShare.vue
pages/userShare/userShare.vue
+266
-0
vipCreate.vue
pages/vipCreate/vipCreate.vue
+0
-0
No files found.
config/index.config.js
View file @
8c8e281e
const
CONFIG
=
{
// 开发环境配置
development
:
{
//
assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
assetsPath
:
'https://www.coujio.com/wechat_static'
,
// 静态资源路径
assetsPath
:
'http://coujiao.pseer.com:8888/wechat_static'
,
// 静态资源路径
//
assetsPath: 'http://10.24.5.63:8211/static', // 静态资源路径
assetsPath
:
'http://10.24.5.63:8211/static'
,
// 静态资源路径
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
baseUrl
:
'https://coujiao.pseer.com/front-api'
,
// 后台接口请求地址
// hostUrl: 'http://coujiao.pseer.com:8888/prod-api', // H5地址(前端运行地址)
...
...
pages/my/myInfo.vue
View file @
8c8e281e
...
...
@@ -630,6 +630,7 @@
}
console
.
log
(
this
.
userInfo
,
999999
)
uni
.
setStorageSync
(
'userInfo'
,
this
.
userInfo
)
this
.
$forceUpdate
();
this
.
onGetOrderInfo
();
}
})
...
...
pages/userShare/userShare.vue
0 → 100644
View file @
8c8e281e
<
template
>
<view
class=
"user-share"
>
<view
class=
"header-part"
>
<view
v-if=
"loginStatus"
class=
"flex-between"
>
<view
class=
"flex-row user-info"
>
<image
class=
"avatar-img"
:src=
"userInfo.avatar|| assetsPath+'/logo_icon.png'"
mode=
"scaleToFill"
>
</image>
<view
class=
""
>
<text>
{{
userInfo
.
nickName
||
'凑角会员_'
+
userName
}}
</text>
</view>
</view>
</view>
<view
v-else
class=
"logo-box"
>
<button
class=
"cu-btn round bg-pink sm margin-left-sm"
@
tap
.
stop=
"onNavToLogin"
>
立即授权绑定
</button>
</view>
</view>
<view
v-if=
"loginStatus"
class=
"share-qrcode"
>
<view
class=
"qrcode-box"
>
<tki-qrcode
ref=
"qrcode"
:cid=
"cid"
:val=
"text"
:size=
"size"
unit=
"upx"
icon=
"../../static/logo_icon.png"
:iconSize=
"iconSize"
:onval=
"true"
:loadMake=
"loadMake"
:showLoading=
"true"
@
result=
"qrR"
/>
</view>
<view
class=
"part-bottom"
>
<button
class=
"btn cu-btn bg-white"
@
tap=
"onSaveImg"
>
<image
src=
"../../static/icon_album.png"
mode=
"widthFix"
></image>
<text>
保存到相册
</text>
</button>
<button
open-type=
"share"
class=
"btn cu-btn bg-blue"
>
<image
src=
"../../static/share_icon_2.png"
mode=
"widthFix"
></image>
<text>
分享邀请
</text>
</button>
</view>
</view>
<view
class=
"tip-rule"
>
<view
class=
"flex-col"
>
<text
class=
"text-black text-lg text-bold"
>
活动介绍:
</text>
<view
class=
"margin-top-sm padding-sm"
>
<text>
已授权并注册过的用户,可通过此页面的分享按钮进行分享小程序,或页面内提供的二维码让新用户扫码,授权并注册成功后,分享该小程序的用户即可获得1小时时长,可在房间下单时进行抵扣;
</text>
</view>
</view>
</view>
<LoginPop
ref=
"loginPop"
@
success=
"onSuccess"
/>
</view>
</
template
>
<
script
>
import
LoginPop
from
"@/components/login/login"
import
tkiQrcode
from
"@/components/tki-qrcode/tki-qrcode.vue"
import
config
from
"@/config/index.config"
;
import
{
getUserInfo
}
from
"@/api/index.js"
export
default
{
components
:
{
LoginPop
,
tkiQrcode
},
data
()
{
return
{
cid
:
"qrCode"
,
qrPath
:
''
,
text
:
'生成中'
,
size
:
520
,
iconSize
:
52
,
colorDark
:
'#000000'
,
loadMake
:
false
,
qrPath
:
''
,
assetsPath
:
config
.
assetsPath
,
loginStatus
:
uni
.
getStorageSync
(
'loginStatus'
)
==
'login'
?
true
:
false
,
userInfo
:
''
,
userName
:
''
};
},
onLoad
(
query
)
{
if
(
query
.
q
)
{
const
q
=
decodeURIComponent
(
query
.
q
)
// let q = 'https://www.coujio.com/userShare?uid=8&act=0'
let
d
=
q
.
split
(
'?'
)
let
c
=
d
[
1
].
split
(
'&'
)
let
obj
=
{};
c
.
forEach
(
item
=>
{
let
l
=
item
.
split
(
'='
);
obj
[
l
[
0
]]
=
l
[
1
];
})
if
(
obj
.
uid
)
{
uni
.
setStorageSync
(
"shareUserId"
,
obj
.
uid
)
}
}
if
(
query
.
uid
)
{
uni
.
setStorageSync
(
"shareUserId"
,
query
.
uid
)
}
if
(
this
.
loginStatus
)
{
this
.
onGetUserInfo
();
}
},
onShareAppMessage
()
{
return
{
title
:
"邀请扫码注册"
,
path
:
`/pages/userShare/userShare?uid=
${
this
.
userInfo
.
id
}
`
,
imageUrl
:
this
.
qrPath
}
},
methods
:
{
onGetUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
userInfo
=
{
...
res
.
data
.
data
,
consumerWallet
:
res
.
data
.
data
.
consumerWallet
?
res
.
data
.
data
.
consumerWallet
:
{
remainingIntegral
:
0
}
}
if
(
this
.
userInfo
&&
this
.
userInfo
.
phone
)
{
this
.
userName
=
this
.
userInfo
.
phone
.
slice
(
-
4
);
}
this
.
text
=
`https://www.coujio.com/userShare?uid=
${
this
.
userInfo
.
id
}
&act=0`
;
this
.
loadMake
=
true
;
}
})
},
onSaveImg
()
{
uni
.
saveImageToPhotosAlbum
({
filePath
:
this
.
qrPath
,
success
:
()
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'保存成功'
})
},
fail
:
(
err
)
=>
{
console
.
log
(
err
,
999
)
}
})
},
qrR
(
r
)
{
console
.
log
(
r
,
"二维码路径"
)
this
.
qrPath
=
r
;
},
onNavToLogin
()
{
this
.
$refs
.
loginPop
.
open
();
},
onSuccess
(){
uni
.
showToast
({
icon
:
"none"
,
title
:
"授权登录成功"
})
this
.
loginStatus
=
uni
.
getStorageSync
(
'loginStatus'
)
==
'login'
?
true
:
false
;
this
.
onGetUserInfo
();
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.user-share
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
width
:
100vw
;
min-height
:
100vh
;
overflow-x
:
hidden
;
background
:
linear-gradient
(
140deg
,
rgba
(
228
,
5
,
131
,
0.16
)
0%
,
#f1f1f1
32%
,
#f1f1f1
72%
,
rgba
(
228
,
5
,
131
,
0.16
)
100%
);
}
.tip-rule
{
display
:
flex
;
flex
:
1
;
padding
:
20
upx
30
upx
;
.flex-col
{
align-self
:
flex-end
;
margin-bottom
:
24
upx
;
}
}
.header-part
{
width
:
100%
;
.flex-between
{
display
:
flex
;
justify-content
:
center
;
padding
:
30
upx
;
align-items
:
center
;
}
.user-info
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
margin-right
:
12
upx
;
}
.avatar-img
{
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
box-shadow
:
0
0
6
upx
#ff00ff
;
margin-right
:
12
upx
;
}
}
.qrcode-box
{
width
:
580
upx
;
background-color
:
#ffffff
;
border-radius
:
12
upx
;
box-shadow
:
0
0
12
upx
#ff00ff
;
padding
:
20
upx
;
margin-top
:
24
upx
;
}
.share-qrcode
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
width
:
100%
;
.part-bottom
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
margin-top
:
24
upx
;
width
:
100%
;
.btn
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
flex
:
1
;
height
:
88
upx
;
border-radius
:
20
upx
;
margin
:
0
20
upx
;
image
{
display
:
block
;
width
:
46
upx
;
height
:
auto
;
margin-right
:
6
upx
;
}
text
{
font-size
:
26
*
1.2
upx
;
}
}
}
}
.logo-box
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
20
upx
0
;
}
</
style
>
\ No newline at end of file
pages/vipCreate/vipCreate.vue
View file @
8c8e281e
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