Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8595c888
authored
Jan 05, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交接龙
1 parent
d4f43e5e
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
528 additions
and
3 deletions
app.json
app.wxss
mixins/index.js
mixins/jumpAuthMixin.js
packageActivity/pages/redEnvelope/record/record.js
packageActivity/pages/redEnvelope/record/record.json
packageActivity/pages/redEnvelope/record/record.scss
packageActivity/pages/redEnvelope/record/record.wxml
packageActivity/pages/solitaire/index/index.js
packageActivity/pages/solitaire/index/index.json
packageActivity/pages/solitaire/index/index.scss
packageActivity/pages/solitaire/index/index.wxml
pages/tab/mine/index.js
app.json
View file @
8595c88
...
@@ -167,7 +167,10 @@
...
@@ -167,7 +167,10 @@
},
},
{
{
"root"
:
"packageActivity"
,
"root"
:
"packageActivity"
,
"pages"
:
[]
"pages"
:
[
"pages/solitaire/index/index"
,
"pages/redEnvelope/record/record"
]
}
}
],
],
"usingComponents"
:
{
"usingComponents"
:
{
...
...
app.wxss
View file @
8595c88
...
@@ -7,7 +7,7 @@ page {
...
@@ -7,7 +7,7 @@ page {
color: #282829;
color: #282829;
font-size: 28rpx;
font-size: 28rpx;
--themeColor: #3772EC;
--themeColor: #3772EC;
--btnColor: #
EC3C1F
;
--btnColor: #
3772EC
;
--borderRadius: 8rpx;
--borderRadius: 8rpx;
--margin: 32rpx;
--margin: 32rpx;
/* 兼容 IOS<11.2 先constant再env */
/* 兼容 IOS<11.2 先constant再env */
...
...
mixins/index.js
View file @
8595c88
...
@@ -3,11 +3,13 @@ import orderMixin from './orderMixin'
...
@@ -3,11 +3,13 @@ import orderMixin from './orderMixin'
import
afterSaleMixin
from
'./afterSaleMixin'
import
afterSaleMixin
from
'./afterSaleMixin'
import
countdownMixin
from
'./countdownMixin'
import
countdownMixin
from
'./countdownMixin'
import
devMixin
from
'./devMixin'
import
devMixin
from
'./devMixin'
import
jumpAuthMixin
from
'./jumpAuthMixin'
module
.
exports
=
{
module
.
exports
=
{
kfMixin
,
kfMixin
,
orderMixin
,
orderMixin
,
afterSaleMixin
,
afterSaleMixin
,
countdownMixin
,
countdownMixin
,
devMixin
devMixin
,
jumpAuthMixin
}
}
mixins/jumpAuthMixin.js
0 → 100644
View file @
8595c88
module
.
exports
=
Behavior
({
methods
:
{
getNickNameAndHeadUrl
()
{
const
redirectUrl
=
`https://scrm.glsx.com.cn/wy-wx-oauth`
,
appid
=
'wx1cf40dc91c28a7fd'
,
wxUrl
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
appid
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
wx
.
p
.
router
.
jumpH5
(
wxUrl
)
},
}
})
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/redEnvelope/record/record.js
0 → 100644
View file @
8595c88
// packageActivity/pages/redEnvelope/record/record.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
},
onClickHide
()
{
this
.
setData
({
show
:
!
this
.
data
.
show
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/redEnvelope/record/record.json
0 → 100644
View file @
8595c88
{
"usingComponents"
:
{
"van-overlay"
:
"@vant/weapp/overlay/index"
},
"navigationBarTitleText"
:
"中奖记录"
}
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/redEnvelope/record/record.scss
0 → 100644
View file @
8595c88
/* packageActivity/pages/redEnvelope/record/record.wxss */
page
{
background-color
:
#F6F6F7
;
}
.layout
{
padding
:
20rpx
30rpx
;
.item
{
height
:
190rpx
;
background
:
#FFFFFF
;
border-radius
:
8rpx
;
margin-bottom
:
20rpx
;
box-sizing
:
border-box
;
position
:
relative
;
font-size
:
28rpx
;
.status
{
position
:
absolute
;
right
:
20rpx
;
top
:
20rpx
;
font-weight
:
500
;
color
:
#52C41A
;
}
.icon
{
width
:
128rpx
;
height
:
128rpx
;
margin
:
0
16rpx
0
24rpx
;
}
.name
{
font-weight
:
500
;
color
:
#333333
;
line-height
:
28rpx
;
}
.price
{
color
:
#ec3c1f
;
font-size
:
34rpx
;
font-weight
:
500
;
display
:
flex
;
align-items
:
baseline
;
line-height
:
44rpx
;
.unit
{
font-size
:
24rpx
;
}
}
.time
{
font-size
:
24rpx
;
color
:
#999999
;
line-height
:
34rpx
;
margin-top
:
12rpx
;
}
.btn
{
width
:
96rpx
;
height
:
52rpx
;
background
:
#3772EC
;
border-radius
:
26rpx
;
position
:
absolute
;
right
:
20rpx
;
bottom
:
32rpx
;
color
:
#fff
;
}
}
}
.code-box
{
justify-content
:
center
;
height
:
100%
;
flex-direction
:
column
;
.content
{
width
:
590rpx
;
height
:
482rpx
;
background
:
#FFFFFF
;
border-radius
:
44rpx
;
flex-direction
:
column
;
.title
{
font-weight
:
600
;
font-size
:
40rpx
;
color
:
#666666
;
padding
:
74rpx
0
54rpx
;
}
.code
{
font-weight
:
700
;
font-size
:
96rpx
;
color
:
#3772EC
;
letter-spacing
:
20rpx
;
}
.tips
{
width
:
428rpx
;
height
:
52rpx
;
background
:
#EEEEEE
;
border-radius
:
26rpx
;
font-size
:
28rpx
;
color
:
#666666
;
margin-top
:
12rpx
;
}
}
.close
{
width
:
72rpx
;
height
:
72rpx
;
margin-top
:
42rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/redEnvelope/record/record.wxml
0 → 100644
View file @
8595c88
<view class="layout isFullSucreen">
<block wx:for="{{10}}" wx:key="index">
<view class="item flex">
<view class="status">提现成功</view>
<view class="icon">
<image src="https://wx.glsx.com.cn/upload/biz/65872118-dd49-425a-a59a-18a1191c107e.jpeg" />
</view>
<view class="info">
<view class="name">先试试</view>
<view class="price">
<view class="unit">¥</view>
8.88
</view>
<view class="time">2023-12-12 12:30:29</view>
</view>
<view class="btn text-center" bindtap="onClickHide">查看</view>
</view>
</block>
</view>
<van-overlay show="{{ show }}" >
<view class="code-box flex">
<view class="content flex">
<view class="title">核销码</view>
<view class="code">134226</view>
<view class="tips text-center">核销码用于到店核销领取奖品</view>
</view>
<view class="close" bindtap="onClickHide">
<glsx-image src="activity/close.png"></glsx-image>
</view>
</view>
</van-overlay>
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/solitaire/index/index.js
0 → 100644
View file @
8595c88
// packageActivity/pages/solitaire/index/index.js
import
{
jumpAuthMixin
}
from
"~/mixins/index"
;
const
generateOptionsArray
=
function
(
count
=
9
)
{
return
Array
.
from
({
length
:
count
},
(
_
,
index
)
=>
Number
(
index
+
1
))
}
Page
({
behaviors
:
[
jumpAuthMixin
],
/**
* 页面的初始数据
*/
data
:
{
activityDetail
:
decodeURIComponent
(
'<div>叮—— 今天社群打地鼠游戏开始啦!跟群主打的老鼠是同一只的话则会就可以获得“精美福利”哦,那么让我们开始吧。<br>参与规则:大家随意选择一只老鼠,选择对应的数(1~9)接龙即可。答对即可获得“精美福利”一份<br>xxxxxxx<br>游戏将在16:00开奖(15:30停止接龙)<br> 本次福利为xxxxxxx</div>'
),
list
:
new
Array
(
15
),
flag
:
1
},
bindPickerChange
:
function
(
e
)
{
this
.
setData
({
'params.num'
:
e
.
detail
.
value
})
},
inSolitaire
()
{
const
{
userInfo
}
=
this
.
data
this
.
setData
({
flag
:
true
})
this
.
setData
({
'params.name'
:
userInfo
.
nickName
})
},
submit
()
{
try
{
const
{
params
}
=
this
.
data
console
.
log
(
params
)
if
(
!
params
.
name
)
throw
'请输入名称!'
if
(
!
params
.
num
)
throw
'请选择数字!'
}
catch
(
error
)
{
if
(
error
)
wx
.
p
.
wxApi
.
showToast
(
error
)
}
},
input
(
e
)
{
const
{
value
}
=
e
.
detail
,
{
name
}
=
e
.
target
.
dataset
this
.
setData
({
[
name
]:
value
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
// this.getNickNameAndHeadUrl()
this
.
setData
({
array
:
generateOptionsArray
(
9
)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/solitaire/index/index.json
0 → 100644
View file @
8595c88
{
"usingComponents"
:
{
"mp-html"
:
"/components/mp-html/index"
},
"navigationBarTitleText"
:
"群接龙抽奖"
}
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/solitaire/index/index.scss
0 → 100644
View file @
8595c88
/* packageActivity/pages/solitaire/index/index.wxss */
page
{
background-color
:
#f7f7f7
;
}
.layout
{
padding
:
24rpx
32rpx
;
.box
{
background
:
#FFFFFF
;
border-radius
:
16rpx
;
}
.title
{
height
:
100rpx
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#2D2D2E
;
justify-content
:
center
;
}
.mp-html
{
padding
:
32rpx
;
font-size
:
28rpx
;
color
:
#2D2D2E
;
line-height
:
46rpx
;
margin
:
24rpx
0
;
}
.detail-box
{
font-size
:
28rpx
;
color
:
#2D2D2E
;
line-height
:
50rpx
;
padding
:
32rpx
;
.subtitle
{
font-size
:
28rpx
;
font-weight
:
600
;
line-height
:
46rpx
;
margin-bottom
:
20rpx
;
text
{
color
:
#FC5B32
;
}
}
.item
{
.value
{
margin-left
:
auto
;
flex-shrink
:
0
;
}
}
.input-box
{
margin-top
:
24px
;
.button
{
.icon
{
width
:
40rpx
;
height
:
40rpx
;
box-sizing
:
border-box
;
border
:
2rpx
solid
#fc5b32
33
;
border-radius
:
100%
;
position
:
relative
;
margin-right
:
8rpx
;
&
:
:
before
,
&::
after
{
content
:
''
;
position
:
absolute
;
background
:
#FC5B32
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
&
:
:
before
{
width
:
20
.84rpx
;
height
:
3
.82rpx
;
}
&
:
:
after
{
width
:
3
.82rpx
;
height
:
20
.86rpx
;
}
}
font-size
:
28rpx
;
color
:
#FC5B32
;
}
.input
{
height
:
68rpx
;
background
:
#F5F5F5
;
border-radius
:
8rpx
;
margin-bottom
:
24rpx
;
padding
:
14rpx
20rpx
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
position
:
relative
;
.arrow
{
position
:
absolute
;
right
:
24rpx
;
width
:
17rpx
;
height
:
17rpx
;
transform
:
rotate
(
-45deg
);
transform-origin
:
left
;
border-left
:
4rpx
solid
#BDBDBD
;
border-bottom
:
4rpx
solid
#BDBDBD
;
}
}
.placeholder
{
color
:
#BDBDBD
;
}
.default-btn
{
width
:
100%
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
packageActivity/pages/solitaire/index/index.wxml
0 → 100644
View file @
8595c88
<view class="layout isFullSucreen">
<view class="title flex box">xxx</view>
<view class="mp-html box">
<mp-html content="{{activityDetail}}"></mp-html>
</view>
<view class="detail-box box">
<view class="subtitle">参与接龙目前共<text>{{list.length}}</text>人</view>
<view class="list">
接龙明细
<block wx:for="{{list}}" wx:key="index">
<block wx:if="{{index < 5}}">
<view class="item flex">
<view class="label">{{index + 1}}.名称:asd56asd4as65</view>
<view class="value">选择数字:5</view>
</view>
</block>
</block>
<block wx:if="{{list.length >= 6}}">
<block wx:if="{{list.length > 6}}">
<view class="item">...</view>
</block>
<view class="item flex">
<view class="label">{{list.length}}.名称:asd56asd4as65</view>
<view class="value">选择数字:5</view>
</view>
</block>
<view class="input-box">
<block wx:if="{{!flag}}">
<view class="button flex" bindtap="inSolitaire">
<view class="icon"></view>参与接龙
</view>
</block>
<block wx:else>
<view class="input">
<input type="text" placeholder="请输入名称" maxlength="32" placeholder-class="placeholder" value="{{params.name}}" bindinput="input" data-name="params.name" />
</view>
<view class="input {{array[params.num] ?'':'placeholder'}}">
<picker bindchange="bindPickerChange" range="{{array}}">
{{array[params.num] || '请选择数字'}}
</picker>
<view class="arrow y-center"></view>
</view>
<button class="default-btn" bindtap="submit">确定</button>
</block>
</view>
</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
pages/tab/mine/index.js
View file @
8595c88
...
@@ -19,6 +19,11 @@ Page({
...
@@ -19,6 +19,11 @@ Page({
icon
:
'myAddress'
,
icon
:
'myAddress'
,
url
:
'/packageMine/pages/address/index/index'
url
:
'/packageMine/pages/address/index/index'
},
},
{
text
:
'中奖记录'
,
icon
:
'redEnvelope'
,
url
:
'/packageActivity/pages/redEnvelope/record/record'
}
],
],
vipType
:
{
vipType
:
{
1
:
'gold_vip_bg'
,
1
:
'gold_vip_bg'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment