Myth 5 years ago
parent
commit
f5801dfa95
  1. 3
      app.js
  2. 9
      app.json
  3. 166
      pages/activity/subway/index.js
  4. 2
      pages/activity/subway/index.wxml
  5. 171
      pages/culture/index.js
  6. 5
      pages/culture/index.json
  7. 42
      pages/culture/index.wxml
  8. 155
      pages/culture/index.wxss
  9. 121
      pages/culture/info/index.js
  10. 5
      pages/culture/info/index.json
  11. 26
      pages/culture/info/index.wxml
  12. 105
      pages/culture/info/index.wxss
  13. 66
      pages/culture/infoindex.js
  14. 3
      pages/culture/infoindex.json
  15. 2
      pages/culture/infoindex.wxml
  16. 1
      pages/culture/infoindex.wxss
  17. 23
      pages/index/index.js
  18. 9
      pages/info/activityInfo/index.js
  19. 10
      pages/info/activityInfo/index.wxml
  20. 9
      pages/info/cardInfo/index.js
  21. 9
      pages/info/foodProductInfo/index.js
  22. 10
      pages/info/hotelProductInfo/index.js
  23. 9
      pages/info/museumInfo/index.js
  24. 9
      pages/info/postProductInfo/index.js
  25. 9
      pages/info/roadInfo/index.js
  26. 1
      pages/info/sceneInfo/index.js
  27. 9
      pages/info/sceneProductInfo/index.js
  28. 9
      pages/info/showInfo/index.js
  29. 1
      pages/info/strategyInfo/index.js
  30. 7
      pages/order/card/index.js
  31. 6
      pages/order/components/contact/index.js
  32. 2
      pages/order/components/date/index.js
  33. 7
      pages/order/food/index.js
  34. 7
      pages/order/hotel/index.js
  35. 7
      pages/order/movie/index.js
  36. 7
      pages/order/postOrder/index.js
  37. 7
      pages/order/roadOrder/index.js
  38. 9
      pages/order/scene/index.js
  39. 7
      pages/order/showOrder/index.js
  40. 129
      pages/user/retail/apply/index.js
  41. 5
      pages/user/retail/apply/index.json
  42. 29
      pages/user/retail/apply/index.wxml
  43. 43
      pages/user/retail/apply/index.wxss
  44. 168
      pages/user/retail/goods/index.js
  45. 5
      pages/user/retail/goods/index.json
  46. 11
      pages/user/retail/goods/index.wxml
  47. 54
      pages/user/retail/goods/index.wxss
  48. 77
      pages/user/retail/index.js
  49. 5
      pages/user/retail/index.json
  50. 23
      pages/user/retail/index.wxml
  51. 34
      pages/user/retail/index.wxss
  52. 96
      pages/user/retail/list/index.js
  53. 5
      pages/user/retail/list/index.json
  54. 20
      pages/user/retail/list/index.wxml
  55. 59
      pages/user/retail/list/index.wxss
  56. 90
      pages/user/retail/order/index.js
  57. 5
      pages/user/retail/order/index.json
  58. 21
      pages/user/retail/order/index.wxml
  59. 38
      pages/user/retail/order/index.wxss
  60. 28
      pages/user/user.js
  61. 4
      pages/user/user.wxml
  62. 10
      project.private.config.json
  63. 4
      utils/https.js

3
app.js

@ -102,6 +102,7 @@ App({
}, },
kjId:null, kjId:null,
gp_id:null, gp_id:null,
team_id:null team_id:null,
retailId:""
} }
}) })

9
app.json

