Commit 7332bcd8 by jscat

nyx weapp: 主流程更新

1. 添加"商家管理"页面 /my-members.wxml
2. 为activity-info 和 quiz-info 添加克隆按钮
3. 暂时将order.wxml连接到/my/my.wxml 上
parent 1a48cc83
{
{
......@@ -11,6 +11,7 @@
"pages/activity/act-writer/act-writer",
"pages/my/my",
"pages/key/matchTest/matchTest",
"pages/my/my-members/my-members",
"pages/my/my-points/my-points",
"pages/my/my-orders/my-orders",
"pages/my/user/user",
......@@ -34,8 +35,8 @@
{
"pagePath": "pages/activity/activity",
"text": "活动",
"iconPath": "./icon/index.png",
"selectedIconPath": "./icon/index.png"
"iconPath": "./icon/my/activity.png",
"selectedIconPath": "./icon/my/activity.png"
},
{
"pagePath": "pages/my/my",
......
<view class="page">
<view class="page">
......@@ -11,8 +11,16 @@
<!-- 文字内容 -->
<view class="note">
<view class="note-price" style="font-weight: bold">
¥{{activityInfo.unit_price}}
<view class="note-price" style="font-weight: bold">
<view class="clone">
<view class="clone-left">¥{{activityInfo.unit_price}}</view>
<view class="clone-right" bindtap="onClickPoints" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<image src="../../../icon/activity/clone.png"></image>
克隆
</view>
</view>
</view>
</view>
<view class="note-content">
......@@ -44,12 +52,12 @@
<image src="../../../icon/index.png"></image>
<text>首页</text>
</view>
<view class="items">
<button class="share" open-type="share">
</button>
<image src="../../../icon/activity/share.png"></image>
<text>分享</text>
</view>
<view class="items">
<button class="share" open-type="share">
</button>
<image src="../../../icon/activity/share.png"></image>
<text>分享</text>
</view>
</view>
</view></view>
<view class="weui-flex__item weui-flex justify align"><view class="placeholder">
......
.scroll-view_H{
.scroll-view_H{
......@@ -193,4 +193,14 @@
background-size: 50rpx 50rpx;
opacity: 0;
border:none;
}
\ No newline at end of file
}
/* 克隆图片 */
.clone{width: 100%; display: flex; margin-top: 0rpx; align-items: center;}
.clone-left{width: 80%; }
.cloner-right{width: 20%;}
.clone-right image{
width: 40rpx;
height: 40rpx;
font-size: 0;
}
\ No newline at end of file
// pages/activity/activity.js
// pages/activity/activity.js
......@@ -68,6 +68,9 @@ Page({
onLoad: function (options) {
var _this = this;
// todo temp
wx.setStorageSync('memberId', "mid_001")
var device = wx.getSystemInfoSync()
//self.device = app.globalData.myDevice
// jscat miniprogram default width is 750rpx
......@@ -95,6 +98,7 @@ Page({
_this.getActivities(0, 1, 4, strCategory);
}
},
/**
......
<view class="page">
<view class="page">
......@@ -41,9 +41,9 @@
<!-- todo 0728 热销暂时也不实现 -->
<view class="items">
<navigator url="/pages/my/my-orders/my-orders">
<image src="../../icon/my/activity.png"></image>
<image src="../../icon/activity/order.png"></image>
</navigator>
<text>预订</text>
<text>订单</text>
</view>
</view>
</view>
......
<view class="page">
<view class="page">
......@@ -12,8 +12,17 @@
<!-- 文字内容 -->
<view class="note">
<view class="note-title" style="font-weight: bold">
{{quiz.member_name}} {{quiz.title}}
<view class="clone">
<view class="clone-left">{{quiz.member_name}} {{quiz.title}}</view>
<view class="clone-right" bindtap="onClickPoints" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;">
<image src="../../../icon/activity/clone.png"></image>
克隆
</view>
</view>
</view>
</view>
<view class="note-content">
{{quiz.content[0]}}
......@@ -44,17 +53,14 @@
<image src="../../../icon/index.png"></image>
<text>首页</text>
</view>
<view class="items">
<button class="share" open-type="share">
</button>
<image src="../../../icon/activity/share.png"></image>
<text>分享</text>
</view>
<view class="items">
<button class="share" open-type="share">
</button>
<image src="../../../icon/activity/share.png"></image>
<text>分享</text>
</view>
</view>
</view></view>
<!-- <view class="weui-flex__item weui-flex justify align"><view class="placeholder">
<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="toGame">立即参与</button>
</view></view>
......
.scroll-view_H{
.scroll-view_H{
......@@ -190,4 +190,14 @@
background-size: 50rpx 50rpx;
opacity: 0;
border:none;
}
\ No newline at end of file
}
/* 克隆图片 */
.clone{width: 100%; display: flex; margin-top: 0rpx; align-items: center;}
.clone-left{width: 80%; }
.cloner-right{width: 20%;}
.clone-right image{
width: 40rpx;
height: 40rpx;
font-size: 0;
}
\ No newline at end of file
// pages/mall/order/order.js
// pages/mall/order/order.js
......@@ -342,5 +342,14 @@ Page({
})
},
// 跳转到支付页面
// 目前暂时跳转到 /page/my/my.wxml
toPay: function (e) {
var _this = this;
var url = "/pages/my/my"
wx.switchTab({
url: url
});
},
})
\ No newline at end of file
<view class="page">
<view class="page">
......@@ -46,7 +46,7 @@
<text class="total-price">¥1231.00</text>
</view></view>
<view class="weui-flex__item weui-flex justify align"><view class="placeholder">
<button class="button-red" bindtap="toBuy">去支付</button>
<button class="button-red" bindtap="toPay">去支付</button>
</view></view>
</view>
</view>
......
// pages/my/my-member/my-member.js
// pages/my/my-member/my-member.js
var config = wx.getStorageSync("config");
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
//用户信息初始化
nyxCode: "",
authStatus: "",
userInfo: {},
memberId: "", // 商家id
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var _this = this;
//初始化数据
if (wx.getStorageSync('nyxCode')) {
_this.setData({
nyxCode: wx.getStorageSync('nyxCode'),
userInfo: wx.getStorageSync('userInfo'),
authStatus: wx.getStorageSync('authStatus'),
memberId: "mid_123",
})
}
/**
* 系统配置:主要用于置底页面设置 step2
*/
var windowHeight = wx.getSystemInfoSync().windowHeight;//获取设备高度,小程序自带的方法
this.setData({
windowHeight: windowHeight
})
/* end */
//tips:每次进入都重新更新
var matchSeason = _this.data.matchSeason
var nyxCode = _this.data.nyxCode
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
var _this = this;
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
// 用户自定义函数
// 获取真实数据
getMatchRank: function (matchSeason, matchTeam) {
var _this = this;
var strUrl = config.match_rank_query_url + '?matchSeason=' + matchSeason + '&matchTeam=' + matchTeam
wx.request({
url: strUrl,
method: 'GET',
header: {
'Cookie': wx.getStorageSync('cookieKey'),
},
success: function (res) {
if (res.data.resultCode == 200) {
//表示上传成功(可以在阿里云服务器查看上传的图片)
console.log(res.data);
var result = _this.data.studyResult
var list = res.data.data
for (var j = 0; j < list.length; j++) {
var matchType = list[j].matchType
result[matchType] = list[j].ratioFinish == null ? 0 : list[j].ratioFinish
}
wx.setStorageSync('studyResult', result)
_this.setData({
studyResult: result,
})
}
}
})
},
})
\ No newline at end of file
{
{
"usingComponents": {},
"navigationBarTitleText": "商家管理"
}
\ No newline at end of file
<!--pages/my/my-members/my-members.wxml-->
<!--pages/my/my-members/my-members.wxml-->
<wxs module="tutil" src="../../../utils/date.wxs"></wxs>
<view class="page">
<view class="workbench">
<text class="title">活动</text>
<view class="list">
<view class="items">
<navigator url="matchStudyDetail/matchStudyDetail?studyType=wset1">
<image src="/icon/my/activity.png"></image>
</navigator>
<text>活动创建</text>
</view>
<view class="items">
<navigator url="matchStudyDetail/matchStudyDetail?studyType=wset2">
<image src="/icon/member/quiz.png"></image>
</navigator>
<text>竞答创建</text>
</view>
<view class="items">
<navigator url="/pages/member/schedule/schedule">
<image src="/icon/member/schedule.png"></image>
</navigator>
<text>活动日历</text>
</view>
</view>
</view>
</view>
.workbench{
.workbench{
font-size: 30rpx;
background: #fff;
padding-bottom: 30rpx;
margin-bottom:10rpx;
color: #333;
}
.workbench .title{
font-size: 35rpx;
padding: 20rpx 20rpx;
margin-bottom: 40rpx;
display: block;
}
.workbench .items{
width: 100rpx;
flex:1;
text-align: center;
}
.workbench .items image{
width: 100rpx;
height: 100rpx;
}
.workbench .items image.service-icon{
width: 50rpx;
height: 50rpx;
}
.workbench .items text{
display: block;
text-align: center;
margin-top: 0rpx;
margin-bottom: 0rpx;
}
.workbench .items text.top{
display: block;
text-align: center;
margin-bottom: 0rpx;
}
.workbench .items text.bottom{
display: block;
text-align: center;
margin-top: 0rpx;
}
.workbench .list{
display: flex;
flex-direction: row;
flex:1;
}
/* end */
\ No newline at end of file
// pages/my/my.js
// pages/my/my.js
......@@ -12,8 +12,9 @@ Page({
data: {
/* 用于判断是否已经登陆 */
nyxCode : "",
authStatus : "0", // 授权状态: 0-未授权, 1-已授权
authStatus : "0", // 授权状态: 00-未授权, 01-已授权
userInfo : {},
memberId : "",
bGetUserInfo : false,
bUpdateUserData: false,
......@@ -31,6 +32,7 @@ Page({
nyxCode: wx.getStorageSync('nyxCode'),
userInfo: wx.getStorageSync('userInfo'),
authStatus: wx.getStorageSync('authStatus'),
memberId : "mid_123",
})
}
......
<view class="page">
<view class="page">
......@@ -36,6 +36,16 @@
</view>
<view class="weui-cell__bd">我的预订</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
</navigator>
<!-- 只针对member商家开放 -->
<!-- <block wx:if="{{memberId!=''}}"> -->
<navigator class="weui-cell weui-cell_access" hover-class="weui-cell_active" url="/pages/my/my-members/my-members">
<view class="weui-cell__hd">
<image src="/icon/my/tools.png" />
</view>
<view class="weui-cell__bd">商家管理</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<!-- </block> -->
</view>
</view>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论