cyl/develop
wangxia 12 months ago
parent 35036268d8
commit f48fd93a64

@ -2,8 +2,9 @@
<!-- <view class="navigatorBar" hover-class="none" style="height:{{navigationBarHeight + statusBarHeight}}px;z-index:{{leftShow ? '99':'0'}};box-sizing:border-box" hover-stop-propagation="false">
<view class="tabs daotian display-flex fw500" style="width:128px;text-align:center;padding-top:{{statusBarHeight + ((navigationBarHeight - menuButtonHeight) / 2) + 4}}px;margin-top:{{}};font-size:34rpx;letter-spacing: 1px;">伯才供应链</view>
</view>-->
<view class="weui-search-bar__form"></view>
<!-- bindrefresherrefresh="onScrollRefresh" refresher-triggered="{{isTrigger}}" refresher-enabled="{{true}}" -->
<scroll-view type="nested" reverse="{{true}}" refresher-enabled="{{false}}" bindrefresherrefresh="onScrollRefresh" scroll-top="{{topNum}}" enhanced decelerationDisabled="{{false}}" bounces="{{false}}" binddragstart="listTouchStart" bindscroll="listTouchMove" style="height:calc(100vh)" enable-passive scroll-x="false" scroll-y="{{true}}" scroll-into-view="{{scrollTo}}" scroll-with-animation="false" enable-back-to-top="true">
<nested-scroll-header>
<view class hover-class="none" id="searchInputBox" hover-stop-propagation="false">
<view class="the_city v-center" style hover-class="thover" bindtap="goCity">
<view class="f16 fw500 dib oelps" style="width:36px">{{searchCityParamStorage.name == '' ? '全国' : searchCityParamStorage.shortName}}</view>
@ -23,13 +24,43 @@
</swiper>
</view>
<input type="text" value="{{inputVal}}" class="f14" bindinput="inputTyping" bindconfirm="bindconfirm" catchblur placeholder-class="f14" confirm-type="search" style="position: absolute;left: 18px;top: 0;width: 90%;height: 100%;" bindfocus="swiperToggleT" bindblur="swiperToggleF" maxlength="12" />
<view class="iconfont icon-guanbi11 f10 c9 biggerSize" wx:if="{{inputVal}}" style="color:#333;left: 80%;" catchtap="clearInput"></view>
</view>
<view class="search f16 g_flex_none" catchtap="searchKey" style="color: var(--color-ysd);">搜索</view>
</view>
<!-- <image class style="width:40px;height:40px;margin-left:12px" bindtap="toEnroll" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/ksbm.svg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image> -->
</view>
</nested-scroll-header>
<nested-scroll-header>
<view class hover-class="none" wx:if="{{true}}" hover-stop-propagation="false">
<view id="navBox" hover-class="none" hover-stop-propagation="false">
<view class="bannerContainer">
<!-- indicator-dots="{{true}}" -->
<swiper class="banner" autoplay="{{true}}" previous-margin="-3px" next-margin="-3px" circular="{{true}}" current="0" current-item-id interval="3000" duration="300" display-multiple-items="1" skip-hidden-item-layout="false">
<swiper-item class wx:for="{{bannerList}}" wx:key="index" item-id>
<image bindtap="toHot" data-path="{{item.path}}" class="size100 br8" src="{{item.img}}" mode="aspectFit|aspectFill|widthFix" binderror bindload />
</swiper-item>
</swiper>
</view>
<view class="navListContainer">
<view class="navList">
<view class="navSub" bindtap="witchNav" data-title="{{item.title}}" data-url="{{item.path}}" wx:for="{{navList}}" target wx:key="index" aria-role="navigate" open-type="navigate">
<view class="por" style="width:44px" hover-class="none" hover-stop-propagation="false">
<image class src="{{item.img}}" mode="aspectFit|aspectFill|widthFix" binderror bindload></image>
<view class="poa" wx:if="{{!readed && item.title == '消息中心'}}" style="width:10px;height:10px;border-radius:50%;right:-2px;top:-2px;background-color:#ff4400" hover-class="none" hover-stop-propagation="false"></view>
</view>
<view class="f12 lh1" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
</view>
<!-- <view class="" bindtap='witchNav' data-title="职教职培" data-url="/subPage/vocationalList/index" hover-class="none" hover-stop-propagation="false">
职教职培
</view>-->
</view>
</view>
</view>
</view>
</nested-scroll-header>
<nested-scroll-header>
<view class="sticky" id="sticky" hover-class="none" hover-stop-propagation="false">
<!-- <view class="fsa " catchtouchmove="modalMove" style> -->
<view class="fsa searchBar" style hover-class="none" hover-stop-propagation="false">
@ -410,7 +441,8 @@
</scroll-view>
</view>-->
</view>
<scroll-view id="listBox" bindscrolltolower="onScrollToLower" refresher-enabled="{{true}}" bindrefresherrefresh="onScrollRefresh" refresher-triggered="{{isTrigger}}" scroll-top="{{topNum}}" enhanced decelerationDisabled="{{false}}" bounces="{{false}}" binddragstart="listTouchStart" bindscroll="listTouchMove" style="height:calc(100vh - 180px)" enable-passive scroll-x="false" scroll-y="{{true}}" scroll-into-view="{{scrollTo}}" scroll-with-animation="false" enable-back-to-top="true">
</nested-scroll-header>
<scroll-view id="listBox" bindscrolltolower="onScrollToLower" refresher-enabled="{{true}}" bindrefresherrefresh="onScrollRefresh" refresher-triggered="{{isTrigger}}" scroll-top="{{topNum}}" enhanced decelerationDisabled="{{false}}" bounces="{{false}}" binddragstart="listTouchStart" bindscroll="listTouchMove" style="height:calc(100% - 40px)" enable-passive scroll-x="false" scroll-y="{{true}}" scroll-into-view="{{scrollTo}}" scroll-with-animation="false" enable-back-to-top="true">
<view class hover-class="none" hover-stop-propagation="false">
<view class="navigator" wx:if="{{false}}">
<!-- <view class="navigatorBar" hover-class="none" style="padding-top:{{statusBarHeight + ((navigationBarHeight - menuButtonHeight) / 2)}}px" hover-stop-propagation="false">
@ -472,32 +504,7 @@
</button>
</view>
</view>
<view class hover-class="none" wx:if="{{false}}" hover-stop-propagation="false">
<view id="navBox" hover-class="none" hover-stop-propagation="false">
<view class="bannerContainer">
<!-- indicator-dots="{{true}}" -->
<swiper class="banner" autoplay="{{true}}" previous-margin="-3px" next-margin="-3px" circular="{{true}}" current="0" current-item-id interval="3000" duration="300" display-multiple-items="1" skip-hidden-item-layout="false">
<swiper-item class wx:for="{{bannerList}}" wx:key="index" item-id>
<image bindtap="toHot" data-path="{{item.path}}" class="size100 br8" src="{{item.img}}" mode="aspectFit|aspectFill|widthFix" binderror bindload />
</swiper-item>
</swiper>
</view>
<view class="navListContainer" wx:if="{{false}}">
<view class="navList">
<view class="navSub" bindtap="witchNav" data-title="{{item.title}}" data-url="{{item.path}}" wx:for="{{navList}}" target wx:key="index" aria-role="navigate" open-type="navigate">
<view class="por" style="width:44px" hover-class="none" hover-stop-propagation="false">
<image class src="{{item.img}}" mode="aspectFit|aspectFill|widthFix" binderror bindload></image>
<view class="poa" wx:if="{{!readed && item.title == '消息中心'}}" style="width:10px;height:10px;border-radius:50%;right:-2px;top:-2px;background-color:#ff4400" hover-class="none" hover-stop-propagation="false"></view>
</view>
<view class="f12 lh1" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
</view>
<!-- <view class="" bindtap='witchNav' data-title="职教职培" data-url="/subPage/vocationalList/index" hover-class="none" hover-stop-propagation="false">
职教职培
</view>-->
</view>
</view>
</view>
</view>
<!-- 滚动公告 -->
<!-- <view class='wrapX'>
<view class="wrapOut fss">
@ -727,6 +734,8 @@
<i class="iconfont icon-huadong f12 ml4 {{leftShow?'rotate':''}}"></i>
</view>
</scroll-view>
</scroll-view>
<!-- 简版抽屉 -->
<bottom-drawer show="{{drawerShow}}" drawerType="drawerShow" bindhidedrawer="hidedrawershow" class="bottomDrawer" height="calc(100vh - {{statusBarHeight + ((navigationBarHeight - menuButtonHeight) / 2) + 41}}px)" hideTabbar="{{true}}">
<!-- <view slot="title" class hover-class="none" hover-stop-propagation="false"></view> -->

