63 changed files with 1837 additions and 191 deletions
@ -0,0 +1,171 @@ |
|||
// pages/culture/index.js
|
|||
import commonApi from "../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
weeks:[], |
|||
selectDay:"", |
|||
date:null, |
|||
days: ['日','一','二','三','四','五','六'], |
|||
top:0, |
|||
tags:[], |
|||
tagKey:"", |
|||
page_no:1, |
|||
total:1, |
|||
list:[] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
let d = new Date(),that = this; |
|||
let month = d.getMonth() + 1,day = d.getDate(); |
|||
month = month>10?month:("0"+month); |
|||
day = day>10?day:("0"+day); |
|||
this.setData({ |
|||
selectDay:d.getTime(), |
|||
date:d.getFullYear()+"-"+month+"-"+day |
|||
}) |
|||
const query=wx.createSelectorQuery(); //创建节点查询器
|
|||
query.select("#types").boundingClientRect() //选择toViewid获取位置信息
|
|||
query.exec(function(res) { |
|||
console.log(res) |
|||
that.setData({ |
|||
top:res[0].top |
|||
}) |
|||
}) |
|||
this.getWeekDay(); |
|||
// 获取分类
|
|||
commonApi._post("pbservice/Culture/getCultureCategory",{ |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
tags:res.data, |
|||
tagKey:res.data[0].key |
|||
}) |
|||
this.getList() |
|||
}) |
|||
}, |
|||
// picker修改日期
|
|||
bindDateChange:function(e){ |
|||
this.setData({ |
|||
selectDay: new Date(e.detail.value).getTime(), |
|||
list:[], |
|||
page_no:1, |
|||
total:1, |
|||
date:e.detail.value |
|||
}) |
|||
this.getWeekDay(); |
|||
this.getList(); |
|||
}, |
|||
// 点击修改日期
|
|||
changeDate:function(e){ |
|||
let times = e.currentTarget.dataset.times,d = new Date(times); |
|||
let month = d.getMonth()+1,day = d.getDate(); |
|||
month = month>10?month:('0'+month); |
|||
day = day>10?day:('0'+day); |
|||
this.setData({ |
|||
selectDay: times, |
|||
date:d.getFullYear()+"-"+month+"-"+day, |
|||
list:[], |
|||
page_no:1, |
|||
total:1 |
|||
}) |
|||
this.getList(); |
|||
}, |
|||
// 获取当前选择日期的一周日期范围
|
|||
getWeekDay:function(){ |
|||
var myDate = this.data.selectDay, daySecond = 24 * 60 * 60 * 1000,reslist=[]; |
|||
for (let i = myDate - daySecond * 3; i <= myDate + daySecond * 3; i = i + daySecond){ |
|||
let day = new Date(i),putDate = day.getDate(); |
|||
putDate = putDate>=10?putDate:'0'+putDate |
|||
let item = { |
|||
times:i, |
|||
day:this.data.days[day.getDay()], |
|||
date:putDate, |
|||
isSelect:i==myDate |
|||
}; |
|||
reslist.push(item); |
|||
} |
|||
this.setData({ |
|||
weeks: reslist |
|||
}) |
|||
}, |
|||
changeTag:function(e){ |
|||
this.setData({ |
|||
tagKey:e.currentTarget.dataset.tag, |
|||
page_no:1, |
|||
list:[], |
|||
total:1 |
|||
}) |
|||
this.getList() |
|||
}, |
|||
getList:function(){ |
|||
if(this.data.total<=this.data.list.length) return; |
|||
commonApi._post("pbservice/Culture/getCultureList",{ |
|||
page_no:this.data.page_no, |
|||
page_num:20, |
|||
date:this.data.date, |
|||
cate_id:this.data.tagKey |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
total:res.data.total, |
|||
list:this.data.list.concat(res.data.rows), |
|||
page_no:this.data.page_no+1 |
|||
}) |
|||
console.log(res) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
<!--pages/culture/index.wxml--> |
|||
<title title="文化配送"></title> |
|||
<!-- <view class="fixed-top" id="types"> |
|||
<view class="types"> |
|||
<view class="type active">全部活动</view> |
|||
<view class="type">可预约</view> |
|||
</view> |
|||
<view class="date-box"> |
|||
<view class="date-item {{item.times==selectDay?'active':''}}" wx:for="{{weeks}}" bindtap="changeDate" data-times="{{item.times}}"> |
|||
<view>{{item.date}}</view> |
|||
<view>周{{item.day}}</view> |
|||
</view> |
|||
<picker mode="date" value="{{date}}" start="1970-01-01" end="2027-09-01" bindchange="bindDateChange"> |
|||
<view class="picker calendar-img"> |
|||
<image width="56rpx" height="60rpx" mode="aspectFill" src="https://static.ticket.sz-trip.com/xcxImages/activity/calendar.png"></image> |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
</view> |
|||
<view style="height:199rpx"></view> --> |
|||
<view class="left-fixed" style="top:{{top}}px"> |
|||
<view class="tags"> |
|||
<view bindtap="changeTag" data-tag="{{item.key}}" class="tag {{tagKey==item.key?'active':''}}" wx:for="{{tags}}">{{item.value}}</view> |
|||
<!-- <view class="tag">讲座导赏</view> --> |
|||
</view> |
|||
</view> |
|||
<view class="list" id="types"> |
|||
<navigator url="info/index?id={{item.id}}" class="item" wx:for="{{list}}"> |
|||
<image src="{{item.cover}}" mode="aspectFill"></image> |
|||
<view class="right-info"> |
|||
<view class="textOver2">{{item.name}}</view> |
|||
<view class="textOver" style="margin:10rpx 0">{{item.begin_date}}-{{item.end_date}}</view> |
|||
<view class="info-bottom"> |
|||
<view class="info-address">{{item.supplier_name}}</view> |
|||
<!-- <view class="info-btn" style="background:#999999" wx:if="{{item.is_act_end==1}}">已结束</view> --> |
|||
<!-- <view class="info-btn" wx:elif="{{item.is_bind_our_sku==1 && item.is_can_booking==1}}">立即预约</view> --> |
|||
<!-- <view class="info-btn borderbtn" wx:else>无需预约</view> --> |
|||
<view class="info-btn borderbtn">无需预约</view> |
|||
</view> |
|||
</view> |
|||
</navigator> |
|||
</view> |
|||
@ -0,0 +1,155 @@ |
|||
/* pages/culture/index.wxss */ |
|||
.fixed-top { |
|||
position: fixed; |
|||
left: 0; |
|||
right: 0; |
|||
height: 200rpx; |
|||
background: white; |
|||
} |
|||
.types { |
|||
height: 80rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
.types .type { |
|||
width: 50%; |
|||
text-align: center; |
|||
font-size: 30rpx; |
|||
color: #333; |
|||
line-height: 80rpx; |
|||
position: relative; |
|||
} |
|||
.types .type.active { |
|||
color: #0F9095; |
|||
font-weight: bold; |
|||
} |
|||
.types .type.active::after { |
|||
content: "1"; |
|||
font-size: 0; |
|||
width: 40rpx; |
|||
height: 6rpx; |
|||
position: absolute; |
|||
left: 50%; |
|||
margin-left: -20rpx; |
|||
bottom: 10rpx; |
|||
background: #0F9095; |
|||
display: block; |
|||
border-radius: 3rpx; |
|||
} |
|||
.date-box { |
|||
height: 86rpx; |
|||
background: rgba(15, 144, 149, 0.08); |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
padding: 17rpx 0; |
|||
padding-left: 20rpx; |
|||
} |
|||
.date-item { |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
text-align: center; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: center; |
|||
width: 86rpx; |
|||
height: 86rpx; |
|||
} |
|||
.date-item.active { |
|||
font-weight:500; |
|||
background: #0B898E; |
|||
border-radius: 50%; |
|||
color: #fff; |
|||
font-size: 24rpx; |
|||
color: #fff; |
|||
} |
|||
.date-item view:nth-child(1){ |
|||
font-size: 28rpx; |
|||
color: #333; |
|||
} |
|||
.date-item.active view:nth-child(1){ |
|||
color: #fff; |
|||
font-size: 28rpx; |
|||
} |
|||
.calendar-img { |
|||
width: 70rpx; |
|||
padding-left: 10rpx; |
|||
height: 80rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-start; |
|||
border-radius: 30rpx 0px 0px 30rpx; |
|||
} |
|||
.calendar-img image { |
|||
width: 56rpx; |
|||
height: 60rpx; |
|||
display: block; |
|||
} |
|||
.calendar-img.active { |
|||
background-color: #0B898E; |
|||
} |
|||
.left-fixed { |
|||
position: fixed; |
|||
left: 0; |
|||
width: 140rpx; |
|||
bottom: 0; |
|||
text-align: center; |
|||
line-height: 80rpx; |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
background: #F2F2F2; |
|||
margin-top: 0; |
|||
} |
|||
.tags { |
|||
overflow-y: auto; |
|||
} |
|||
.tag.active { |
|||
background: white; |
|||
color: #333; |
|||
} |
|||
.item { |
|||
margin: 40rpx 20rpx; |
|||
margin-top: 20rpx; |
|||
display: flex; |
|||
margin-left: 150rpx; |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
} |
|||
.item image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
flex-shrink: 0; |
|||
display: block; |
|||
margin-right: 10rpx; |
|||
border-radius: 10rpx; |
|||
} |
|||
.item .textOver2 { |
|||
font-size: 30rpx; |
|||
color: #333; |
|||
} |
|||
.info-bottom { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.info-bottom .info-btn { |
|||
width: 140rpx; |
|||
height: 40rpx; |
|||
background: #0F9095; |
|||
border-radius: 20rpx; |
|||
line-height: 40rpx; |
|||
text-align: center; |
|||
color: #fff; |
|||
} |
|||
.right-info { |
|||
flex: 1; |
|||
} |
|||
.info-bottom .info-btn.borderbtn { |
|||
background: white; |
|||
box-sizing: border-box; |
|||
border: 2rpx solid #0F9095; |
|||
color: #0F9095; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
@ -0,0 +1,121 @@ |
|||
// pages/info/activityInfo/index.js
|
|||
import commonApi from "../../../utils/https/common" |
|||
let app = getApp() |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
id:null, |
|||
info:null |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
let id = options.id; |
|||
this.setData({ |
|||
id:id |
|||
}) |
|||
commonApi._post("pbservice/Culture/getCultureDetail",{ |
|||
id:id |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
info:res.data |
|||
}) |
|||
this.BroswerRecord() |
|||
}) |
|||
}, |
|||
BroswerRecord:function(){ |
|||
setTimeout(()=>{ |
|||
if(app.globalData.uuid){ |
|||
commonApi._post('browse/browse_record',{ |
|||
type:"page", |
|||
title:this.data.info.name, |
|||
drive:"mini", |
|||
source_id:this.data.info.id, |
|||
url:"/pages/culture/info/index?id="+this.data.info.id, |
|||
uuid:app.globalData.uuid |
|||
}).then(res=>{ |
|||
}) |
|||
} |
|||
else { |
|||
this.BroswerRecord(); |
|||
} |
|||
},500) |
|||
}, |
|||
order:function(){ |
|||
let skuid = this.data.info.sku_id; |
|||
if(!skuid) return; |
|||
commonApi._post("product/get_sku_detail_by_id",{ |
|||
sku_id:skuid |
|||
}).then(res=>{ |
|||
if(!res.data){ |
|||
wx.showToast({ |
|||
title: '本活动不支持预约', |
|||
icon:'none' |
|||
}) |
|||
return; |
|||
} |
|||
app.globalData.couponInfo = null; |
|||
app.globalData.product = { |
|||
sku:res.data, |
|||
product:res.data.product |
|||
} |
|||
wx.navigateTo({ |
|||
url: '/pages/order/scene/index?type=museum', |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
<!--pages/info/activityInfo/index.wxml--> |
|||
<wxs src="../../../utils/filter.wxs" module="tool" /> |
|||
<title title="活动"></title> |
|||
<view wx:if="{{info}}"> |
|||
<image src="{{info.cover}}" mode="widthFix" class="swiper"></image> |
|||
<view class="top-box"> |
|||
<view class="top-box-title">{{info.name}}</view> |
|||
<view class="top-tip-box" wx:if="{{info.begin_date || info.end_date}}"> |
|||
<image src="https://static.ticket.sz-trip.com/xcxImages/activity/time.png" mode="widthFix"></image> |
|||
<text>活动时间:{{info.begin_date}} ~ {{info.end_date}}</text> |
|||
</view> |
|||
<view class="top-tip-box" wx:if="{{info.detail_address}}"> |
|||
<image src="https://static.ticket.sz-trip.com/xcxImages/activity/location.png" mode="widthFix"></image> |
|||
<text>活动地点:{{info.detail_address}}</text> |
|||
</view> |
|||
</view> |
|||
<view class="tip-box">本活动无需在线预约,可直接前往。更多详情请咨询活动主办方工作人员。</view> |
|||
<view class="box-title">活动详情</view> |
|||
<rich-text class="box-content" nodes="{{tool.formateRichText(info.intro)}}"></rich-text> |
|||
<!-- <view class="box-tip" wx:if="{{info && info.is_bind_our_sku==0}}">* 本活动无需在线预约,可直接前往。</view> --> |
|||
</view> |
|||
<view style="height:124rpx" wx:if="{{info && info.is_bind_our_sku!=0 && info.sku_id}}"></view> |
|||
<view class="bottom-fixed" wx:if="{{info && info.is_bind_our_sku!=0 && info.sku_id}}"> |
|||
<view class="bottom-btn" bindtap="order" wx:if="{{info.is_act_end==0}}">预约活动</view> |
|||
<view class="bottom-btn disable" wx:else>活动已过期</view> |
|||
</view> |
|||
@ -0,0 +1,105 @@ |
|||
/* pages/info/activityInfo/index.wxss */ |
|||
.swiper ,.swiper image{ |
|||
width: 100%; |
|||
height: 330rpx; |
|||
display: block; |
|||
} |
|||
.top-box { |
|||
margin: 35rpx 0; |
|||
position: relative; |
|||
z-index: 1; |
|||
border-radius: 13rpx; |
|||
padding: 0 20rpx; |
|||
} |
|||
.top-box-title { |
|||
font-size: 31rpx; |
|||
color: #000; |
|||
} |
|||
.top-tip-box { |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 20rpx; |
|||
} |
|||
.top-tip-box image { |
|||
width: 29rpx; |
|||
height: 29rpx; |
|||
display: block; |
|||
margin-right: 25rpx; |
|||
} |
|||
.box-title { |
|||
font-weight: 500; |
|||
font-size: 35rpx; |
|||
color: #000; |
|||
margin: 0 20rpx; |
|||
margin-top: 50rpx; |
|||
padding-left: 17rpx; |
|||
line-height: 30rpx; |
|||
border-left: 6rpx solid #0F9095; |
|||
} |
|||
.box-content { |
|||
margin: 0 27rpx; |
|||
font-size: 25rpx; |
|||
color: #333; |
|||
margin-top: 34rpx; |
|||
display: block; |
|||
} |
|||
.box-tip { |
|||
margin: 0 27rpx; |
|||
color: #D62828; |
|||
margin-top: 50rpx; |
|||
font-size: 25rpx; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.time { |
|||
margin: 0 27rpx; |
|||
margin-bottom: 17rpx; |
|||
border: 1rpx solid #999; |
|||
border-radius: 10rpx; |
|||
color: #666; |
|||
font-size: 24rpx; |
|||
padding: 0 19rpx; |
|||
line-height: 73rpx; |
|||
} |
|||
.time.active { |
|||
border-color: #0B898E; |
|||
background: #0B898E; |
|||
color: #fff; |
|||
} |
|||
.bottom-fixed { |
|||
position: fixed; |
|||
width: 750rpx; |
|||
height: 104rpx; |
|||
background: #FFFFFF; |
|||
left: 0; |
|||
bottom: 0; |
|||
box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1); |
|||
display: flex; |
|||
z-index: 1; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
.bottom-btn { |
|||
width: 391rpx; |
|||
line-height: 74rpx; |
|||
background: #D62828; |
|||
border-radius: 37rpx; |
|||
font-size: 31rpx; |
|||
font-weight: 500; |
|||
color: #fff; |
|||
text-align: center; |
|||
} |
|||
.bottom-btn.disable { |
|||
background: #ccc; |
|||
} |
|||
.tip-box { |
|||
background: #ECF6F7; |
|||
border-radius: 10rpx; |
|||
margin: 0 20rpx; |
|||
color: #0F9095; |
|||
font-size: 28rpx; |
|||
padding: 14rpx 20rpx; |
|||
font-weight: bold; |
|||
line-height: 42rpx; |
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
// pages/culture/infoindex.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,3 @@ |
|||
{ |
|||
"usingComponents": {} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
<!--pages/culture/infoindex.wxml--> |
|||
<text>pages/culture/infoindex.wxml</text> |
|||
@ -0,0 +1 @@ |
|||
/* pages/culture/infoindex.wxss */ |
|||
@ -0,0 +1,129 @@ |
|||
// pages/user/retail/apply/index.js
|
|||
import spreadApi from "../../../../utils/https/common" |
|||
import userApi from "../../../../utils/https/user" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
name:"", |
|||
phone:"", |
|||
idcard:"", |
|||
list:[], |
|||
index:-1, |
|||
nickName:"" |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
userApi.user_post("user/getMyInfo",{}).then(res=>{ |
|||
spreadApi.user_post("commission/getMerchantList",{ |
|||
user_id:res.data.id |
|||
}).then(r=>{ |
|||
this.setData({ |
|||
list:r.data.rows, |
|||
user_id:res.data.id |
|||
}) |
|||
}) |
|||
}) |
|||
|
|||
}, |
|||
bindPickerChange:function(e){ |
|||
console.log(e) |
|||
this.setData({ |
|||
index:e.detail.value |
|||
}) |
|||
}, |
|||
apply:function(){ |
|||
spreadApi.user_post("commission/Register",{ |
|||
user_name:this.data.name, |
|||
mobile:this.data.phone, |
|||
id_card:this.data.idcard, |
|||
merchant_id:this.data.list[this.data.index].id, |
|||
user_id:this.data.user_id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
wx.showToast({ |
|||
title: '申请成功', |
|||
icon:'success' |
|||
}) |
|||
setTimeout(()=>{ |
|||
wx.navigateBack() |
|||
},1000) |
|||
} |
|||
}) |
|||
// wx.redirectTo({
|
|||
// url: '../index',
|
|||
// })
|
|||
}, |
|||
changeName:function(e){ |
|||
let name = e.detail.value; |
|||
this.setData({ |
|||
name:name |
|||
}) |
|||
}, |
|||
changeTel:function(e){ |
|||
let tel = e.detail.value; |
|||
this.setData({ |
|||
phone:tel |
|||
}) |
|||
}, |
|||
changeId:function(e){ |
|||
let id = e.detail.value; |
|||
this.setData({ |
|||
idcard:id |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
<!--pages/user/retail/apply/index.wxml--> |
|||
<title title="我要分销"></title> |
|||
<view class="topbg"></view> |
|||
<view class="content"> |
|||
<view class="line-item"> |
|||
<view class="left-item">所属单位:</view> |
|||
<picker bindchange="bindPickerChange" value="{{index}}" range="{{list}}" range-key="merchant_name"> |
|||
<view class="picker" wx:if="{{index>-1}}"> |
|||
{{list[index].merchant_name}} |
|||
</view> |
|||
<input wx:else disabled type="text" placeholder="请选择所属单位" /> |
|||
</picker> |
|||
<!-- --> |
|||
</view> |
|||
<view class="line-item"> |
|||
<view class="left-item">姓名:</view> |
|||
<input type="text" bindinput="changeName" placeholder="请输入姓名" /> |
|||
</view> |
|||
<view class="line-item"> |
|||
<view class="left-item">手机号:</view> |
|||
<input type="text" bindinput="changeTel" placeholder="请输入手机号" /> |
|||
</view> |
|||
<view class="line-item"> |
|||
<view class="left-item">身份证号:</view> |
|||
<input type="text" bindinput="changeId" placeholder="请输入身份证号" /> |
|||
</view> |
|||
<view class="apply-btn" bindtap="apply">立即申请</view> |
|||
<view style="height:1rpx"></view> |
|||
</view> |
|||
@ -0,0 +1,43 @@ |
|||
/* pages/user/retail/apply/index.wxss */ |
|||
.topbg { |
|||
height: 320rpx; |
|||
background: #0B898E; |
|||
position: absolute; |
|||
width: 900rpx; |
|||
border-bottom-left-radius: 130rpx; |
|||
border-bottom-right-radius: 130rpx; |
|||
left: 50%; |
|||
margin-left: -450rpx; |
|||
z-index: 0; |
|||
} |
|||
.content { |
|||
background: #FFFFFF; |
|||
border-radius: 20rpx; |
|||
margin: 0 30rpx; |
|||
margin-top:100rpx; |
|||
position: relative; |
|||
z-index: 1; |
|||
padding: 0 45rpx; |
|||
} |
|||
.line-item { |
|||
display: flex; |
|||
align-items: center; |
|||
height: 120rpx; |
|||
border-bottom: 1rpx solid #ccc; |
|||
font-size: 30rpx; |
|||
color: #333; |
|||
} |
|||
.left-item { |
|||
width: 200rpx; |
|||
text-align: left; |
|||
} |
|||
.apply-btn { |
|||
font-size: 30rpx; |
|||
color: #fff; |
|||
width: 360rpx; |
|||
line-height: 80rpx; |
|||
background: #0B898E; |
|||
border-radius: 40rpx; |
|||
text-align: center; |
|||
margin: 100rpx auto; |
|||
} |
|||
@ -0,0 +1,168 @@ |
|||
// pages/user/retail/goods/index.js
|
|||
import spreadApi from "../../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageNo:1, |
|||
list:[], |
|||
isMore:true, |
|||
userid:"", |
|||
total:1, |
|||
commission_code:'' |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
spreadApi.user_post("commission/getCommissionUser",{ |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
userid:res.data.id, |
|||
commission_code:res.data.commission_code |
|||
}) |
|||
this.getList() |
|||
}) |
|||
}, |
|||
getList:function(){ |
|||
if(this.data.list.length>=this.data.total) return; |
|||
spreadApi.user_post("commission/getProductsByUserid",{ |
|||
page:this.data.pageNo, |
|||
user_id:this.data.userid |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
this.setData({ |
|||
pageNo:this.data.pageNo+1, |
|||
list:this.data.list.concat(res.data.rows), |
|||
total:res.data.total |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
getUrl(item){ |
|||
switch(item.type){ |
|||
case "tenscenic": |
|||
return '/pages/info/foodInfo/index?id='+(item.scene_id || item.id); |
|||
break; |
|||
case "ticket": |
|||
// 产品 产品票务
|
|||
return '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id); |
|||
break; |
|||
case "hotel": |
|||
// 产品 酒店
|
|||
return '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id); |
|||
break; |
|||
case "post": |
|||
// 产品 产品发货的
|
|||
return '/pages/info/postProductInfo/index?id='+item.id; |
|||
break; |
|||
case "line": |
|||
// 产品 线路
|
|||
return '/pages/info/roadInfo/index?id='+item.id; |
|||
break; |
|||
case "coupon": |
|||
// 产品 卡券
|
|||
wx.navigateTo({ |
|||
url: '/pages/info/cardInfo/index?id='+item.id |
|||
}) |
|||
break; |
|||
case "show": |
|||
// 产品 演出
|
|||
return '/pages/info/showInfo/index?id='+item.id; |
|||
break; |
|||
case "food": |
|||
// 产品 美食
|
|||
return '/pages/info/foodProductInfo/index?id='+item.id; |
|||
break; |
|||
case "activity": |
|||
// 活动
|
|||
return '/pages/info/activityInfo/index?id='+item.act_calendar_id; |
|||
break; |
|||
case "movie": |
|||
// 产品 电影票
|
|||
return '/pages/list/movieticket/list/info/index?id='+item.third_id+'&title='+item.title; |
|||
break; |
|||
case "cinema": |
|||
// 产品 电影票
|
|||
return '/pages/list/movieticket/list/cinema/index?id='+item.third_id+'&title='+item.title; |
|||
break; |
|||
case "scenic": |
|||
// 场景 景点
|
|||
return '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id); |
|||
break; |
|||
case "room": |
|||
// 场景 酒店
|
|||
return '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id); |
|||
break; |
|||
case "venue": |
|||
// 场景 场馆
|
|||
return '/pages/info/museumInfo/index?id='+(item.scene_id || item.id); |
|||
break; |
|||
} |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function (e) { |
|||
if(e.from=='button'){ |
|||
let item = e.target.dataset.item; |
|||
return { |
|||
title: item.product.title, |
|||
path: this.getUrl(item.product)+'&retailId='+this.data.commission_code, //分享页面地址
|
|||
imageUrl:item.product.headimg |
|||
} |
|||
} |
|||
else { |
|||
return { |
|||
title: "君到苏州", |
|||
path: '/pages/user/user', //分享页面地址
|
|||
} |
|||
} |
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
<!--pages/user/retail/goods/index.wxml--> |
|||
<title title="可分销商品"></title> |
|||
<view class="item" wx:for="{{list}}"> |
|||
<image src="{{item.product.headimg}}" mode="aspectFill"></image> |
|||
<view class="item-center"> |
|||
<view class="item-title">{{item.product.title}}</view> |
|||
<view class="item-price">¥{{item.product.price/100}}<text>起</text></view> |
|||
<view class="item-money">佣金:预计{{item.commission_price/100}}元</view> |
|||
</view> |
|||
<button open-type="share" class="item-btn" data-item="{{item}}">分享</button> |
|||
</view> |
|||
@ -0,0 +1,54 @@ |
|||
/* pages/user/retail/goods/index.wxss */ |
|||
.item { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin: 20rpx 30rpx; |
|||
background: white; |
|||
border-radius: 20rpx; |
|||
padding: 20rpx; |
|||
} |
|||
.item image { |
|||
width: 140rpx; |
|||
height: 140rpx; |
|||
border-radius: 10rpx; |
|||
display: block; |
|||
flex-shrink: 0; |
|||
margin-right: 20rpx; |
|||
} |
|||
.item-center { |
|||
flex: 1; |
|||
width: 300rpx; |
|||
font-size: 30rpx; |
|||
} |
|||
button.item-btn { |
|||
width: 140rpx !important; |
|||
line-height: 60rpx !important; |
|||
background: #0B898E; |
|||
border-radius: 30rpx !important; |
|||
font-size: 26rpx !important; |
|||
text-align: center !important; |
|||
font-weight: 500 !important; |
|||
flex-shrink: 0; |
|||
color: #fff; |
|||
padding: 0 !important; |
|||
} |
|||
.item-title { |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
} |
|||
.item-price { |
|||
color: #D62828; |
|||
margin-top: 10rpx; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.item-price text { |
|||
font-size: 24rpx; |
|||
color: #333; |
|||
margin-left: 10rpx; |
|||
} |
|||
.item-money { |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
} |
|||
@ -0,0 +1,77 @@ |
|||
// pages/user/retail/index.js
|
|||
import spreadApi from "../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
info:null |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
spreadApi.user_post("commission/getCommissionUser",{ |
|||
}).then(res=>{ |
|||
spreadApi.user_post("commission/getStatistics",{ |
|||
user_id:res.data.id |
|||
}).then(r=>{ |
|||
this.setData({ |
|||
info:r.data.rows |
|||
}) |
|||
}) |
|||
}) |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
<!--pages/user/retail/index.wxml--> |
|||
<view wx:if="{{info}}"> |
|||
<title title="我的分销"></title> |
|||
<view class="top"> |
|||
<view>我的佣金</view> |
|||
<view class="money-all" wx:if="{{info.total_collection}}">{{info.total_collection/100}}</view> |
|||
<view class="money-all" wx:else>0</view> |
|||
</view> |
|||
<view class="line-item"> |
|||
<text>我的粉丝数(人)</text> |
|||
<view>{{info.fans}} </view> |
|||
</view> |
|||
<navigator url="order/index" class="line-item"> |
|||
<text>我的业绩(订单数)</text> |
|||
<view style="flex:1"></view> |
|||
<view>{{info.count?info.count:0}} </view> |
|||
<view style="margin-left:10rpx" class="iconfont icon-you"></view> |
|||
</navigator> |
|||
<navigator url="goods/index" class="line-item"> |
|||
<text>可分销产品</text> |
|||
<view class="iconfont icon-you"></view> |
|||
</navigator> |
|||
</view> |
|||
@ -0,0 +1,34 @@ |
|||
/* pages/user/retail/index.wxss */ |
|||
.top { |
|||
height: 300rpx; |
|||
color: #FFFFFF; |
|||
text-align: center; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: center; |
|||
font-size: 30rpx; |
|||
font-weight: 500; |
|||
align-items: center; |
|||
background: #0B898E; |
|||
} |
|||
.money-all { |
|||
font-size: 60rpx; |
|||
margin-top: 40rpx; |
|||
} |
|||
.money-all::before { |
|||
content: "¥"; |
|||
font-size: 40rpx; |
|||
} |
|||
.line-item { |
|||
height: 120rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
margin: 0 30rpx; |
|||
border-bottom: 1rpx solid #ccc; |
|||
font-size: 30rpx; |
|||
color: #333; |
|||
justify-content: space-between; |
|||
} |
|||
page { |
|||
background: white; |
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
// pages/user/retail/list/index.js
|
|||
import spreadApi from "../../../../utils/https/common" |
|||
let app = getApp() |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
month:null, |
|||
list:[], |
|||
status:{}, |
|||
page:1, |
|||
total:1 |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
let month = options.month; |
|||
this.setData({ |
|||
month:month, |
|||
status:app.globalData.productState |
|||
}) |
|||
spreadApi.user_post("commission/getCommissionUser",{}).then(res=>{ |
|||
this.setData({ |
|||
user_id:res.data.id |
|||
}) |
|||
this.getList() |
|||
}) |
|||
}, |
|||
getList:function(){ |
|||
if(this.data.list.length>=this.data.total) return; |
|||
spreadApi.user_post("commission/getOrdersByMonth",{ |
|||
date:this.data.month, |
|||
user_id:this.data.user_id, |
|||
page:this.data.page |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list:res.data.rows, |
|||
total:res.data.total, |
|||
page:this.data.page+1 |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
<!--pages/user/retail/list/index.wxml--> |
|||
<title title="订单明细"></title> |
|||
<view class="item" wx:for="{{list}}"> |
|||
<view class="top-tip"> |
|||
<text>订单编号:{{item.order_id}}</text> |
|||
<view>{{status[item.order_product[0].state]}}</view> |
|||
</view> |
|||
<view class="top-tip"> |
|||
<text>创建时间:{{item.create_time}}</text> |
|||
<text>佣金:{{item.commission_price?item.commission_price/100:0}}</text> |
|||
</view> |
|||
<view class="item-info" wx:for="{{item.order_product}}" wx:for-item="product"> |
|||
<image src="{{product.product_img}}" mode="aspectFill"></image> |
|||
<view class="item-title">{{product.product_title+product.sku_name}}</view> |
|||
<view class="item-right"> |
|||
<view class="price">{{product.paid_money?product.paid_money/100:0}}</view> |
|||
<view>x {{product.product_num}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,59 @@ |
|||
/* pages/user/retail/list/index.wxss */ |
|||
.item { |
|||
border-radius: 20rpx; |
|||
background: white; |
|||
margin: 20rpx 30rpx; |
|||
padding: 0 20rpx; |
|||
} |
|||
page { |
|||
background: #f2f2f2; |
|||
} |
|||
.top-tip { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
font-size: 24rpx; |
|||
color: #888888; |
|||
line-height: 40rpx; |
|||
padding-top: 10rpx; |
|||
} |
|||
.top-tip view { |
|||
color: #0B898E; |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
} |
|||
.item-info { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
padding: 20rpx 0; |
|||
border-top: 1rpx solid #D8D8D8; |
|||
margin-top: 10rpx; |
|||
} |
|||
.item image { |
|||
width: 140rpx; |
|||
height: 140rpx; |
|||
border-radius: 10rpx; |
|||
display: block; |
|||
flex-shrink: 0; |
|||
} |
|||
.item-title { |
|||
flex: 1; |
|||
width: 300rpx; |
|||
font-size: 30rpx; |
|||
font-weight: 500; |
|||
margin: 0 20rpx; |
|||
} |
|||
.item-right { |
|||
flex-shrink: 0; |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
text-align: right; |
|||
} |
|||
.item-right .price { |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.price::before { |
|||
content: "¥"; |
|||
font-size: 24rpx; |
|||
margin-right: 6rpx; |
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
// pages/user/retail/order/index.js
|
|||
import spreadApi from "../../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageNo:1, |
|||
isMore:true, |
|||
list:[], |
|||
user_id:"", |
|||
total:1 |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
spreadApi.user_post("commission/getCommissionUser",{}).then(res=>{ |
|||
this.setData({ |
|||
user_id:res.data.id |
|||
}) |
|||
this.getList() |
|||
}) |
|||
|
|||
}, |
|||
getList:function(){ |
|||
if(this.data.list.length>=this.data.total) return; |
|||
spreadApi.user_post("commission/getStatisticsByMonth",{ |
|||
page:this.data.pageNo, |
|||
user_id:this.data.user_id |
|||
}).then(res=>{ |
|||
this.setData({ |
|||
list:this.data.list.concat(res.data.rows), |
|||
total:res.data.total, |
|||
pageNo:this.data.pageNo+1 |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.getList() |
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
<!--pages/user/retail/order/index.wxml--> |
|||
<title title="我的业绩"></title> |
|||
<navigator url="../list/index?month={{item.month}}" class="item" wx:for="{{list}}"> |
|||
<view class="item-top"> |
|||
<text>{{item.c_month}}</text> |
|||
<view>{{item.is_withdraw==0?'未':'已'}}结算</view> |
|||
</view> |
|||
<view class="line"> |
|||
<text>订单数量</text> |
|||
<text>{{item.count}}</text> |
|||
</view> |
|||
<view class="line"> |
|||
<text>订单金额</text> |
|||
<text>¥{{item.total_collection?item.total_collection/100:0}}</text> |
|||
</view> |
|||
<view class="line"> |
|||
<text>佣金金额</text> |
|||
<text>¥{{item.totle_price?item.totle_price/100:0}}</text> |
|||
</view> |
|||
<view class="item-bottom">查看详情 ></view> |
|||
</navigator> |
|||
@ -0,0 +1,38 @@ |
|||
/* pages/user/retail/order/index.wxss */ |
|||
.item { |
|||
border-radius: 20rpx; |
|||
background: white; |
|||
margin: 20rpx 30rpx; |
|||
padding: 0 20rpx; |
|||
color: #333333; |
|||
font-size: 26rpx; |
|||
line-height: 54rpx; |
|||
} |
|||
.item-top { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
height: 60rpx; |
|||
border-bottom: 1rpx solid #D8D8D8; |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
margin-bottom: 10rpx; |
|||
} |
|||
.item-top view { |
|||
color: rgba(11, 137, 142, 1); |
|||
} |
|||
page { |
|||
background: #f2f2f2; |
|||
} |
|||
.item-bottom { |
|||
border-top: 1rpx solid #D8D8D8; |
|||
line-height: 69rpx; |
|||
text-align: center; |
|||
font-weight: 500; |
|||
margin-top: 10rpx; |
|||
} |
|||
.line { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
Loading…
Reference in new issue