Commit e3b1bba8 by zhangxw

改版修改

1 parent 70ef6280
Showing 160 changed files with 1741 additions and 294 deletions
......@@ -18,6 +18,7 @@ setSystem_info() // 存储设备信息
import { checkYqdSuper, checkScene } from '~/store/index'
import eventbus from './utils/eventbus'
import api from './api/api'
import {Version} from 'glsx-common-sdk'
App({
onLaunch() {
/**挂载到wx对象 */
......@@ -31,6 +32,28 @@ App({
let userInfo = util.getStorageSync('dj_boutique_user_info')
// ,this.globalData, userInfo
userInfo && this.gobalCheckYqdSuper(userInfo)
wx.$versionConfig = new Version({
request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
isSign: false
}
})
},
async getVersionInfo(request) {
if (request) this.globalData.versionData = null
const {
versionData
} = this.globalData
if (versionData) return versionData
else {
const res = await wx.$versionConfig.get({
// moduleUrl: 'dj-car-boutique-work-wechat',
moduleUrl: 'business-assistant',
env: 'update'
})
this.globalData.versionData = res
return res
}
},
showModal(that, options) {
that.selectComponent('#modal').showModal(options)
......@@ -189,5 +212,6 @@ App({
isStaff: false,
YQorderSetting: '',
count:'',
versionData: null
}
})
{
"pages": ["pages/sceneIndex/sceneIndex", "pages/wxLogin/wxLogin", "tabIndex/pages/index/index", "pages/accountItems/accountItems", "pages/nothing/nothing", "pages/webView/webView", "pages/tabWorkOrder/pages/index/index", "tabMine/pages/index/index", "tabDate/pages/index/index", "tabDate/pages/detail/detail", "tabDate/pages/apprManage/apprManage", "tabDate/pages/userPortrait/userPortrait"],
"pages": ["pages/loading/loading", "pages/sceneIndex/sceneIndex", "pages/wxLogin/wxLogin", "tabIndex/pages/index/index", "pages/accountItems/accountItems", "pages/merchantList/merchantList", "pages/nothing/nothing", "pages/webView/webView", "pages/tabWorkOrder/pages/index/index", "tabMine/pages/index/index", "tabDate/pages/index/index", "tabDate/pages/detail/detail", "tabDate/pages/apprManage/apprManage", "tabDate/pages/userPortrait/userPortrait"],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
......@@ -73,12 +73,12 @@
{
"root": "packageCrowdFunding",
"name": "packageCrowdFunding",
"pages": ["pages/paidOrder/paidOrder", "pages/activityList/activityList", "pages/activityPay/activityPay", "pages/paymentSuccess/paymentSuccess", "pages/balanceNote/balanceNote", "pages/newOrder/newOrder", "pages/additionRecordOrder/additionRecordOrder"]
"pages": ["pages/TabBar/crowdFundingPage", "pages/activityPage/paidOrder/orderList", "pages/activityPage/activityList/activityList", "pages/activityPage/activityPay/activityPay", "pages/activityPage/paymentSuccess/paymentSuccess", "pages/activityPage/balanceNote/balanceNote", "pages/activityPage/newOrder/newOrder", "pages/activityPage/additionRecordOrder/additionRecordOrder"]
},
{
"root": "subvehicleConversion",
"name": "subvehicleConversion",
"pages": ["pages/index/index", "pages/activityManagement/activityManagement", "pages/visitor/visitor", "pages/order/order", "pages/supplementaryOrderList/supplementaryOrderList", "pages/supplementaryOrderPay/supplementaryOrderPay", "pages/relatedFinalPayment/relatedFinalPayment", "pages/paySuccess/paySuccess"]
"pages": ["pages/TabBar/conversionPage", "pages/activityPage/activityManagement/activityManagement", "pages/activityPage/visitor/visitor", "pages/activityPage/order/order", "pages/orderPage/supplementaryOrderPay/supplementaryOrderPay", "pages/orderPage/relatedFinalPayment/relatedFinalPayment", "pages/orderPage/paySuccess/paySuccess"]
}
],
"usingComponents": {
......
......@@ -41,7 +41,9 @@ Component({
init(keyword) {
// console.log('getBrandList')
// console.log(storageData)
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.selectedMerchantId,
pageSize: 999999,
pageNum: 1,
// upgradeFinishFlag: 'R',
......
......@@ -64,7 +64,7 @@ Component({
moreMerchant: !this.data.moreMerchant
})
},
getMerchantList() {
async getMerchantList() {
let {
userInfo,
type
......@@ -87,15 +87,23 @@ Component({
// debugger
// console.log('orderObj', orderObj)
// }
api[callBackName](
type == 1
? {
merchantId: userInfo.merchantId,
sceneType: 1,
staffUUID: orderObj.sellerUserId
}
: {}
).then(async res => {
// api[callBackName](
// type == 1
// ? {
// merchantId: userInfo.merchantId,
// sceneType: 1,
// staffUUID: orderObj.sellerUserId
// }
// : {}
// ).then(async res => {
// let userInfo = wx.$util.getUserInfo()
let res = {
code: 0,
data: [{
merchantId: userInfo?.selectedMerchantId,
merchantName: userInfo?.selectedMerchantName
}]
}
let {
code,
data,
......@@ -126,7 +134,7 @@ Component({
let result = await api.getLastUserOrderInfo({ sellerUserId: userInfo.subLoginUser.uuid })
// let {data} = result
result.data && (orderSellerInfo = result.data)
if (result.data && result.data.merchantId == userInfo?.selectedMerchantId) (orderSellerInfo = result.data)
// console.log(orderSellerInfo, 'result')
if (orderSellerInfo && !isSellerInfo) {
compareId = orderSellerInfo.merchantId
......@@ -164,7 +172,7 @@ Component({
}
)
}
})
// })
},
getConversionEmployeeList(merchantId, refresh) {
// console.log(merchantId)
......
// components/SideSelectPopup/SideSelectPopup.js
import constantData from '../../pages/constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat'
Component({
/**
* 组件的属性列表
......@@ -12,21 +13,34 @@ Component({
if (n) {
wx.$util.pointRecord(31)
let userInfo = wx.$util.getUserInfo() || {}
let storageSelectedSceneType = userInfo.selectedSceneType
this.setData({storageSelectedSceneType})
let { sceneList } = this.data
let openSceneArr = userInfo?.openSceneArr || []
// 获取开通业务场景
let arr = sceneList.filter(v => openSceneArr.includes(v.sceneType))
let { storeList } = this.data
storeList?.map(val => {
val.actived = false
if (val.merchantId == userInfo?.selectedMerchantId) val.actived = true
})
this.setData({
sceneList: arr
userInfo,
storeList
})
// let storageSelectedSceneType = userInfo.selectedSceneType
// this.setData({storageSelectedSceneType})
// let { sceneList } = this.data
// let openSceneArr = userInfo?.openSceneArr || []
// // 获取开通业务场景
// let arr = sceneList.filter(v => openSceneArr.includes(v.sceneType))
// this.setData({
// sceneList: arr
// })
}
}
},
hasTabBar: {
type: Boolean,
value: false
},
storeList: {
type: Array,
value: []
}
},
......@@ -34,8 +48,9 @@ Component({
* 组件的初始数据
*/
data: {
sceneList: constantData.sceneList,
storageSelectedSceneType: ''
storageSelectedSceneType: '',
IMG_URL,
userInfo: {}
},
/**
......@@ -53,18 +68,63 @@ Component({
hideTabBar() {
if (this.data.hasTabBar) wx.hideTabBar({animation: true})
},
selectScene(e) {
let { scene,item } = e.currentTarget.dataset
let { sceneList, storageSelectedSceneType } = this.data
if (scene == storageSelectedSceneType) return this.closeMenu()
wx.$router.reLaunch(constantData?.pageUrl[scene])
sceneList.map(i => (i.actived = false))
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: scene })
wx.$util.pointRecord(item.recordId)
},
goMineCenter() {
wx.$util.pointRecord(5)
wx.$router.redirectTo('pages.sceneIndex')
selectStore(e) {
let { item } = e.currentTarget.dataset
let { userInfo, storeList } = this.data
if (item?.merchantId == userInfo?.selectedMerchantId) return this.closeMenu()
const thisPage = wx.$router.getPageInstance()
storeList?.map(val => {
val.actived = false
if (val.merchantId == userInfo?.selectedMerchantId) val.actived = true
return val
})
this.setData({
storeList
})
this.closeMenu()
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
selectedMerchantName: item.merchantName,
selectedMerchantId: item.merchantId,
default4SStoreInfo: {
merchantId: item.merchantId,
merchantName: item.merchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: item.merchantId,
merchantName: item.merchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: item.merchantId,
merchantName: item.merchantName
}
})
thisPage.setData({
userInfo: {
...wx.$util.getUserInfo(),
selectedMerchantName: item.merchantName,
selectedMerchantId: item.merchantId,
default4SStoreInfo: {
merchantId: item.merchantId,
merchantName: item.merchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: item.merchantId,
merchantName: item.merchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: item.merchantId,
merchantName: item.merchantName
}
}})
// 除精品升级外 切换门店刷新数据
console.log(thisPage.initList)
thisPage.initList && thisPage.initList()
// wx.$util.pointRecord(item.recordId)
}
// goMineCenter() {
// wx.$util.pointRecord(5)
// wx.$router.redirectTo('pages.sceneIndex')
// }
}
})
<!--components/SideSelectPopup/SideSelectPopup.wxml-->
<van-popup custom-style="height: 100%;width:70%;" z-index="999999" custom-class="popclass" bind:click-overlay="closeMenu" position="left" bind:before-enter="hideTabBar" bind:after-leave="showTabBar" show="{{ show }}">
<view class="wrapper">
<view class="title">业务</view>
<block wx:for="{{sceneList}}" wx:key="index">
<view catch:tap="selectScene" data-item="{{item}}" data-scene="{{item.sceneType}}" class="element {{item.sceneType == storageSelectedSceneType ? 'active' : ''}}">
<view class="img"><image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_{{item.sceneType}}.png"></image></view>
<view class="label">{{item.sceneName}}</view>
<view class="title">4S店</view>
<scroll-view scroll-y style="height: calc(100vh - 264rpx);" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{storeList}}" wx:key="index">
<view catch:tap="selectStore" data-item="{{item}}" class="element {{item.actived ? 'active' : ''}}">
<view class="img"><image src="{{IMG_URL}}/4s_store_icon.png"></image></view>
<view class="gap_icon"><image src="{{IMG_URL}}/4s_store_icon_gap.png"></image></view>
<view class="label">{{item.merchantName}}</view>
</view>
</block>
<view class="title">通用</view>
</block>
</scroll-view>
<!-- <view class="title">通用</view>
<view catch:tap="goMineCenter" data-index="" class="element mine">
<view class="flex_box">
<view class="img"><image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/side_mine_icon.png"></image></view>
<view class="label">个人中心</view>
</view>
<view class="right_icon"></view>
</view>
</view> -->
</view>
</van-popup>
......@@ -27,7 +27,7 @@
color: #FFFFFF;
}
.wrapper .element .img{
.wrapper .element .img,.gap_icon{
width: 64rpx;
height: 64rpx;
margin-right: 16rpx;
......@@ -37,7 +37,15 @@
background: #FFFFFF15;
border-radius: 16rpx;
}
.wrapper .element .img{
display: none;
}
.wrapper .active .img{
display: block;
}
.wrapper .active .gap_icon{
display: none;
}
.wrapper .mine{
display: flex;
align-items: center;
......
// components/tabMine/TabMine.js
import api from '../../tabMine/api'
const app = getApp()
import constantData from '../../pages/constant/data'
Component({
/**
* 组件的属性列表
*/
properties: {
navBarHeight: {
type: Number,
value: 0
},
},
/**
* 组件的初始数据
*/
data: {
isYqdSuper: '',
selectedSceneName: '',
userInfo: {}
},
lifetimes: {
ready() {
let userInfo = wx.$util.getUserInfo()
this.setData({
isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.selectedSceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.selectedSceneType)[0]?.sceneDesc,
userInfo
})
if (userInfo.createdDate) {
let date = userInfo.createdDate + ''
date = date.replace(/-/g, '/').split(' ')[0] // 日期格式处理
this.setData({
['userInfo.createdTime']: date
})
}
this.getVersionInfo()
}
},
/**
* 组件的方法列表
*/
methods: {
// 获取版本信息
async getVersionInfo() {
const versionData = await getApp().getVersionInfo()
this.setData({
versionData
})
},
// 更新日志
goVersionPage() {
},
// 切换场景
changeScene() {
wx.$router.reLaunch('pages.sceneIndex')
},
// 切换账号
changeAccount() {
wx.$router.reLaunch('pages.accountItems')
},
// 退出登录
logout() {
let _this = this
wx.showModal({
title: '温馨提示',
content: '是否退出当前账号?',
confirmColor: '#3582EE',
success(res) {
if (res.confirm) {
_this.setData({
flag: true
})
wx.showLoading()
api.logout().then(_res_ => {
let { code, message } = _res_
if (code == 0) {
app.login(false)
} else {
_this.setData({
flag: false
})
wx.showToast(message)
}
})
}
}
})
}
}
})
{
"component": true,
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
<!--components/tabMine/TabMine.wxml-->
<!-- src引入filter.wxs, module给模块起名 -->
<!-- <wxs src="./index.wxs" module="filter" /> -->
<view class="bg"></view>
<block>
<block>
<view class="main" style="margin-top:104rpx">
<view class="user-box">
<view class="user-avatar">
<block wx:if="{{userInfo.userAvatarUrl}}">
<image src="{{userInfo.userAvatarUrl}}" bindtap="getAvatar" />
</block>
<block wx:else>
<open-data type="userAvatarUrl" />
</block>
</view>
<view class="name_box">
<view class="item name text-hide">{{userInfo.name}}</view>
<view class="change_btn" bindtap="changeAccount">切换账号</view>
</view>
<view class="user-info">
<view class="user-text">
<view class="item">
所属园区:{{userInfo.merchantName}}{{userInfo.isSuper==true?'(超管)':loginRoleLabel[userInfo.loginRole]}}
</view>
<view class="item">创建时间:{{userInfo.createdTime}}</view>
</view>
</view>
</view>
<block >
<view class="scene_box">
<view class="title">场景</view>
<view class="select_item">
<view class="scene_message">
<view class="scene_icon" wx:if="{{userInfo.selectedSceneType >= 0}}">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_{{userInfo.selectedSceneType}}.png" mode=""/>
</view>
<view class="scene_text">
<view class="name">
<view>{{selectedSceneName}}</view>
<view class="name_tips">当前</view>
</view>
<view class="tips">{{selectedSceneDesc}}</view>
</view>
</view>
<view class="change_btn" bindtap="changeScene">切换场景</view>
</view>
</view>
<!-- <view class="set_box">
<view class="set_item item_1" bindtap="showWork">
<view class="title">工位设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<view class="set_tips" wx:if="{{workCount>0}}"><text style="font-size: 32rpx;color: #333333; font-weight: 500;">{{workCount}}</text>个</view>
<view class="set_tips" wx:else>根据门店设置工位数</view>
</view>
<view class="set_item item_2" bindtap="showMerchantPop">
<view class="title">录单设置<image class="arrow_icon" src="../../images/arrow_icon.png" mode=""/></view>
<view class="set_tips">设置录单必填项</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>
<view class="logout text-center" bindtap="logout">退出账号</view>
</view>
</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="#3582EE"
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="#3582EE"
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>
/* tabComponents/pages/index/index.wxss */
.main {
}
.bg {
width: 100%;
height: 350rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/navgation_bg.png') no-repeat;
background-size: 100% 526rpx;
background-color: #fff;
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.user-box {
position: relative;
border-radius: 32rpx 32rpx 0 0;
background: #FFFFFF;
font-size: 28rpx;
color: #333333;
}
.user-avatar {
width: 108rpx;
height: 108rpx;
overflow: hidden;
border-radius: 100%;
position: absolute;
left: 50rpx;
top: -32rpx;
}
.name_box{
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 32rpx 40rpx 182rpx;
}
.name_box .name {
font-size: 40rpx;
color: #323436;
font-weight: 600;
}
.change_btn{
width: 134rpx;
height: 48rpx;
background: rgba(53, 180, 238, .1);
color: #3582EE;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 24rpx;
}
.user-info {
padding: 0 50rpx;
}
.user-text {
width: 100%;
}
.user-text .item {
color: #5A6066;
font-size: 24rpx;
margin: 4rpx;
}
.scene_box{
margin: 20rpx;
margin-top: 48rpx;
box-sizing: border-box;
height: 236rpx;
background: #b8d6ff1a;
border-radius: 16rpx;
padding: 20rpx 32rpx;
}
.scene_box .title {
color: #323436;
font-size: 28rpx;
font-weight: 600;
margin-bottom: 20rpx;
}
.select_item{
display: flex;
align-items: center;
justify-content: space-between;
}
.select_item .scene_message{
display: flex;
align-items: center;
}
.select_item .scene_icon{
width: 128rpx;
height: 128rpx;
margin-right: 24rpx;
}
.select_item .scene_text .name{
color: #333333;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
}
.select_item .scene_text .name .name_tips{
width: 64rpx;
height: 30rpx;
line-height: 30rpx;
text-align: center;
font-size: 24rpx;
background: #ff9d0a0d;
border: 1rpx solid #ff9d0a4d;
color: #FF9D0A;
border-radius: 4rpx;
margin-left: 4rpx;
}
.select_item .scene_text .tips{
font-size: 24rpx;
color: #9B9B9E;
margin-top: 8rpx;
}
.select_item .change_btn{
margin: 0;
}
.set_box{
display: grid;
grid-template-columns: repeat(auto-fill, 344rpx);
justify-content: space-between;
align-items: center;
margin: 20rpx;
}
.set_box .set_item{
box-sizing: border-box;
width: 344rpx;
height: 168rpx;
border-radius: 16rpx;
display: flex;
flex-flow: column;
justify-content: center;
padding: 32rpx;
}
.set_box .set_item .title .arrow_icon{
width: 40rpx;
height: 40rpx;
}
.set_box .item_1{
background: #F8FFFD;
}
.set_box .item_2{
background: #F8F9FF;
}
.set_box .set_item .title{
font-weight: 500;
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
}
.set_box .set_item .set_tips{
font-weight: 400;
font-size: 24rpx;
color: #9B9B9E;
margin-top: 8rpx;
}
.version_box{
margin-top: 28rpx;
display: grid;
grid-template-columns: repeat(auto-fill, 190rpx);
align-items: center;
font-size: 24rpx;
color: #323436;
}
.version_box .icon_box{
width: 90rpx;
height: 90rpx;
background: #FAFAFA;
border-radius: 16rpx;
position: relative;
}
.version_box .item{
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}
.version_box .is_new {
font-size: 20rpx;
text-align: center;
color: #fff;
position: absolute;
top: -14rpx;
right: -28rpx;
background-image: linear-gradient(0deg, #347BFF 0%, #3B8FFE 100%);
width: 56rpx;
height: 28rpx;
line-height: 28rpx;
border-radius: 4rpx;
}
.version_box .is_new::before {
content: "";
position: absolute;
top: 8rpx;
left: -6rpx;
transform: rotate(-90deg);
margin-left: -6rpx; /* 调整尖角位置 */
border-width: 6rpx;
border-style: solid;
border-color: transparent transparent #007bff transparent;
}
.logout {
margin: 94rpx auto;
width: 326rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #DCDEE0;
border-radius: 12rpx;
color: #6C6C70;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
{
"name": "dj-car-boutique-work-wechat",
"lockfileVersion": 2,
"requires": true,
"lockfileVersion": 1,
"packages": {
"": {
"dependencies": {
"@vant/weapp": "^1.10.24",
"glsx-applet-component": "^1.1.25",
"glsx-common-sdk": "^0.2.8",
"number-precision": "^1.6.0",
"rfdc": "^1.3.0"
}
},
"node_modules/@vant/weapp": {
"version": "1.10.24",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz",
"integrity": "sha512-oovAaaJq3mlB+wto5bHVCn/rov8IgRDg+gJXy6hPX0A3c9WF1GqLqSmoXyaktgidJ9IaV1RADd3PAFlw4lUsnQ=="
},
"node_modules/glsx-applet-component": {
"version": "1.1.25",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.25.tgz",
"integrity": "sha512-tE84hW6y+1YG6hFroDEUvP/0rC0Bsgk/Z+xkKfp2++V3qs/7xFtYvz15ShThMSemLd7lcZCi0aMh9Xp4QNytLA=="
},
"node_modules/glsx-common-sdk": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"node_modules/number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"node_modules/rfdc": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz",
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA=="
}
},
"dependencies": {
"@vant/weapp": {
"version": "1.10.24",
......@@ -12,6 +49,11 @@
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.25.tgz",
"integrity": "sha512-tE84hW6y+1YG6hFroDEUvP/0rC0Bsgk/Z+xkKfp2++V3qs/7xFtYvz15ShThMSemLd7lcZCi0aMh9Xp4QNytLA=="
},
"glsx-common-sdk": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
......
......@@ -3,6 +3,7 @@
"@vant/weapp": "^1.10.24",
"glsx-applet-component": "^1.1.25",
"number-precision": "^1.6.0",
"rfdc": "^1.3.0"
"rfdc": "^1.3.0",
"glsx-common-sdk": "^0.2.8"
}
}
import { get4SStoreList, getStaffListByMerchant } from '~/store/index'
// pages/equity/index.js
import { get4SStoreList } from '~/store/index'
import { waitinputorder } from '../../api'
const app = getApp()
let time = null
Page({
/**
* 页面的初始数据
*/
data: {
showStorePicker: false,
userInfo: {},
tabBarList: [
{
name: '工作台',
iconPath: '/images/tab-staging.png',
selectedIconPath: '/images/tab-staging-active.png'
},
{
name: '活动',
iconPath: '/images/tab-quited.png',
selectedIconPath: '/images/tab-quited-active.png'
},
{
name: '设置',
iconPath: '/images/tab-setting.png',
selectedIconPath: '/images/tab-setting-active.png'
}
],
tabIndex: 0,
pageShow: [true, false, false],
navBarHeight: 0,
selectObj: {
key: 'merchantId',
label: 'merchantName',
placeholder: '门店'
},
defaultSelectInfo: {},
shopSideSelectPopup: false
showPicker: false,
userInfo: {},
selectStroeIndex: 0,
shopSideSelectPopup: false,
mode: 1,
tipsProps: false,
waitInputCount: 0,
isStaff: false,
storeRange: []
// hasMode:true
},
init(userInfo) {
this.setData({ userInfo })
this.getStoreList()
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
showStorePicker() {
this.setData({
showStorePicker: true
})
this.get4SStoreList()
// this.test()
},
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
get4SStoreList() {
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
this.setData({
defaultSelectInfo: userInfo?.default4SStoreInfo_crowdFunding
get4SStoreList(params).then(result => {
this.setData({
storeRange: result || [],
showPage: true
})
})
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_crowdFunding?.merchantId
}) > -1
? result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_crowdFunding?.merchantId
})
: 0
// 获取门店下的员工(推荐人)
let params = {
merchantId: userInfo?.default4SStoreInfo_crowdFunding?.merchantId
}
getStaffListByMerchant({...params})
this.setData({
storeListRange: result,
userInfo,
selectStroeIndex,
showPage: true
})
})
.catch(err => {})
},
changePicker(e) {
let { storeListRange, selectStroeIndex } = this.data
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo_crowdFunding = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_crowdFunding })
changeTabBar(e) {
let tabIndex = e.detail
this.setData({
userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo_crowdFunding }
[`pageShow[${tabIndex}]`]: true,
tabIndex
})
// 获取门店下的员工(推荐人)
let params = {
merchantId: storeListRange[value]?.merchantId
}
getStaffListByMerchant({...params})
// 获取门店下活动列表
this.selectComponent(`#order-list`)?.onLoad && this.selectComponent(`#order-list`).onLoad()
this.initList()
},
back() {
wx.$router.reLaunch('pages.sceneIndex')
initList() {
let { tabIndex } = this.data
this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
},
showMenuPopup() {
......@@ -100,7 +78,18 @@ Page({
})
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
onRoute(options) {
// console.log(options,'options');
if (options&&options.tabIndex) {
this.changeTabBar({detail:options.tabIndex})
}
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -115,17 +104,25 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.initList()
// let { tabIndex } = this.data
// this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
onHide() {
time && clearTimeout(time)
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
onUnload() {
time && clearTimeout(time)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
......
{
"usingComponents": {
"top-select-picker": "../../components/topSelectPicker/topSelectPicker",
"conversion-list": "../../components/conversionList/conversionList",
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup"
"custom-tabBar": "/components/CustomTabBar/CustomTabBar",
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"home-page": "../homePage/index/index",
"activity-page": "../activityPage/paidOrder/orderList",
"tab-mine": "/components/TabMine/TabMine"
},
"navigationStyle": "custom"
}
<!-- pages/equity/index.wxml -->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{ true }}" navStyle="{{tabIndex != 3 ? '' : 'background-color: rgba(0,0,0,0);box-shadow:none;'}}" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" wx:if="{{tabIndex != 3}}">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_crowdFunding && userInfo.default4SStoreInfo_crowdFunding.merchantName}}</view>
</view>
<view wx:else>我的</view>
</navigation-bar>
<!-- style="margin-top:{{navBarHeight}}px" -->
<view class="layout {{waitInputCount && mode == 1?'tipsHeigh':''}}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}">
<home-page id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}"> </home-page>
<activity-page id="page-1" class="pagedetail {{ tabIndex == 1?'':'hide' }}"> </activity-page>
<tab-mine id="page-2" class="pagedetail {{ tabIndex == 2?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine>
</block>
</view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#3582EE" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{storeRange}}"/>
\ No newline at end of file
/* pages/equity/index.wxss */
.navigation-header .navigation-bar {
background-color: transparent;
box-shadow: none;
background-color: transparent;
box-shadow: none;
}
.hide {
display: none;
display: none;
}
.show {
display: block;
display: block;
}
.navigation-title {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title-text {
text-align: center;
max-width: calc(100% - 24rpx);
text-align: center;
max-width: calc(100% - 24rpx);
}
.navigation-title .arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-left: 4rpx;
transform: rotate(180deg);
transition: all 0.5s;
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-left: 4rpx;
transform: rotate(180deg);
transition: all 0.5s;
}
.navigation-title .move {
transform: rotate(270deg);
transform: rotate(270deg);
}
.layout {
box-sizing: border-box;
position: relative;
font-size: 24rpx;
color: #8A8C90;
display: flex;
flex-direction: column;
height: calc(100vh - 100rpx - env(safe-area-inset-bottom));
height: calc(100vh - 100rpx - constant(safe-area-inset-bottom));
overflow: hidden;
}
.tipsHeigh{
height: calc(100vh - 100rpx - 72rpx - env(safe-area-inset-bottom));
height: calc(100vh - 100rpx - 72rpx - constant(safe-area-inset-bottom));
}
.layout .pagedetail {
height: 100%;
}
.waitOrderCon {
position: absolute;
/* bottom: env(safe-area-inset-bottom); */
bottom: constant(safe-area-inset-bottom);
/* height: calc(100vh - 100rpx - 72rpx - env(safe-area-inset-bottom));
height: calc(100vh - 100rpx - 72rpx - constant(safe-area-inset-bottom)); */
width: 100%;
}
\ No newline at end of file
/* packageCrowdFunding/pages/activityList/activityList.wxss */
\ No newline at end of file
// packageCrowdFunding/pages/activityList/activityList.js
import api from '../../api'
import api from '~/packageCrowdFunding/api'
const app = getApp()
Page({
/**
......
{
"usingComponents": {
"acitivity-detail": "../../components/activityDetail/activityDetail",
"popup-manner": "../../components/popupManner/popupManner",
"top-select-picker": "../../components/topSelectPicker/topSelectPicker"
"acitivity-detail": "../components/activityDetail/activityDetail",
"popup-manner": "/packageCrowdFunding/components/popupManner/popupManner",
"top-select-picker": "/packageCrowdFunding/components/topSelectPicker/topSelectPicker"
},
"navigationStyle": "custom"
}
......@@ -14,7 +14,7 @@
</block>
</view>
<!-- 超管isSuper/商户号类型 userType 2(员工号)账号不可操作 -->
<image data-target="addOrder" wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}" bind:tap="showMannerPicker" class="addOrder" src="./../../images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
<image data-target="addOrder" wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}" bind:tap="showMannerPicker" class="addOrder" src="/packageCrowdFunding/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
<popup-manner show="{{showPicker}}" activityName="{{activityName}}" activityId="{{activityId}}" bindconfirm="changePicker"></popup-manner>
<top-select-picker show="{{showActivityPicker}}" selectObj="{{selectObj}}" defaultSelectInfo="{{defaultSelectInfo}}" items="{{activityListRange}}" bindsearch="getActivityList" bindconfirm="changePicker"></top-select-picker>
......
......@@ -2,7 +2,7 @@
// import { centsToyuan } from "~/utils/format";
import constantData from './constant/data'
import { getOrderDetail, createPayOrder, createPayOrderAPI, getSamePriceGoodsAPI, updateOrderRemark } from '../../api'
import { getOrderDetail, createPayOrder, createPayOrderAPI, getSamePriceGoodsAPI, updateOrderRemark } from '~/packageCrowdFunding/api'
import { createQrcodeImage, uploadImg } from '~/api/api'
import qrcode from '~/utils/lib/wxqrcode'
let time = null
......
{
"usingComponents": {
"activity-info": "../../components/activityInfoCom/activityInfoCom",
"activity-info": "../components/activityInfoCom/activityInfoCom",
"picker-select": "/packageCrowdFunding/components/PickerSelect/PickerSelect"
},
"navigationStyle": "custom"
......
......@@ -5,7 +5,7 @@
<view class="big-img page-box isFullSucreen">
<view class="titleBox">
<view class="imgBox" bind:tap="back">
<image src="../../images/arrow-left.png" />
<image src="/packageCrowdFunding/images/arrow-left.png" />
</view>
<view class="navigation-title-text">去支付</view>
</view>
......
// packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.js
import constantData from './constant/data'
import api from '../../api'
import api from '~/packageCrowdFunding/api'
const app = getApp()
Page({
/**
......
......@@ -3,7 +3,7 @@
import constantData from './constant/data'
const app = getApp()
import api from '../../api'
import api from '~/packageCrowdFunding/api'
Page({
/**
......
{
"usingComponents": {
"activity-info": "../../components/activityInfoCom/activityInfoCom",
"activity-info": "../components/activityInfoCom/activityInfoCom",
"order-no-popup": "/components/OrderNoPopup/OrderNoPopup",
"picker-select": "/packageCrowdFunding/components/PickerSelect/PickerSelect",
"gl-form": "/packageCrowdFunding/components/GLForm/GLForm"
......
......@@ -3,7 +3,7 @@
<view class="big-img page-box isFullSucreen">
<view class="titleBox">
<view class="imgBox" bind:tap="back">
<image src="../../images/arrow-left.png"></image>
<image src="/packageCrowdFunding/images/arrow-left.png"></image>
</view>
<view class="navigation-title-text">
去支付
......@@ -20,7 +20,7 @@
{{orderInfo.outTradeNo}}
</view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
<image class="right" src="../../../images/arrow-right.png"/>
<image class="right" src="/images/arrow-right.png"/>
</view>
</view>
</view>
......
......@@ -37,7 +37,7 @@
<view class='select_box'>
<view class='select' catchtap='selectTap'>
<view class='select_text'>{{selectData[selectIndex]}}</view>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='../../../images/arrow-right.png'></image>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='/images/arrow-right.png'></image>
</view>
<view class='option_box' wx:if="{{showSelect}}" style="padding: {{ showSelect ? '20rpx 34rpx' : ''}}">
<view class='option' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view>
......@@ -71,7 +71,7 @@
<view class="header-cust">
<view class="cust-name">{{item.customerName}}</view>
<view class="cust-phone">{{item.customerPhone}}</view>
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="1" src="../../images/copy-text.png" mode=""/>
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="1" src="/packageCrowdFunding/images/copy-text.png" mode=""/>
</view>
<view class="header-status">
<view wx:if="{{ item.tailOrderStatus =='1'}}">
......@@ -96,7 +96,7 @@
<block wx:else>
<view wx:if="{{i.key == 'subOrderCode'}}" class="ordercode-class">
{{item[i.key] || ''}}
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="2" src="../../images/copy-text.png" mode=""/>
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="2" src="/packageCrowdFunding/images/copy-text.png" mode=""/>
</view>
<view wx:else>
{{item[i.key] || ''}}
......
......@@ -19,7 +19,7 @@
<block wx:if="{{payVoucher.length > 0}}">
<view class="payVoucher_image" wx:for="{{payVoucher}}" wx:key="index">
<image bindtap="previewImage" data-index="{{index}}" data-url="{{payVoucher}}" src="{{item}}"/>
<image class="del_icon" src="../../../images/del_icon.png" mode="" bindtap="delCustomPayVoucher" data-index="{{index}}"/>
<image class="del_icon" src="/packageCrowdFunding/images/del_icon.png" mode="" bindtap="delCustomPayVoucher" data-index="{{index}}"/>
</view>
</block>
<block wx:if="{{payVoucher.length < 5}}">
......
......@@ -2,7 +2,7 @@
import constantData from './constant/data'
import fn from './constant/ruleFn'
const app = getApp()
import api from '../../api'
import api from '~/packageCrowdFunding/api'
Page({
/**
* 页面的初始数据
......
// import activityList from './constant/data'
import activityApi from '../../api'
import activityApi from '~/packageCrowdFunding/api'
Component({
/**
......
......@@ -28,7 +28,7 @@
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
class="list"
style="height:calc(100vh - {{navBarHeight}}px - 208rpx);"
style="height:calc(100% - 208rpx);"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
......
// packageCrowdFunding/pages/paymentSuccess/paymentSuccess.js
import { getOrderDetail, createPayOrder } from '../../api'
import { getOrderDetail, createPayOrder } from '~/packageCrowdFunding/api'
Page({
/**
......
{
"usingComponents": {
"activity-info": "../../components/activityInfoCom/activityInfoCom"
"activity-info": "../components/activityInfoCom/activityInfoCom"
},
"navigationBarTitleText": "支付成功"
}
......
/* packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.wxss */
\ No newline at end of file
/* packageCrowdFunding/pages/balanceNote/balanceNote.wxss */
\ No newline at end of file
// packageCrowdFunding/pages/homePage/index/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
staticDataList: [{
label: '今日营业额',
value: 0,
tipsLabel: '今日成交量',
tipsValue: 0
}, {
label: '本月营业额',
value: 0,
tipsLabel: '本月成交量',
tipsValue: 0
}, {
label: '累计营业额',
value: 0,
tipsLabel: '累计成交量',
tipsValue: 0
}],
itemDataList: [{
label: '当日访客',
value: 0,
icon: ''
}, {
label: '当日订单',
value: 0,
icon: ''
}, {
label: '当日产值',
value: 0,
icon: ''
}, {
label: '累计访客',
value: 0,
icon: ''
}, {
label: '累计订单',
value: 0,
icon: ''
}, {
label: '累计产值',
value: 0,
icon: ''
}],
loginRoleLabel: {
1: '超管',
2: '商户管理员',
3: '区域督导',
4: '驻店负责人'
},
loginRole: '',
userInfo: {}
},
lifetimes: {
attached() {
let userInfo = wx.$util.getUserInfo()
const loginRole = userInfo.subLoginUser?.loginRole
this.setData({
loginRole,
userInfo
})
}
},
/**
* 组件的方法列表
*/
methods: {
onLoad() {
}
}
})
<!--packageCrowdFunding/pages/homePage/index/index.wxml-->
<view class="layout_box">
<view class="top_box">
<view class="top_item" wx:for="{{staticDataList}}" wx:key="index">
<view class="label">{{item.label}}</view>
<view class="value">{{item.value}}</view>
<view class="tips_box">
<text>{{item.tipsLabel}}</text>
<text class="num_text">{{item.tipsValue}}</text>
</view>
</view>
</view>
<view class="content_box">
<view class="tips-text text-hide">
你好,
<text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
</view>
<view class="static_box">
<view class="static_item" wx:for="{{itemDataList}}" wx:key="index">
<view class="label">
<image src="" mode=""/>
<text>{{item.label}}</text>
</view>
<view class="value">{{item.value}}</view>
</view>
</view>
</view>
</view>
/* packageCrowdFunding/pages/homePage/index/index.wxss */
.layout_box{
width: 100%;
height: 100vh;
background: #F6FAFF;
padding-top: 6rpx;
}
.top_box{
width: calc(100% - 24rpx);
height: 212rpx;
box-sizing: border-box;
margin: 0 12rpx 20rpx 12rpx;
background: linear-gradient(0deg, #347BFF 0%, #3B8FFE 100%);
border-radius: 32rpx;
color: #FFFFFF;
padding: 32rpx 24rpx;
display: flex;
}
.top_box .top_item{
width: 33%;
}
.top_item .label{
font-size: 24rpx;
}
.top_item .value{
font-size: 40rpx;
margin: 4rpx 0 12rpx 0;
font-weight: 700;
}
.top_item .tips_box{
display: flex;
align-items: center;
word-break: break-all;
}
.top_item .tips_box text{
font-size: 20rpx;
margin-right: 12rpx;
}
.top_item .tips_box .num_text{
font-size: 28rpx;
margin: 0;
}
.content_box{
width: 100%;
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
border-radius: 32rpx 32rpx 0 0;
height: calc(100% - 238rpx);
padding: 30rpx 36rpx;
}
.tips-text{
font-size: 28rpx;
color: #2D2D2E;
}
.tips-text text{
color: #347BFF;
}
.static_box{
margin: 32rpx 0 14rpx 0;
display: grid;
grid-template-columns: repeat(auto-fill, 216rpx);
justify-content: space-between;
align-items: center;
}
.static_box .static_item{
background: #F6FCFE;
border-radius: 12rpx;
margin-bottom: 18rpx;
padding: 24rpx 8rpx;
}
.static_box .static_item .label{
display: flex;
align-items: center;
font-size: 22rpx;
color: #5A6066;
}
.static_box .static_item .label image{
width: 36rpx;
height: 36rpx;
}
.static_box .static_item .value{
margin-left: 44rpx;
font-size: 36rpx;
color: #2D2D33;
font-weight: 700;
margin-top: 8rpx;
}
/* packageCrowdFunding/pages/paidOrder/paidOrder.wxss */
<!--packageCrowdFunding/pages/paidOrder/paidOrder.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" bindtap="showStorePicker" wx:if="{{storeListRange.length}}">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_crowdFunding && userInfo.default4SStoreInfo_crowdFunding.merchantName}}</view>
<view class="arrow">
<image src="/images/back.png"/>
</view>
</view>
</navigation-bar>
<block wx:if="{{navBarHeight && showPage}}">
<order-list id="order-list" navBarHeight="{{navBarHeight}}" ActivityList="{{ActivityList}}"></order-list>
</block>
<top-select-picker show="{{showStorePicker}}" selectObj="{{selectObj}}" bindsearch="getStoreList" defaultSelectInfo="{{defaultSelectInfo}}" items="{{storeListRange}}" bindconfirm="changePicker"></top-select-picker>
<side-select-popup show="{{shopSideSelectPopup}}" />
/* packageCrowdFunding/pages/paymentSuccess/paymentSuccess.wxss */
\ No newline at end of file
......@@ -10,6 +10,11 @@ Page({
data: {
tabBarList: [
{
name: '工作台',
iconPath: '/images/tab-staging.png',
selectedIconPath: '/images/tab-staging-active.png'
},
{
name: '数字报价',
iconPath: '/images/tab-quited.png',
selectedIconPath: '/images/tab-quited-active.png'
......@@ -18,6 +23,11 @@ Page({
name: '权益提单',
iconPath: '/images/tab-equity.png',
selectedIconPath: '/images/tab-equity-active.png'
},
{
name: '设置',
iconPath: '/images/tab-setting.png',
selectedIconPath: '/images/tab-setting-active.png'
}
],
tipsPropsConfig: {
......@@ -27,7 +37,7 @@ Page({
typeText: '补录订单'
},
tabIndex: 0,
pageShow: [true, false],
pageShow: [true, false, false, false],
navBarHeight: 0,
showPicker: false,
userInfo: {},
......@@ -36,7 +46,8 @@ Page({
mode: 1,
tipsProps: false,
waitInputCount: 0,
isStaff: false
isStaff: false,
storeRange: []
// hasMode:true
},
navigator(e) {
......@@ -115,9 +126,22 @@ Page({
},
init(userInfo) {
this.setData({ userInfo })
this.getStoreList()
this.get4SStoreList()
// this.test()
},
get4SStoreList() {
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
get4SStoreList(params).then(result => {
this.setData({
storeRange: result || [],
showPage: true
})
})
},
// test (){
// const params ={
// mode: 1,
......@@ -150,41 +174,41 @@ Page({
// });
// },
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
// {
// merchantId: options.yqMerchantId,
// scene: 0,
// merchantName: options.merchantName
// }
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 0,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo?.merchantId
}) > -1
? result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo?.merchantId
})
: 0
this.setData({
storeListRange: result,
userInfo,
selectStroeIndex,
showPage: true
})
this.getMerchant4SMode()
})
.catch(err => {})
},
// getStoreList(e) {
// // 获取园区店下的4s店数据 超管拉全部数据
// let { userInfo } = this.data
// // {
// // merchantId: options.yqMerchantId,
// // scene: 0,
// // merchantName: options.merchantName
// // }
// let params = {
// merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
// merchantName: e?.detail.value,
// staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
// }
// get4SStoreList(params)
// .then(result => {
// console.log(result)
// userInfo = wx.$util.getUserInfo()
// let selectStroeIndex =
// result?.findIndex(v => {
// return v.merchantId == userInfo?.default4SStoreInfo?.merchantId
// }) > -1
// ? result?.findIndex(v => {
// return v.merchantId == userInfo?.default4SStoreInfo?.merchantId
// })
// : 0
// this.setData({
// storeListRange: result,
// userInfo,
// selectStroeIndex,
// showPage: true
// })
// this.getMerchant4SMode()
// })
// .catch(err => {})
// },
showStorePicker() {
this.setData({
......
{
"usingComponents": {
"custom-tabBar": "../components/CustomTabBar/CustomTabBar",
"custom-tabBar": "/components/CustomTabBar/CustomTabBar",
"quotation-list": "../carQuotation/index/index",
"equity-list": "../carEquity/components/EquityList/EquityList",
"store-picker": "../../components/storePicker/storePicker",
"side-select-popup": "../../../components/SideSelectPopup/SideSelectPopup",
"order-switchPopup": "/components/orderSwitchPopup/orderSwitchPopup",
"order-no-popup":"../../components/OrderNoPopup/OrderNoPopup"
"order-no-popup":"../../components/OrderNoPopup/OrderNoPopup",
"tab-mine": "/components/TabMine/TabMine"
},
"navigationStyle": "custom"
}
<!-- pages/equity/index.wxml -->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{ true }}" bindback="back" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" bindtap="showStorePicker" wx:if="{{ storeListRange.length }}">
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{ true }}" navStyle="{{tabIndex != 3 ? '' : 'background-color: rgba(0,0,0,0);box-shadow:none;'}}" bindback="back" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" wx:if="{{tabIndex != 3}}">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName}}</view>
<view class="arrow">
<image src="/images/back.png" />
</view>
</view>
<view wx:else>我的</view>
</navigation-bar>
<!-- style="margin-top:{{navBarHeight}}px" -->
<view class="layout {{waitInputCount && mode == 1?'tipsHeigh':''}}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}">
<quotation-list id="page-0" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 0?'':'hide' }} " mode="{{ mode }}" />
<equity-list id="page-1" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" />
<quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }} " mode="{{ mode }}" />
<equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" />
<tab-mine id="page-3" class="pagedetail {{ tabIndex == 3?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine>
</block>
</view>
<view class="waitOrderCon" wx:if="{{ waitInputCount && mode == 1}}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsPropsConfig }}" />
</view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#3582EE" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" />
<side-select-popup show="{{ shopSideSelectPopup }}" />
<!-- <store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" /> -->
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{storeRange}}"/>
<!-- <order-switchPopup
bind:close="closeSwitchPopup"
bind:success="navigator"
......
// pages/accountItems/accountItems.js
import api from '../../api/api.js'
const app = getApp()
import { getYQorderInfo } from '~/store/index'
import { checkYqdSuper } from '~/store/index'
import { getYQorderInfo, get4SStoreList } from '~/store/index'
import constantData from '../constant/data'
Page({
/**
......@@ -258,7 +257,7 @@ Page({
})
})
},
async getYqMerchantSceneConfig({ yqMerchantId, isSuper }) {
async getYqMerchantSceneConfig({ yqMerchantId, isSuper, result }) {
// 先取消掉
// let checkAgree = await this.checkAgree()
// if (!checkAgree) return false
......@@ -268,7 +267,25 @@ Page({
let openSceneArr = constantData.sceneList.map(val => {
return val?.sceneType
})
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr })
let {merchantId, merchantName} = result[0]
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
openSceneArr,
selectedMerchantName: merchantName,
selectedMerchantId: merchantId,
default4SStoreInfo: {
merchantId: merchantId,
merchantName: merchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: merchantId,
merchantName: merchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: merchantId,
merchantName: merchantName
}
})
wx.$router.reLaunch('pages.sceneIndex')
return
}
......@@ -284,22 +301,46 @@ Page({
wx.$util.showToast('暂无开通业务,请联系总部管理员')
} else {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr })
// 只开通一个场景直接跳转页面
if (openSceneArr.length === 1) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: openSceneArr[0] })
let pageUrl = ['packageEquity.equityPage', 'tabIndex.index', 'subvehicleConversion.index', 'packageCrowdFunding.paidOrder']
wx.$router.reLaunch(pageUrl[openSceneArr[0]])
// wx.$router.reLaunch(openSceneArr.includes(1) ? 'tabIndex.index' : 'packageEquity.equityPage')
} else if (openSceneArr.length > 1) {
wx.$router.reLaunch('pages.sceneIndex')
}
if (result?.length == 1) this.jumpPage(openSceneArr, result[0])
else wx.$router.reLaunch('pages.merchantList')
}
} else {
wx.$util.showToast(message)
}
})
},
choiceAccountLogin() {
// 仅一家4s店
jumpPage(openSceneArr, merchantItem) {
// 存储4s店信息
let {merchantId, merchantName} = merchantItem
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
selectedMerchantName: merchantName,
selectedMerchantId: merchantId,
default4SStoreInfo: {
merchantId: merchantId,
merchantName: merchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: merchantId,
merchantName: merchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: merchantId,
merchantName: merchantName
}
})
// 只开通一个场景直接跳转页面
if (openSceneArr.length === 1) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: openSceneArr[0] })
let pageUrl = constantData?.pageUrl
wx.$router.reLaunch(pageUrl[openSceneArr[0]])
} else if (openSceneArr.length > 1) {
wx.$router.reLaunch('pages.sceneIndex')
}
},
async choiceAccountLogin() {
let { loginUserInfoList } = this.data
let id = null
let yqMerchantId = null
......@@ -317,8 +358,18 @@ Page({
wx.$util.showToast('请选择账号')
return
}
// 清空4s店数据
app.globalData.storeListRange = []
wx.$util.showLoading()
this.get4SStoreList(yqMerchantId, id, isSuper)
},
get4SStoreList(yqMerchantId, id, isSuper) {
get4SStoreList({merchantId: isSuper ? undefined : yqMerchantId, staffUUID: id}).then(result => {
this.selectAccountLogin(yqMerchantId, id, result, isSuper)
})
},
selectAccountLogin(yqMerchantId, id, result, isSuper) {
api
.selectAccountLogin({
id
......@@ -339,7 +390,7 @@ Page({
const SCENE = wx.$SCENE
// debugger
// 有场景信息就跳转对应页面 没有就登录场景
SCENE && SCENE.path != 'pages/accountItems/accountItems' ? this.sceneHandle() : this.getYqMerchantSceneConfig({ yqMerchantId, isSuper })
SCENE && SCENE.path != 'pages/accountItems/accountItems' ? this.sceneHandle() : this.getYqMerchantSceneConfig({ yqMerchantId, isSuper, result })
} else {
wx.$util.showToast(message)
}
......
......@@ -33,8 +33,8 @@ const sceneList = [
const pageUrl = {
0: 'packageEquity.equityPage',
1: 'tabIndex.index',
3: 'packageCrowdFunding.paidOrder',
2: 'subvehicleConversion.index'
3: 'packageCrowdFunding.crowdFundingPage',
2: 'subvehicleConversion.conversionPage'
}
export default {
......
import constantData from '../constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) { },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() { },
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.init()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
init() {
let userInfo = wx.$util.getUserInfo()
wx.nextTick(() => {
// 没有登录信息 或无开通场景 退出登录
if (!userInfo || !Object.keys(userInfo).length || !userInfo.openSceneArr?.length) {
return app.login(true,'请重新登录')
}
// 未选择4s店
if ((userInfo?.selectedMerchantId ?? '') === '') return wx.$router.reLaunch('pages.accountItems')
// 未选择场景
if ((userInfo?.selectedSceneType ?? '') === '') return wx.$router.reLaunch('pages.sceneIndex')
if (!((userInfo?.selectedSceneType ?? '') === '')) return wx.$router.reLaunch(constantData?.pageUrl[userInfo?.selectedSceneType])
})
}
})
{
"usingComponents": {},
"navigationStyle": "custom",
"disableScroll": true
}
\ No newline at end of file
<view class="layout">
<image webp src="{{IMG_URL}}/index-loading.webp" mode="widthFix" ></image>
</view>
\ No newline at end of file
.layout {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #fff;
}
\ No newline at end of file
// pages/accountItems/accountItems.js
const app = getApp()
import { get4SStoreList } from '~/store/index'
import constantData from '../constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({
/**
* 页面的初始数据
*/
data: {
searchValue: '',
edit: false,
copyLoginUserInfoList: [],
loginUserInfoList: [],
selectedMerchantId: '',
selectedMerchantName: '',
IMG_URL
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getMerchantList()
},
open() {
this.setData({
edit: true,
inputFocus: true
})
},
getMerchantList(e) {
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
get4SStoreList(params)
.then(result => {
this.setData({
loginUserInfoList: result,
copyLoginUserInfoList: result,
flag: true
})
})
.catch(err => {})
},
jumpPage() {
let userInfo = wx.$util.getUserInfo()
let openSceneArr = userInfo?.openSceneArr || []
// 只开通一个场景直接跳转页面
if (openSceneArr.length === 1) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: openSceneArr[0] })
let pageUrl = constantData?.pageUrl
wx.$router.reLaunch(pageUrl[openSceneArr[0]])
} else if (openSceneArr.length > 1) {
wx.$router.reLaunch('pages.sceneIndex')
}
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
searchValue: value
})
},
input(e) {
let {
value
} = e.detail
this.setValue(value)
},
inputBlur(e) {
this.emit(e)
},
inputConfifm(e) {
this.emit(e)
},
emit(e) {
let {
detail:{
value
}
} = e
this.setData({
edit: false,
searchValue: value
})
this.setValue(value)
this.searchEvent()
},
// 搜索过滤
searchEvent() {
let { searchValue, copyLoginUserInfoList, selectedMerchantId } = this.data
copyLoginUserInfoList.map(val => {
val.active = false
if (val.merchantId == selectedMerchantId) val.active = true
return val
})
let filterArr = copyLoginUserInfoList.filter(val => val.merchantName.includes(searchValue) || val.merchantId == searchValue) || []
this.setData({
loginUserInfoList: filterArr
})
if (!searchValue) {
this.setData({
loginUserInfoList: copyLoginUserInfoList
})
}
},
chooseAccount(e) {
let { item } = e.currentTarget.dataset
let { loginUserInfoList } = this.data
loginUserInfoList.map(i => {
i.active = false
if (i.merchantId == item?.merchantId) {
i.active = true
}
return i
})
this.setData({
loginUserInfoList,
selectedMerchantId: item.merchantId,
selectedMerchantName: item.merchantName
})
},
choiceAccountLogin() {
let { selectedMerchantName, selectedMerchantId } = this.data
if (!selectedMerchantId) return wx.$util.showToast('请选择4S店')
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
selectedMerchantName,
selectedMerchantId,
default4SStoreInfo: {
merchantId: selectedMerchantId,
merchantName: selectedMerchantName
},
default4SStoreInfo_crowdFunding: {
merchantId: selectedMerchantId,
merchantName: selectedMerchantName
},
default4SStoreInfo_newCarConversion: {
merchantId: selectedMerchantId,
merchantName: selectedMerchantName
}
})
this.jumpPage()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
wx.hideHomeButton()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {}
})
{
"navigationBarTitleText": "选择账号"
}
\ No newline at end of file
<view class="layout" style="padding-bottom:{{isFullSucreen?'224rpx':'160rpx'}}">
<view class="title">请选择4S店</view>
<view class="search-box" wx:if="{{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10}}">
<view class="search-input">
<block wx:if="{{!edit}}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open">
<block wx:if="{{searchValue}}">
{{searchValue}}
</block>
<block wx:else>
<image src="../../images/search.png" class="icon"></image>
请输入门店名称/商户号搜索
</block>
</view>
</block>
<block wx:else>
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/>
</block>
</view>
</view>
<scroll-view class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);">
<block wx:if="{{flag}}">
<block wx:if="{{loginUserInfoList}}">
<block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="left">
<view class="icon">
<image src="{{IMG_URL}}/4s_store_icon.png"/>
</view>
<view class="name">
{{item.merchantName}}
</view>
</view>
<!-- userType 1商户号 2员工号 loginRole细化员工号角色 3区域督导 4驻店负责人 -->
<view class="right">
<view class="icon">
<image src="/images/active-arc.png" />
</view>
<view class='radio' />
</view>
</view>
</block>
</block>
<block wx:else>
<view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount">
点击刷新
</view>
</block>
</block>
<view class="scrollSpase"></view>
</scroll-view >
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class='btn' bindtap="choiceAccountLogin">确定</view>
</view>
</view>
/* pages/accountItems/accountItems.wxss */
.layout {
padding: 32rpx 24rpx 0;
font-size: 28rpx;
color: #333;
letter-spacing: 0;
background: #F8F9F9;
box-sizing: border-box;
height: 100vh;
}
.user-box {
padding: 16px;
font-size: 28rpx;
color: #333333;
}
.user-info {
display: flex;
align-items: center;
}
.user-avatar {
width: 96rpx;
height: 96rpx;
overflow: hidden;
border-radius: 100%;
margin-right: 24rpx;
}
.user-info .right{
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
}
.user-text .item {
font-size: 36rpx;
font-weight: 600;
color: #333333;
}
.user-text .merchant-name{
font-size: 26rpx;
font-weight: 400;
color: #6E6E7A;
}
.change-btn{
width: 156rpx;
height: 56rpx;
border: 2rpx solid #9B9B9E;
border-radius: 32rpx;
line-height: 56rpx;
text-align: center;
color: #6C6C70;
font-size: 26rpx;
font-weight: 400;
}
.title {
margin-bottom: 32rpx;
margin-left: 16rpx;
font-weight: 600;
color: #1B233D;
}
.search-box .search-input {
width: 100%;
height: 72rpx;
background: #fff;
border-radius: 38rpx;
padding-left: 24rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
height: 100%;
width: 100%;
}
.search-input .icon{
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
.search-input .placeholder{
color: #C8C9CC;
}
.list .scrollSpase{
height: 70rpx;
}
.items:first-child{
margin-top: 0;
}
.items {
width: 100%;
height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-top: 32rpx;
padding: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
.items {
display: flex;
box-sizing: border-box;
}
.items .left{
width: 65%;
display: flex;
align-items: center;
}
.items .left .icon{
width: 64rpx;
height: 64rpx;
margin-right: 20rpx;
}
.items .left .name{
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14px;
color: #323436;
}
.items .right{
flex-shrink: 0;
display: flex;
align-items: center;
}
.items .right .radio {
width: 32rpx;
height: 32rpx;
border: 2rpx solid #cccccc;
border-radius: 100%;
transition: all .2s;
}
.items .right .icon {
width: 36rpx;
height: 36rpx;
transition: all .2s;
display: none;
}
.items.active .right .icon {
display: block;
}
.items.active .right .radio{
display: none;
}
.btn-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 140rpx;
display: flex;
justify-content: center;
align-items: center;
z-index: 20;
background-color: #fff;
border-radius: 40rpx;
font-size: 32rpx;
color: #fff;
/* letter-spacing: 13rpx; */
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.btn {
width: calc(100% - 80rpx);
height: 80rpx;
line-height: 80rpx;
text-align: center;
background-color: #3582EE;
border-radius: 16rpx;
}
.list-not{
font-size: 40rpx;
}
\ No newline at end of file
......@@ -53,10 +53,6 @@ Page({
userBoxHeight: res?.height
})
},)
// 没有登录信息 或无开通场景 退出登录
if (!Object.keys(userInfo).length || !userInfo.openSceneArr?.length) {
app.login(true,'请重新登录')
}
},
// 切换账号
......
<!-- pages/sceneIndex/sceneIndex.wxml -->
<view class="layout" wx:if="{{isShow}}">
<view class="user-box">
<view class="user-info">
<view class="user-avatar">
<block wx:if="{{userInfo.userAvatarUrl}}">
<image src="{{userInfo.userAvatarUrl}}" />
</block>
<block wx:else>
<open-data type="userAvatarUrl" />
</block>
</view>
<view class="right">
<view class="user-text">
<!-- <view class="item">{{timeState + ',' + userInfo.accountName}}</view> -->
<view class="item">{{ '你好,' + (userInfo.name || '')}}</view>
<view class="merchant-name">{{userInfo.merchantName || ''}}</view>
</view>
<view class="change-btn" bindtap="changeAccount">切换账号</view>
</view>
</view>
</view>
<scroll-view class="scene-box" scroll-y style="height: calc(100vh - 140rpx - {{userBoxHeight}}px - {{isFullSucreen ? 34 : 0}}px - 60rpx);">
<block wx:for="{{sceneList}}" wx:key="index">
<view class="scene-item {{item.actived ? 'active' : ''}}" bindtap="selectScene" data-scene="{{item.sceneType}}" data-index="{{index}}">
......@@ -31,14 +11,14 @@
</view>
</view>
<view class="right">
<image wx:if='{{!item.actived}}' src="../../images/arrow-right.png" />
<image wx:if='{{!item.actived}}' src="/images/arrow-right.png" />
<view class="selected-class" wx:else>当前场景</view>
</view>
</view>
</block>
</scroll-view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<!-- <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="logout text-center" bindtap="logout">退出账号</view>
</view>
</view> -->
</view>
......@@ -42,7 +42,7 @@ page {
}
.scene-box{
padding: 16rpx 32rpx;
padding: 40rpx 32rpx;
overflow: hidden;
box-sizing: border-box;
}
......@@ -65,10 +65,6 @@ page {
margin-top: 0;
}
.scene-item.active{
border: 3px solid #3582EE;
}
.scene-item .left{
display: flex;
}
......@@ -104,13 +100,13 @@ page {
.scene-item .right .selected-class{
position: absolute;
top: -12rpx;
top: 0rpx;
right: 0;
width: 128rpx;
height: 48rpx;
background: #3582EE;
background: rgba(53, 130, 238, .1);
border-radius: 0 24rpx 0 24rpx;
color: #FFFFFF;
color: #3582EE;
font-size: 24rpx;
font-weight: 600;
display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!