@ -1529,7 +1529,7 @@ button.collect icon::before {
#navBox {
position: relative;
overflow: hidden;
margin-top: 50px;
/* margin-top: 50px; */
/* z-index: -1; */
/* visibility: ; */
}

@ -1,58 +1,130 @@
// pages/setting/index.js
const app = getApp();
import { customRequest } from '../../utils/request.js';
Page({
/**
* 页面的初始数据
*/
data: {
version: app.globalData.version,
userInfo: {},
drawerShow: false,
teamList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
onLoad (options) { },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady () { },
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
onShow () {
this.setData({
userInfo: wx.getStorageSync('loginUser'),
});
this.getTeamList()
},
showToggle () {
this.setData({
drawerShow: true
})
},
toogleTeam (e) {
console.log(e);
let that = this
let item = e.currentTarget.dataset.item;
console.log(item);
if (wx.getStorageSync("LOGINUSER_ID") == item.id) {
return false
}
wx.showLoading({
title: '切换中...',
});
customRequest(`/yishoudan/agency/group/user/changeGroup/${item.id}`, { header: 'headers', method: 'GET', data: {} }).then((res) => {
console.log(res);
if (res.data.status == 200) {
that.checkToken(item)
app.getConfigInfo()
app.getServiceInfo()
wx.hideLoading();
wx.showToast({
title: '切换成功',
icon: 'success',
duration: 2000
})
} else {
that.getTeamList()
}
})
},
getTeamList () {
let that = this
customRequest("/yishoudan/agency/group/user/listByUser", { header: 'headers', method: 'GET', data: {} }).then((res) => {
console.log(res);
res.data.data.forEach(item => {
if (item.id == app.globalData.loginUserInfo.user.agencyId) {
item.checked = true;
}
});
console.log('res.data.data', res.data.data);
that.setData({
teamList: res.data.data
})
})
},
checkToken (_item) {
let that = this
wx.setStorageSync("LOGINUSER_ID", _item.id);
customRequest('/appLoginByToken', { header: 'headers', method: 'GET', data: {} }).then((res) => {
console.log(res);
app.globalData.agencyStatus = res.data.data.agencyStatus;
app.globalData.loginUserInfo = res.data.data;
wx.setStorageSync("loginUser", res.data.data);
wx.setStorageSync("LOGINUSER_ID", res.data.data.user.agencyId);
this.setData({
drawerShow: false
})
that.onLoad()
that.onShow()
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
onHide () { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
onUnload () { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
onPullDownRefresh () { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
onReachBottom () { },
/**
* 用户点击右上角分享
*/
onShareAppMessage1() {},
onShareAppMessage1 () { },
loginOut: function () {
wx.showModal({
title: "退出登录",
content: "确定要退出登录吗?",
confirmColor: "#1890ff",
success(res) {
success (res) {
if (res.confirm) {
console.log("用户点击确定");
app.logout().then(() => {
@ -73,4 +145,40 @@ Page({
},
});
},
logOff: function () {
var that = this;
wx.showModal({
title: "注销账号",
content: "确定要注销账号吗?该操作不可逆!",
confirmColor: "#1890ff",
success (res) {
if (res.confirm) {
customRequest("/yishoudan/updatePasswordByPwd", {
header: 'headers', method: 'post', data: {
tel: app.globalData.user.tel,
oldPassword: 'qqqq1111',
password: '1111qqqq',
}
}).then(({ data }) => {
if (data.status == 200) {
app.showTips(that, "修改成功");
setTimeout(() => {
wx.reLaunch({
url: "/pages/login/index?type=psw",
success: (result) => { },
});
}, 2000);
} else {
app.showTips(that, data.msg);
}
})
// wx.navigateBack({
// delta: 1
// })
} else if (res.cancel) {
console.log("用户点击取消");
}
},
});
},
});

@ -1,5 +1,7 @@
{
"usingComponents": {
"bottom-drawer": "../../components/bottom-drawer/index"
},
"navigationBarTitleText": "设置",
"usingComponents": {},
"backgroundColor": "#f5f5f5"
}

@ -1,5 +1,5 @@
<view class="container">
<navigator class='mt16' target url="../changePsw/index?type=2" hover-class="hcb" open-type="navigate">
<navigator class="pt16" target url="../changePsw/index?type=2" hover-class="hcb" open-type="navigate">
<view class="changePsw fsa">
<view>修改密码</view>
<view>
@ -36,9 +36,46 @@
</view>
</navigator>
</view>
<view class="br_8 bgf" catchtap="showToggle" hover-class="hcb" style hover-stop-propagation="false" wx:if="{{ userInfo.agencyStatus == 1 }}">
<view class="setting mt_10 fsa ml10 mr10" style="height:56px" hover-stop-propagation="false">
<view style>
<!-- <view class="t-icon t-icon-qiehuantuandui mr6" style="width:24px;height:24px"></view> -->
<view class="c3" style="line-height:16px">当前团队</view>
</view>
<view style="flex: 1;" class="g_flex_column_center">
<view class="g_flex_row_end" style="width: 100%;position: relative;">
<view class="g_flex_column_center g_flex_1">
<view class="g_flex_1 g_ell_1 c9" style="text-align: right;">{{userInfo.agencyName || '-'}}</view>
</view>
<view class="g_flex_column_center g_flex_none">
<view class="iconfont icon-gengduo11 c9 ml4 mt2"></view>
</view>
</view>
</view>
</view>
<bottom-drawer show="{{drawerShow}}" touchClose="{{false}}" hideTabbar="{{true}}" drawerType="drawerShow" height="60vh">
<view slot="title" class="tac fw500 f18 bb1" style="line-height:56px" hover-class="none" hover-stop-propagation="false">切换团队</view>
<scroll-view class="pb32" scroll-y="true" hover-class="none" hover-stop-propagation="{{false}}" style="height:calc(100% - 82px)">
<!-- <radio-group class="radio-group mb32" bindchange="radioChange" hover-class="none"> -->
<view class="weui-check__label fsa p16 bb1" hover-class="thover" hover-stop-propagation="true" wx:for="{{teamList}}" wx:key="name" wx:for-index="index" bindtap="toogleTeam" data-item="{{item}}">
<view class="weui-cell__bd">
<view class="f17">{{item.agencyName}}</view>
</view>
<view class style="color:#1890ff" hover-class="none" hover-stop-propagation="false">{{item.checked ? '当前':''}}</view>
</view>
<!-- </radio-group> -->
</scroll-view>
</bottom-drawer>
</view>
<view class="loginOut" catchtap="loginOut" hover-class="thover">
<view class>
<text class="f16">退出登录</text>
</view>
</view>
<view catchtap="logOff" style="position: absolute;bottom:40px; left: 50%;transform: translateX(-50%);" hover-class="thover">
<view class="tc mt120">
<text class="f12 c9">注销账号</text>
</view>
</view>
<view class="c9 f12 tc" style="position: absolute;bottom:20px; left: 50%;transform: translateX(-50%);">豫ICP备2023001993号-27A</view>
</view>

@ -84,7 +84,7 @@
</view>
<!-- 切换团队 -->
<!-- && configInfo.team -->
<view class="br_8" catchtap="showToggle" hover-class="none" style="background-color:#fff" hover-stop-propagation="false" wx:if="{{ userInfo.agencyStatus == 1 }}">
<view class="br_8" catchtap="showToggle" hover-class="none" style="background-color:#fff" hover-stop-propagation="false" wx:if="{{ userInfo.agencyStatus == 1 && false }}">
<view class="setting mt_10 fsa " style="height:56px" hover-class="thover">
<view style>
<!-- <view class="t-icon t-icon-qiehuantuandui mr6" style="width:24px;height:24px"></view> -->

@ -1,7 +1,8 @@
{
"setting": {
"compileHotReLoad": true,
"urlCheck": false
"urlCheck": false,
"skylineRenderEnable": true
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "%E4%BC%AF%E6%89%8D%E4%BE%9B%E5%BA%94%E9%93%BE",

Loading…
Cancel
Save