index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <template>
  2. <view class="content">
  3. <view class="bg"></view>
  4. <view class="cont-box">
  5. <view class="user-cont">
  6. <view class="user-box" v-if="user!=null">
  7. <view class="left">
  8. <image src="../../static/images/default.png"></image>
  9. <view class="user" >
  10. <view class="username">{{user.nickName}}</view>
  11. <view class="account">{{user.deptName}}</view>
  12. </view>
  13. </view>
  14. <view class="right" @click="navTo('/pages/user/userInfo')">
  15. <image src="../../static/images/right_arrow.png"></image>
  16. </view>
  17. </view>
  18. <view class="company" v-if="user!=null">
  19. <image src="../../static/images/icon_comp.png"></image>
  20. <view class="name">{{user.deptName}}</view>
  21. </view>
  22. </view>
  23. <view class="menu-box">
  24. <view class="title-box">
  25. <image class="icon" src="../../static/images/office.png"></image>
  26. <view class="title">常用功能</view>
  27. </view>
  28. <view class="line"></view>
  29. <view class="menus">
  30. <view class="menu-item" @click="navTo('/pages/user/ai/index')">
  31. <image src="../../static/images/menu_info.png"></image>
  32. <view class="m-name">AI客服</view>
  33. </view>
  34. <view class="menu-item" @click="navTo('/pages/user/qwSop/sop')">
  35. <image src="../../static/images/menu_info.png"></image>
  36. <view class="m-name">群发SOP</view>
  37. </view>
  38. <!-- <view class="menu-item" @click="navTo('/pages/user/courseSop/sop')">
  39. <image src="../../static/images/menu_info.png"></image>
  40. <view class="m-name">课程群发SOP</view>
  41. </view> -->
  42. <view class="menu-item" @click="navTo('/pages/courseManage/index')">
  43. <image src="../../static/images/menu_info.png"></image>
  44. <view class="m-name">看课管理</view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="menu-box">
  49. <view class="title-box">
  50. <image class="icon" src="../../static/images/office.png"></image>
  51. <view class="title">客户管理</view>
  52. </view>
  53. <view class="line"></view>
  54. <view class="menus">
  55. <view class="menu-item" @click="navTo('/pages/user/crm/lineCustomer')">
  56. <image src="../../static/images/menu_info.png"></image>
  57. <view class="m-name">线索客户</view>
  58. </view>
  59. <view class="menu-item" @click="navTo('/pages/user/crm/myCustomer')">
  60. <image src="../../static/images/menu_info.png"></image>
  61. <view class="m-name">我的客户</view>
  62. </view>
  63. <view class="menu-item" @click="navTo('/pages/user/crm/importWxUser')">
  64. <image src="../../static/images/menu_info.png"></image>
  65. <view class="m-name">导入微信用户</view>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- <view class="menu-box">
  70. <view class="title-box">
  71. <image class="icon" src="../../static/images/office.png"></image>
  72. <view class="title">常用工具</view>
  73. </view>
  74. <view class="line"></view>
  75. <view class="menus">
  76. <view class="menu-item" >
  77. <image src="../../static/images/menu_info.png"></image>
  78. <view class="m-name">制单</view>
  79. </view>
  80. <view class="menu-item" >
  81. <image src="../../static/images/menu_info.png"></image>
  82. <view class="m-name">微信收款</view>
  83. </view>
  84. <view class="menu-item" >
  85. <image src="../../static/images/menu_info.png"></image>
  86. <view class="m-name">支付宝收款</view>
  87. </view>
  88. <view class="menu-item" >
  89. <image src="../../static/images/menu_info.png"></image>
  90. <view class="m-name">订单管理</view>
  91. </view>
  92. <view class="menu-item" >
  93. <image src="../../static/images/menu_info.png"></image>
  94. <view class="m-name">商品套餐包</view>
  95. </view>
  96. <view class="menu-item" >
  97. <image src="../../static/images/menu_info.png"></image>
  98. <view class="m-name">优惠券</view>
  99. </view>
  100. </view>
  101. </view> -->
  102. <view class="menu-box">
  103. <view class="title-box">
  104. <image class="icon" src="../../static/images/office.png"></image>
  105. <view class="title">其它工具</view>
  106. </view>
  107. <view class="line"></view>
  108. <view class="menus">
  109. <view class="menu-item" @click="navTo('/pages/user/users/users')">
  110. <image src="../../static/images/menu_info.png"></image>
  111. <view class="m-name">通讯录</view>
  112. </view>
  113. </view>
  114. </view>
  115. <view class="menu-box1">
  116. <view class="menu-item" @click="navTo('/pages/user/about')">
  117. <view class="left">
  118. <image src="../../static/images/icon_about_us.png"></image>
  119. <view class="label">关于我们</view>
  120. </view>
  121. <view class="right">
  122. <image src="../../static/images/right_arrow.png"></image>
  123. </view>
  124. </view>
  125. <view class="menu-item" @click="navTo('/pages/user/editUser')">
  126. <view class="left">
  127. <image src="../../static/images/icon_set.png"></image>
  128. <view class="label">设置</view>
  129. </view>
  130. <view class="right">
  131. <image src="../../static/images/right_arrow.png"></image>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="btn-box" >
  136. <view class="sub-btn" @click="showLogout()">退出登录</view>
  137. </view>
  138. </view>
  139. <u-modal :show="show" title="提示" :showCancelButton="true" @cancel="hideLogout()" @confirm="logout()" content='确认退出吗?'></u-modal>
  140. </view>
  141. </template>
  142. <script>
  143. import { getCompanyUser } from '@/api/user.js'
  144. export default {
  145. data() {
  146. return {
  147. show:false,
  148. user:null,
  149. }
  150. },
  151. onShow() {
  152. this.getCompanyUser()
  153. },
  154. methods: {
  155. showLogout(){
  156. this.show=true;
  157. },
  158. hideLogout(){
  159. this.show=false;
  160. },
  161. logout(){
  162. this.utils.logout();
  163. uni.$emit('closeWebSocket');
  164. uni.reLaunch({
  165. url: '/pages/auth/login',
  166. animationType: 'pop-in',
  167. animationDuration: 100
  168. })
  169. },
  170. navTo(url){
  171. console.log(url)
  172. uni.navigateTo({
  173. url
  174. })
  175. },
  176. getCompanyUser(){
  177. var data = {
  178. };
  179. getCompanyUser(data).then(res => {
  180. if(res.code==200){
  181. this.user=res.data;
  182. }else{
  183. }
  184. });
  185. },
  186. }
  187. }
  188. </script>
  189. <style lang="scss">
  190. page{
  191. height: 100%;
  192. background: #f6f6f6;
  193. }
  194. </style>
  195. <style scoped lang="scss">
  196. .content{
  197. position: relative;
  198. height: 100%;
  199. width: 100%;
  200. .bg{
  201. width: 100%;
  202. height: 200upx;
  203. position: absolute;
  204. top: 0;
  205. left: 0;
  206. z-index: 1;
  207. background: linear-gradient(to bottom,#115296, #b4d8ff);
  208. // border-radius: 0rpx 0rpx 60rpx 60rpx;
  209. }
  210. .cont-box{
  211. position: relative;
  212. z-index: 2;
  213. padding: 30rpx 30rpx 200rpx;
  214. .user-cont{
  215. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  216. padding: 30rpx;
  217. background-color: #fff;
  218. border-radius: 15rpx;
  219. .user-box{
  220. width: 100%;
  221. display: flex;
  222. align-items: center;
  223. justify-content: flex-start;
  224. .left{
  225. flex:1;
  226. display: flex;
  227. align-items: center;
  228. justify-content: flex-start;
  229. image{
  230. border-radius: 50%;
  231. width:120rpx;
  232. height:120rpx;
  233. }
  234. .user{
  235. margin-left: 20rpx;
  236. width: calc(100% - 140rpx);
  237. display: flex;
  238. flex-direction: column;
  239. align-items: flex-start;
  240. justify-content: flex-start;
  241. .username{
  242. font-size: 38rpx;
  243. font-family: PingFang SC;
  244. color: #111;
  245. font-weight: bold;
  246. }
  247. .account{
  248. padding: 5rpx 20rpx;
  249. border-radius: 30rpx;
  250. background-color: #115296;
  251. margin-top: 20rpx;
  252. font-size: 24rpx;
  253. font-family: PingFang SC;
  254. color: #fff;
  255. }
  256. }
  257. }
  258. .right{
  259. image{
  260. width: 15rpx;
  261. height:30rpx;
  262. }
  263. }
  264. }
  265. .company{
  266. margin-top: 30rpx;
  267. display: flex;
  268. align-items: center;
  269. justify-content: flex-start;
  270. image{
  271. width:40rpx;
  272. height:40rpx;
  273. }
  274. .name{
  275. margin-left: 15rpx;
  276. font-size: 28rpx;
  277. color: #111;
  278. }
  279. }
  280. }
  281. .menu-box{
  282. box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  283. width: 100%;
  284. margin-top: 30rpx;
  285. padding: 30rpx;
  286. background-color: #fff;
  287. border-radius: 15rpx;
  288. .title-box{
  289. display: flex;
  290. align-items: center;
  291. justify-content: flex-start;
  292. .icon{
  293. width: 30rpx;
  294. height:30rpx;
  295. }
  296. .title{
  297. margin-left: 10rpx;
  298. font-size: 28rpx;
  299. font-family: PingFang SC;
  300. color: #111;
  301. }
  302. }
  303. .line{
  304. margin-top: 15rpx;
  305. height: 0.5rpx;
  306. width: 100%;
  307. background-color: #efefef;
  308. }
  309. .menus{
  310. margin-top: 30rpx;
  311. display: flex;
  312. align-items: center;
  313. justify-content: flex-start;
  314. flex-wrap: wrap;
  315. }
  316. .menu-item{
  317. display: flex;
  318. flex-direction: column;
  319. align-items: center;
  320. justify-content: center;
  321. width: 25%;
  322. margin-bottom: 20rpx;
  323. image{
  324. width:60rpx;
  325. height:60rpx;
  326. }
  327. .m-name{
  328. margin-top: 10rpx;
  329. font-size: 24rpx;
  330. font-family: PingFang SC;
  331. color: #111;
  332. }
  333. }
  334. }
  335. .menu-box1{
  336. width: 100%;
  337. margin-top: 30rpx;
  338. padding: 0rpx 30rpx;
  339. background-color: #fff;
  340. border-radius: 15rpx;
  341. .menu-item{
  342. width: 100%;
  343. display: flex;
  344. align-items: center;
  345. justify-content: flex-start;
  346. line-height: 100rpx;
  347. .left{
  348. flex:1;
  349. display: flex;
  350. align-items: center;
  351. justify-content: flex-start;
  352. image{
  353. width: 30rpx;
  354. height:30rpx;
  355. }
  356. .label{
  357. margin-left: 10rpx;
  358. }
  359. }
  360. .right{
  361. image{
  362. width: 10rpx;
  363. height:15rpx;
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. .btn-box{
  371. margin: 60rpx 0rpx 30rpx;
  372. display: flex;
  373. align-items: center;
  374. justify-content: center;
  375. .sub-btn{
  376. // box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
  377. border: 1rpx solid #f8f8f8;
  378. background: #FFFFFF;
  379. width: 100%;
  380. height: 88upx;
  381. line-height: 88upx;
  382. text-align: center;
  383. font-size: 30upx;
  384. font-family: PingFang SC;
  385. color: #111;
  386. }
  387. }
  388. </style>