Commit a5ddb1df by 前端

Merge branch 'dev_v4.32.0_1130' of http://192.168.3.233:8090/saas_plus/dj-car-bo…

…utique-work-wechat into dev_v4.32.0_1130
2 parents c4781a59 a6d09dbf
...@@ -30,29 +30,25 @@ ...@@ -30,29 +30,25 @@
"pagePath": "tabIndex/pages/index/index", "pagePath": "tabIndex/pages/index/index",
"text": "首页", "text": "首页",
"iconPath": "images/tab-home.png", "iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png", "selectedIconPath": "images/tab-home-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabWorkOrder/pages/index/index", "pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "工单管理", "text": "工单管理",
"iconPath": "images/tab-order.png", "iconPath": "images/tab-order.png",
"selectedIconPath": "images/tab-order-active.png", "selectedIconPath": "images/tab-order-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabDateIndex/pages/tabDateIndex", "pagePath": "pages/tabDateIndex/pages/tabDateIndex",
"text": "预约管理", "text": "预约管理",
"iconPath": "images/tab-date.png", "iconPath": "images/tab-date.png",
"selectedIconPath": "images/tab-date-active.png", "selectedIconPath": "images/tab-date-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabMine/pages/index/index", "pagePath": "pages/tabMine/pages/index/index",
"text": "个人中心", "text": "个人中心",
"iconPath": "images/tab-mine.png", "iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png", "selectedIconPath": "images/tab-mine-active.png"
"iconSize": "24"
} }
] ]
}, },
......
// components/tabMine/TabMine.js // components/tabMine/TabMine.js
import api from '../../tabMine/api' import api from '~/pages/tabMine/api'
const app = getApp() const app = getApp()
import constantData from '../../pages/constant/data' import constantData from '../../pages/constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
...@@ -83,7 +83,10 @@ Component({ ...@@ -83,7 +83,10 @@ Component({
}) })
wx.showLoading() wx.showLoading()
api.logout().then(_res_ => { api.logout().then(_res_ => {
let { code, message } = _res_ let {
code,
message
} = _res_
if (code == 0) { if (code == 0) {
app.login(false) app.login(false)
} else { } else {
...@@ -98,4 +101,4 @@ Component({ ...@@ -98,4 +101,4 @@ Component({
}) })
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
<!--components/tabMine/TabMine.wxml--> <!--components/tabMine/TabMine.wxml-->
<!-- src引入filter.wxs, module给模块起名 --> <!-- src引入filter.wxs, module给模块起名 -->
<!-- <wxs src="./index.wxs" module="filter" /> --> <!-- <wxs src="./index.wxs" module="filter" /> -->
<view>2222</view>
<view class="bg"></view> <view class="bg"></view>
<block>
<block> <block>
<view class="main" style="margin-top:104rpx"> <view class="main" style="margin-top:104rpx">
<view class="user-box"> <view class="user-box">
...@@ -57,102 +58,22 @@ ...@@ -57,102 +58,22 @@
<view class="set_tips">设置录单必填项</view> <view class="set_tips">设置录单必填项</view>
</view> --> </view> -->
<view class="set_item item_3" bindtap="changeScene"> <view class="set_item item_3" bindtap="changeScene">
<view class="title">场景切换<image class="arrow_icon" src="/tabMine/images/arrow_icon.png" mode=""/></view> <view class="title">场景切换<image class="arrow_icon" src="/pages/tabMine/images/arrow_icon.png" mode=""/></view>
<view class="set_tips">{{selectedSceneName}}</view> <view class="set_tips">{{selectedSceneName}}</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode=""/> <image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode=""/>
</view> </view>
<view class="set_item item_4" bindtap="goVersionPage"> <view class="set_item item_4" bindtap="goVersionPage">
<view class="title">更新日志<image class="arrow_icon" src="/tabMine/images/arrow_icon.png" mode=""/></view> <view class="title">更新日志<image class="arrow_icon" src="/pages/tabMine/images/arrow_icon.png" mode=""/></view>
<view class="set_tips">最新{{versionData.version}}版</view> <view class="set_tips">最新{{versionData.version}}版</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/> <image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/>
</view> </view>
</view> </view>
<!-- <view class="version_box" bindtap="goVersionPage">
<view class="item">
<view class="icon_box">
<view class="is_new" hidden="{{!versionData.isNew}}">NEW</view>
</view>
<view>更新日志</view>
</view>
</view> -->
</block> </block>
<view class="logout text-center" bindtap="logout">退出账号</view> <view class="logout text-center" bindtap="logout">退出账号</view>
</view> </view>
</block> </block>
<!-- <block wx:if="{{showWorkBox}}">
<view class="work-box" catchtouchmove="noScroll">
<view class="work-bg" bindtap="showWork" />
<view class="work-content">
<view class="work-title text-center hasborder">工位设置</view>
<view class="work-body">
<block wx:for="{{workItem}}" wx:key="index">
<view class="item hasborder">
<view class="label">{{item.label}}</view>
<view class="value">
<view
class="minus {{userInfo.userType == 2 ?'disabled':''}}"
bindtap="addWorkCount"
data-count="{{-1}}"
data-index="{{index}}"
bindlongtap="addWorkCount"
bindtouchend="touchend"
bindtouchstart="touchstart">
-
</view>
<view class="input text-center {{userInfo.userType == 2 ?'disabled':''}}">
{{item.maxCount}}
</view>
<view
class="add {{userInfo.userType == 2 ?'disabled':''}}"
bindtap="addWorkCount"
data-count="{{1}}"
data-index="{{index}}"
bindlongtap="addWorkCount"
bindtouchend="touchend"
bindtouchstart="touchstart">
+
</view>
个
</view>
</view>
</block>
<view class="item hasborder">
<view class="label">周六施工</view>
<switch
class="{{userInfo.userType == 2 ?'disabled':''}}"
disabled="{{userInfo.userType == 2}}"
color="#347BFF"
isYqdSuper="{{isYqdSuper}}"
checked="{{saturdayFlag}}"
bindchange="changeSwitch"
data-target="saturdayFlag" />
</view>
<view class="item hasborder">
<view class="label">周日施工</view>
<switch
class="{{userInfo.userType == 2 ?'disabled':''}}"
disabled="{{userInfo.userType == 2}}"
color="#347BFF"
checked="{{sundayFlag}}"
bindchange="changeSwitch"
data-target="sundayFlag" />
</view>
<view class="tips">设置门店每日每个时段可接待的客户人数, 施工时段以1个半小时为准,请合理安排施工进度</view>
</view>
<view class="work-footer">
<view class="cancel text-center" bindtap="showWork">取消</view>
<view class="confirm text-center" bindtap="confirm">确定</view>
</view>
</view>
</view>
</block>
<switch-popup
show="{{showMerchantPop}}"
height="{{merchantPopConfig.height}}"
title="{{merchantPopConfig.title}}"
isYqdSuper="{{isYqdSuper}}"
tips="{{merchantPopConfig.tips}}" /> -->
</block>
......
...@@ -47,44 +47,47 @@ ...@@ -47,44 +47,47 @@
<view class="change_btn" bindtap="changeScene">切换场景</view> <view class="change_btn" bindtap="changeScene">切换场景</view>
</view> </view>
</view> --> </view> -->
<view class="set_box"> <scroll-view scroll-y>
<view class="set_item item_1" bindtap="showWork"> <view class="set_box">
<view class="title">工位设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_1" bindtap="showWork">
<view class="set_tips" wx:if="{{workCount>0}}"><text style="font-size: 32rpx;color: #333333; font-weight: 500;">{{workCount}}</text>个</view> <view class="title">工位设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<view class="set_tips" wx:else>根据门店设置工位数</view> <view class="set_tips" wx:if="{{workCount>0}}"><text style="font-size: 32rpx;color: #333333; font-weight: 500;">{{workCount}}</text>个</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_4.png" mode=""/> <view class="set_tips" wx:else>根据门店设置工位数</view>
</view> <image class="icon_image" src="{{IMG_URL}}mine_icon_4.png" mode=""/>
<view class="set_item item_2" bindtap="showMerchantPop"> </view>
<view class="title">录单设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_2" bindtap="showMerchantPop">
<view class="set_tips">设置录单必填项</view> <view class="title">录单设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_2.png" mode=""/> <view class="set_tips">设置录单必填项</view>
</view> <image class="icon_image" src="{{IMG_URL}}mine_icon_2.png" mode=""/>
<view class="set_item item_3" bindtap="changeScene"> </view>
<view class="title">场景切换<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_3" bindtap="changeScene">
<view class="set_tips">{{selectedSceneName}}</view> <view class="title">场景切换<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode=""/> <view class="set_tips">{{selectedSceneName}}</view>
</view> <image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode=""/>
<view class="set_item item_4" bindtap="goVersionPage"> </view>
<view class="title">更新日志<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_4" bindtap="goVersionPage">
<view class="set_tips">最新{{versionData.version}}版</view> <view class="title">更新日志<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/> <view class="set_tips">最新{{versionData.version}}版</view>
</view> <image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/>
<view class="set_item item_5" bindtap="goReservationCouponPage"> </view>
<view class="title">领券预约<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_5" bindtap="goReservationCouponPage">
<view class="set_tips">设置接待电话</view> <view class="title">领券预约<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_5.png" mode=""/> <view class="set_tips">设置接待电话</view>
</view> <image class="icon_image" src="{{IMG_URL}}mine_icon_5.png" mode=""/>
<view class="set_item item_6" bindtap="goTechnicianSetupPage"> </view>
<view class="title">技师设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_6" bindtap="goTechnicianSetupPage">
<view class="set_tips">设置园区店技师</view> <view class="title">技师设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_6.png" mode=""/> <view class="set_tips">设置园区店技师</view>
</view> <image class="icon_image" src="{{IMG_URL}}mine_icon_6.png" mode=""/>
<view class="set_item item_7" bindtap="goConstructSetupPage"> </view>
<view class="title">完成施工<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view> <view class="set_item item_7" bindtap="goConstructSetupPage">
<view class="set_tips">设置施工完成上传图片</view> <view class="title">完成施工<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode=""/> <view class="set_tips">设置施工完成上传图片</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode=""/>
</view>
</view> </view>
</view> </scroll-view>
<!-- <view class="version_box" bindtap="goVersionPage"> <!-- <view class="version_box" bindtap="goVersionPage">
<view class="item"> <view class="item">
<view class="icon_box"> <view class="icon_box">
...@@ -94,7 +97,10 @@ ...@@ -94,7 +97,10 @@
</view> </view>
</view> --> </view> -->
</block> </block>
<view class="logout text-center" bindtap="logout">退出账号</view> <view class="logout-box">
<view class="logout text-center" bindtap="logout">退出账号</view>
</view>
</view> </view>
</block> </block>
<block wx:if="{{showWorkBox}}"> <block wx:if="{{showWorkBox}}">
......
/* tabComponents/pages/index/index.wxss */ /* tabComponents/pages/index/index.wxss */
.main { .main {
padding-bottom: 80rpx;
} }
.bg { .bg {
...@@ -398,11 +398,16 @@ ...@@ -398,11 +398,16 @@
opacity: .5; opacity: .5;
} }
.logout-box{
display: flex;
justify-content: center;
}
.logout { .logout {
position: fixed; /* position: fixed;
bottom: 106rpx; bottom: 106rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%); */
width: 326rpx; width: 326rpx;
height: 80rpx; height: 80rpx;
background: #FFFFFF; background: #FFFFFF;
......
...@@ -4,8 +4,13 @@ ...@@ -4,8 +4,13 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
<<<<<<< HEAD
"name": "个人中心", "name": "个人中心",
"pathName": "pages/tabMine/pages/index/index", "pathName": "pages/tabMine/pages/index/index",
=======
"name": "技师设置",
"pathName": "tabMine/pages/technicianSetup/technicianSetup",
>>>>>>> a6d09dbf096e7ca9edfd223c82da4a502f034061
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
......
...@@ -2,46 +2,71 @@ ...@@ -2,46 +2,71 @@
import api from '~/utils/request/request.js' import api from '~/utils/request/request.js'
// const api = wx.$request // const api = wx.$request
module.exports = { module.exports = {
/**退出*/ /**退出*/
logout() { logout() {
return api.post('dj.api.smartcarlife.logout') return api.post('dj.api.smartcarlife.logout')
}, },
/** 获取工位设置信息 */ /** 获取工位设置信息 */
getWorkSetting() { getWorkSetting() {
return api.post('dj.api.smartcarlife.inviteStationSet.get') return api.post('dj.api.smartcarlife.inviteStationSet.get')
}, },
/**更新工位设置 */ /**更新工位设置 */
setWorkSetting(data) { setWorkSetting(data) {
return api.post('dj.api.smartcarlife.inviteStationSet.update', data) return api.post('dj.api.smartcarlife.inviteStationSet.update', data)
}, },
/** 获取我的种草总数 */ // /** 获取我的种草总数 */
GETGRASSTOTAL(data) { // GETGRASSTOTAL(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.count', data) // return api.post('dj.api.smartcarlife.orderShareRecord.own.count', data)
}, // },
/** 分页查询我的种草 */ // /** 分页查询我的种草 */
GETGRASSLIST(data) { // GETGRASSLIST(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data) // return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data)
}, // },
/** 获取商户配置 */ // 分页查询技师列表
getMerchantConfiguration(data) { getTechnicianList(data) {
return api.post('dj.api.scenemerchantref.getMerchantConfiguration', data) return api.post('dj.api.smartcarlife.staff.findStaffByPage', data)
}, },
/** 配置修改 */ // 新增技师信息
updateSignatureConfiguration(data) { addTechnician(data) {
return api.post('dj.api.scenemerchantref.updateSignatureConfiguration', data) return api.post('dj.api.smartcarlife.technicianConfig.add', data)
}, },
/** 获取领劵预约设置 */ // 修改技师信息
getReservationConfig(data) { updateTechnician(data) {
return api.post('dj.api.smartcarlife.reservation.phone.number.config.get', data) return api.post('dj.api.smartcarlife.technicianConfig.update', data)
}, },
/** 更新领劵预约设置 */ // 删除技师
updateReservationConfig(data) { deleteTechnician(data) {
return api.post('dj.api.smartcarlife.reservation.phone.number.config.update', data) return api.post('dj.api.smartcarlife.technicianConfig.delete', data)
} },
}
/** 分页查询我的种草 */
GETGRASSLIST(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data)
},
/** 获取商户配置 */
getMerchantConfiguration(data) {
return api.post('dj.api.scenemerchantref.getMerchantConfiguration', data)
},
/** 配置修改 */
updateSignatureConfiguration(data) {
return api.post('dj.api.scenemerchantref.updateSignatureConfiguration', data)
},
/** 获取领劵预约设置 */
getReservationConfig(data) {
return api.post('dj.api.smartcarlife.reservation.phone.number.config.get', data)
},
/** 更新领劵预约设置 */
updateReservationConfig(data) {
return api.post('dj.api.smartcarlife.reservation.phone.number.config.update', data)
}
}
\ No newline at end of file \ No newline at end of file
// tabMine/pages/technicianSetup/technicianSetup.js // tabMine/pages/technicianSetup/technicianSetup.js
import api from '../../api.js'
import {
ImgUrl
} from '~/config';
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL: ImgUrl,
total: -1,
pageCof: {
pageNum: 1,
pageSize: 1000
},
isAsk: false,
technicianList: [
// {
// staffName: '',
// staffPhone: '',
// isEdit: true
// }
]
},
init() {
this.getList(true)
},
addTechnicalItem() {
let {
technicianList,
userInfo
} = this.data
technicianList.unshift({
staffName: '',
staffPhone: '',
merchantId: userInfo.merchantId,
merchantName: userInfo.merchantName,
isEdit: true
})
this.setData({
technicianList
})
},
editTechicianInfo(e) {
let {
index
} = e.currentTarget.dataset
this.setData({
[`technicianList[${index}].isEdit`]: true
})
},
submit(e) {
let {
index
} = e.currentTarget.dataset
let {
technicianList
} = this.data
let params = wx.$util.deepClone(technicianList[index])
if (!params.staffName) {
wx.$util.showToast('请输入姓名')
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (!params.staffPhone || !phoneRex.test(params.staffPhone)) {
wx.$util.showToast('请输入正确手机号')
}
params.technicianName = params.staffName
params.technicianPhone = params.staffPhone
console.log('18775035205');
wx.$util.showLoading('加载中')
// this.setData({
// [`technicianList[${index}].isEdit`]: false
// })
// return
let apiName = params.id ? 'updateTechnician' : 'addTechnician'
// debugger
api[apiName](params).then((res) => {
wx.hideLoading()
// debugger
console.log(res, 'res');
let {
code,
data,
message
} = res
if (code == 0) {
wx.$util.showToast(params.id ? '修改成功' : '新增成功')
this.setData({
[`technicianList[${index}].isEdit`]: false
})
} else {
wx.$util.showToast(message)
}
}).catch((err) => {
});
// this.setData({
// // [`technicianList[${index}].isEdit`]:true
// })
}, },
deleteTechicianInfo(e) {
let {
index
} = e.currentTarget.dataset
let {
technicianList
} = this.data
const id = technicianList[index]?.id
// if (id) {
let _this = this
wx.showModal({
title: '温馨提示',
content: '是否删除该技师',
// showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) {
if (res.confirm) {
if (!id) {
technicianList.splice(index, 1)
_this.setData({
technicianList
})
return
}
wx.$util.showLoading('加载中')
api.deleteTechnician({
id
}).then((result) => {
wx.hideLoading()
let {
code,
data,
message
} = result
if (code == 0) {
technicianList.splice(index, 1)
_this.setData({
technicianList
})
} else {
wx.$util.showToast(message)
}
}).catch((err) => {
console.log(err);
});
// _this.getDetail(orderCode)
}
}
})
// }
},
input(e) {
let {
value
} = e.detail
let {
name,
index
} = e.currentTarget.dataset
let {
technicianList
} = this.data
let itemChar = `technicianList[${index}].${name}`
this.setData({
[itemChar]: value.trim()
})
},
getList(isReset = false) {
// let user
let {
technicianList,
pageCof,
total,
userInfo,
isAsk
} = this.data
console.log(userInfo, 'userInfo');
let _this = this
if (total == technicianList.length || isAsk) {
return true
}
let params = {
...pageCof,
status: 0,
merchantNoList: [userInfo.merchantId],
// roleName: '技师'
staffBusinessType: 1
}
this.setData({
isAsk: true
})
api.getTechnicianList(params).then(res => {
let {
data,
count
} = res.data
this.setData({
technicianList: pageCof.pageNum == 1 ? (data || []) : technicianList.concat(data),
['pageCof.pageNum']: pageCof.pageNum + 1,
triggered: false,
total: count
})
if (isReset) {
this.setData({
scrollTop: 0
})
}
}).finally(function () {
_this.setData({
isAsk: false
})
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
/* tabMine/pages/technicianSetup/technicianSetup.wxss */
page {
background: rgb(246, 248, 250);
}
.scrollCon {
width: 710rpx;
// height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 20rpx auto;
overflow-y: scroll;
.merchantNameCon {
box-sizing: border-box;
padding: 32rpx;
width: 100%;
height: 108rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #292D33;
.addIcon {
display: flex;
align-items: center;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #347BFF;
.icon-plus {
width: 28rpx;
height: 28rpx;
margin-right: 5rpx;
}
}
}
}
.item-box {
.item {
box-sizing: border-box;
width: 670rpx;
height: 124rpx;
background: #F7F8FA;
border-radius: 16rpx;
margin: 0 auto 20rpx;
}
.techicianInfoEdit {
box-sizing: border-box;
padding: 0 24rpx 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.icon-delete {
width: 28rpx;
height: 28rpx;
}
.name {
box-sizing: border-box;
width: 200rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
}
.phone {
box-sizing: border-box;
width: 280rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
}
.btn {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #347BFF;
}
}
.techicianInfo {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 32rpx;
.left {
.label {
display: flex;
.name {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 28rpx;
color: #292D33;
margin-right: 10rpx;
}
.position {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 20rpx;
background: #EAF1FF;
border: 1rpx solid #347bff80;
padding: 4rpx 16rpx;
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 20rpx;
color: #347BFF;
}
}
.phone {
margin-top: 10rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
}
}
.icon-edit {
width: 32rpx;
height: 32rpx;
}
}
}
.input {
// text-align: right;
font-size: 28rpx;
padding: 0 24rpx;
}
.placeholder-class {
color: #BEC1C7;
}
\ No newline at end of file \ No newline at end of file
/* tabMine/pages/technicianSetup/technicianSetup.wxss */
\ No newline at end of file \ No newline at end of file
<!--tabMine/pages/technicianSetup/technicianSetup.wxml--> <!--tabMine/pages/technicianSetup/technicianSetup.wxml-->
<text>tabMine/pages/technicianSetup/technicianSetup.wxml</text> <!-- <view>1111</view> -->
<!-- <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}"> -->
<view class="scrollCon">
<view class="merchantNameCon">
<view class="name">{{userInfo.merchantName}}</view>
<view class="addIcon" bind:tap="addTechnicalItem">
<image class="icon-plus" src="{{IMG_URL}}/miniProgram/icon-plus.png" />
技师
</view>
</view>
<view class="item-box" wx:for="{{technicianList}}" wx:key="index">
<view class=" item techicianInfoEdit" wx:if="{{item.isEdit}}">
<image class="icon-delete" bind:tap="deleteTechicianInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/deleteIcon.png" />
<input placeholder="技师姓名" class="input name" placeholder-class="placeholder-class" maxlength="16" data-index="{{index}}" value="{{ item.staffName }}" bindinput="input" data-name="staffName" always-embed></input>
<input placeholder="技师手机号" class="input phone" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{ item.staffPhone }}" bindinput="input" bindblur="phoneBlur" data-index="{{index}}" data-name="staffPhone" always-embed></input>
<view class="btn" bind:tap="submit" data-index="{{index}}">提交</view>
</view>
<view class=" item techicianInfo" wx:else>
<view class="left">
<view class="label">
<view class="name">{{item.staffName}}</view>
<view class="position">技师</view>
</view>
<view class="phone">手机号 {{item.staffPhone}}</view>
</view>
<image class="icon-edit" bind:tap="editTechicianInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/grayEditIcon.png" />
</view>
<!-- <view class="top">
<view class="message">
<glsx-image src="personal/tech_defalut_avatar.png" class="avatar" />
<view class="message-text">
<input wx:if="{{item.isEdit}}" type="text" placeholder="{{formItems[0].placeholder}}" maxlength="{{formItems[0].maxlength}}" class="input" value="{{formData.staffName}}" focus="{{item.isEdit}}" placeholder-class="input-placeholder" data-attr="{{formItems[0].props}}" confirm-type="done" bindinput="handleInput" bindblur="handleConfirm" />
<view wx:else class="merchant">{{item.staffName}}</view>
</view>
<glsx-image wx:if="{{!item.isEdit}}" src="personal/icon-edit.png" class="icon-edit" bindtap="handleEdit" data-type="edit" data-target="{{item}}" data-idx="{{index}}" />
</view>
<view class="delete" bindtap="handleDelete" data-target="{{item}}">删除</view>
</view>
<view class="bottom">
<view class="technician_name">
所属:{{item.merchantName}}
</view>
<view class="time">{{item.createdTime}}</view>
</view> -->
</view>
<!-- <view class="bottomTips" wx:if="{{technicianList.length == total}}">到底啦!</view> -->
</view>
<!-- </scroll-view> -->
\ No newline at end of file \ No newline at end of file
import { envIndex } from '~/config' import {
envIndex
} from '~/config'
// console.log(envIndex, 'envIndex') // console.log(envIndex, 'envIndex')
...@@ -23,7 +25,7 @@ const secretKey_items = { ...@@ -23,7 +25,7 @@ const secretKey_items = {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
cdptest:{ cdptest: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
} }
...@@ -49,7 +51,7 @@ const scrmSecretKey_items = { ...@@ -49,7 +51,7 @@ const scrmSecretKey_items = {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
cdptest:{ cdptest: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
} }
...@@ -57,10 +59,10 @@ const scrmSecretKey_items = { ...@@ -57,10 +59,10 @@ const scrmSecretKey_items = {
const domain_items = { const domain_items = {
ip: { ip: {
// dj: 'http://192.168.1.165:8292', // dj: 'http://192.168.1.165:8292',
dj: 'http://192.168.1.104:8292', //叶立庆 // dj: 'http://192.168.1.104:8292', //叶立庆
// dj: 'http://192.168.1.169:8292',//蔡远明 // dj: 'http://192.168.1.169:8292',//蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣 // dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.203:8292',//周杭 dj: 'http://192.168.1.88:8292', //周杭
// dj: 'http://192.168.1.53:8292',//陈希 // dj: 'http://192.168.1.53:8292',//陈希
// dj:'http://192.168.2.59:8292/',//周立明 // dj:'http://192.168.2.59:8292/',//周立明
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
...@@ -90,7 +92,7 @@ const domain_items = { ...@@ -90,7 +92,7 @@ const domain_items = {
} }
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease','cdptest'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease', 'cdptest']
module.exports = { module.exports = {
domain: domain_items[target[envIndex]], domain: domain_items[target[envIndex]],
...@@ -98,4 +100,4 @@ module.exports = { ...@@ -98,4 +100,4 @@ module.exports = {
dj: secretKey_items[target[envIndex]], dj: secretKey_items[target[envIndex]],
scrm: scrmSecretKey_items[target[envIndex]] scrm: scrmSecretKey_items[target[envIndex]]
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -24,11 +24,11 @@ const noScroll = () => {} ...@@ -24,11 +24,11 @@ const noScroll = () => {}
/**设置粘贴板内容 */ /**设置粘贴板内容 */
const setCopyData = (data, callBack) => { const setCopyData = (data, callBack) => {
console.log(data,'setCopyData'); console.log(data, 'setCopyData');
wx.setClipboardData({ wx.setClipboardData({
data: data, data: data,
success(res) { success(res) {
console.log(res,'setCopyData'); console.log(res, 'setCopyData');
if (callBack && typeof callBack === 'function') callBack(res) if (callBack && typeof callBack === 'function') callBack(res)
} }
}) })
...@@ -37,7 +37,7 @@ const setCopyData = (data, callBack) => { ...@@ -37,7 +37,7 @@ const setCopyData = (data, callBack) => {
/** /**
* 防止重复点击 * 防止重复点击
*/ */
const showLoading = (title = '') => { const showLoading = (title = '加载中') => {
if (wx.showLoading) { if (wx.showLoading) {
// 基础库 1.1.0 微信6.5.6版本开始支持,低版本需做兼容处理 // 基础库 1.1.0 微信6.5.6版本开始支持,低版本需做兼容处理
wx.showLoading({ wx.showLoading({
...@@ -68,7 +68,7 @@ const showToast = val => { ...@@ -68,7 +68,7 @@ const showToast = val => {
if (val && typeof val === 'string') { if (val && typeof val === 'string') {
obj.title = val obj.title = val
obj.icon = 'none', obj.icon = 'none',
obj.duration = 3000 obj.duration = 3000
} else { } else {
obj = val obj = val
} }
...@@ -175,10 +175,17 @@ const getDeviceSize = () => { ...@@ -175,10 +175,17 @@ const getDeviceSize = () => {
wx.getSystemInfo({ wx.getSystemInfo({
success: function (res) { success: function (res) {
// console.log(res) // console.log(res)
const { screenHeight, safeArea } = res const {
const { bottom } = safeArea screenHeight,
safeArea
} = res
const {
bottom
} = safeArea
const bottomLift = screenHeight - bottom const bottomLift = screenHeight - bottom
resolve({ bottomLift }) resolve({
bottomLift
})
} }
}) })
}) })
...@@ -193,10 +200,17 @@ const isFullSucreen = isComponents => { ...@@ -193,10 +200,17 @@ const isFullSucreen = isComponents => {
wx.getSystemInfo({ wx.getSystemInfo({
success(res) { success(res) {
// console.log(res) // console.log(res)
let { statusBarHeight, screenHeight, windowHeight, safeArea } = res let {
statusBarHeight,
screenHeight,
windowHeight,
safeArea
} = res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea) // console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// const { screenHeight, safeArea } = res // const { screenHeight, safeArea } = res
const { bottom } = safeArea const {
bottom
} = safeArea
// console.log(bottom) // console.log(bottom)
// console.log(router.isTab, 'router.isTab') // console.log(router.isTab, 'router.isTab')
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型 // windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
...@@ -258,4 +272,4 @@ const wxApi = { ...@@ -258,4 +272,4 @@ const wxApi = {
handleCopy handleCopy
} }
export default wxApi export default wxApi
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!