Commit 16a76289 by 严立

流程测试

parent 881999b9
...@@ -193,63 +193,6 @@ App({ ...@@ -193,63 +193,6 @@ App({
}, },
/** /**
* 请求封装
* @function
* @param {object} - 请求参数
* @returns
*/
wxRequest: function (obj) {
var token = wx.getStorageSync('token')
var param = obj.data ? JSON.stringify(obj.data) : ''
var header = obj.header ? obj.header : { 'token': token || '' }
wx.request({
url: this.globalData.baseUrl + obj.url,
data: param,
method: obj.method || 'POST',
header: header,
success: (res) => {
let code = res.data.code * 1
if (200 == code && true == res.data.success) {
if (obj.success) {
obj.success(res.data)
}
} else if (402 == code) {
// this.refreshToken(obj)
} else if (500 === code) {
if (obj.success) {
obj.success(res)
}
} else {
if (obj.fail) {
let err = {
statusCode: code,
msg: res.data.msg || '网络异常'
};
obj.fail(err)
}
}
},
fail: (err) => {
if (obj.fail) {
let err = {
statusCode: 9999,
msg: '网络异常'
};
obj.fail(err)
} else {
wx.showToast({
title: '网络异常',
icon: 'none',
duration: 2000
})
}
}
});
},
/**
* 查询用户认证状态 * 查询用户认证状态
* 仅在用户已经注册的前提下会查询此函数 * 仅在用户已经注册的前提下会查询此函数
* @function * @function
......
...@@ -64,15 +64,15 @@ ...@@ -64,15 +64,15 @@
/* 操作按钮 */ /* 操作按钮 */
.dialog-operation { .dialog-operation {
border: 1px #E2E7EF solid;
border-style: solid none none none; border-style: solid none none none;
border-width: 1px;
} }
.dialog-operation-line { .dialog-operation-line {
width: 1px; width: 1px;
height: 32rpx; height: 32rpx;
border: 1px #E2E7EF solid;
border-style: none solid none solid; border-style: none solid none solid;
border-width: 1px;
} }
.dialog-operation-cancel { .dialog-operation-cancel {
......
...@@ -24,6 +24,9 @@ function showToast (funcOption) { ...@@ -24,6 +24,9 @@ function showToast (funcOption) {
funcOption = Object.assign(App.ui.toast.data, funcOption) funcOption = Object.assign(App.ui.toast.data, funcOption)
funcOption.winToast = true funcOption.winToast = true
console.log('App.ui.toast', App.ui.toast)
console.log('funcOption', funcOption)
App.ui.toast.setData(funcOption) App.ui.toast.setData(funcOption)
// 设置 toast 关闭时间 // 设置 toast 关闭时间
......
<view class="m-input"> <view class="m-input">
<view class="row ac" hidden="{{!winText}}" bindtap="setInputShow"> <view class="row ac" hidden="{{!winText}}" bindtap="setInputShow">
<view class="m-input-boundary row ac {{className}}"> <view class="m-input-boundary row ac {{className}}">
<text class="m-input-text-content" hidden="{{value === '' ? true : false}}">{{value}}</text> <text class="m-input-text-content fs30" hidden="{{value === '' ? true : false}}">{{value}}</text>
<text class="m-input-text-placeholder" hidden="{{value === '' ? false : true}}">{{placeholder}}</text> <text class="m-input-text-placeholder fs30" hidden="{{value === '' ? false : true}}">{{placeholder}}</text>
</view> </view>
</view> </view>
<view class="row ac" hidden="{{!winInput}}"> <view class="row ac" hidden="{{!winInput}}">
<view class="m-input-boundary row ac {{className}}"> <view class="m-input-boundary row ac {{className}}">
<input <input
class="m-input-input-content row ac" class="m-input-input-content row ac fs30"
value="{{value}}" value="{{value}}"
type="{{type}}" type="{{type}}"
maxlength="{{maxlength}}" maxlength="{{maxlength}}"
......
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
.m-input-boundary { .m-input-boundary {
position: relative; position: relative;
width: 100%;
height: 80rpx;
margin: 16rpx 0 0 0;
padding: 0 24rpx;
border-radius: 4px;
overflow-x: scroll; overflow-x: scroll;
border: 1px #DBDFE5 solid;
} }
/* 显示文本样式 */ /* 显示文本样式 */
......
...@@ -149,13 +149,14 @@ Page({ ...@@ -149,13 +149,14 @@ Page({
} else { } else {
funcBanner[funcIndex] = '' funcBanner[funcIndex] = ''
} }
this.setData({ This.setData({
banner: funcBanner banner: funcBanner
}) })
}) })
} }
// 0 首页,1 所有服务,2 儿童营地,3 海错图,4 元养水韵,5 儿童营地接待,6 拾光花坊, 7 商品 // 0 首页,1 所有服务,2 儿童营地,3 海错图,4 元养水韵,5 儿童营地接待,6 拾光花坊, 7 商品
let This = this
let funcShopList = [2, 3, 4, 5, 6] let funcShopList = [2, 3, 4, 5, 6]
for (let i = 0, l = funcShopList.length; i < l; i++) { for (let i = 0, l = funcShopList.length; i < l; i++) {
shopCover(funcShopList[i], i) shopCover(funcShopList[i], i)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<text>{{notice.title}}</text> <text>{{notice.title}}</text>
</view> </view>
<view class="date row cs"> <view class="date row cs">
<text>{{notice.date}}</text> <text class="fs26 c31">{{notice.date}}</text>
</view> </view>
<view class="describe"> <view class="describe">
<rich-text nodes="{{notice.describe}}"></rich-text> <rich-text nodes="{{notice.describe}}"></rich-text>
......
.title { .title {
width: 670rpx; width: 670rpx;
margin-top: 60rpx; margin: 50rpx 0 0 0;
font-size: 46rpx; font-size: 46rpx;
font-weight: bolder; font-weight: bolder;
color: #15191F; color: #15191F;
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
.date { .date {
width: 670rpx; width: 670rpx;
margin: 32rpx 0 64rpx 0; margin: 38rpx 0 64rpx 0;
font-size: 32rpx;
color: #959DA9;
} }
.cover, .cover,
...@@ -22,7 +20,7 @@ ...@@ -22,7 +20,7 @@
.describe { .describe {
width: 670rpx; width: 670rpx;
margin-top: 50rpx; margin: 2rpx 0 0 0;
margin-bottom: 50rpx; margin-bottom: 50rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 300; font-weight: 300;
......
<m-nav titleText="最新动态"></m-nav> <m-nav titleText="最新动态" styleIndex="{{1}}"></m-nav>
<view class="container"> <view class="container">
<view class="title row cb ae"> <view class="title row cb ae">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<text>{{item.date}}</text> <text>{{item.date}}</text>
</view> </view>
<view class="notice-describe"> <view class="notice-describe">
<rich-text nodes="{{item.describe}}"></rich-text> <text class="fs26 c31">{{item.describe}}</text>
</view> </view>
<view class="notice-cover" wx:if="{{item.cover !== ''}}"> <view class="notice-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="widthFix"></image> <image src="{{item.cover}}" mode="widthFix"></image>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
.notice-describe { .notice-describe {
width: 670rpx; width: 670rpx;
margin-top: 24rpx; margin: 16rpx 0 0 0;
} }
.notice-describe text { .notice-describe text {
......
const App = getApp() let App = getApp()
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
navScroll: 0,
appointmentDate: '', appointmentDate: '',
appointmentEndDate: '', appointmentEndDate: '',
appointmentComplete: false, appointmentComplete: false,
...@@ -229,7 +218,6 @@ Page({ ...@@ -229,7 +218,6 @@ Page({
App.ui.showToast({ App.ui.showToast({
iconType: 'loading', iconType: 'loading',
title: '提交中', title: '提交中',
duration: 60000,
}) })
App.request({ App.request({
url: 'v1/subscribe/doSubscribe', url: 'v1/subscribe/doSubscribe',
...@@ -245,9 +233,8 @@ Page({ ...@@ -245,9 +233,8 @@ Page({
if (response.data && response.data.code == 500) { if (response.data && response.data.code == 500) {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.data.msg, title: response.data.message,
}) })
} else { } else {
this.setData({ this.setData({
appointmentComplete: true, appointmentComplete: true,
...@@ -256,9 +243,10 @@ Page({ ...@@ -256,9 +243,10 @@ Page({
} }
}) })
.catch((response) => { .catch((response) => {
console.log('response', response)
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.msg, title: response.message,
}) })
}) })
}, },
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
/* 表单 */ /* 表单 */
.form-title { .form-title {
width: 750rpx; width: 750rpx;
margin-top: 40rpx; margin: 40rpx 0 10rpx 0;
padding: 0 40rpx; padding: 0 40rpx;
font-size: 30rpx; font-size: 30rpx;
color: #959DA9; color: #959DA9;
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
width: 76rpx; width: 76rpx;
height: 40rpx; height: 40rpx;
border-right: 1px #DBDFE5 solid; border-right: 1px #DBDFE5 solid;
border-radius: 0;
background: #FFFFFF; background: #FFFFFF;
} }
...@@ -99,6 +100,7 @@ ...@@ -99,6 +100,7 @@
width: 76rpx; width: 76rpx;
height: 40rpx; height: 40rpx;
border-left: 1px #DBDFE5 solid; border-left: 1px #DBDFE5 solid;
border-radius: 0;
background: #FFFFFF; background: #FFFFFF;
} }
...@@ -159,7 +161,7 @@ ...@@ -159,7 +161,7 @@
/* 操作按钮 */ /* 操作按钮 */
.appointment-operation { .appointment-operation {
width: 750rpx; width: 750rpx;
margin-top: 30rpx; margin: 18rpx 0 0 0;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
background: #ffffff; background: #ffffff;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="container"> <view class="container">
<view class="header"> <view class="header">
<image class="banner" src="http://upload.miaomiao-bao.com/968f6202008192116574683.jpg"></image> <image class="banner" src="{{resourcesBase + 'bgi/bgi-71.png'}}"></image>
<view style="display:flex;justify-content: center;padding-top:144rpx;"> <view style="display:flex;justify-content: center;padding-top:144rpx;">
<image class="yztq" src="./image/yztq.png"></image> <image class="yztq" src="./image/yztq.png"></image>
</view> </view>
......
...@@ -83,80 +83,80 @@ Page({ ...@@ -83,80 +83,80 @@ Page({
*/ */
queryOrder: function () { queryOrder: function () {
// 数据全部加载完成不再执行 // 数据全部加载完成不再执行
App.wxRequest({ App.request({
url: 'v1/order/getOrderList', url: 'v1/order/getOrderList',
data: { params: {
'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : '', 'goodType': this.data.orderTypeActive ? this.data.orderType[this.data.orderTypeActive].value : '',
'status': this.data.tabItem[this.data.statusActive].value, 'status': this.data.tabItem[this.data.statusActive].value,
'pageSize': 10, 'pageSize': 10,
'pageNo': this.data.orderPages, 'pageNo': this.data.orderPages,
}, }
success: (response) => { })
let funcResponse = response.data .then((response) => {
let funcList = [] let funcResponse = response.data
for (let i = 0, l = funcResponse.length; i < l; i++) { let funcList = []
let funcItem = { for (let i = 0, l = funcResponse.length; i < l; i++) {
'id': funcResponse[i].orderId, let funcItem = {
'shopId': '', 'id': funcResponse[i].orderId,
'shopAppId': '', 'shopId': '',
'shopName': funcResponse[i].officeName, 'shopAppId': '',
'shopLogo': '', 'shopName': funcResponse[i].officeName,
'total': 0, 'shopLogo': '',
'status': Number(funcResponse[i].status), 'total': 0,
'amount': funcResponse[i].totalMoney, 'status': Number(funcResponse[i].status),
'commodity': [], 'amount': funcResponse[i].totalMoney,
'commodityBackup': [], 'commodity': [],
'commoditySlice3': [], 'commodityBackup': [],
'commodityType': Number(funcResponse[i].goodType), 'commoditySlice3': [],
'wxRequest': funcResponse[i].wxRequest, 'commodityType': Number(funcResponse[i].goodType),
'total': funcResponse[i].smOrderDetails.length 'wxRequest': funcResponse[i].wxRequest,
'total': funcResponse[i].smOrderDetails.length
} }
// 添加订单商品列表 // 添加订单商品列表
let funcTotal = 0 let funcTotal = 0
let funcCommodity = funcResponse[i].smOrderDetails let funcCommodity = funcResponse[i].smOrderDetails
let commodityBackup = [] let commodityBackup = []
for (let ii = 0, ll = funcCommodity.length; ii < ll; ii++) { for (let ii = 0, ll = funcCommodity.length; ii < ll; ii++) {
let funcCommodityItem = { let funcCommodityItem = {
'cover': funcCommodity[ii].imgUrl ? funcCommodity[ii].imgUrl : this.data.resourcesBase + 'commodity/menu/commodity-item.png', 'cover': funcCommodity[ii].imgUrl ? funcCommodity[ii].imgUrl : this.data.resourcesBase + 'commodity/menu/commodity-item.png',
'name': funcCommodity[ii].name, 'name': funcCommodity[ii].name,
'quantity': funcCommodity[ii].number, 'quantity': funcCommodity[ii].number,
'price': funcCommodity[ii].unitPrice, 'price': funcCommodity[ii].unitPrice,
}
funcTotal = funcTotal + funcCommodityItem.quantity
funcItem.commodity.push(funcCommodityItem)
funcItem.commodityBackup.push(funcCommodityItem)
}
// 处理大于三条数据的问题
if (funcItem.commodity.length > 3) {
funcItem.commoditySlice3 = funcItem.commodityBackup.slice(0, 3)
} }
funcTotal = funcTotal + funcCommodityItem.quantity
funcItem.commodity.push(funcCommodityItem)
funcItem.commodityBackup.push(funcCommodityItem)
}
// 处理大于三条数据的问题
if (funcItem.commodity.length > 3) {
funcItem.commoditySlice3 = funcItem.commodityBackup.slice(0, 3)
}
funcItem.total = funcTotal funcItem.total = funcTotal
// 映射门店信息 // 映射门店信息
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) { for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcItem.shopName.toLowerCase() === App.globalData.shopId[i].name.toLowerCase()) { if (funcItem.shopName.toLowerCase() === App.globalData.shopId[i].name.toLowerCase()) {
funcItem.shopId = App.globalData.shopId[i].id funcItem.shopId = App.globalData.shopId[i].id
funcItem.shopAppId = App.globalData.shopId[i].appId funcItem.shopAppId = App.globalData.shopId[i].appId
funcItem.shopLogo = App.globalData.shopId[i].logo funcItem.shopLogo = App.globalData.shopId[i].logo
break break
} else if (funcItem.shopName.toLowerCase().indexOf(App.globalData.shopId[i].name.toLowerCase()) != -1) { } else if (funcItem.shopName.toLowerCase().indexOf(App.globalData.shopId[i].name.toLowerCase()) != -1) {
// 5D星空影院 // 5D星空影院
funcItem.shopId = App.globalData.shopId[i].id funcItem.shopId = App.globalData.shopId[i].id
funcItem.shopAppId = App.globalData.shopId[i].appId funcItem.shopAppId = App.globalData.shopId[i].appId
funcItem.shopLogo = App.globalData.shopId[i].logo funcItem.shopLogo = App.globalData.shopId[i].logo
break break
}
} }
funcList.push(funcItem)
} }
funcList.push(funcItem)
this.setData({
orderList: this.data.orderPages === 1 ? funcList : this.data.orderList.concat(funcList)
})
} }
this.setData({
orderList: this.data.orderPages === 1 ? funcList : this.data.orderList.concat(funcList)
})
}) })
}, },
...@@ -167,65 +167,65 @@ Page({ ...@@ -167,65 +167,65 @@ Page({
* @returns * @returns
*/ */
setOrderType: function () { setOrderType: function () {
App.wxRequest({ App.request({
url: 'v1/common/getDictByType', url: 'v1/common/getDictByType',
data: { params: {
'type': 'order_good_type', 'type': 'order_good_type',
}, },
success: (response) => { })
let funcResponse = response.data .then((response) => {
let funcList = [{ let funcResponse = response.data
'value': '', let funcList = [{
'name': '全部分类' 'value': '',
}] 'name': '全部分类'
for (let i = 0, l = funcResponse.length; i < l; i++) { }]
let funcItem ={ for (let i = 0, l = funcResponse.length; i < l; i++) {
'value': funcResponse[i].value, let funcItem ={
} 'value': funcResponse[i].value,
if(funcResponse[i].value==3 ){
//门票
funcItem.name = "门票"
funcList.push(funcItem)
} else if( funcResponse[i].value==5 ){
// 餐饮
funcItem.name = "餐饮"
funcList.push(funcItem)
}else if( funcResponse[i].value==-2 ){
// 影票
funcItem.name = "影票"
funcList.push(funcItem)
}else if( funcResponse[i].value==2 ){
// SPA
funcItem.name = "SPA"
funcList.push(funcItem)
}else if( funcResponse[i].value==4 ){
// 文创
funcItem.name = "文创"
funcList.push(funcItem)
}
} }
let typeTitle = '全部分类' // if(funcResponse[i].value==3 ){
let orderTypeActive = 0 // //门票
let aVal = '' funcItem.name = "门票"
funcList.forEach((item, index) => { funcList.push(funcItem)
if (item.value == this.data.optionsGoodType) { } else if( funcResponse[i].value==5 ){
typeTitle = item.name // 餐饮
orderTypeActive = index funcItem.name = "餐饮"
} funcList.push(funcItem)
}) }else if( funcResponse[i].value==-2 ){
// 影票
funcItem.name = "影票"
funcList.push(funcItem)
}else if( funcResponse[i].value==2 ){
// SPA
funcItem.name = "SPA"
funcList.push(funcItem)
}else if( funcResponse[i].value==4 ){
// 文创
funcItem.name = "文创"
funcList.push(funcItem)
}
}
let typeTitle = '全部分类' //
let orderTypeActive = 0 //
let aVal = ''
funcList.forEach((item, index) => {
if (item.value == this.data.optionsGoodType) {
typeTitle = item.name
orderTypeActive = index
}
})
// if (filter.length > 0) { // if (filter.length > 0) {
// typeTitle = filter[0].name // typeTitle = filter[0].name
// orderTypeActive = 0 // orderTypeActive = 0
// } // }
this.setData({ this.setData({
'orderType': funcList, 'orderType': funcList,
'orderTypeTitle': typeTitle, 'orderTypeTitle': typeTitle,
orderTypeActive orderTypeActive
}) })
this.queryOrder() this.queryOrder()
}
}) })
}, },
...@@ -308,9 +308,7 @@ Page({ ...@@ -308,9 +308,7 @@ Page({
* @param * @param
* @returns * @returns
*/ */
onOrderCancel: function (event) { onOrderCancel: function (event) {
console.log('onOrderCancel')
App.ui.showDialog({ App.ui.showDialog({
type: 'confirm', type: 'confirm',
title: '是否确认取消订单', title: '是否确认取消订单',
...@@ -327,24 +325,24 @@ Page({ ...@@ -327,24 +325,24 @@ Page({
isDoing: true isDoing: true
}) })
let funcItem = event.target.dataset.item let funcItem = event.target.dataset.item
App.wxRequest({ App.request({
url: 'v1/order/cancelOrder', url: 'v1/order/cancelOrder',
data: { params: {
'orderId': funcItem.id, 'orderId': funcItem.id,
'type': 0, 'type': 0,
}, },
success: (response) => { })
App.ui.showToast({ .then((response) => {
'iconType': 'success', App.ui.showToast({
'title': '取消成功' 'iconType': 'success',
}) 'title': '取消成功'
this.setData({ })
'isDoing': false, this.setData({
'orderList': [], 'isDoing': false,
'orderPages': 1, 'orderList': [],
}) 'orderPages': 1,
this.queryOrder() })
} this.queryOrder()
}) })
}, },
fail: () => { }, fail: () => { },
...@@ -374,24 +372,24 @@ Page({ ...@@ -374,24 +372,24 @@ Page({
isDoing: true isDoing: true
}) })
let funcItem = event.target.dataset.item let funcItem = event.target.dataset.item
App.wxRequest({ App.request({
url: 'v1/order/cancelOrder', url: 'v1/order/cancelOrder',
data: { params: {
'orderId': funcItem.id, 'orderId': funcItem.id,
'type': 1, 'type': 1,
}, },
success: (response) => { })
App.ui.showToast({ .then((response) => {
'iconType': 'success', App.ui.showToast({
'title': '删除成功' 'iconType': 'success',
}) 'title': '删除成功'
this.setData({ })
'isDoing': false, this.setData({
'orderList': [], 'isDoing': false,
'orderPages': 1, 'orderList': [],
}) 'orderPages': 1,
this.queryOrder() })
} this.queryOrder()
}) })
}, },
fail: () => {}, fail: () => {},
......
...@@ -80,6 +80,7 @@ Page({ ...@@ -80,6 +80,7 @@ Page({
let funcData = response.data let funcData = response.data
let funcList = [{ text: '全部', value: 0 }] let funcList = [{ text: '全部', value: 0 }]
for (let i = 0, l = funcData.length; i < l; i++) { for (let i = 0, l = funcData.length; i < l; i++) {
if (['101'].includes(funcData[i].tagId)) continue
let funcItem = { let funcItem = {
'text': funcData[i].name, 'text': funcData[i].name,
'value': funcData[i].tagId, 'value': funcData[i].tagId,
......
<m-nav titleText="主题活动" scrollHeight="{{navScroll}}" styleIndex="{{1}}" bindnavChangeHeight="eventNavChangeHeight"></m-nav> <m-nav titleText="主题活动" scrollHeight="{{navScroll}}" styleIndex="{{1}}" bindnavChangeHeight="eventNavChangeHeight"></m-nav>
<m-tab item="{{tabItem}}" isFixed="{{true}}" fixedTop="{{tabTop}}" bindtabChange="eventTabChange"></m-tab> <m-tab class="tab-type" item="{{tabItem}}" isFixed="{{true}}" fixedTop="{{tabTop}}" bindtabChange="eventTabChange"></m-tab>
<view class="container bg-gradient"> <view class="container bg-gradient">
<!-- 近期活动 --> <!-- 近期活动 -->
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
<view class="item-info column"> <view class="item-info column">
<view class="item-title row cb ac"> <view class="item-title row cb ac">
<text>{{item.name}}</text> <text class="fs30 fw800 c01">{{item.name}}</text>
<text wx:if="{{item.tagNames[0]}}">{{item.tagNames[0]}}</text> <text wx:if="{{item.tagNames[0]}}">{{item.tagNames[0]}}</text>
</view> </view>
<view class="item-date row ac"> <view class="item-date row ac">
......
.tab { .tab-type {
position: fixed; margin: 44rpx 0 0 0;
top: 0;
left: 0;
background: #FFFFFF;
} }
.container { .container {
...@@ -86,14 +83,10 @@ ...@@ -86,14 +83,10 @@
.item-title { .item-title {
height: 44rpx; height: 44rpx;
margin-top: 32rpx; margin: 20rpx 0 0 0;
} }
.item-title text:nth-child(1) { .item-title text:nth-child(1) {
font-size: 34rpx;
font-weight: bold;
color: #15191f;
line-height: 44rpx;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
white-space: normal; white-space: normal;
......
...@@ -11,6 +11,7 @@ page { ...@@ -11,6 +11,7 @@ page {
.status { .status {
z-index: 2; z-index: 2;
width: 750rpx; width: 750rpx;
margin: 52rpx 0 0 0;
background-color: #1C1C25; background-color: #1C1C25;
border-bottom: 1rpx #3A3A40 solid; border-bottom: 1rpx #3A3A40 solid;
} }
...@@ -40,7 +41,7 @@ page { ...@@ -40,7 +41,7 @@ page {
width: 670rpx; width: 670rpx;
height: 396rpx; height: 396rpx;
margin: 76rpx auto 0; margin: 76rpx auto 0;
padding: 64rpx 32rpx 32rpx 32rpx; padding: 60rpx 32rpx 32rpx 32rpx;
background: #272733; background: #272733;
} }
.movie-time-wrapper { .movie-time-wrapper {
...@@ -83,7 +84,7 @@ page { ...@@ -83,7 +84,7 @@ page {
} }
.movie-name-wrapper { .movie-name-wrapper {
height: 40rpx; height: 40rpx;
margin: 0 0 12rpx 0; margin: 0 0 20rpx 0;
overflow: hidden; overflow: hidden;
flex-wrap: wrap; flex-wrap: wrap;
} }
......
...@@ -43,6 +43,12 @@ let output = { ...@@ -43,6 +43,12 @@ let output = {
} }
}, },
/**
* 计算字符串字符数量
* @function
* @param {string} - funcCountString 字符串
* @returns
*/
countStringChar: function (funcCountString) { countStringChar: function (funcCountString) {
let funcCountDoubleByte = funcCountString.match(/[\uff00-\uffff]/ig) let funcCountDoubleByte = funcCountString.match(/[\uff00-\uffff]/ig)
let funcCountSingleByte = funcCountString.match(/[\u0000-\u00ff]/ig) let funcCountSingleByte = funcCountString.match(/[\u0000-\u00ff]/ig)
...@@ -55,7 +61,6 @@ let output = { ...@@ -55,7 +61,6 @@ let output = {
if (funcCountEmoji === null) funcCountEmoji = [] if (funcCountEmoji === null) funcCountEmoji = []
let funcCountStringChar = funcCountDoubleByte.length * 2 + funcCountSingleByte.length * 1 + funcCountChinese.length * 2 + funcCountEmoji.length * 1 let funcCountStringChar = funcCountDoubleByte.length * 2 + funcCountSingleByte.length * 1 + funcCountChinese.length * 2 + funcCountEmoji.length * 1
console.log(funcCountStringChar)
return funcCountStringChar return funcCountStringChar
}, },
} }
......
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