diff --git a/app.js b/app.js
index 183a052..76fae02 100644
--- a/app.js
+++ b/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
})
diff --git a/app.json b/app.json
index e22e3d3..738527c 100644
--- a/app.json
+++ b/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",
diff --git a/pages/group/apply/index.js b/pages/group/apply/index.js
new file mode 100644
index 0000000..9fd36ee
--- /dev/null
+++ b/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 () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/group/apply/index.json b/pages/group/apply/index.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/group/apply/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/group/apply/index.wxml b/pages/group/apply/index.wxml
new file mode 100644
index 0000000..3d9aae5
--- /dev/null
+++ b/pages/group/apply/index.wxml
@@ -0,0 +1,53 @@
+
+
+
+
+ 1
+ 填写资料
+
+ ·······
+
+ 2
+ 审核
+
+ ·······
+
+ 3
+ 结果通知
+
+
+
+
+
+ 姓名:
+
+
+
+ 手机号码:
+
+
+
+ 机构名称:
+
+
+
+ 提交
+
+
+
+ 信息提交成功
+ 姓名: {{applyInfo.apply_user}}
+ 手机号码:{{applyInfo.mobile}}
+ 机构名称:{{applyInfo.organization_name}}
+ 您所提交的申请正在进行审核,请耐心等待
+
+ 撤销申请
+
+
+
+ 申请被拒绝
+ 拒绝原因:
+ {{applyInfo.refund_msg}}
+
+ 再次申请
+
\ No newline at end of file
diff --git a/pages/group/apply/index.wxss b/pages/group/apply/index.wxss
new file mode 100644
index 0000000..912b741
--- /dev/null
+++ b/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;
+}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 97b0406..d13eca8 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -229,10 +229,10 @@
在线鉴赏
-
+
书香借阅
diff --git a/pages/info/museumInfo/index.js b/pages/info/museumInfo/index.js
index 058e55f..a3b31d1 100644
--- a/pages/info/museumInfo/index.js
+++ b/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;
diff --git a/project.private.config.json b/project.private.config.json
index c6eda40..213adb2 100644
--- a/project.private.config.json
+++ b/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
},
diff --git a/utils/https.js b/utils/https.js
index 99b335b..ffc5a32 100644
--- a/utils/https.js
+++ b/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){