@ -35,6 +35,11 @@
"pages/info/showInfo/index", "pages/info/showInfo/index",
"pages/info/strategyInfo/index", "pages/info/strategyInfo/index",
"pages/user/user", "pages/user/user",
"pages/user/retail/index",
"pages/user/retail/apply/index",
"pages/user/retail/goods/index",
"pages/user/retail/list/index",
"pages/user/retail/order/index",
"pages/user/coupon/index", "pages/user/coupon/index",
"pages/user/verify/index", "pages/user/verify/index",
"pages/user/cartlist/list", "pages/user/cartlist/list",
@ -131,7 +136,9 @@
"pages/kj/mine/index", "pages/kj/mine/index",
"pages/group/index", "pages/group/index",
"pages/group/mine/index", "pages/group/mine/index",
"pages/group/info/index" "pages/group/info/index",
"pages/culture/index",
"pages/culture/infoindex"
], ],
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {

166
pages/activity/subway/index.js

@ -11,156 +11,7 @@ Page({
colors:["#2EAE4F","#00A5AF","#E99A10","#278AE7","#C652A7"], colors:["#2EAE4F","#00A5AF","#E99A10","#278AE7","#C652A7"],
tagIndex:0, tagIndex:0,
isFixed:false, isFixed:false,
tags:[ tags:[],
[{
id:74,
name:"全部"
},{
id:31,
name:"木渎站"
},{
id:32,
name:"西环路站"
},{
id:33,
name:"养育巷站"
},{
id:34,
name:"乐桥站"
},{
id:35,
name:"临顿路站"
},{
id:36,
name:"相门站"
},{
id:37,
name:"东方之门站"
},{
id:38,
name:"文化博览中心站"
},{
id:39,
name:"时代广场站"
}],[{
id:75,
name:"全部"
},{
id:40,
name:"山塘街站"
},{
id:41,
name:"石路站"
},{
id:42,
name:"桐泾公园站"
},{
id:43,
name:"独墅湖邻里中心站"
},{
id:44,
name:"月亮湾站"
},{
id:45,
name:"桑田岛站"
}],[{
id:76,
name:"全部"
},{
id:46,
name:"文昌路站"
},{
id:47,
name:"索山桥西站"
},{
id:48,
name:"石湖北站"
},{
id:48,
name:"石湖北站"
},{
id:49,
name:"新郭站"
},{
id:50,
name:"迎春路站"
},{
id:51,
name:"李公堤西站"
},{
id:52,
name:"东方之门站"
},{
id:53,
name:"唯亭站"
}],[{
id:77,
name:"全部"
},{
id:54,
name:"龙道浜站"
},{
id:55,
name:"孙武纪念园站"
},{
id:56,
name:"北寺塔站"
},{
id:57,
name:"乐桥站"
},{
id:58,
name:"三元坊站"
},{
id:59,
name:"南门站"
},{
id:60,
name:"苏州湾东站"
},{
id:61,
name:"松陵大道站"
},{
id:62,
name:"同里站"
},{
id:63,
name:"越溪站"
}],[{
id:78,
name:"全部"
},{
id:64,
name:"太湖香山站"
},{
id:65,
name:"胥口站"
},{
id:66,
name:"灵岩山站"
},{
id:67,
name:"索山桥西站"
},{
id:68,
name:"新市桥站"
},{
id:69,
name:"南门站"
},{
id:70,
name:"李公堤南站"
},{
id:71,
name:"斜塘站"
},{
id:72,
name:"苏州奥体中心站"
},{
id:73,
name:"阳澄湖南站"
}]
],
list:[], list:[],
total:1 total:1
}, },
@ -169,7 +20,17 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.getList() commonApi._post("pbservice/Other/getClientConfig",{
unique_key:"wechatxcx"
}).then(res=>{
let info = JSON.parse(res.data);
console.log(info)
this.setData({
tags:info.subway
})
this.getList()
})
}, },
changeLine:function(e){ changeLine:function(e){
this.setData({ this.setData({
@ -193,7 +54,8 @@ Page({
commonApi._post('scene/get_scene_by_tag',{ commonApi._post('scene/get_scene_by_tag',{
tag_id:this.data.tags[this.data.line][this.data.tagIndex].id, tag_id:this.data.tags[this.data.line][this.data.tagIndex].id,
limit:10, limit:10,
offset:this.data.list.length offset:this.data.list.length,
del_html:true
}).then(res=>{ }).then(res=>{
this.setData({ this.setData({
total:res.data.count, total:res.data.count,

2
pages/activity/subway/index.wxml

@ -17,7 +17,7 @@
<image src="{{item.headimg}}" class="headimg" mode="aspectFill"></image> <image src="{{item.headimg}}" class="headimg" mode="aspectFill"></image>
<view class="right-info"> <view class="right-info">
<view class="title textOver">{{item.title}}</view> <view class="title textOver">{{item.title}}</view>
<view style="color:{{colors[line]}} !important" class="subtitle textOver">{{item.display_tags}}</view> <view style="color:{{colors[line]}} !important" class="subtitle textOver">{{item.brief_intro}}</view>
<view class="right-bottom"><view style="background:{{colors[line]}}">查看详情</view></view> <view class="right-bottom"><view style="background:{{colors[line]}}">查看详情</view></view>
</view> </view>
</view> </view>

171
pages/culture/index.js

@ -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 () {
}
})

5
pages/culture/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

42
pages/culture/index.wxml

@ -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>

155
pages/culture/index.wxss

@ -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;
}

121
pages/culture/info/index.js

@ -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 () {
}
})

5
pages/culture/info/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

26
pages/culture/info/index.wxml

@ -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>

105
pages/culture/info/index.wxss

@ -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;
}

66
pages/culture/infoindex.js

@ -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 () {
}
})

3
pages/culture/infoindex.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

2
pages/culture/infoindex.wxml

@ -0,0 +1,2 @@
<!--pages/culture/infoindex.wxml-->
<text>pages/culture/infoindex.wxml</text>

1
pages/culture/infoindex.wxss

@ -0,0 +1 @@
/* pages/culture/infoindex.wxss */

23
pages/index/index.js

@ -22,7 +22,9 @@ Page({
date:"", date:"",
list:[], list:[],
listMore:true, listMore:true,
isTest:false isTest:false,
lat:"",
lon:""
}, },
onLoad: function (options) { onLoad: function (options) {
if(options.from){ if(options.from){
@ -30,7 +32,20 @@ Page({
} }
let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height; let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
this.getList() wx.getLocation({
type: 'gcj02',
success:(res)=>{
this.setData({
lat:res.latitude,
lon:res.longitude
})
this.getList()
},
fail:(err)=>{
this.getList()
}
})
this.setData({ this.setData({
height:height, height:height,
padHeight:systemInfo.statusBarHeight, padHeight:systemInfo.statusBarHeight,
@ -223,7 +238,9 @@ Page({
if(!this.data.listMore) return; if(!this.data.listMore) return;
commonApi._post("search/recommend",{ commonApi._post("search/recommend",{
offset:this.data.list.length, offset:this.data.list.length,
limit:10 limit:10,
lon:this.data.lon,
lat:this.data.lat
}).then(res=>{ }).then(res=>{
res.data.map(item=>{ res.data.map(item=>{
if(item.ext.display_tags){ if(item.ext.display_tags){

9
pages/info/activityInfo/index.js

@ -8,7 +8,8 @@ Page({
*/ */
data: { data: {
id:null, id:null,
info:null info:null,
retailId:""
}, },
/** /**
@ -19,6 +20,11 @@ Page({
this.setData({ this.setData({
id:id id:id
}) })
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
commonApi._post("pbservice/Actcalendar/getActDetail",{ commonApi._post("pbservice/Actcalendar/getActDetail",{
id:id id:id
}).then(res=>{ }).then(res=>{
@ -64,6 +70,7 @@ Page({
sku:res.data, sku:res.data,
product:res.data.product product:res.data.product
} }
app.globalData.retailId = this.data.retailId;
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/scene/index?type=museum', url: '/pages/order/scene/index?type=museum',
}) })

10
pages/info/activityInfo/index.wxml

@ -27,19 +27,13 @@
<view class="time" wx:for="{{10}}">活动场次名称 2020/06/13 9:00:00至2020/06/13 12:00:00</view> --> <view class="time" wx:for="{{10}}">活动场次名称 2020/06/13 9:00:00至2020/06/13 12:00:00</view> -->
<view class="box-title">活动时间</view> <view class="box-title">活动时间</view>
<view class="box-content"> <view class="box-content">
<!-- 2020/12/20 14:00-16:30 -->
{{info.begin_date}} ~ {{info.end_date}} {{info.begin_date}} ~ {{info.end_date}}
</view> </view>
<view class="box-title">活动详情</view> <view class="box-title">活动详情</view>
<!-- <view class="box-content">展览预约开放期间需遵守如下规定:
1、文化馆展厅预约开放时间为周一至周五9:30-11:30。周六、周日暂不开放。(上午10:30后停止入场)
2、疫情防控期间暂时关闭文化馆南门、西门及文化馆与图书馆连廊通道,仅开放文化馆北门为出入口。
</view> -->
<rich-text class="box-content" nodes="{{tool.formateRichText(info.intro)}}"></rich-text> <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>
<view style="height:124rpx" wx:if="{{info && info.is_bind_our_sku!=0 && info.sku_id}}"></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-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" bindtap="order" wx:if="{{info.is_act_end==0}}">预约活动</view>
<view class="bottom-btn disable" wx:else>活动已过期</view> <view class="bottom-btn disable" wx:else>活动已过期</view>
</view> </view> -->

9
pages/info/cardInfo/index.js

@ -13,7 +13,8 @@ Page({
fixed:false, fixed:false,
type:1, type:1,
info:null, info:null,
top:0 top:0,
retailId:""
}, },
/** /**
@ -29,6 +30,11 @@ Page({
util.back(); util.back();
return; return;
} }
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
let rect = wx.getMenuButtonBoundingClientRect(); let rect = wx.getMenuButtonBoundingClientRect();
let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
console.log(height) console.log(height)
@ -77,6 +83,7 @@ Page({
product:this.data.info, product:this.data.info,
sku:this.data.info.sku[0] sku:this.data.info.sku[0]
} }
app.globalData.retailId = this.data.retailId;
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/card/index' url: '/pages/order/card/index'
}) })

9
pages/info/foodProductInfo/index.js

@ -11,7 +11,8 @@ Page({
number:['一','二','三','四','五','六','七','八','九','十','十一','十二'], number:['一','二','三','四','五','六','七','八','九','十','十一','十二'],
skuIndex:0, skuIndex:0,
bookingInfo:null, bookingInfo:null,
skuName:"" skuName:"",
retailId:''
}, },
/** /**
@ -22,6 +23,11 @@ Page({
if(wx.getStorageSync("jstrip_token")){ if(wx.getStorageSync("jstrip_token")){
api = commonApi.user_post api = commonApi.user_post
} }
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
api("product/get_product_detail",{ api("product/get_product_detail",{
id:options.id id:options.id
}).then(res=>{ }).then(res=>{
@ -85,6 +91,7 @@ Page({
}, },
order:function(e){ order:function(e){
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
app.globalData.retailId = this.data.retailId;
app.globalData.product = e.currentTarget.dataset; app.globalData.product = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/food/index', url: '/pages/order/food/index',

10
pages/info/hotelProductInfo/index.js

@ -31,7 +31,8 @@ Page({
isTest:true, isTest:true,
activeSkuIndex:-1, activeSkuIndex:-1,
skuList:[], skuList:[],
roomInfo:null roomInfo:null,
retailId:""
}, },
/** /**
@ -41,6 +42,11 @@ Page({
this.setData({ this.setData({
id:options.id id:options.id
}) })
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
commonApi._post("pbservice/Other/getClientConfig",{ commonApi._post("pbservice/Other/getClientConfig",{
unique_key:"wechatxcx" unique_key:"wechatxcx"
}).then(res=>{ }).then(res=>{
@ -148,8 +154,8 @@ Page({
item.sku_model.bed_type = item.bed_type; item.sku_model.bed_type = item.bed_type;
item.sku_model.breakfast=item.breakfast; item.sku_model.breakfast=item.breakfast;
item.sku_model.max_room_num = item.max_room_num; item.sku_model.max_room_num = item.max_room_num;
console.log(item);
app.globalData.product = item; app.globalData.product = item;
app.globalData.retailId = this.data.retailId;
// return; // return;
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
wx.navigateTo({ wx.navigateTo({

9
pages/info/museumInfo/index.js

@ -21,7 +21,8 @@ Page({
isLogin:false, isLogin:false,
product:null, product:null,
time:null, time:null,
date:null date:null,
retailId:""
}, },
/** /**
@ -31,6 +32,11 @@ Page({
this.setData({ this.setData({
id:options.id id:options.id
}) })
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
commonApi._post("scene/detail_for_venue",{ commonApi._post("scene/detail_for_venue",{
id:options.id id:options.id
}).then(res=>{ }).then(res=>{
@ -130,6 +136,7 @@ Page({
if(!this.data.info.product_venue) return; if(!this.data.info.product_venue) return;
if(!this.data.info.product_venue.sku[0]) return; if(!this.data.info.product_venue.sku[0]) return;
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
app.globalData.retailId = this.data.retailId;
// 如果在当前的详情页面选择了日期时间的话 那么需要修改日期时间 // 如果在当前的详情页面选择了日期时间的话 那么需要修改日期时间
app.globalData.product = { app.globalData.product = {
product:this.data.info.product_venue, product:this.data.info.product_venue,

9
pages/info/postProductInfo/index.js

@ -18,7 +18,8 @@ Page({
info:null, info:null,
skuFlag:null, skuFlag:null,
producNum:1, producNum:1,
skuIndex:0 skuIndex:0,
retailId:""
}, },
/** /**
@ -32,6 +33,11 @@ Page({
top:height, top:height,
id:options.id id:options.id
}) })
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
commonApi._post("product/get_product_detail",{ commonApi._post("product/get_product_detail",{
id:options.id id:options.id
}).then(res=>{ }).then(res=>{
@ -193,6 +199,7 @@ Page({
productNum:this.data.producNum productNum:this.data.producNum
}]; }];
app.globalData.postProduct = product; app.globalData.postProduct = product;
app.globalData.retailId = this.data.retailId;
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/postOrder/index', url: '/pages/order/postOrder/index',
}) })

9
pages/info/roadInfo/index.js

@ -14,7 +14,8 @@ Page({
top:0, top:0,
info:null, info:null,
comment:[], comment:[],
commentTotal:0 commentTotal:0,
retailId:""
}, },
/** /**
@ -27,6 +28,11 @@ Page({
top:height, top:height,
id:options.id id:options.id
}) })
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
let api = commonApi._post; let api = commonApi._post;
if(wx.getStorageSync("jstrip_token")){ if(wx.getStorageSync("jstrip_token")){
api = commonApi.user_post; api = commonApi.user_post;
@ -141,6 +147,7 @@ Page({
app.globalData.product = { app.globalData.product = {
product:this.data.info product:this.data.info
} }
app.globalData.retailId = this.data.retailId;
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/road/index?id='+this.data.info.id url: '/pages/order/road/index?id='+this.data.info.id
}) })

1
pages/info/sceneInfo/index.js

@ -25,6 +25,7 @@ Page({
this.setData({ this.setData({
top:height top:height
}) })
commonApi._post("scene/detail",{ commonApi._post("scene/detail",{
id:options.id id:options.id
}).then(res=>{ }).then(res=>{

9
pages/info/sceneProductInfo/index.js

@ -15,7 +15,8 @@ Page({
isLike:0, isLike:0,
comment:[], comment:[],
commentTotal:0, commentTotal:0,
isTest:true isTest:true,
retailId:""
}, },
/** /**
@ -26,6 +27,11 @@ Page({
util.back() util.back()
return; return;
} }
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
commonApi._post("pbservice/Other/getClientConfig",{ commonApi._post("pbservice/Other/getClientConfig",{
unique_key:"wechatxcx" unique_key:"wechatxcx"
}).then(res=>{ }).then(res=>{
@ -157,6 +163,7 @@ Page({
}, },
order:function(e){ order:function(e){
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
app.globalData.retailId = this.data.retailId;
// let sku = e.currentTarget.dataset.sku,product = e.currentTarget.dataset.product; // let sku = e.currentTarget.dataset.sku,product = e.currentTarget.dataset.product;
app.globalData.product = e.currentTarget.dataset; app.globalData.product = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({

9
pages/info/showInfo/index.js

@ -7,13 +7,19 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
info:null info:null,
retailId:''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
if(options.retailId){
this.setData({
retailId:options.retailId
})
}
commonApi.user_post('product/get_product_detail',{ commonApi.user_post('product/get_product_detail',{
id:options.id id:options.id
}).then(res=>{ }).then(res=>{
@ -50,6 +56,7 @@ Page({
}) })
return; return;
} }
app.globalData.retailId = this.data.retailId;
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
app.globalData.product = this.data.info; app.globalData.product = this.data.info;
wx.navigateTo({ wx.navigateTo({

1
pages/info/strategyInfo/index.js

@ -14,6 +14,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
commonApi.user_post("travels/getDetail",{ commonApi.user_post("travels/getDetail",{
id:options.id id:options.id
}).then(res=>{ }).then(res=>{

7
pages/order/card/index.js

@ -180,6 +180,13 @@ Page({
fetch_type:this.data.type==0?'selffetch':'post' fetch_type:this.data.type==0?'selffetch':'post'
}] }]
} }
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
if(app.globalData.from){
data.system_name = app.globalData.from;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

6
pages/order/components/contact/index.js

@ -206,7 +206,7 @@ Component({
wx.hideLoading() wx.hideLoading()
}, },
selectIt:function(e){ selectIt:function(e){
let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:app.globalData.product.sku.sku_model.traveller_limit_num; let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:(app.globalData.product.sku.sku_model?app.globalData.product.sku.sku_model.traveller_limit_num:-1);
// 先计算出全部选中的出行人 // 先计算出全部选中的出行人
linkmanList.map(linkman=>{ linkmanList.map(linkman=>{
if(linkman.selected==1){ if(linkman.selected==1){
@ -229,14 +229,14 @@ Component({
}) })
return; return;
} }
else if(this.properties.maxNum!=-1 && item.selected!=1 && num>=traveller_limit_num){ else if(this.properties.maxNum!=-1 && item.selected!=1 && num>=traveller_limit_num && traveller_limit_num!=-1){
wx.showToast({ wx.showToast({
title: '最多只能选择'+this.properties.maxNum+"个出行人", title: '最多只能选择'+this.properties.maxNum+"个出行人",
icon:'none' icon:'none'
}) })
return; return;
} }
else if(item.selected!=1 && traveller_limit_num!=0 && num>=traveller_limit_num){ else if(item.selected!=1 && traveller_limit_num!=0 && num>=traveller_limit_num && traveller_limit_num!=-1){
wx.showToast({ wx.showToast({
title: '出行人限购'+traveller_limit_num+"份", title: '出行人限购'+traveller_limit_num+"份",
icon:'none' icon:'none'

2
pages/order/components/date/index.js

@ -154,7 +154,7 @@ Component({
if(this.data.activeDate.is_time_stock!=true) return; if(this.data.activeDate.is_time_stock!=true) return;
commonApi.user_post("product/product_timestock_price",{ commonApi.user_post("product/product_timestock_price",{
date:this.data.activeDate.date, date:this.data.activeDate.date,
sku_id:app.globalData.product.sku.id sku_id:this.data.activeDate.sku_id?this.data.activeDate.sku_id:app.globalData.product.sku.id
}).then(res=>{ }).then(res=>{
let timeIndex = -1; let timeIndex = -1;
if(app.globalData.product.infoTime){ if(app.globalData.product.infoTime){

7
pages/order/food/index.js

@ -110,6 +110,13 @@ Page({
source:"WECHATXCX", source:"WECHATXCX",
coupon_id:this.data.coupon?this.data.coupon.id:null coupon_id:this.data.coupon?this.data.coupon.id:null
}; };
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

7
pages/order/hotel/index.js

@ -315,6 +315,13 @@ Page({
product_num:numberIndex product_num:numberIndex
}] }]
} }
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

7
pages/order/movie/index.js

@ -89,6 +89,13 @@ Page({
source:"WECHATXCX", source:"WECHATXCX",
coupon_id:this.data.coupon?this.data.coupon.id:null coupon_id:this.data.coupon?this.data.coupon.id:null
} }
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

7
pages/order/postOrder/index.js

@ -133,6 +133,13 @@ Page({
gp_id:app.globalData.gp_id, gp_id:app.globalData.gp_id,
team_id:app.globalData.team_id team_id:app.globalData.team_id
}; };
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

7
pages/order/roadOrder/index.js

@ -246,6 +246,13 @@ Page({
source:"WECHATXCX", source:"WECHATXCX",
remark:this.data.remark remark:this.data.remark
} }
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

9
pages/order/scene/index.js

@ -164,7 +164,7 @@ Page({
product_list: [{ product_list: [{
type:product.product.type, type:product.product.type,
product_id:product.product.id, product_id:product.product.id,
sku_id:product.sku.id, sku_id:date.sku_id?date.sku_id:product.sku.id,
start_time:time.start_time, start_time:time.start_time,
end_time:time.end_time, end_time:time.end_time,
use_date:date.date, use_date:date.date,
@ -176,6 +176,13 @@ Page({
gp_id:app.globalData.gp_id, gp_id:app.globalData.gp_id,
team_id:app.globalData.team_id team_id:app.globalData.team_id
} }
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

7
pages/order/showOrder/index.js

@ -54,6 +54,13 @@ Page({
"seats_ids":product.seats "seats_ids":product.seats
}] }]
}; };
if(app.globalData.from){
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
commonApi.user_post("order/create",{ commonApi.user_post("order/create",{
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{

129
pages/user/retail/apply/index.js

@ -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 () {
}
})

5
pages/user/retail/apply/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

29
pages/user/retail/apply/index.wxml

@ -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>

43
pages/user/retail/apply/index.wxss

@ -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;
}

168
pages/user/retail/goods/index.js

@ -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',  //分享页面地址
}
}
}
})

5
pages/user/retail/goods/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

11
pages/user/retail/goods/index.wxml

@ -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>

54
pages/user/retail/goods/index.wxss

@ -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;
}

77
pages/user/retail/index.js

@ -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 () {
}
})

5
pages/user/retail/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

23
pages/user/retail/index.wxml

@ -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>

34
pages/user/retail/index.wxss

@ -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;
}

96
pages/user/retail/list/index.js

@ -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 () {
}
})

5
pages/user/retail/list/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

20
pages/user/retail/list/index.wxml

@ -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>

59
pages/user/retail/list/index.wxss

@ -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;
}

90
pages/user/retail/order/index.js

@ -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 () {
}
})

5
pages/user/retail/order/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

21
pages/user/retail/order/index.wxml

@ -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>

38
pages/user/retail/order/index.wxss

@ -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;
}

28
pages/user/user.js

@ -1,3 +1,4 @@
import common from "../../utils/https/common";
// pages/user/user.js // pages/user/user.js
import userApi from "../../utils/https/user" import userApi from "../../utils/https/user"
Page({ Page({
@ -20,7 +21,32 @@ Page({
}) })
}, },
retail:function(){
common.user_post('commission/getCommissionUser',{}).then(res=>{
if(res.code==0){
wx.navigateTo({
url: 'retail/apply/index',
})
}
else if(res.data.status==0){
wx.showToast({
title: '正在审核中,请联系管理员',
icon:'none'
})
}
else if(res.data.status==2){
wx.showToast({
title: '审核拒绝,请联系管理员',
icon:'none'
})
}
else if(res.data.status==1){
wx.navigateTo({
url: 'retail/index',
})
}
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

4
pages/user/user.wxml

@ -54,9 +54,9 @@
<navigator url="likes/index" class="user-box-line"> <navigator url="likes/index" class="user-box-line">
我的收藏 我的收藏
</navigator> </navigator>
<!-- <view class="user-box-line"> <view bindtap="retail" class="user-box-line">
我要分销 我要分销
</view> --> </view>
<navigator url="verify/index" class="user-box-line" wx:if="{{info && info.name_verification=='UNCERTFIED'}}"> <navigator url="verify/index" class="user-box-line" wx:if="{{info && info.name_verification=='UNCERTFIED'}}">
实名认证 实名认证
</navigator> </navigator>

10
project.private.config.json

@ -13,15 +13,15 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/kj/info/index", "name": "pages/user/user",
"pathName": "pages/kj/info/index", "pathName": "pages/user/user",
"query": "user_id=25&id=68&originate_id=109", "query": "user_id=25&id=68&originate_id=109",
"scene": null "scene": null
}, },
{ {
"name": "pages/kj/index", "name": "pages/info/sceneProductInfo/index",
"pathName": "pages/kj/index", "pathName": "pages/info/sceneProductInfo/index",
"query": "id=5", "query": "id=5442&retailId=17020017459",
"scene": null "scene": null
}, },
{ {

4
utils/https.js

@ -1,8 +1,8 @@
var app = getApp(); var app = getApp();
import util from "../utils/util" import util from "../utils/util"
import userApi from "../utils/https/user.js"; import userApi from "../utils/https/user.js";
// const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
const baseUrl = "https://api.cloud.sz-trip.com/api/"; // const baseUrl = "https://api.cloud.sz-trip.com/api/";
const orders = ['','weight','distance','sale_number','sale_price','price']; const orders = ['','weight','distance','sale_number','sale_price','price'];
//封装GET请求 //封装GET请求
function _get(url,data) { function _get(url,data) {

Loading…
Cancel
Save