mine.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view>
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="mineBox">
  5. <view class="userInformation" @click="gotoMineEdit">
  6. <view class="userAvatar">
  7. <image
  8. :src="isManage!=='' ? userAvatar : 'http://43.139.158.220:5007/img/static/mine/Avatar_default.png'"
  9. mode="aspectFill"></image>
  10. </view>
  11. <view class="userInfo">
  12. <view class="infoTextone">
  13. <text class="twoZ-font">{{ isManage!=='' ? username : '未登录' }}</text>
  14. <span v-if="isManage!==''" class="manage bq-font">管理员</span>
  15. </view>
  16. <view class="infoTexttwo">
  17. <text style="font-size: 26rpx;font-weight: 400;line-height: 42rpx;color: #999999;">个性签名</text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="userOptionsBox">
  22. <view class="optionsItemBox">
  23. <view class="optionItem" @click="goToSub(1)">
  24. <view class="option_left">
  25. <span class="option_icon">
  26. <image src="http://43.139.158.220:5007/img/static/mine/Subscribe.png" mode="aspectFill">
  27. </image>
  28. </span>
  29. <text class="option_text fwb-font">我的订阅</text>
  30. </view>
  31. <view class="option_right">
  32. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" mode="aspectFill">
  33. </image>
  34. </view>
  35. </view>
  36. <view class="optionItem" @click="gotoMineCollect">
  37. <view class="option_left">
  38. <span class="option_icon">
  39. <image src="http://43.139.158.220:5007/img/static/mine/Collect.png" mode="aspectFill">
  40. </image>
  41. </span>
  42. <text class="option_text fwb-font">我的收藏</text>
  43. </view>
  44. <view class="option_right">
  45. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" mode="aspectFill">
  46. </image>
  47. </view>
  48. </view>
  49. <view class="optionItem" @click="gotoMineActive">
  50. <view class="option_left">
  51. <span class="option_icon">
  52. <image src="http://43.139.158.220:5007/img/static/mine/active.png" mode="aspectFill">
  53. </image>
  54. </span>
  55. <text class="option_text fwb-font">我的活动</text>
  56. </view>
  57. <view class="option_right">
  58. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" mode="aspectFill">
  59. </image>
  60. </view>
  61. </view>
  62. <view class="optionItem" @click="gotoMineClass">
  63. <view class="option_left">
  64. <span class="option_icon">
  65. <image src="http://43.139.158.220:5007/img/static/mine/myClass.png" mode="aspectFill">
  66. </image>
  67. </span>
  68. <text class="option_text fwb-font">我的教研室</text>
  69. </view>
  70. <view class="option_right">
  71. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" mode="aspectFill">
  72. </image>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="optionsItemBox">
  77. <view class="optionItem">
  78. <view class="option_left">
  79. <span class="option_icon">
  80. <image src="http://43.139.158.220:5007/img/static/mine/help.png" mode="aspectFill">
  81. </image>
  82. </span>
  83. <text class="option_text fwb-font">反馈帮助</text>
  84. </view>
  85. <view class="option_right">
  86. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" mode="aspectFill">
  87. </image>
  88. </view>
  89. </view>
  90. <view class="optionItem" @click="gotoMineEdit">
  91. <view class="option_left">
  92. <span class="option_icon">
  93. <image src="http://43.139.158.220:5007/img/static/mine/setting.png" mode="aspectFill">
  94. </image>
  95. </span>
  96. <text class="option_text fwb-font">我的设置</text>
  97. </view>
  98. <view class="option_right">
  99. <image src="http://43.139.158.220:5007/img/static/mine/arrow-right.png" mode="aspectFill">
  100. </image>
  101. </view>
  102. </view>
  103. <!-- <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept" :progress="progress">111</beUpload> -->
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </template>
  109. <script>
  110. export default {
  111. data() {
  112. return {
  113. accept: "*",
  114. progress: {
  115. value: 50,
  116. show: false,
  117. },
  118. navBarData: {
  119. title: '我的',
  120. btn: 0
  121. },
  122. username: '刘雨潼',
  123. userAvatar: 'http://43.139.158.220:5007/img/static/mine/Avatar.png',
  124. isManage: ''
  125. };
  126. },
  127. methods: {
  128. getFile(val) {
  129. // console.log(val);
  130. this.ajax
  131. .post("https://cxcy.ssti.net.cn/api/UploadFirmFile", {
  132. uid: this.$store.state.userInfo.userid,
  133. file: JSON.stringify(val),
  134. })
  135. .then((res) => {
  136. if (res.data == 1) {
  137. this.$message.success("上传成功");
  138. } else {
  139. this.$message.error("上传失败");
  140. }
  141. this.getData();
  142. });
  143. },
  144. goToSub(i) {
  145. uni.navigateTo({
  146. url: '/pages/mineSubscribe/mineSubscribe'
  147. });
  148. },
  149. gotoMineClass() {
  150. uni.navigateTo({
  151. url: '/pages/mineClass/mineClass'
  152. })
  153. },
  154. gotoMineCollect() {
  155. uni.navigateTo({
  156. url: '/pages/mineCollect/mineCollect'
  157. })
  158. },
  159. gotoMineEdit() {
  160. uni.navigateTo({
  161. url: '/pages/mineEdit/mineEdit'
  162. })
  163. },
  164. gotoMineEdit() {
  165. uni.navigateTo({
  166. url: '/pages/mineEdit/mineEdit'
  167. })
  168. },
  169. gotoMineActive() {
  170. uni.navigateTo({
  171. url: '/pages/mineActive/mineActive'
  172. })
  173. }
  174. },
  175. onShow() {
  176. console.log(this.$store.state.user.openid, 11111);
  177. this.isManage = this.$store.state.user.openid;
  178. console.log(this.isManage == "");
  179. }
  180. };
  181. </script>
  182. <style lang="scss" scoped>
  183. .mineBox {
  184. width: 100%;
  185. // 头像信息
  186. .userInformation {
  187. width: 100%;
  188. height: 100px;
  189. padding: 0 18px;
  190. background-color: white;
  191. display: flex;
  192. justify-content: flex-start;
  193. align-items: center;
  194. .userAvatar {
  195. flex: 1;
  196. // height: 80%;
  197. display: flex;
  198. align-items: center;
  199. image {
  200. width: 128rpx;
  201. height: 128rpx;
  202. }
  203. }
  204. .userInfo {
  205. margin-left: 10px;
  206. flex: 4;
  207. height: 80%;
  208. display: flex;
  209. flex-direction: column;
  210. justify-content: space-evenly;
  211. .infoTextone {
  212. display: flex;
  213. align-items: center;
  214. span {
  215. &:first-child {
  216. color: #000;
  217. // font-size: 40rpx;
  218. font-weight: 600;
  219. }
  220. &.manage {
  221. border: 1px #ffa338 solid;
  222. // font-size: 11px;
  223. display: flex;
  224. white-space: nowrap;
  225. justify-content: center;
  226. align-items: center;
  227. padding: 2px 4px;
  228. border-radius: 3px;
  229. margin-right: 10rpx;
  230. color: #ffa338;
  231. margin-left: 5px;
  232. }
  233. }
  234. }
  235. .infoTexttwo {
  236. span {
  237. color: rgb(153, 153, 153);
  238. // font-size: 26rpx;
  239. }
  240. }
  241. }
  242. }
  243. // 个人资料选项
  244. .userOptionsBox {
  245. width: 100%;
  246. margin-top: 10px;
  247. .optionsItemBox {
  248. background-color: #fff;
  249. width: 100%;
  250. margin-bottom: 10px;
  251. padding: 5px 23px;
  252. .optionItem {
  253. display: flex;
  254. justify-content: space-between;
  255. align-items: center;
  256. height: 81rpx;
  257. // font-size: 28rpx;
  258. .option_left {
  259. display: flex;
  260. align-items: center;
  261. height: 40rpx;
  262. .option_icon {
  263. height: 100%;
  264. width: 40rpx;
  265. image {
  266. width: 100%;
  267. height: 100%;
  268. }
  269. }
  270. .option_text {
  271. margin-left: 10px;
  272. color: rgba(0, 0, 0, 0.8);
  273. }
  274. }
  275. .option_right {
  276. height: 40rpx;
  277. image {
  278. height: 34rpx;
  279. width: 30rpx;
  280. }
  281. }
  282. }
  283. }
  284. }
  285. }
  286. </style>