Commit a8a533de by 严立

LL - 俱乐部创建,加入

parent 22a1b21a
......@@ -296,7 +296,7 @@ App({
// 如果用户身份有更新,则自动跳转到首页
if (funcStatus !== funcStatusRaw) {
console.log('status change')
wx.switchTab({ url: '/pages/home/home/home' })
// wx.switchTab({ url: '/pages/home/home/home' })
}
}
})
......
{
"pages": [
"pages/home/home/home",
"pages/home/dynamic/dynamic",
"pages/home/dynamic-detail/dynamic-detail",
"pages/home/night-appointment/night-appointment",
"pages/home/guide/guide",
"pages/home/history/history",
"pages/play/home/home",
"pages/play/service/service",
"pages/play/service-sell/service-sell",
......@@ -17,21 +17,19 @@
"pages/play/movie-detail/movie-detail",
"pages/play/point-detail/point-detail",
"pages/play/strategy-detail/strategy-detail",
"pages/commodity/home/home",
"pages/commodity/shopping-cart/shopping-cart",
"pages/commodity/project/project",
"pages/commodity/project-detail/project-detail",
"pages/commodity/menu-food/menu-food",
"pages/commodity/room-appointment/room-appointment",
"pages/campsite/home/home",
"pages/campsite/home-mirror/home-mirror",
"pages/mine/home/home",
"pages/mine/info/info",
"pages/mine/order/order",
"pages/mine/card/card",
"pages/mine/club/club",
"pages/mine/accumulate/accumulate",
"pages/mine/appointment/appointment",
"pages/mine/appointment-ticket/appointment-ticket",
......@@ -39,7 +37,6 @@
"pages/mine/authentication-input/authentication-input",
"pages/mine/question/question",
"pages/mine/question-more/question-more",
"pages/pay/home/home",
"pages/pay/order-input/order-input",
"pages/pay/order-state/order-state",
......@@ -48,14 +45,13 @@
"pages/pay/coupon/coupon",
"pages/pay/coupon-input/coupon-input",
"pages/pay/coupon-detail/coupon-detail",
"pages/club/home/home",
"pages/club/information/information",
"pages/club/member/member",
"pages/club/create/create",
"pages/club/enter/enter",
"pages/login/login"
"pages/login/login",
"pages/mall/home/home"
],
"usingComponents": {
"m-button-bottom": "./component/m-button-bottom/m-button-bottom",
......@@ -63,12 +59,12 @@
"m-dialog": "./component/m-dialog/m-dialog",
"m-input": "./component/m-input/m-input",
"m-nav": "./component/m-nav/m-nav",
"m-popup": "./component/m-popup/m-popup",
"m-textarea": "./component/m-textarea/m-textarea",
"m-tab": "./component/m-tab/m-tab",
"m-toast": "./component/m-toast/m-toast",
"parser": "./component/parser.min/parser",
"swiper-point": "./component/swiper-point/swiper-point",
"l-icon": "./miniprogram_npm/lin-ui/icon/index",
"l-collapse": "./miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "./miniprogram_npm/lin-ui/collapse-item/index",
......
......@@ -9,7 +9,7 @@ Component({
value: '申请加入',
},
isDisable: {
isEnable: {
type: Boolean,
value: true
},
......@@ -21,6 +21,7 @@ Component({
methods: {
onButton: function () {
console.log('[m-button-bottom] click')
this.triggerEvent('click')
},
}
......
<view class="m-button-bottom">
<view class="m-button-bottom-content">
<button class="row cc ac {{isDisable ? 'm-button-bottom-able' : 'm-button-bottom-disable'}}" bindtap="{{isDisable ? onButton : ''}}">{{text}}</button>
<button wx:if="{{isEnable}}" class="row cc ac m-button-bottom-enable" bindtap="onButton">{{text}}</button>
<button wx:if="{{!isEnable}}" class="row cc ac m-button-bottom-disable">{{text}}</button>
</view>
<view class="m-button-bottom-occupy"></view>
</view>
\ No newline at end of file
......@@ -23,7 +23,7 @@
color: #FFFFFF;
}
.m-button-bottom-able {
.m-button-bottom-enable {
background: #86C5E1;
}
......
let App = getApp()
Component({
options: {
multipleSlots: true,
styleIsolation: 'apply-shared'
},
properties: {
isShow: {
type: Boolean,
value: false,
},
align: {
type: String,
value: 'bottom',
}
},
data: {
cssPopup: '',
borderRadius: {
'top': 'border-top-left-radius: 0;',
'right': 'border-top-right-radius: 0;',
'bottom': 'border-bottom-right-radius: 0;',
'left': 'border-bottom-left-radius: 0;',
},
deviationX: 0, // 横轴偏移数值。
deviationY: 0, // 纵轴偏移数值。
direction: 1, // 偏移方向。
elementOpacity: 0, // 在显示之前将元素隐藏,移动到动画进入的位置。不可使用 wx:if 或者 hidden ,因为那样会获取不到元素宽高。
animationData: {},
},
observers: {
'isShow': function (funcValue) {
this.setElement()
},
},
methods: {
setElement: function () {
const query = this.createSelectorQuery()
query.select('.m-popup-content').boundingClientRect()
query.exec((response) => {
let funcElementInfo = response[0]
this.setData({
deviationX: funcElementInfo.width,
deviationY: funcElementInfo.height,
})
this.setBorder()
this.setAnimation()
})
},
setAnimation: function () {
let funcAnimation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease',
})
this.animation = funcAnimation
funcAnimation.translate(this.data.deviationX * this.data.direction, this.data.deviationY * this.data.direction).step()
this.setData({
animationData: funcAnimation.export(),
})
setTimeout(function () {
funcAnimation.translate(0, 0).step()
this.setData({
elementOpacity: 100,
animationData: funcAnimation.export()
})
}.bind(this), 1000)
},
setBorder: function () {
switch (this.data.align) {
case 'top':
this.setData({
cssPopup: this.data.borderRadius.top + this.data.borderRadius.right + 'top: 0; width: 100vw;',
direction: -1,
deviationX: 0,
})
break
case 'right':
this.setData({
cssPopup: this.data.borderRadius.right + this.data.borderRadius.bottom + 'right: 0; height: 100vh;',
deviationY: 0,
})
break
case 'bottom':
this.setData({
cssPopup: this.data.borderRadius.left + this.data.borderRadius.bottom + 'bottom: 0; width: 100vw;',
deviationX: 0,
})
break
case 'left':
this.setData({
cssPopup: this.data.borderRadius.top + this.data.borderRadius.left + 'left: 0; height: 100vh;',
direction: -1,
deviationY: 0,
})
break
}
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="m-popup fill-mask" wx:if="{{isShow}}">
<view class="m-popup-content" style="{{cssPopup + 'opacity: ' + elementOpacity + ';'}}" animation="{{animationData}}">
<slot name="content"></slot>
</view>
</view>
\ No newline at end of file
.m-popup-content {
position: absolute;
border-radius: 24px;
opacity: 0;
background: #FFFFFF;
overflow: hidden;
}
\ No newline at end of file
......@@ -8,6 +8,16 @@ Component({
},
properties: {
tabClass: {
type: String,
value: '',
},
itemClass: {
type: String,
value: '',
},
// 导航栏是否固定在视图顶部
isFixed: {
type: Boolean,
......@@ -34,11 +44,6 @@ Component({
type: Number,
value: 0,
},
itemClass: {
type: String,
value: '',
}
},
data: {
......
<view class="m-tab {{isFixed ? 'm-tab-fixed' : ''}}" style="{{'top: ' + fixedTop + 'px;'}}">
<scroll-view class="m-item-list row ae" scroll-x="true" scroll-left="{{scrollLeft}}" bindscroll="eventTabScroll">
<view class="m-tab {{tabClass}} {{isFixed ? 'm-tab-fixed' : ''}}" style="{{'top: ' + fixedTop + 'px;'}}">
<scroll-view class="m-item-list row ae {{tabClass}}" scroll-x="true" scroll-left="{{scrollLeft}}" bindscroll="eventTabScroll">
<block wx:for="{{item}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view
class="m-item row cc ac {{itemClass}}"
......
.m-tab {
z-index: 4;
width: 750rpx;
padding: 0 0 0 40rpx;
border-bottom: 1px #E2E7EF solid;
background: #FFFFFF;
}
......@@ -13,7 +12,7 @@
}
.m-item-list {
width: 710rpx;
width: 750rpx;
margin: 0;
padding: 0;
white-space: nowrap;
......
......@@ -73,7 +73,7 @@ Page({
}
}
if (!funcPass) true
if (!funcPass) return
console.log('验证通过')
App.request({
......@@ -86,7 +86,7 @@ Page({
'wxAccount': 'wxAccount'
}
}).then((response) => {
wx.setStorageSync('tempEstablish', true)
wx.setStorageSync('tempBackInfo', 'winEstablish')
wx.navigateBack()
}).catch((response) => {
console.log('resolve', response)
......
......@@ -10,8 +10,8 @@
inputId="clubName"
className="form-item-input row ac"
placeholder="请输入俱乐部名称"
bindblur="onInputBlur"
></m-input>
bindblur="onInputBlur">
</m-input>
<text>{{establishInfo.errorClubName}}</text>
</view>
<view class="form-item col">
......@@ -21,8 +21,8 @@
className="form-item-textarea"
placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等"
inputMax="{{200}}"
bindblur="onInputBlur"
></m-textarea>
bindblur="onInputBlur">
</m-textarea>
<text>{{establishInfo.errorClubDescribe}}</text>
</view>
<view class="form-item col">
......@@ -31,8 +31,8 @@
inputId="userName"
className="form-item-input row ac"
placeholder="请输入姓名"
bindblur="onInputBlur"
></m-input>
bindblur="onInputBlur">
</m-input>
<text>{{establishInfo.errorUserName}}</text>
</view>
<view class="form-item col">
......@@ -43,8 +43,8 @@
type="number"
maxlength="{{11}}"
placeholder="请输入手机号"
bindblur="onInputBlur"
></m-input>
bindblur="onInputBlur">
</m-input>
<text>{{establishInfo.errorUserPhone}}</text>
</view>
</view>
......
......@@ -85,7 +85,7 @@
font-size: 30rpx;
font-weight: 400;
line-height: 44rpx;
color: #C2C7CF;
color: #000000;
}
.form-item > text:nth-child(3) {
......
let App = getApp()
Page({
enterInfoBuffer: {
'name': '',
'phone': '',
'remark': '',
'errorName': '',
'errorPhone': '',
'errorRemark': '',
},
data: {
isButtonBottom: false,
clubInfo: {},
enterInfo: {},
isButtonEnable: false,
},
onLoad: function (options) {
this.setData({
clubInfo: {
'id': options.id,
}
})
this.queryClubInfo()
},
queryClubInfo: function () {
App.request({
url: 'v3/club/get',
params: {
'clubId': this.data.clubInfo.id,
}
}).then((response) => {
console.log(response)
let funcData = response.data
this.setData({
clubInfo: {
'id': funcData.clubId,
'logo': funcData.logo,
'name': funcData.name,
'describe': funcData.summary,
'member': funcData.memberNum,
'isOwner': Number(funcData.owner) === 0 ? false : true
}
})
}).catch((response) => {})
},
onInputBlur: function (funcEvent) {
let funcType = funcEvent.detail.id
let funcValue = funcEvent.detail.value
switch (funcType) {
case 'name':
this.enterInfoBuffer.name = funcValue
this.enterInfoBuffer.errorName = App.modular.rule.item('name', funcValue)
break
case 'phone':
this.enterInfoBuffer.phone = funcValue
this.enterInfoBuffer.errorPhone = App.modular.rule.item('phone', funcValue)
break
case 'remark':
this.enterInfoBuffer.remark = funcValue
this.enterInfoBuffer.errorRemark = App.modular.rule.item('required', funcValue)
if (this.enterInfoBuffer.errorRemark !== '') this.enterInfoBuffer.errorRemark = '备注' + this.enterInfoBuffer.errorRemark
break
}
this.setData({
enterInfo: this.enterInfoBuffer
})
if (this.enterInfoBuffer.name !== '' && this.enterInfoBuffer.phone !== '' && this.enterInfoBuffer.remark !== '') {
console.log('没有空值')
this.setData({
isButtonEnable: true
})
} else {
console.log('存在空值')
this.setData({
isButtonEnable: false
})
}
console.log(this.data.enterInfo)
},
inspectForm: function () {
console.log('inspectForm')
let funcPass = true
let funcEnterInfoKey = Object.keys(this.data.enterInfo)
for (let i = 0, l = funcEnterInfoKey.length; i < l; i++) {
// error 信息验证,如果存在非空字段,则表示有数据校验不通过。
if (funcEnterInfoKey[i].indexOf('error') >= 0 && this.data.enterInfo[funcEnterInfoKey[i]]) {
console.log('验证不通过')
funcPass = false
}
// 常规字段验证,确保没有非空字段。
if (funcEnterInfoKey[i].indexOf('error') < 0 && this.data.enterInfo[funcEnterInfoKey[i]] === '') {
this.onInputBlur({ detail: { id: funcEnterInfoKey[i], value: '' }})
console.log('验证不通过')
funcPass = false
}
}
return funcPass
},
onEnter: function () {
console.log('onEnter')
if (!this.inspectForm()) return
console.log('验证通过')
App.request({
url: 'v3/club/joinClub',
params: {
'name': this.data.enterInfo.name,
'nickname': wx.getStorageSync('userInfo').name,
'mobile': this.data.enterInfo.phone,
'jsonData': '{}',
'smClub': { id: this.data.clubInfo.id }
}
}).then((response) => {
wx.setStorageSync('tempBackInfo', 'winEnter')
wx.navigateBack()
}).catch((response) => {
App.ui.showToast({
'iconType': 'error',
'title': response.message
})
console.log('catch', response)
})
}
})
\ No newline at end of file
<m-toast></m-toast>
<m-nav titleText="申请加入俱乐部"></m-nav>
<view class="container">
<view class="club-info col cc ac">
<image class="club-info-logo" src=""></image>
<image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
<text class="title">{{clubInfo.name}}</text>
</view>
</view>
<view class="club-enter">
<view class="form-item col">
<text>姓名</text>
<m-input class="form-item-input row ac" placeholder="请输入姓名"></m-input>
<text>错误提示</text>
<m-input
inputId="name"
className="form-item-input row ac"
placeholder="请输入姓名"
bindblur="onInputBlur">
</m-input>
<text>{{enterInfo.errorName}}</text>
</view>
<view class="form-item col">
<text>手机号</text>
<m-input class="form-item-input row ac" placeholder="请输入手机号"></m-input>
<text>错误提示</text>
<m-input
inputId="phone"
className="form-item-input row ac"
type="number"
maxlength="{{11}}"
placeholder="请输入手机号"
bindblur="onInputBlur">
</m-input>
<text>{{enterInfo.errorPhone}}</text>
</view>
<view class="form-item col">
<text>备注</text>
<m-input class="form-item-input row ac" placeholder="请输入备注信息"></m-input>
<text>错误提示</text>
<m-input
inputId="remark"
className="form-item-input row ac"
placeholder="请输入备注信息"
bindblur="onInputBlur">
</m-input>
<text>{{enterInfo.errorRemark}}</text>
</view>
</view>
</view>
<m-button-bottom text="确认申请加入" isDisable="{{isButtonBottom}}"></m-button-bottom>
\ No newline at end of file
<m-button-bottom text="确认申请加入" isEnable="{{isButtonEnable}}" bindclick="onEnter"></m-button-bottom>
\ No newline at end of file
......@@ -4,60 +4,116 @@ Page({
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
bannerCreatTop: wx.getStorageSync('navTitleHeight') + 30,
bannerCreatTop: wx.getStorageSync('navStatusHeight') + wx.getStorageSync('navTitleHeight') + 30,
tabItem: [
{ 'text': '全部', 'value': '' },
{ 'text': '亲子教育', 'value': '' },
{ 'text': '健康', 'value': '' },
{ 'text': '理财经商', 'value': '' },
{ 'text': '家居美学', 'value': '' },
],
clubList: [],
clubPageIndex: 1,
clubPageSize: 5,
winPowerInfo: false, // 非业主创建俱乐部提示
winSubmitSuccess: false, // 创建提交成功提示
winEstablish: false, // 创建提交提示
winPowerInfoEstablish: false, // 创建权限提示
winEnter: false, // 加入提交提示
winPowerInfoEnter: false, // 加入权限提示
},
onLoad: function (options) {
this.queryClub()
this.setClubTab()
},
onShow: function () {
let funcWinSubmitSuccess = wx.getStorageSync('tempEstablish')
if (funcWinSubmitSuccess) {
let funcBackInfo = wx.getStorageSync('tempBackInfo')
switch (funcBackInfo) {
case 'winEstablish':
this.setData({
winEstablish: true
})
wx.removeStorageSync('tempBackInfo')
break
case 'winEnter':
this.setData({
winSubmitSuccess: true
winEnter: true
})
wx.removeStorageSync('tempEstablish')
wx.removeStorageSync('tempBackInfo')
break
}
},
queryClub: function () {
let funcResponse = [
{
'id': '',
'logo': '',
'name': '马术俱乐部',
'describe': '俱乐部拥有进口纯血马20匹,国产马6匹,马匹每天清理一次,运动完洗澡烤电放松背部肌肉,是热爱马术人士的聚集地。',
'member': 1900,
}, {
'id': '',
'logo': '',
'name': '音乐剧话剧俱乐部',
'describe': '为广大音乐剧话剧爱好者提供了一个学习和讨论的平台,让大家感受到音乐剧话剧之美,参与其中学习表演,体会到音乐剧话剧的魅力所在。',
'member': 1700,
/**
* 设置俱乐部分类 tab
* @function
* @param {object} - funcEvent
* @returns
*/
setClubTab: function () {
App.request({
url: 'v1/common/getSmTags',
params: {
'types': 4
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'text': funcData[i].name,
'value': Number(funcData[i].tagId)
}
funcList.push(funcItem)
}
this.setData({
tabItem: this.data.tabItem.concat(funcList)
})
this.queryClub(0)
console.log(response)
}).catch((response) => {
console.log(response)
})
},
]
/**
* 查询俱乐部列表
* @function
* @param {object} - funcEvent
* @returns
*/
queryClub: function (funcTabIndex) {
App.request({
url: 'v3/club/getClubList',
params: {
'pageNo': this.data.clubPageIndex,
'pageSize': this.data.clubPageSize,
'clubTypes': this.data.tabItem[funcTabIndex].value
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].clubId,
'logo': funcData[i].logo,
'name': funcData[i].name,
'describe': funcData[i].summary,
'member': funcData[i].memberNum,
'isOwner': Number(funcData[i].owner) === 0 ? false : true
}
funcList.push(funcItem)
}
this.setData({
clubList: funcResponse
clubList: funcList
})
}).catch((response) => {})
},
/**
* 页面滚动事件
* 创建俱乐部
* @function
* @param {object} - funcEvent
* @returns
......@@ -66,7 +122,7 @@ Page({
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.userType === 0) {
this.setData({
winPowerInfo: true
winPowerInfoEstablish: true
})
return
}
......@@ -75,27 +131,66 @@ Page({
},
/**
* 创建俱乐部提交成功关闭弹窗
* 查看俱乐部详情
* @function
* @param {object} - funcEvent
* @returns
*/
onClubDetail: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({ url: '/pages/club/information/information?id=' + funcItem.id })
},
/**
* 申请加入俱乐部
* @function
* @param {object} - funcEvent
* @returns
*/
onEnterClub: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
// 判断俱乐部是否业主专享,以及加入用户是否满足权限。
if (funcItem.isOwner) {
let funcUserType = wx.getStorageSync('userInfo').userType
if (funcUserType === 0) {
this.setData({
winPowerInfoEnter: true
})
return
}
}
wx.navigateTo({ url: '/pages/club/enter/enter?id=' + funcItem.id })
},
/**
* 关闭页面提示
* @function
* @param
* @returns
*/
onSubmitSuccess: function () {
onCloseTip: function () {
this.setData({
winSubmitSuccess: false,
winEstablish: false,
winPowerInfoEstablish: false,
winEnter: false,
winPowerInfoEnter: false,
})
},
/**
* 权限提醒
* 俱乐部分类 tab 点击事件
* @function
* @param
* @returns
*/
onPowerInfo: function () {
onTabChange: function (funcEvent) {
let funcItem = funcEvent.detail
this.setData({
winPowerInfo: false
clubList: [],
clubPageIndex: 1
})
this.queryClub(funcItem.index)
},
/**
......
<m-nav titleText="俱乐部" styleIndex="{{2}}" scrollHeight="{{navScroll}}" isOccupy="{{false}}"></m-nav>
<!-- 权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfo}}">
<!-- 创建权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfoEstablish}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>仅业主可创建俱乐部,如果您是业主,可前往【我的】页面进行业主认证。</text>
<button class="row cc ac" bindtap="onPowerInfo">我知道了</button>
<button class="row cc ac" bindtap="onCloseTip">我知道了</button>
</view>
</view>
<!-- 提交成功 -->
<view class="submit-success row cc ac" wx:if="{{winSubmitSuccess}}">>
<image src="{{resourcesBase + 'club/establish-tip.png'}}" bindtap="onSubmitSuccess"></image>
<!-- 俱乐部创建提交成功 -->
<view class="submit-success row cc ac" wx:if="{{winEstablish}}">>
<image src="{{resourcesBase + 'operation-tip/club-establish.png'}}" bindtap="onCloseTip"></image>
</view>
<!-- 加入权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfoEnter}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>该俱乐部为业主专享,仅面向业主。如果您是业主,可前往【我的】页面进行业主认证。</text>
<button class="row cc ac" bindtap="onCloseTip">我知道了</button>
</view>
</view>
<!-- 俱乐部加入提交成功 -->
<view class="submit-success row cc ac" wx:if="{{winEnter}}">>
<image src="{{resourcesBase + 'operation-tip/club-enter.png'}}" bindtap="onCloseTip"></image>
</view>
<view class="container">
......@@ -23,26 +37,26 @@
<!-- tab -->
<view class="tab">
<m-tab item="{{tabItem}}"></m-tab>
<m-tab item="{{tabItem}}" tabClass="tab_list" bindtabChange="onTabChange"></m-tab>
</view>
<view class="club-list">
<block wx:for="{{clubList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="club-item row">
<view class="club-item row" data-item="{{item}}" bindtap="onClubDetail">
<view class="club-logo">
<image src="{{item.logo}}"></image>
</view>
<view class="club-info column">
<view class="club-info-name row ac">
<text>{{item.name}}</text>
<text class="owner-mark">业主专享</text>
<text class="owner-mark" wx:if="{{item.isOwner}}">业主专享</text>
</view>
<view class="club-info-describe row">
<text>{{item.describe}}</text>
</view>
<view class="club-info-other row cb ac">
<text>{{item.member + '成员'}}</text>
<button>申请加入</button>
<button data-item="{{item}}" catchtap="onEnterClub">申请加入</button>
</view>
</view>
</view>
......
......@@ -92,12 +92,14 @@
background: #999999;
}
.tab {
margin-top: 64rpx;
.tab_list {
margin: 64rpx 0 0 0;
padding: 0 0 0 40rpx;
}
.club-list {
padding-top: 80rpx;
min-height: 600rpx;
padding: 80rpx 40rpx 0 40rpx;
}
.club-item {
......@@ -112,12 +114,17 @@
}
.club-info-name > text:nth-child(1) {
max-width: 360rpx;
height: 44rpx;
margin-right: 16rpx;
font-size: 34rpx;
font-weight: 800;
line-height: 44rpx;
color: #15191F;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.club-info-describe {
......
......@@ -4,34 +4,131 @@ Page({
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
detailActivity: [],
clubInfo: {},
clubActivity: [],
winEnter: false, // 加入提交提示
winPowerInfoEnter: false, // 加入权限提示
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.queryActi()
},
queryActi: function () {
let funcList = [{
'cover': '',
'id': '',
'title': '活动名称',
'officeId': '',
'price': 123,
'priceText': App.modular.utils.formatAmount(123),
'priceSpecial': 123, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(123),
'tagIds': '',
'tagNames': 'tag',
'date': '2020-10-19 2020-10-20',
'priceType': 1,
}]
this.setData({
clubInfo: {
'id': options.id,
}
})
this.queryClubInfo()
this.queryActivity()
},
/**
* 查询俱乐部信息
* @function
* @param
* @returns
*/
queryClubInfo: function () {
App.request({
url: 'v3/club/get',
params: {
'clubId': this.data.clubInfo.id,
}
}).then((response) => {
console.log(response)
let funcData = response.data
this.setData({
detailActivity: funcList
clubInfo: {
'id': funcData.clubId,
'logo': funcData.logo,
'name': funcData.name,
'describe': funcData.summary,
'member': funcData.memberNum,
'content': funcData.content,
'isOwner': Number(funcData.owner) === 0 ? false : true
}
})
}).catch((response) => {})
},
/**
* 查询俱乐部活动
* @function
* @param
* @returns
*/
queryActivity: function () {
App.request({
url: 'v1/activity/getList',
params: {
'listType': 1,
'pageSize': 5,
'pageNo': 1,
'clubId': this.data.clubInfo.id,
'type': 2
},
}).then((response) => {
console.log(response)
}).catch((response) => {})
},
/**
* 申请加入俱乐部
* @function
* @param {object} - funcEvent
* @returns
*/
onEnterClub: function () {
let funcItem = this.data.clubInfo
console.log(funcItem)
// 判断俱乐部是否业主专享,以及加入用户是否满足权限。
if (funcItem.isOwner) {
let funcUserType = wx.getStorageSync('userInfo').userType
if (funcUserType === 0) {
this.setData({
winPowerInfoEnter: true
})
return
}
}
wx.navigateTo({ url: '/pages/club/enter/enter?id=' + funcItem.id })
},
/**
* 关闭页面提示
* @function
* @param
* @returns
*/
onCloseTip: function () {
this.setData({
winEstablish: false,
winPowerInfoEstablish: false,
winEnter: false,
winPowerInfoEnter: false,
})
},
/**
* 查看俱乐部成员
* @function
* @param
* @returns
*/
onMemberList: function () {
wx.navigateTo({ url: '/pages/club/member/member?id=' + this.data.clubInfo.id })
},
/**
* 页面滚动事件
* @function
* @param {object} - funcEvent
* @returns
*/
onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this)
},
})
\ No newline at end of file
<m-nav titleText="俱乐部详情" scrollHeight="{{navScroll}}" styleIndex="{{2}}" isOccupy="{{false}}"></m-nav>
<!-- 加入权限提醒 -->
<view class="member-power row cc ac" wx:if="{{winPowerInfoEnter}}">
<view class="member-power-info col cc ac">
<text>权限提醒</text>
<text>该俱乐部为业主专享,仅面向业主。如果您是业主,可前往【我的】页面进行业主认证。</text>
<button class="row cc ac" bindtap="onCloseTip">我知道了</button>
</view>
</view>
<!-- 俱乐部加入提交成功 -->
<view class="submit-success row cc ac" wx:if="{{winEnter}}">>
<image src="{{resourcesBase + 'operation-tip/club-enter.png'}}" bindtap="onCloseTip"></image>
</view>
<view class="container">
<view class="banner">
<image src=""></image>
</view>
<view class="club-info row cc ac">
<image class="club-info-logo" src=""></image>
<image class="club-info-logo" src="{{clubInfo.logo}}"></image>
<view class="club-info-name column cc ac">
<text class="title">马术俱乐部</text>
<text class="owner-mark">业主专享</text>
<view class="club-info-member row cc ac">
<text>1877 成员</text>
<text class="title">{{clubInfo.name}}</text>
<text class="owner-mark" wx:if="{{clubInfo.isOwner}}">业主专享</text>
<view class="club-info-member row cc ac" bindtap="onMemberList">
<text>{{clubInfo.member + ' 成员'}}</text>
<image class="arrow-more" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
......@@ -17,7 +33,7 @@
<view class="club-describe column">
<text class="title">俱乐部简介</text>
<text>俱乐部拥有进口纯血马20匹,国产马6匹,马匹每天清理一次,运动完洗澡烤电放松背部肌肉。有中外会员数百人,是热爱马术人士的聚集地。</text>
<text>{{clubInfo.describe}}</text>
</view>
<!-- 近期活动 -->
......@@ -27,8 +43,9 @@
<text>查看全部</text>
</view>
<block wx:if="{{clubActivity.length > 0}}">
<view class="card-list row">
<block wx:for="{{3}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<block wx:for="{{clubActivity}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="card-item column ac">
<image class="card-item-cover"></image>
<view class="card-item-info">
......@@ -53,7 +70,14 @@
</block>
<view class="card-item column ac" wx:if="{{true}}"></view>
</view>
</block>
</view>
<block wx:if="{{clubActivity.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>近期暂无活动安排</text>
</view>
</block>
<!-- 详情 -->
<view class="club-detail">
......@@ -61,7 +85,8 @@
<text class="club-detail-title title">俱乐部详情</text>
</view>
<view class="club-detail-content">
<image mode="widthFix" src="{{resourcesBase + 'club/information/club-detail.png'}}"></image>
<rich-text nodes="{{clubInfo.content}}"></rich-text>
<!-- <image mode="widthFix" src="{{resourcesBase + 'club/information/club-detail.png'}}"></image> -->
</view>
</view>
......@@ -74,4 +99,4 @@
</view>
</view>
<m-button-bottom></m-button-bottom>
\ No newline at end of file
<m-button-bottom text="申请加入" bindclick="onEnterClub"></m-button-bottom>
\ No newline at end of file
......@@ -174,6 +174,26 @@
color: #C2C7CF;
}
/* 没有活动样式 */
.item-nothing {
width: 670rpx;
height: 478rpx;
}
.item-nothing text {
margin-top: 42rpx;
font-size: 30rpx;
color: #959da9;
line-height: 42rpx;
font-weight: 600;
}
.nothing-activity {
display: block;
width: 96rpx;
height: 76rpx;
}
/* 俱乐部详情 */
.club-detail {
margin-top: 80rpx;
......@@ -183,9 +203,13 @@
padding: 0 40rpx;
}
.club-detail-content {
margin: 80rpx 0 0 0;
padding: 0 60rpx;
}
.club-detail-content > image {
margin-top: 80rpx;
width: 750rpx;
max-width: 630rpx;
}
/* 加入规则 */
......@@ -201,3 +225,56 @@
width: 750rpx;
margin-top: 48rpx;
}
/* 权限提醒 */
.member-power {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
}
.member-power-info {
width: 606rpx;
height: 538rpx;
padding: 56rpx 40rpx 48rpx 40rpx;
border-radius: 4px;
background: #FFFFFF;
}
.member-power-info > text:nth-child(1) {
height: 72rpx;
font-size: 50rpx;
font-weight: 800;
line-height: 72rpx;
color: #15191F;
}
.member-power-info > text:nth-child(2) {
width: 526rpx;
height: 138rpx;
margin-top: 48rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 46rpx;
color: #656E7B;
}
.member-power-info > button {
width: 526rpx;
height: 80rpx;
margin-top: 96rpx;
border-radius: 4px;
border: 1px solid #15191F;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #15191F;
}
\ No newline at end of file
let App = getApp()
Page({
data: {
clubInfo: {},
memberList: [],
winPowerInfo: false,
winAdminInfo: false,
},
onLoad: function (options) {
this.queryClubMember(options.id)
},
queryClubMember: function (funcClubId) {
App.request({
url: 'v3/club/getClubAdmin',
params: {
'clubId': funcClubId
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
}
funcList.push(funcItem)
}
}).catch((response) => {
})
},
onPowerInfo: function () {
......
// pages/mall/home/home.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/mall/home/home.wxml-->
<text>pages/mall/home/home.wxml</text>
/* pages/mall/home/home.wxss */
\ No newline at end of file
let App = getApp()
Page({
data: {
tabItem: [
{ text: '我加入的', value: 0 },
{ text: '我管理的', value: 1 },
],
tabIndex: 0,
clubList: [],
clubPageIndex: 1,
clubPageSize: 5,
},
onLoad: function (options) {
this.queryClubEnter()
},
/**
* 查询我加入的
* @function
* @param
* @returns
*/
queryClubEnter: function () {
App.request({
url: 'v3/club/getMyJoinClubs',
params: {
'pageNo': this.data.clubPageIndex,
'pageSize': this.data.clubPageSize,
}
}).then((response) => {
console.log(response)
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].clubId,
'logo': funcData[i].logo,
'name': funcData[i].name,
'member': funcData[i].memberNum,
'memberId': funcData[i].memberId,
'state': Number(funcData[i].state),
'date': funcData[i].date,
'isOwner': Number(funcData[i].owner) === 0 ? false : true
}
funcList.push(funcItem)
}
this.setData({
clubList: funcList
})
}).catch((response) => {})
},
/**
* 查询我管理的
* @function
* @param
* @returns
*/
queryClubEstablish: function () {
App.request({
url: 'v3/club/getMyCreateClub',
params: {
'pageNo': this.data.clubPageIndex,
'pageSize': this.data.clubPageSize,
}
}).then((response) => {
console.log(response)
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].clubId,
'logo': funcData[i].logo,
'name': funcData[i].name,
'member': funcData[i].memberNum,
'memberId': funcData[i].memberId,
'state': Number(funcData[i].state),
'date': funcData[i].date,
'isOwner': Number(funcData[i].owner) === 0 ? false : true
}
funcList.push(funcItem)
}
this.setData({
clubList: funcList
})
}).catch((response) => {})
},
/**
* 取消,删除我加入的
* @function
* @param
* @returns
*/
cancelEnter: function (funcEvent, funcType) {
let funcItem = funcEvent.currentTarget.dataset.item
console.log(funcEvent)
App.request({
url: 'v3/club/deleteMyJoin',
params: {
'memberId': funcItem.memberId,
}
}).then((response) => {
App.ui.showToast({
'iconType': 'success',
'title': funcType
})
this.queryClubEnter()
}).catch((response) => {})
},
/**
* 取消,删除我管理的
* @function
* @param
* @returns
*/
cancelEstablish: function (funcEvent, funcType) {
let funcItem = funcEvent.currentTarget.dataset.item
App.request({
url: 'v3/club/deleteMyCreateClub',
params: {
'clubId': funcItem.id,
}
}).then((response) => {
App.ui.showToast({
'iconType': 'success',
'title': funcType
})
this.queryClubEstablish()
}).catch((response) => {})
},
/**
* 取消申请
* @function
* @param {object} - funcEvent
* @returns
*/
onCancel: function (funcEvent) {
switch (this.data.tabIndex) {
case 0:
App.ui.showDialog({
type: 'confirm',
title: '是否确认取消申请加入俱乐部?',
content: '取消后无法恢复',
cancel: '取消',
confirm: '确定',
success: () => {
App.ui.showToast({
iconType: 'loading',
title: '正在处理',
duration: 30000
})
this.cancelEnter(funcEvent, '取消成功')
},
fail: () => {},
})
break
case 1:
App.ui.showDialog({
type: 'confirm',
title: '是否确认取消申请创建俱乐部?',
content: '取消后无法恢复',
cancel: '取消',
confirm: '确定',
success: () => {
App.ui.showToast({
iconType: 'loading',
title: '正在处理',
duration: 30000
})
this.cancelEstablish(funcEvent, '取消成功')
},
fail: () => {},
})
break
}
},
/**
* 删除申请
* @function
* @param {object} - funcEvent
* @returns
*/
onDelete: function (funcEvent) {
switch (this.data.tabIndex) {
case 0:
App.ui.showDialog({
type: 'confirm',
title: '是否确认删除申请加入俱乐部?',
content: '删除后无法恢复',
cancel: '取消',
confirm: '确定',
success: () => {
App.ui.showToast({
iconType: 'loading',
title: '正在处理',
duration: 30000
})
this.cancelEnter(funcEvent, '删除成功')
},
fail: () => {},
})
break
case 1:
App.ui.showDialog({
type: 'confirm',
title: '是否确认删除申请创建俱乐部?',
content: '删除后无法恢复',
cancel: '取消',
confirm: '确定',
success: () => {
App.ui.showToast({
iconType: 'loading',
title: '正在处理',
duration: 30000
})
this.cancelEstablish(funcEvent, '删除成功')
},
fail: () => {},
})
break
}
},
onClubMore: function () {
wx.redirectTo({ url: '/pages/club/home/home' })
},
onClubEstablish: function () {
wx.redirectTo({ url: '/pages/club/home/home' })
},
eventTabChange: function (funcEvent) {
let funcTabIndex = funcEvent.detail.index
this.setData({
tabIndex: funcTabIndex
})
switch (funcTabIndex) {
case 0:
this.queryClubEnter()
break
case 1:
this.queryClubEstablish()
break
}
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<m-toast></m-toast>
<m-dialog></m-dialog>
<m-nav titleText="我的俱乐部" styleIndex="{{1}}"></m-nav>
<m-tab item="{{tabItem}}" tabClass="tab" itemClass="tab-item" bindtabChange="eventTabChange"></m-tab>
<view class="container">
<view class="club-list bg-gradient {{clubList.length ? 'column' : 'row cc ac'}}">
<block wx:for="{{clubList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 待审核 -->
<view class="club-item row ac" wx:if="{{item.state === 0}}">
<image class="club-logo" src="{{item.logo}}"></image>
<view class="club-info column">
<view class="club-info-name row ac">
<text>{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.isOwner}}">业主专享</text>
</view>
<view class="club-info-other row cb ae">
<view class="club-info-examine column">
<text>{{item.date + ' 提交申请'}}</text>
<text>{{'审核待通过'}}</text>
</view>
<view class="club-operation row cb ae">
<button class="row cc ac" data-item="{{item}}" bindtap="onCancel">取消申请</button>
</view>
</view>
</view>
</view>
<!-- 已通过 -->
<view class="club-item row ac" wx:if="{{item.state === 1}}">
<image class="club-logo" src="{{item.logo}}"></image>
<view class="club-info column">
<view class="club-info-name row ac">
<text>{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.isOwner}}">业主专享</text>
</view>
<view class="club-info-other row cb ae">
<view class="club_info_member column">
<text>{{item.member + ' 成员'}}</text>
<text wx:if="{{tabIndex === 0}}">{{item.date + ' 加入'}}</text>
<text wx:if="{{tabIndex === 1}}">{{item.date + ' 创建'}}</text>
</view>
<view class="club-operation row cb ae">
</view>
</view>
</view>
</view>
<!-- 未通过 -->
<view class="club-item row ac" wx:if="{{item.state === 2}}">
<image class="club-logo" src="{{item.logo}}"></image>
<view class="club-info column">
<view class="club-info-name row ac">
<text>{{item.name}}</text>
<text class="owner-mark" wx:if="{{item.isOwner}}">业主专享</text>
</view>
<view class="club-info-other row cb ae">
<view class="club-info-examine column">
<text>{{item.date + ' 提交申请'}}</text>
<text>{{'审核未通过'}}</text>
</view>
<view class="club-operation row cb ae">
<button class="row cc ac" data-item="{{item}}" bindtap="onDelete">删除</button>
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{clubList.length === 0}}">
<view class="club_list_nothing_tip">
<block wx:if="{{tabIndex === 0}}">
<text>暂无已加入俱乐部</text>
<button class="row cc ac" bindtap="onClubMore">发现更多</button>
</block>
<block wx:if="{{tabIndex === 1}}">
<text>暂无管理的俱乐部</text>
<button class="row cc ac" bindtap="onClubEstablish">创建俱乐部</button>
</block>
</view>
</block>
</view>
</view>
\ No newline at end of file
.tab {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 60rpx;
}
.tab-item {
margin: 0 136rpx;
font-size: 26rpx;
font-weight: 800;
color: #15191F;
}
/* 俱乐部列表 */
.club-list {
width: 750rpx;
min-height: 85vh;
padding: 0 40rpx;
}
.club-item {
width: 670rpx;
height: 220rpx;
margin: 48rpx 0 0 0;
padding: 32rpx 40rpx;
border-radius: 4px;
background: #FFFFFF;
}
.club-logo {
display: block;
width: 140rpx;
height: 140rpx;
margin: 0 32rpx 0 0;
background: #999999;
}
.club-info {
flex-grow: 1;
}
.club-info-name > text:nth-child(1) {
max-width: 300rpx;
height: 44rpx;
margin: 0 16rpx 0 0;
font-size: 34rpx;
font-weight: 800;
line-height: 44rpx;
color: #15191F;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.club-info-examine > text:nth-child(1) {
height: 36rpx;
margin: 18rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.club-info-examine > text:nth-child(2) {
height: 36rpx;
margin: 8rpx 0 0 0;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
color: #E66060;
}
.club_info_member > text {
height: 36rpx;
margin: 18rpx 0 0 0;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.club-operation > button {
width: 120rpx;
height: 56rpx;
border-radius: 4px;
border: 1px solid #C2C7CF;
font-size: 22rpx;
font-weight: 500;
line-height: 32rpx;
color: #656E7B;
}
/* 空列表样式 */
.club_list_nothing_tip {
height: 216rpx;
}
.club_list_nothing_tip > text {
height: 52rpx;
font-size: 38rpx;
font-weight: 800;
line-height: 52rpx;
color: #959DA9;
}
.club_list_nothing_tip > button {
width: 308rpx;
height: 96rpx;
margin: 68rpx 0 0 0;
border-radius: 4px;
background: #86C5E1;
font-size: 30rpx;
font-weight: 500;
line-height: 42px;
color: #FFFFFF;
}
\ No newline at end of file
......@@ -706,7 +706,7 @@ Page({
},
onToClub: function () {
wx.navigateTo({ url: '/pages/club/home/home' })
wx.navigateTo({ url: '/pages/mine/club/club' })
},
/**
......
......@@ -33,7 +33,8 @@ Page({
onShow: function () {
this.setData({ appStatus: App.globalData.appStatus })
this.queryActivity()
// this.queryMovie()
this.queryMovie()
this.queryClub()
this.setData({
pageNo: 1,
......@@ -129,6 +130,43 @@ Page({
},
/**
* 查询俱乐部列表
* @function
* @param {object} - funcEvent
* @returns
*/
queryClub: function (funcTabIndex) {
App.request({
url: 'v3/club/getClubList',
params: {
'pageNo': 1,
'pageSize': 10,
'clubTypes': ''
}
}).then((response) => {
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'id': funcData[i].clubId,
'logo': funcData[i].logo,
'name': funcData[i].name,
'describe': funcData[i].summary,
'member': funcData[i].memberNum,
'isOwner': Number(funcData[i].owner) === 0 ? false : true
}
funcList.push(funcItem)
}
this.setData({
clubList: funcList
})
}).catch((response) => {
console.log(response)
})
},
/**
* 设置标题高度
* @function
* @param
......@@ -285,4 +323,17 @@ Page({
url: '/pages/play/strategy-detail/strategy-detail?id=' + funcItem.id
})
},
// s3 - 代码整理
/**
* 查看俱乐部详情
* @function
* @param {object} - funcEvent
* @returns
*/
onClubDetail: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item
wx.navigateTo({ url: '/pages/club/information/information?id=' + funcItem.id })
},
})
\ No newline at end of file
......@@ -94,18 +94,18 @@
<image src="./image/title-club.png"></image>
<text bindtap="onAllRecent" bindtap="onToClubList">查看全部</text>
</view>
<view class="club-list">
<block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="club-item row cc" data-item="{{item}}" bindtap="onActivityDetail">
<view class="club-list" wx:if="{{clubList.length > 0}}">
<block wx:for="{{clubList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="club-item row cc" data-item="{{item}}" bindtap="onClubDetail">
<view class="club-item-info column ac">
<image src="{{item.cover}}"></image>
<text class="club-item-info-name">音乐剧话剧俱乐部</text>
<text class="club-item-info-owner owner-mark">业主专享</text>
<image src="{{item.logo}}"></image>
<text class="club-item-info-name">{{item.name}}</text>
<text class="club-item-info-owner owner-mark" wx:if="{{item.isOwner}}">业主专享</text>
</view>
</view>
</block>
</view>
<block wx:if="{{activityList.length === 0}}">
<block wx:if="{{clubList.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>暂无俱乐部信息</text>
......
......@@ -40,3 +40,29 @@
* 逻辑事件函数,所有不是用户触发的事件,比如 swiper 组件 bindchange 事件
* })
*/
// 轻提示
App.ui.showToast({
iconType: 'error',
title: '',
duration: 30000
})
// 请求示例
App.request({
url: '',
params: {}
}).then((response) => {
}).catch((response) => {
})
// 常用循环
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
}
funcList.push(funcItem)
}
\ No newline at end of file
const output = {
// 测试环境
// 二期测试环境
baseUrl: 'https://sm-web2.meiqicloud.com/api/',
// 三期测试环境
// baseUrl: 'https://sm-web.meiqicloud.com/api/',
// 正式环境
// baseUrl: 'https://smbhyh-web.meiqicloud.com/api/',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment