index.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <template>
  2. <view class="main">
  3. <navbar :config="config" backColor="#666"></navbar>
  4. <view class="box">
  5. <view class="card">
  6. <view class="userBox">
  7. <view class="userBox_t">
  8. <view>
  9. <view class="user_name">{{userInfo.real_name}}</view>
  10. <view class="user_item">
  11. <text class="iconfont2">&#xe728;</text>
  12. <view>
  13. <view v-if="userInfo.service_system_province==0">普通会员</view>
  14. <view v-if="userInfo.service_system_province==1">创客</view>
  15. <view v-if="userInfo.service_system_province==2">爱心小屋</view>
  16. <view v-if="userInfo.service_system_province==3">服务驿站</view>
  17. <view v-if="userInfo.service_system_province==4">服务中心</view>
  18. <view v-if="userInfo.service_system_province==5">市级</view>
  19. <view v-if="userInfo.service_system_province==6">省级公司</view>
  20. <view v-if="userInfo.service_system_province==7">大区公司</view>
  21. </view>
  22. </view>
  23. <view class="user_item">
  24. <text class="iconfont2">&#xe744;</text>
  25. <view>{{userInfo.register_time?userInfo.register_time.substr(0,11):''}}</view>
  26. </view>
  27. <view class="user_item">
  28. <text class="iconfont2">&#xe643;</text>
  29. <view>推荐人:{{userInfo.invited}}</view>
  30. </view>
  31. </view>
  32. <view class="user_img">
  33. <image :src="userInfo.head_photo" mode="" v-if="userInfo.head_photo"></image>
  34. <image :src="$mConfig.staticUrl+'/head-on.png'" mode="" v-else></image>
  35. </view>
  36. </view>
  37. <view class="user_item" style="align-items:flex-start" v-if="userInfo.service_system_province!=0&&userInfo.service_system_province!=1">
  38. <text class="iconfont2">&#xe642;</text>
  39. <view class="areaBox">所属区域:
  40. {{userInfo.addr}}
  41. </view>
  42. </view>
  43. <view class="user_c">
  44. <view>
  45. <view class="user_c_lab">可提现服务积分</view>
  46. <view class="user_c_money">
  47. {{userInfo.commission_able}}
  48. </view>
  49. </view>
  50. <view class="user_c_btn" @click="goWithdraw()">去提现</view>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="card otherCls">
  55. <view class="otherCls_title">其他工具</view>
  56. <view class="listBox">
  57. <view class="list_item" @click="goOrder">
  58. <view>
  59. <image src="/static/operationCenter/tools1.png" mode=""></image>
  60. </view>
  61. <view class="list_item_lab">推广订单</view>
  62. <view class="list_item_money" v-if="false">{{hintObj.extension_value.toFixed(2)}}</view>
  63. </view>
  64. <view class="list_item" @click="goNewPull">
  65. <view>
  66. <image src="/static/operationCenter/tools2.png" mode=""></image>
  67. </view>
  68. <view class="list_item_lab">推广拉新</view>
  69. <view class="list_item_money" v-if="false">{{hintObj.pull_new_value.toFixed(2)}}</view>
  70. </view>
  71. <view class="list_item" @click="goWdDetail">
  72. <view>
  73. <image src="/static/operationCenter/tools3.png" mode=""></image>
  74. </view>
  75. <view class="list_item_lab">提现明细</view>
  76. <view class="list_item_money" v-if="false">{{hintObj.withdrawal_num}}</view>
  77. </view>
  78. <view class="list_item" @click="goInvitationCode">
  79. <view>
  80. <image src="/static/operationCenter/tools4.png" mode=""></image>
  81. </view>
  82. <view class="list_item_lab">推广海报</view>
  83. </view>
  84. <view class="list_item" @click="goMyGroup">
  85. <view>
  86. <image src="/static/operationCenter/tools5.png" mode=""></image>
  87. </view>
  88. <view class="list_item_lab">我的团队</view>
  89. </view>
  90. <view class="list_item" @click="upgrade">
  91. <view>
  92. <image src="/static/operationCenter/tools6.png" mode=""></image>
  93. </view>
  94. <view class="list_item_lab">我要升级</view>
  95. </view>
  96. <view class="list_item" @click="goBankCardList">
  97. <view>
  98. <image src="/static/operationCenter/tools7.png" mode=""></image>
  99. </view>
  100. <view class="list_item_lab">收款账户</view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </template>
  107. <script>
  108. export default {
  109. data() {
  110. return {
  111. config: {
  112. back: true,
  113. title: '运营中心',
  114. color: '#1A1A1A',
  115. backgroundColor: [1, "#ffffff"],
  116. statusBarFontColor: 'black',
  117. },
  118. userInfo: {
  119. user_service_area_list: [{}]
  120. },
  121. hintObj:{}
  122. }
  123. },
  124. onLoad() {
  125. },
  126. onShow() {
  127. this.getInfo();
  128. this.getHint()
  129. },
  130. methods: {
  131. // 跳转 去提现
  132. goWithdraw() {
  133. uni.navigateTo({
  134. url: "/pages/operationCenter/withdraw"
  135. })
  136. },
  137. // 跳转 我的团队
  138. goMyGroup() {
  139. let obj = {
  140. real_name: this.userInfo.real_name,
  141. service_system_province: this.userInfo.service_system_province,
  142. head_photo: this.userInfo.head_photo
  143. }
  144. uni.navigateTo({
  145. url: "/pages/operationCenter/myGroup?userInfo=" + JSON.stringify(obj)
  146. })
  147. },
  148. // 获取推广订单 推广拉新 提现明细 3个提示
  149. getHint(){
  150. this.$http.get('/userordergains/statistics').then(res=>{
  151. if(res&&res.code==200){
  152. this.hintObj=res.data
  153. }
  154. })
  155. },
  156. // 跳转 推广拉新
  157. goNewPull() {
  158. let obj = {
  159. real_name: this.userInfo.real_name,
  160. service_system_province: this.userInfo.service_system_province,
  161. head_photo: this.userInfo.head_photo
  162. }
  163. uni.navigateTo({
  164. url: "/pages/operationCenter/newPull?userInfo=" + JSON.stringify(obj)
  165. })
  166. },
  167. // 跳转 推广订单
  168. goOrder() {
  169. uni.navigateTo({
  170. url: "/pages/user/distribution/moneyList"
  171. })
  172. },
  173. // 跳转 提现明细
  174. goWdDetail() {
  175. uni.navigateTo({
  176. url: "/pages/user/distribution/wdDetail"
  177. })
  178. },
  179. // 跳转 收款账户
  180. goBankCardList() {
  181. uni.navigateTo({
  182. url: "/pages/user/bankCard/bankCardList"
  183. })
  184. },
  185. // 点击 我要升级
  186. upgrade() {
  187. uni.navigateTo({
  188. url: "/pages/entrepreneurshipZone/index"
  189. })
  190. },
  191. // 跳转 推广海报
  192. goInvitationCode() {
  193. uni.navigateTo({
  194. url: "/pages/user/invitationCode/invitationCode"
  195. })
  196. },
  197. // 获取信息
  198. getInfo() {
  199. this.$http.get(`/account/operating/center/info`).then(res => {
  200. if (res && res.code == 200) {
  201. this.userInfo = res.data;
  202. // userInfo.user_service_area_list
  203. this.userInfo.addr = ""
  204. this.userInfo.user_service_area_list.forEach(v => {
  205. this.userInfo.addr += v.province_name + v.city_name + v.area_name + v
  206. .street_name + v.community_name+' '
  207. })
  208. }
  209. })
  210. },
  211. }
  212. }
  213. </script>
  214. <style lang="scss" scoped>
  215. .main {
  216. background: #f8f8f8;
  217. .box {
  218. margin-top: 30rpx;
  219. padding: 0 30rpx 30rpx 30rpx;
  220. }
  221. .card {
  222. background: #ffffff;
  223. padding: 30rpx;
  224. border-radius: 20rpx;
  225. // filter: blur(.5rpx);
  226. box-shadow: 0rpx 4rpx 8rpx 0rpx #f1f1f1;
  227. }
  228. .userBox {
  229. .userBox_t {
  230. display: flex;
  231. justify-content: space-between;
  232. }
  233. .user_name {
  234. font-size: 36rpx;
  235. color: #1A1A1A;
  236. font-weight: 700;
  237. }
  238. .user_item {
  239. display: flex;
  240. align-items: center;
  241. margin-top: 10rpx;
  242. >view {
  243. margin-left: 10rpx;
  244. color: #808080;
  245. }
  246. text {
  247. font-size: 32rpx;
  248. color: #20A634;
  249. }
  250. .areaBox {
  251. display: flex;
  252. flex-wrap: wrap;
  253. word-wrap: break-word;
  254. word-wrap: break-word;
  255. >view {
  256. // margin-right: 20rpx;
  257. }
  258. }
  259. }
  260. .user_c {
  261. background: #0b844a;
  262. border-radius: 20rpx;
  263. display: flex;
  264. justify-content: space-between;
  265. align-items: center;
  266. padding: 30rpx;
  267. margin-top: 30rpx;
  268. .user_c_lab {
  269. font-size: 30rpx;
  270. color: #FFFFFF;
  271. }
  272. .user_c_money {
  273. font-size: 38rpx;
  274. color: #FFFFFF;
  275. text {
  276. font-size: 24rpx;
  277. }
  278. }
  279. .user_c_btn {
  280. width: 195rpx;
  281. height: 80rpx;
  282. display: flex;
  283. justify-content: center;
  284. align-items: center;
  285. background: #FFFFFF;
  286. border-radius: 40rpx;
  287. color: #0B844A;
  288. font-size: 28rpx;
  289. }
  290. }
  291. }
  292. .user_img image {
  293. width: 130rpx;
  294. height: 130rpx;
  295. border-radius: 50%;
  296. margin-top: 40rpx;
  297. }
  298. .otherCls {
  299. padding: 30rpx;
  300. margin-top: 30rpx;
  301. .otherCls_title {
  302. color: #1A1A1A;
  303. font-size: 30rpx;
  304. font-weight: 700;
  305. padding-bottom: 30rpx;
  306. border-bottom: 1rpx solid #e6e6e6;
  307. }
  308. .listBox {
  309. padding-top: 30rpx;
  310. display: flex;
  311. flex-wrap: wrap;
  312. .list_item {
  313. width: 110rpx;
  314. height: 200rpx;
  315. display: flex;
  316. flex-direction: column;
  317. align-items: center;
  318. margin-right: 150rpx;
  319. image {
  320. width: 100rpx;
  321. height: 100rpx;
  322. }
  323. .list_item_lab {
  324. font-size: 26rpx;
  325. color: #1A1A1A;
  326. }
  327. .list_item_money {
  328. font-size: 24rpx;
  329. color: #808080;
  330. }
  331. &:nth-child(3n) {
  332. margin-right: 0;
  333. }
  334. }
  335. }
  336. }
  337. }
  338. </style>