Myth 4 years ago
parent
commit
c91b213e77
  1. 2
      app.js
  2. 1
      app.json
  3. 171
      pages/group/apply/index.js
  4. 5
      pages/group/apply/index.json
  5. 53
      pages/group/apply/index.wxml
  6. 105
      pages/group/apply/index.wxss
  7. 4
      pages/index/index.wxml
  8. 21
      pages/info/museumInfo/index.js
  9. 4
      project.private.config.json
  10. 6
      utils/https.js

2
app.js

@ -22,7 +22,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest8?true:false;
data.isTest = data.isTest9?true:false;
this.globalData.configJson = data
})

1
app.json

@ -161,6 +161,7 @@
"pages/kj/info/index",
"pages/kj/mine/index",
"pages/group/index",
"pages/group/apply/index",
"pages/group/mine/index",
"pages/group/info/index",
"pages/culture/index",

171
pages/group/apply/index.js

@ -0,0 +1,171 @@
// pages/group/apply/index.js
import commonApi from "../../../utils/https"
import util from "../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
info:{
company:"",
tel:"",
name:""
},
step:0,
venue:null,
applyInfo:null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
commonApi._post("scene/detail_for_venue",{
id:this.data.id
}).then(res=>{
this.setData({
venue:res.data
})
// 判断状态
this.getStatus()
})
},
getStatus:function(){
commonApi.user_post("team_order/apply_post",{
supplier_id:this.data.venue.product_venue.supplier_id,
product_code:this.data.venue.product_venue.product_code,
},'get').then(res=>{
// state 0:审核中 1:审核通过 2:审核拒绝 3:撤销申请
if(res && res.data){
this.setData({
applyInfo:res.data
})
if(res.data.state==0){
this.setData({
step:1
})
}
else if(res.data.state==2){
this.setData({
step:2
})
}
else if(res.data.state==1){
wx.redirectTo({
url: '/pages/info/museumInfo/index?isGroup=1&id='+this.data.id,
})
}
}
})
},
changeInfo:function(e){
let info = this.data.info
info[e.currentTarget.dataset.key] = e.detail.value
this.setData({
info:info
})
},
submit:function(e){
// this.setData({
// step:1
// })
let info = this.data.info
commonApi.user_post("team_order/apply_post",{
supplier_id:this.data.venue.product_venue.supplier_id,
product_code:this.data.venue.product_venue.product_code,
organization_name:info.company,
apply_user:info.name,
mobile:info.tel
}).then(res=>{
if(res && res.code==1){
this.getStatus()
}
})
},
// 再次申请
reGet(){
this.setData({
step:0,
info:{
company:"",
tel:"",
name:""
}
})
},
// 撤销申请
cancel:function(){
commonApi.user_post('team_order/undo_apply',{
supplier_id:this.data.venue.product_venue.supplier_id,
product_code:this.data.venue.product_venue.product_code,
}).then(res=>{
if(res.code==1){
wx.showToast({
title: '撤销成功',
icon:"success",
mask:true
})
setTimeout(()=>{
util.back()
},1000)
// this.getStatus()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// 判断状态
if(this.data.id && this.data.venue){
this.getStatus()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/group/apply/index.json

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

53
pages/group/apply/index.wxml

@ -0,0 +1,53 @@
<!--pages/group/apply/index.wxml-->
<title title="资质申请"></title>
<view class="com-flex steps">
<view class="step-item com-flex {{step==0?'active':''}}">
<view class="num com-flex">1</view>
<view>填写资料</view>
</view>
<view class="dot">·······</view>
<view class="step-item com-flex {{step==1?'active':''}}">
<view class="num com-flex">2</view>
<view>审核</view>
</view>
<view class="dot">·······</view>
<view class="step-item com-flex {{step==2?'active':''}}">
<view class="num com-flex">3</view>
<view>结果通知</view>
</view>
</view>
<view wx:if="{{step==0}}">
<view class="inputs">
<view class="com-flex input">
<text>姓名:</text>
<input type="text" placeholder="请输入申请人姓名" bindinput="changeInfo" data-key="name" />
</view>
<view class="com-flex input">
<text>手机号码:</text>
<input type="number" placeholder="请输入申请人手机号" bindinput="changeInfo" data-key="tel" />
</view>
<view class="com-flex input">
<text>机构名称:</text>
<input type="text" placeholder="请输入机构名称" bindinput="changeInfo" data-key="company" />
</view>
</view>
<view class="btn" bindtap="submit">提交</view>
</view>
<view wx:elif="{{step==1}}">
<view class="inputs" style="height:400rpx">
<view class="com-flex top-tip"><image src="http://erdos-yijiyou.oss-cn-huhehaote.aliyuncs.com/uploads/20220211/30e03ed2db0b8267299bf24cba752bb0.png" mode="widthFix"></image>信息提交成功</view>
<view class="info">姓名: {{applyInfo.apply_user}}</view>
<view class="info">手机号码:{{applyInfo.mobile}}</view>
<view class="info">机构名称:{{applyInfo.organization_name}}</view>
<view class="tip">您所提交的申请正在进行审核,请耐心等待</view>
</view>
<view class="btn" bindtap="cancel">撤销申请</view>
</view>
<view wx:elif="{{step==2}}">
<view class="inputs" style="height:400rpx">
<view class="com-flex top-tip" style="background:#D62828"><image src="https://static.ticket.sz-trip.com/uploads/20220214/70e2dfdbca9cfe8efb6f3b8b7beb8ff2.png" mode="widthFix"></image>申请被拒绝</view>
<view class="info">拒绝原因:</view>
<view class="info" style="line-height:50rpx;margin:20rpx">{{applyInfo.refund_msg}}</view>
</view>
<view class="btn" bindtap="reGet">再次申请</view>
</view>

105
pages/group/apply/index.wxss

@ -0,0 +1,105 @@
/* pages/group/apply/index.wxss */
.steps {
margin: 20rpx 30rpx;
height: 120rpx;
font-size: 30rpx;
color: #333333;
background: white;
border-radius: 20rpx;
padding: 0 30rpx;
justify-content: space-between;
}
.inputs {
margin: 20rpx 30rpx;
font-size: 30rpx;
color: #333333;
background: white;
border-radius: 20rpx;
padding: 0 20rpx;
position: relative;
}
.input {
height: 120rpx;
justify-content: space-between;
border-bottom: 1px solid #d8d8d8;
}
.input:last-child {
border-bottom: none;
}
.input text {
width: 180rpx;
flex-shrink: 0;
}
.input input {
flex: 1;
display: block;
text-align: right;
width: 400rpx;
}
page {
background: #f2f2f2;
}
.steps .num{
width: 34rpx;
height: 34rpx;
box-sizing: border-box;
justify-content: center;
border: 2rpx solid #333333;
border-radius: 50%;
margin-right: 10rpx;
font-size: 28rpx;
}
.steps .dot {
color: #999999;
letter-spacing: -6rpx;
}
.steps .active {
color: #0B898E;
font-weight: bold;
}
.steps .active .num {
color: #fff;
border-color: #0B898E;
background: #0B898E;
font-weight: normal;
}
.btn {
width: 690rpx;
line-height: 70rpx;
background: #0B898E;
border-radius: 35rpx;
position: fixed;
left: 30rpx;
bottom: 30rpx;
text-align: center;
color: #fff;
font-size: 30rpx;
font-weight: 500;
}
.inputs .info {
font-size: 34rpx;
font-weight: bold;
text-align: center;
color: #333333;
line-height: 70rpx;
}
.tip {
color: #999999;
font-size: 28rpx;
text-align: center;
margin-top: 40rpx;
}
.top-tip {
width: 300rpx;
height: 60rpx;
background: #0B898E;
border-radius: 0px 0px 30rpx 30rpx;
margin: 0 auto;
color: #fff;
margin-bottom: 30rpx;
justify-content: center;
}
.top-tip image {
width: 30rpx;
margin-right: 10rpx;
}

4
pages/index/index.wxml

@ -229,10 +229,10 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb4.png" mode="widthFix"></image>
<view>在线鉴赏</view>
</view>
<view bindtap="gotoPath" data-title="文化配送" data-path="/pages/culture/index" class="pbservice-item">
<!-- <view bindtap="gotoPath" data-title="文化配送" data-path="/pages/culture/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb7.png" mode="widthFix"></image>
<view>文化配送</view>
</view>
</view> -->
<view bindtap="gotoPath" data-title="书香借阅" data-path="/pages/pbService/library/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image>
<view>书香借阅</view>

21
pages/info/museumInfo/index.js

@ -399,6 +399,27 @@ Page({
})
},
order: function () {
if(this.data.isGroup){
// 如果是团队预约的话 是需要判断是否需要审核的
commonApi.user_post("team_order/is_apply",{
id:this.data.id
}).then(res=>{
// 0 无需资质申请 1 需要资质申请跳转资质申请页面
if(res && res.data==1){
wx.navigateTo({
url: '/pages/group/apply/index?id='+this.data.id,
})
return;
}
this.realOrder()
})
}
else {
this.realOrder()
}
},
realOrder:function(){
if (!this.data.info.product_venue) return;
if (!this.data.info.product_venue.sku[0]) return;
app.globalData.couponInfo = null;

4
project.private.config.json

@ -13,8 +13,8 @@
"miniprogram": {
"list": [
{
"name": "pages/supplier/good/index",
"pathName": "pages/supplier/good/index",
"name": "pages/group/apply/index",
"pathName": "pages/group/apply/index",
"query": "id=2825",
"scene": null
},

6
utils/https.js

@ -136,6 +136,7 @@ function user_post(url,data={},type){
}
}
function user_post_new(url,data={},type){
console.log(type)
var token = wx.getStorageSync("jstrip_token"),userId = wx.getStorageSync("jstrip_userid");
//为了用户体验,加一个loading效果
wx.showLoading({ title: '加载中', mask: true });
@ -173,7 +174,7 @@ function user_post_new(url,data={},type){
header: header,
success: (res) => {
wx.hideLoading();
console.log(url)
console.log(url,url.indexOf('team_order/apply_post')!=-1)
if(url.indexOf('user/getJumpThirdAppCode')!=-1){
}
@ -191,7 +192,8 @@ function user_post_new(url,data={},type){
return;
}
else if (res.data.code != 1 && res.data.msg) {
if(url.indexOf('actonline/video_act/getRaffle')!=-1){
// 不出现提示语
if(url.indexOf('actonline/video_act/getRaffle')!=-1 || url.indexOf('team_order/apply_post')!=-1 && type=='get'){
}
else if(url.indexOf('actonline/act_online/vote')!=-1 && res.data.code==0){

Loading…
Cancel
Save