index.vue 9.9 KB

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