Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nyx
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
发现
nyx
Commits
c6412858
Commit
c6412858
authored
Jul 24, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx: 产品-页面
完成活动竞答+活动结果页面
parent
62bc767e
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
205 行增加
和
33 行删除
+205
-33
增值产品-小程序及app/nyx-master/pages/activity/act-info/act-info.js
+15
-4
增值产品-小程序及app/nyx-master/pages/activity/act-info/act-info.wxml
+2
-3
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.js
+50
-22
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.json
+3
-2
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.wxml
+37
-1
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.wxss
+98
-1
没有找到文件。
增值产品-小程序及app/nyx-master/pages/activity/act-info/act-info.js
查看文件 @
c6412858
// pa
ges/index/note-info/note-info.js
// pa
ges/index/note-info/note-info.js
...
...
@@ -104,10 +104,10 @@ Page({
}
// 来自页面内的按钮的转发
if
(
options
.
from
==
'button'
){
//
var eData = options.target.dataset;
console
.
log
(
eData
.
id
);
// shareBtn
//
var eData = options.target.dataset;
//
console.log( eData.id); // shareBtn
// 此处可以修改 shareObj 中的内容
shareObj
.
path
=
'/pages/goods/goods?goodId='
;
shareObj
.
path
=
'/pages/goods/goods?goodId=
123
'
;
}
return
shareObj
;
},
...
...
@@ -141,4 +141,14 @@ Page({
// console.log("newScrollLeft: ", newScrollLeft)
},
//跳转到知识竞答页面
toGame
:
function
(
e
)
{
wx
.
navigateTo
({
url
:
"/pages/key/matchDaily/matchDaily"
});
},
})
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/activity/act-info/act-info.wxml
查看文件 @
c6412858
<view
class="page">
<view
class="page">
...
...
@@ -45,7 +45,6 @@
<text>首页</text>
</view>
<view class="items">
<!-- <image src="../../../icon/activity/share.png"></image> -->
<button class="share" open-type="share">
</button>
<image src="../../../icon/activity/share.png"></image>
...
...
@@ -57,7 +56,7 @@
<button class="button-brown" bindtap="toBuy" formType="submit">我要收藏</button>
</view></view>
<view class="weui-flex__item weui-flex justify align"><view class="placeholder">
<button class="button-red" bindtap="to
Buy" formType="submit
">立即参与</button>
<button class="button-red" bindtap="to
Game
">立即参与</button>
</view></view>
</view>
</view>
...
...
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.js
查看文件 @
c6412858
// pa
ges/key/matchDaily/matchDaily.js
// pa
ges/key/matchDaily/matchDaily.js
...
...
@@ -66,6 +66,10 @@ Page({
inputContentToValue
:
""
,
autoFocus
:
true
,
//对话框默认为focus
/* 模态框 */
showModal
:
false
,
},
/**
...
...
@@ -269,7 +273,7 @@ Page({
//逻辑判断
//超过了10题,溢出了,直接进入doneDaily
if
(
current_index
>=
1
0
)
if
(
current_index
>=
1
)
{
_this
.
doneDaily
()
}
...
...
@@ -351,26 +355,29 @@ Page({
// 如果完成了10道题
doneDaily
:
function
(
res
)
{
var
_this
=
this
wx
.
showModal
({
title
:
'恭喜你完成本次学习'
,
content
:
'正确率'
+
_this
.
__data__
.
score
+
'/10'
,
showCancel
:
false
,
// 将cancel按钮disable掉
confirmText
:
'谢谢老师'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 用户点击了确定属性的按钮,于是跳转到tabbar /pages/key/key
// wx.navigateTo 和 wx.redirectto都无法跳转到tabbar
_this
.
setData
({
isStudyDone
:
true
,
item_index
:
9
,
})
// 基于用户交互原则,不直接跳转到/pages/key/key页面, 让用户自主选择
// wx.switchTab({
// url: '/pages/key/key'
// });
}
}
})
this
.
setData
({
showModal
:
true
})
// wx.showModal({
// title: '恭喜你完成本次活动',
// content: '获得'+_this.__data__.score + '积分,打败80%的玩家',
// showCancel: false, // 将cancel按钮disable掉
// confirmText: '谢谢老师',
// success(res) {
// if (res.confirm) {
// // 用户点击了确定属性的按钮,于是跳转到tabbar /pages/key/key
// // wx.navigateTo 和 wx.redirectto都无法跳转到tabbar
// _this.setData({
// isStudyDone: true,
// item_index : 9,
// })
// // 基于用户交互原则,不直接跳转到/pages/key/key页面, 让用户自主选择
// // wx.switchTab({
// // url: '/pages/key/key'
// // });
// }
// }
// })
},
...
...
@@ -694,4 +701,24 @@ Page({
},
// 外面的弹窗
btn
:
function
()
{
this
.
setData
({
showModal
:
true
})
},
// 禁止屏幕滚动
preventTouchMove
:
function
()
{
},
// 弹出层里面的弹窗
ok
:
function
()
{
this
.
setData
({
showModal
:
false
})
}
})
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.json
查看文件 @
c6412858
{
{
{
"usingComponents"
:
{},
"navigationBarTitleText"
:
"
随便看看
"
"navigationBarTitleText"
:
"
活动竞答
"
}
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.wxml
查看文件 @
c6412858
<!--p
ages/key/matchTest/matchTest.wxml-->
<!--p
ages/key/matchTest/matchTest.wxml-->
...
...
@@ -3,6 +3,42 @@
<view class="page bottom_fixed_page" style="min-height:{{ windowHeight }}px">
<!-- 微信小程序自定义弹框 https://blog.csdn.net/qq_39702981/article/details/85104827 -->
<!-- 微信小程序自定义弹框 https://blog.csdn.net/qq_39702981/article/details/85320926 -->
<!-- start 遮罩层 -->
<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
<!-- 弹出层 -->
<view class="modalDlg" wx:if="{{showModal}}">
<!-- 二维码或其他图片 -->
<view class="text">
<text style="color:#666666">恭喜你获得 </text>
<text style="font-weight:bold;">10</text>
<text style="color:#666666"> 积分</text>
</view>
<view class="weui-flex weui-width">
<view class="weui-flex__item"><view class="placeholder-modal">
<view class="items">
<image src="../../../icon/activity/points.png"></image>
<text>查看积分</text>
</view>
</view></view>
<view class="weui-flex__item"><view class="placeholder-modal">
<view class="items">
<button class="share" open-type="share">
</button>
<image src="../../../icon/activity/share.png"></image>
<text>分享给好友</text>
</view>
</view></view>
</view>
<view bindtap="ok" class="ok">取消</view>
</view>
<!-- end 遮罩层 -->
<view class="weui-flex">
<view class="weui-flex__item"><view class="placeholder">题目:{{item_index+1}}/10题</view></view>
<view class="weui-flex__item"><view class="placeholder">分数:{{score}}</view></view>
...
...
增值产品-小程序及app/nyx-master/pages/key/matchDaily/matchDaily.wxss
查看文件 @
c6412858
page{
background-color:#EDEDED;}
page{
background-color:#EDEDED;}
...
...
@@ -164,3 +164,99 @@ page{background-color:#EDEDED;}
display: inline-block;
vertical-align: middle;
}
/* 小程序自定义弹框 */
/* 遮罩层 */
.mask{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
z-index: 9000;
opacity: 0.5;
}
/* 弹出层 */
.modalDlg{
width: 70%;
height: 360rpx;
position: fixed;
top: 50px;
left: 0;
right: 0;
z-index: 9999;
margin: 0 auto;
background-color: #fff;
border-radius:5px;
display: flex;
flex-direction: column;
align-items: center;
}
/* 弹出层里面的图片 */
/* 弹出层里面的按钮 */
.ok{
width: 100%;
height: 2rpx;
background: #ccc;
text-align: center;
font-size: 38rpx;
color: #666666;
}
/* 弹出层里面的文字 */
.text{
text-align: center;
font-size: 38rpx;
color: rgb(255, 0, 0);
width: 80%;
/* margin: 20rpx; */
padding: 30rpx;
}
/* 图片+文字 */
.weui-width{
width: 80%;
}
.placeholder-modal{
margin: 0px;
text-align: center;
vertical-align: middle;
line-height: 2.3em;
background-color: #fff;
}
.items{
width: 100%;
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
}
.items image{
width: 80rpx;
height: 80rpx;
margin-top: 10rpx;
font-size: 0;
}
.items text{
/* display: block; */
text-align: center;
padding: 0rpx;
font-size: 30rpx;
color:#666666
}
/* 分享按钮 */
.share {
position: absolute;
background-size: 50rpx 50rpx;
opacity: 0;
border:none;
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论