mine.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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="userAvatar!=='' ? userAvatar : 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar_default.png'"
  9. mode="aspectFill"></image>
  10. </view>
  11. <view class="userInfo">
  12. <view class="infoTextone">
  13. <text class="twoZ-font">{{ username!=='' ? 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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/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="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
  72. </image>
  73. </view>
  74. </view>
  75. <view class="optionItem" @click="gotomyRelease">
  76. <view class="option_left">
  77. <span class="option_icon">
  78. <image src="https://teacherapi.cocorobo.cn/teaching-file/static//fabu.png" mode="aspectFill">
  79. </image>
  80. </span>
  81. <text class="option_text fwb-font">我的发布</text>
  82. </view>
  83. <view class="option_right">
  84. <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
  85. </image>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="optionsItemBox">
  90. <view class="optionItem">
  91. <view class="option_left">
  92. <span class="option_icon">
  93. <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/help.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="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
  100. </image>
  101. </view>
  102. </view>
  103. <view class="optionItem" @click="gotoMineEdit">
  104. <view class="option_left">
  105. <span class="option_icon">
  106. <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/setting.png" mode="aspectFill">
  107. </image>
  108. </span>
  109. <text class="option_text fwb-font">我的设置</text>
  110. </view>
  111. <view class="option_right">
  112. <image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png" mode="aspectFill">
  113. </image>
  114. </view>
  115. </view>
  116. <!-- <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept" :progress="progress">111</beUpload> -->
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </template>
  122. <script>
  123. export default {
  124. data() {
  125. return {
  126. accept: "*",
  127. progress: {
  128. value: 50,
  129. show: false,
  130. },
  131. navBarData: {
  132. title: '我的',
  133. btn: 0
  134. },
  135. username: '',
  136. userAvatar: 'https://teacherapi.cocorobo.cn/teaching-file/static//mine/Avatar.png',
  137. isManage: ''
  138. };
  139. },
  140. methods: {
  141. getFile(val) {
  142. // console.log(val);
  143. this.ajax
  144. .post("https://cxcy.ssti.net.cn/api/UploadFirmFile", {
  145. uid: this.$store.state.userInfo.userid,
  146. file: JSON.stringify(val),
  147. })
  148. .then((res) => {
  149. if (res.data == 1) {
  150. this.$message.success("上传成功");
  151. } else {
  152. this.$message.error("上传失败");
  153. }
  154. this.getData();
  155. });
  156. },
  157. goToSub(i) {
  158. uni.navigateTo({
  159. url: '/pages/mineSubscribe/mineSubscribe'
  160. });
  161. },
  162. gotoMineClass() {
  163. uni.navigateTo({
  164. url: '/pages/mineClass/mineClass'
  165. })
  166. },
  167. gotoMineCollect() {
  168. uni.navigateTo({
  169. url: '/pages/mineCollect/mineCollect'
  170. })
  171. },
  172. gotoMineEdit() {
  173. uni.navigateTo({
  174. url: '/pages/mineEdit/mineEdit'
  175. })
  176. },
  177. gotoMineEdit() {
  178. uni.navigateTo({
  179. url: '/pages/mineEdit/mineEdit'
  180. })
  181. },
  182. gotoMineActive() {
  183. uni.navigateTo({
  184. url: '/pages/mineActive/mineActive'
  185. })
  186. },
  187. gotomyRelease() {
  188. const value = this.$store.state.user.openid;
  189. if (value == '') {
  190. uni.navigateTo({
  191. url: "/pages/login_Wechat/login_Wechat",
  192. });
  193. } else {
  194. uni.navigateTo({
  195. url: '/pages/mineRelease/mineRelease'
  196. })
  197. }
  198. }
  199. },
  200. onShow() {
  201. console.log(this.$store.state);
  202. this.userAvatar = this.$store.state.user.avatar;
  203. this.username = this.$store.state.user.username;
  204. this.isManage = this.$store.state.user.openid;
  205. console.log(this.isManage == "");
  206. }
  207. };
  208. </script>
  209. <style lang="scss" scoped>
  210. .mineBox {
  211. width: 100%;
  212. // 头像信息
  213. .userInformation {
  214. width: 100%;
  215. height: 100px;
  216. padding: 0 18px;
  217. background-color: white;
  218. display: flex;
  219. justify-content: flex-start;
  220. align-items: center;
  221. .userAvatar {
  222. flex: 1;
  223. // height: 80%;
  224. display: flex;
  225. align-items: center;
  226. image {
  227. width: 128rpx;
  228. height: 128rpx;
  229. border-radius: 50%;
  230. }
  231. }
  232. .userInfo {
  233. margin-left: 10px;
  234. flex: 4;
  235. height: 80%;
  236. display: flex;
  237. flex-direction: column;
  238. justify-content: space-evenly;
  239. .infoTextone {
  240. display: flex;
  241. align-items: center;
  242. span {
  243. &:first-child {
  244. color: #000;
  245. // font-size: 40rpx;
  246. font-weight: 600;
  247. }
  248. &.manage {
  249. border: 1px #ffa338 solid;
  250. // font-size: 11px;
  251. display: flex;
  252. white-space: nowrap;
  253. justify-content: center;
  254. align-items: center;
  255. padding: 2px 4px;
  256. border-radius: 3px;
  257. margin-right: 10rpx;
  258. color: #ffa338;
  259. margin-left: 5px;
  260. }
  261. }
  262. }
  263. .infoTexttwo {
  264. span {
  265. color: rgb(153, 153, 153);
  266. // font-size: 26rpx;
  267. }
  268. }
  269. }
  270. }
  271. // 个人资料选项
  272. .userOptionsBox {
  273. width: 100%;
  274. margin-top: 10px;
  275. .optionsItemBox {
  276. background-color: #fff;
  277. width: 100%;
  278. margin-bottom: 10px;
  279. padding: 5px 23px;
  280. .optionItem {
  281. display: flex;
  282. justify-content: space-between;
  283. align-items: center;
  284. height: 81rpx;
  285. // font-size: 28rpx;
  286. .option_left {
  287. display: flex;
  288. align-items: center;
  289. height: 40rpx;
  290. .option_icon {
  291. height: 100%;
  292. width: 40rpx;
  293. image {
  294. width: 100%;
  295. height: 100%;
  296. }
  297. }
  298. .option_text {
  299. margin-left: 10px;
  300. color: rgba(0, 0, 0, 0.8);
  301. }
  302. }
  303. .option_right {
  304. height: 40rpx;
  305. image {
  306. height: 34rpx;
  307. width: 30rpx;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. }
  314. </style>