index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  1. <template>
  2. <view class="container" :data-theme="theme">
  3. <!-- :style="userInfo.avatar?{ backgroundImage: `url(${userInfo.avatar})` }: ''" -->
  4. <!-- #ifdef MP || APP -->
  5. <NavBar navTitle="个人主页" :isBackgroundColor="false" iconColor='#fff'></NavBar>
  6. <!-- #endif -->
  7. <view class="header">
  8. <view class="header-bg" :style="{'background-image': userInfo.avatar}">
  9. <img :src="userInfo.avatar" alt="">
  10. <view class="header-bg-mc"></view>
  11. </view>
  12. <view class="user_wrapper flex-between-center">
  13. <image v-if="userInfo.userLevelIcon" class="level_icon" :src="userInfo.userLevelIcon" alt="">
  14. <view class="flex-y-center row-middle">
  15. <image :src="userInfo.avatar || urlDomain+'crmebimage/presets/morenT.png'" class="picture">
  16. </image>
  17. <view class="user_text flex-1">
  18. <view class="name acea-row">
  19. <text>{{userInfo.isLogoff ? "用户已注销": (userInfo.nickname || '')}}</text>
  20. </view>
  21. <!-- <view v-if="userInfo.id" class="user_id">ID: {{userInfo.id || ''}}</view> -->
  22. <view class="flex-between-center mt-16" @click="onEdit('school')">
  23. <view class="user_id">学校: {{school || '暂无'}}</view>
  24. <text v-show="userInfo.id==uid" class="ml10 iconfont icon-fabuzhongcao"></text>
  25. </view>
  26. </view>
  27. </view>
  28. <view v-if="id && id!=uid" @click.stop="followAuthor">
  29. <button v-if="!userInfo.isConcerned" class="follow_btn focus">
  30. <text class="iconfont icon-jiahao2"></text>关注
  31. </button>
  32. <button v-else class="follow_btn focused">已关注</button>
  33. </view>
  34. <view v-if="userInfo.id==uid">
  35. <navigator hover-class="none" :url="`/pages/discover/discover_release/index?fair=${true}`" class="follow_btn focus bg-color">
  36. 去发布
  37. </navigator>
  38. </view>
  39. </view>
  40. <view class="acea-row plant_info" @click="onEdit('signature')">
  41. <view v-if="!userInfo.signature && userInfo.id==uid">点击可编辑个性签名</view>
  42. <view class="" v-if="userInfo.signature" style="width: 92%;">
  43. <view class="acea-row" v-if="userInfo.isMore || userInfo.signature.length<=30">
  44. <text class="signature">{{userInfo.signature}}</text>
  45. <text v-if="userInfo.isMore" class="more" @click.stop="moreTap">收起</text>
  46. </view>
  47. <view v-else class="acea-row">
  48. <text class="info signature">{{userInfo.signature.slice(0,23)}}...</text>
  49. <text class="more" @click.stop="moreTap"> 展开</text>
  50. </view>
  51. </view>
  52. <text v-show="userInfo.id==uid" class="ml10 iconfont icon-fabuzhongcao"></text>
  53. </view>
  54. <view class="plant_info" style="padding-bottom: 30rpx;">
  55. <view class="count_wrapper acea-row">
  56. <navigator :url="!id ? '/pages/discover/discover_follow/index?type=follow' : ''" class="item" hover-class="none">
  57. <text class="mr10">{{userInfo.concernedNum}}</text> 关注
  58. </navigator>
  59. <navigator :url="!id ? '/pages/discover/discover_follow/index?type=fans' : ''" class="item" hover-class="none">
  60. <text class="mr10">{{userInfo.fansNum}}</text> 粉丝
  61. </navigator>
  62. <view class="item">
  63. <text class="mr10">{{userInfo.likeNum}}</text> 获赞
  64. </view>
  65. </view>
  66. </view>
  67. <view v-if="!id && isShow" class="tab_count relative">
  68. <text @click.stop="changeTab(0)" :class="tab==0 ? 'on' : ''">我发布的</text>
  69. <text @click.stop="changeTab(1)" :class="tab==1 ? 'on' : ''">我想要的</text>
  70. <text @click.stop="changeTab(2)" :class="tab==2 ? 'on' : ''">我收藏的</text>
  71. <text @click.stop="changeTab(3)" :class="tab==3 ? 'on' : ''">我购买的</text>
  72. </view>
  73. </view>
  74. <view class="main">
  75. <view class="tab-conts">
  76. <view v-if="list.length > 0 && tab!==3" class="goods-wrap flex-1">
  77. <view class="goods">
  78. <!-- <WaterfallsFlow v-if="list.length" :wfList="list" :fromType="1" fromTo="home">
  79. </WaterfallsFlow> -->
  80. <WaterfallsFlow :wfList='list' :type="1" :isDynamics="true" :userFair="true" :isManage="manage">
  81. <template slot-scope="{item}">
  82. <WaterfallsFlowItem :item="item" :type="1" :isStore="1" />
  83. </template>
  84. </WaterfallsFlow>
  85. </view>
  86. </view>
  87. <view class='my-order' v-else>
  88. <view class='list'>
  89. <view class='item' v-for="(item,index) in list" :key="index">
  90. <view class='title acea-row row-between-wrapper'>
  91. <view class="acea-row row-middle">
  92. <view v-if="item.merName">
  93. <navigator :url="`/pages/merchant/home/index?merId=${item.merId}`" hover-class="none">
  94. <text class='iconfont icon-shangjiadingdan mr10'></text>
  95. <text class="mr10">{{item.merName}}</text>
  96. <text class='iconfont icon-xiangyou'></text>
  97. </navigator>
  98. </view>
  99. <view v-else>
  100. <text class="mr10">{{item.orderNo}}</text>
  101. </view>
  102. </view>
  103. <view v-if="item.refundStatus == 3" class='font_color'>已退款</view>
  104. <template v-else>
  105. <view class='font_color'>{{item.status | orderStatusFilter}}</view>
  106. </template>
  107. </view>
  108. <view v-for="(items,indexs) in item.orderInfoList" :key="indexs">
  109. <view @click='goOrderDetails(item)' class='item-info acea-row row-between row-top'>
  110. <view class='pictrue'>
  111. <easy-loadimage mode="widthFix" :image-src="items.image"></easy-loadimage>
  112. </view>
  113. <view class='text acea-row row-between'>
  114. <view class="nameBox">
  115. <view class='name line2'>
  116. <span v-if="Number(item.type) > 0 && Number(item.type) < 3" class="activity bg_color">{{item.type | orderTypeFilter}}</span>
  117. <span v-if="Number(item.secondType) === 1" class="activity bg_color">积分</span>
  118. <span>{{items.productName}}</span>
  119. </view>
  120. <view class="sku line1">{{items.sku}}</view>
  121. </view>
  122. <view class='money'>
  123. <view>¥{{items.price}}</view>
  124. <view>x{{items.payNum}}</view>
  125. </view>
  126. </view>
  127. </view>
  128. <view v-if="items.applyRefundNum && item.refundStatus > -1" class="text-24rpx font-color oppoSans-R mr-20px px-30 mt-14">
  129. 售后申请数量:{{ items.applyRefundNum }}
  130. </view>
  131. </view>
  132. <view class='totalPrice' :class="item.status===0?'no-border':''">{{item.totalNum}}
  133. 件商品,总金额
  134. <text class='money semiBold'> ¥{{item.payPrice}}</text>
  135. </view>
  136. <!-- <view v-if="item.status===0" class="mx-20 flex">
  137. <view class="tips w-full px-20 f-s-26">
  138. 付款提醒<text class="ml-20 text-999">请在{{item.expirationTime}}前完成支付!</text>
  139. </view>
  140. </view> -->
  141. <!-- 订单状态(0:待支付,1:待发货,2:部分发货, 3:待核销,4:待收货,5:已收货,6:已完成,9:已取消) -->
  142. <view class='bottom acea-row row-right row-middle'>
  143. <view class='bnt cancelBnt' v-if="item.status === 0" @click='cancelOrder(index,item.orderNo)'>
  144. 取消订单
  145. </view>
  146. <view class='bnt bg_color' v-if="item.status === 0" @click='goPay(item)'>
  147. 立即付款
  148. </view>
  149. <view class='bnt bg_color' v-if="((item.paid || item.status == 9)&&item.type!=2)||(item.type==2&&item.groupBuyRecordStatus!==0)"
  150. @click='goOrderDetails(item)'>
  151. 查看详情</view>
  152. <view class='bnt cancelBnt' v-if="item.status==6 || item.status==9" @click='delOrder(item.orderNo,index)'>
  153. 删除订单
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="empty-boxs noContent" v-if="list.length == 0 && !loading">
  160. <emptyPage title="暂无更多内容~" mTop="13%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'">
  161. </emptyPage>
  162. </view>
  163. <view class='loadingicon acea-row row-center-wrapper'>
  164. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>
  165. <view class="end" :hidden="loading || list.length == 0"><text :class="loaded ? 'loaded' : ''">{{loadTitle}}</text>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. <uni-popup ref="inputDialog" type="dialog">
  171. <view v-if="isShowSignature" class="tui-modal-custom">
  172. <view class="fs-32 fw-500 lh-44rpx text-center">{{fieldStr == 'signature' ? '编辑简介' : '编辑学校'}}</view>
  173. <view class="mt-24 bg--w111-f5f5f5 rd-16rpx p-24">
  174. <textarea v-if="fieldStr == 'signature'" class="w-full fs-26 h-342" ref="myTextarea" v-model="signature" :focus="focus"
  175. :always-embed="true" :adjust-position="true" cursor-spacing="85rpx" placeholder="请输入内容" :maxlength="100" name="desc" />
  176. <input v-if="fieldStr == 'school'" class="placeholder" type='text' v-model='school' :focus="focus"
  177. placeholder='请输入学校' placeholder-class='placeholder'></input>
  178. </view>
  179. <view class="flex-between-center mt-40">
  180. <view class="w-244 h-72 rd-36rpx flex-center fs-26 font-color close-btn" @tap="handleInputClose">取消
  181. </view>
  182. <view class="w-244 h-72 rd-36rpx flex-center bg-color text--w111-fff fs-26"
  183. @tap="handleInputConfirm">保存
  184. </view>
  185. </view>
  186. </view>
  187. </uni-popup>
  188. </view>
  189. </template>
  190. <script>
  191. // +----------------------------------------------------------------------
  192. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  193. // +----------------------------------------------------------------------
  194. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  195. // +----------------------------------------------------------------------
  196. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  197. // +----------------------------------------------------------------------
  198. // | Author: CRMEB Team <admin@crmeb.com>
  199. // +----------------------------------------------------------------------
  200. import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
  201. import WaterfallsFlowItem from '@/components/discoverFlowItem/discoverFlowItem.vue'
  202. import emptyPage from '@/components/emptyPage.vue';
  203. import NavBar from '@/components/navBar.vue';
  204. import {
  205. userHomeApi,
  206. myHomeApi,
  207. authorNoteApi,
  208. mySecondHandListApi,
  209. myLikeListApi,
  210. secondHandListApi,
  211. secondHandFollowListApi,
  212. editSignatureApi,
  213. editSchoolApi
  214. } from '@/api/discover.js';
  215. import {
  216. getSecondHandDetail,
  217. secondHandTake,
  218. secondHandDel,
  219. secondHandCancel,
  220. secondHandStatusImgApi,
  221. secondHandSend,
  222. secondHandOrderList
  223. } from '@/api/secondHand.js';
  224. import {
  225. ProductTypeEnum,
  226. } from "@/enums/productEnums";
  227. import {
  228. Debounce
  229. } from '@/utils/validate.js';
  230. import {
  231. toLogin
  232. } from '@/libs/login.js';
  233. import {
  234. mapGetters
  235. } from "vuex";
  236. import {
  237. discoverFollowAuthor
  238. } from '@/libs/follow.js';
  239. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  240. const app = getApp();
  241. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  242. export default {
  243. components: {
  244. WaterfallsFlow,
  245. WaterfallsFlowItem,
  246. emptyPage,
  247. NavBar,
  248. easyLoadimage
  249. },
  250. data() {
  251. return {
  252. sysHeight: sysHeight,
  253. urlDomain: this.$Cache.get("imgHost"),
  254. theme: app.globalData.theme,
  255. ProductTypeEnum: ProductTypeEnum,
  256. list: [], // 内容列表
  257. loadTitle: '加载更多',
  258. loading: false,
  259. loaded: false,
  260. isShowAuth: false, //是否隐藏授权
  261. isAuto: false, //没有授权的不会自动授权
  262. userInfo: {},
  263. where: {
  264. page: 1,
  265. limit: 10
  266. },
  267. tab: 0,
  268. id: '', //作者id
  269. isShow: false,
  270. focus: false,
  271. isShowSignature: false, // 是否显示简介编辑内容
  272. signature: '', //弹窗中的签名
  273. school: '',
  274. fieldStr: '',
  275. manage: 1
  276. }
  277. },
  278. created() {},
  279. computed: {
  280. ...mapGetters(['isLogin', 'uid']),
  281. },
  282. watch: {},
  283. onLoad: function(options) {
  284. this.id = options.id ? options.id : '';
  285. },
  286. onShow() {
  287. // if (this.id) {
  288. // this.isShow = false
  289. // this.getUserHome(this.id);
  290. // this.authorNoteList();
  291. // } else {
  292. this.isShow = true
  293. this.getMyHome();
  294. this.myNoteList();
  295. // }
  296. },
  297. onReady() {},
  298. mounted: function() {},
  299. methods: {
  300. moreTap() {
  301. this.$set(this.userInfo, 'isMore', !this.userInfo.isMore)
  302. },
  303. //个性签名取消
  304. handleInputClose() {
  305. this.$refs.inputDialog.close()
  306. this.isShowSignature = false;
  307. },
  308. //个性签名保存
  309. handleInputConfirm() {
  310. const api = this.fieldStr == 'signature' ? editSignatureApi({signature: this.signature}) : editSchoolApi({school: this.school});
  311. api.then(res => {
  312. uni.showToast({
  313. title: res.data,
  314. icon: 'none'
  315. })
  316. this.getMyHome();
  317. }).catch(err => {
  318. uni.showToast({
  319. title: err,
  320. icon: 'none'
  321. })
  322. });
  323. // 关闭窗口后,恢复默认内容
  324. this.$refs.inputDialog.close()
  325. this.isShowSignature = false;
  326. },
  327. //编辑个性签名
  328. onEdit(str) {
  329. if (this.userInfo.id == this.uid) {
  330. this.fieldStr = str;
  331. this.isShowSignature = true;
  332. this.signature = this.userInfo.signature;
  333. this.$refs.inputDialog.open();
  334. }
  335. },
  336. //回退页面之后重新加载页面
  337. reFresh() {
  338. this.loading = false;
  339. this.loaded = false;
  340. this.where = {
  341. page: 1,
  342. limit: 10
  343. }
  344. this.list = []
  345. // if (this.id) {
  346. // this.getUserHome(this.id);
  347. // this.authorNoteList();
  348. // } else {
  349. this.getMyHome();
  350. this.myNoteList();
  351. // }
  352. },
  353. //获取我的用户信息
  354. getMyHome() {
  355. myHomeApi().then(res => {
  356. console.log(res.data)
  357. this.userInfo = res.data;
  358. this.signature = this.userInfo.signature
  359. this.school = this.userInfo.school
  360. this.isMore = false;
  361. }).catch(err => {
  362. uni.showToast({
  363. title: err,
  364. icon: 'none'
  365. })
  366. });
  367. },
  368. /**
  369. * 去订单详情
  370. */
  371. goOrderDetails: function(item, status) {
  372. if (!item.orderNo) return this.$util.Tips({
  373. title: '缺少订单号无法查看订单详情'
  374. });
  375. //虚拟商品
  376. if (item.secondType === this.ProductTypeEnum.CloudDrive || item.secondType === this.ProductTypeEnum
  377. .CardPassword) {
  378. // #ifdef MP
  379. uni.navigateTo({
  380. url: '/pages/goods/virtual_order_details/index?orderNo=' + item.orderNo
  381. })
  382. // #endif
  383. // #ifndef MP
  384. uni.navigateTo({
  385. animationType: animationType.type,
  386. animationDuration: animationType.duration,
  387. url: '/pages/goods/virtual_order_details/index?orderNo=' + item.orderNo
  388. })
  389. // #endif
  390. } else {
  391. // #ifdef MP
  392. uni.navigateTo({
  393. url: '/pages/goods/order_details/index?orderNo=' + item.orderNo + '&orderType=secondHand'
  394. })
  395. // #endif
  396. // #ifndef MP
  397. uni.navigateTo({
  398. animationType: animationType.type,
  399. animationDuration: animationType.duration,
  400. url: '/pages/goods/order_details/index?orderNo=' + item.orderNo + "'&orderType=secondHand'
  401. })
  402. // #endif
  403. }
  404. },
  405. //逛逛用户主页
  406. getUserHome(id) {
  407. userHomeApi(id).then(res => {
  408. this.userInfo = res.data
  409. }).catch(err => {
  410. uni.showToast({
  411. title: err,
  412. icon: 'none'
  413. })
  414. });
  415. },
  416. // 关注作者
  417. followAuthor: function() {
  418. if (this.isLogin) {
  419. if (this.userInfo.isLogoff) return;
  420. discoverFollowAuthor(this.id).then(() => {
  421. this.$set(this.userInfo, 'isConcerned', !this.userInfo.isConcerned);
  422. });
  423. } else {
  424. toLogin();
  425. }
  426. },
  427. changeTab(tab) {
  428. this.tab = tab
  429. this.where.page = 1
  430. this.loaded = this.loading = false
  431. this.list = []
  432. if (tab === 0) {
  433. this.manage = 1;
  434. this.myNoteList();
  435. } else if (tab === 1) {
  436. this.manage = 0;
  437. this.myLikeList();
  438. } else if (tab === 2) {
  439. this.manage = 0;
  440. this.myFollowList()
  441. } else {
  442. this.manage = 0;
  443. this.myOrderList()
  444. }
  445. },
  446. // 获取我购买的作品
  447. myOrderList: function() {
  448. let that = this;
  449. if (that.loaded || that.loading) return;
  450. that.loading = true;
  451. that.loadTitle = '';
  452. that.where.status = -1;
  453. secondHandOrderList(that.where).then(res => {
  454. let list = res.data.list;
  455. let goods = that.$util.SplitArray(list, that.list);
  456. that.loaded = list.length < that.where.limit;
  457. that.loading = false;
  458. that.loadTitle = that.loaded ? '到底了' : '加载更多';
  459. that.$set(that, 'list', goods);
  460. that.$set(that.where, 'page', that.where.page + 1);
  461. }).catch(err => {
  462. that.loading = false;
  463. uni.showToast({
  464. title: err,
  465. icon: 'none'
  466. })
  467. })
  468. },
  469. // 获取我的收藏作品
  470. myFollowList: function() {
  471. let that = this;
  472. if (that.loaded || that.loading) return;
  473. that.loading = true;
  474. that.loadTitle = '';
  475. secondHandFollowListApi(that.where).then(res => {
  476. let list = res.data.list;
  477. let goods = that.$util.SplitArray(list, that.list);
  478. that.loaded = list.length < that.where.limit;
  479. that.loading = false;
  480. that.loadTitle = that.loaded ? '到底了' : '加载更多';
  481. that.$set(that, 'list', goods);
  482. that.$set(that.where, 'page', that.where.page + 1);
  483. }).catch(err => {
  484. that.loading = false;
  485. uni.showToast({
  486. title: err,
  487. icon: 'none'
  488. })
  489. })
  490. },
  491. // 获取我的点赞作品
  492. myLikeList: function() {
  493. let that = this;
  494. if (that.loaded || that.loading) return;
  495. that.loading = true;
  496. that.loadTitle = '';
  497. secondHandListApi(that.where).then(res => {
  498. let list = res.data.list;
  499. let goods = that.$util.SplitArray(list, that.list);
  500. that.loaded = list.length < that.where.limit;
  501. that.loading = false;
  502. that.loadTitle = that.loaded ? '到底了' : '加载更多';
  503. that.$set(that, 'list', goods);
  504. that.$set(that.where, 'page', that.where.page + 1);
  505. }).catch(err => {
  506. that.loading = false;
  507. uni.showToast({
  508. title: err,
  509. icon: 'none'
  510. })
  511. })
  512. },
  513. // 获取我的的作品
  514. myNoteList: function() {
  515. let that = this;
  516. if (that.loaded || that.loading) return;
  517. that.loading = true;
  518. that.loadTitle = '';
  519. mySecondHandListApi(that.where).then(res => {
  520. let list = res.data.list;
  521. let goods = that.$util.SplitArray(list, that.list);
  522. that.loaded = list.length < that.where.limit;
  523. that.loading = false;
  524. that.loadTitle = that.loaded ? '到底了' : '加载更多';
  525. that.$set(that, 'list', goods);
  526. that.$set(that.where, 'page', that.where.page + 1);
  527. }).catch(err => {
  528. that.loading = false;
  529. uni.showToast({
  530. title: err,
  531. icon: 'none'
  532. })
  533. })
  534. },
  535. // 作者的作品
  536. authorNoteList: function() {
  537. let that = this;
  538. if (that.loaded || that.loading) return;
  539. that.loading = true;
  540. that.loadTitle = '';
  541. this.where.authorId = this.id
  542. authorNoteApi(this.where.authorId, that.where).then(res => {
  543. let list = res.data.list;
  544. let goods = that.$util.SplitArray(list, that.list);
  545. that.loaded = list.length < that.where.limit;
  546. that.loading = false;
  547. that.loadTitle = that.loaded ? '到底了' : '加载更多';
  548. that.$set(that, 'list', goods);
  549. that.$set(that.where, 'page', that.where.page + 1);
  550. }).catch(err => {
  551. that.loading = false;
  552. uni.showToast({
  553. title: err,
  554. icon: 'none'
  555. })
  556. })
  557. },
  558. /**
  559. * 取消订单
  560. *
  561. */
  562. cancelOrder: function(index, orderNo) {
  563. let that = this;
  564. if (!orderNo) return that.$util.Tips({
  565. title: '缺少订单号无法取消订单'
  566. });
  567. uni.showModal({
  568. content: '确定取消该订单',
  569. cancelText: "取消",
  570. confirmText: "确定",
  571. showCancel: true,
  572. confirmColor: '#f55850',
  573. success: (res) => {
  574. if (res.confirm) {
  575. uni.showLoading({
  576. title: '正在取消中'
  577. });
  578. secondHandCancel(orderNo).then(res => {
  579. uni.hideLoading();
  580. return that.$util.Tips({
  581. title: '取消成功',
  582. icon: 'success'
  583. }, function() {
  584. that.getAllOrder();
  585. });
  586. }).catch(err => {
  587. return that.$util.Tips({
  588. title: err
  589. });
  590. });
  591. } else {
  592. }
  593. },
  594. })
  595. },
  596. /**
  597. * 打开支付组件
  598. *
  599. */
  600. goPay: Debounce(function(item) {
  601. uni.showLoading({
  602. title: '加载中...'
  603. });
  604. // 其他商品走正常流程,去支付收银台页面
  605. this.getToPayment('', item, 'secondHand')
  606. }),
  607. },
  608. onReachBottom() {
  609. // if (this.id) {
  610. // this.authorNoteList();
  611. // } else {
  612. if (this.tab === 0) {
  613. this.myNoteList();
  614. } else {
  615. this.myLikeList();
  616. }
  617. // }
  618. },
  619. onPullDownRefresh() {},
  620. // 滚动监听
  621. onPageScroll(e) {
  622. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  623. uni.$emit('scroll');
  624. }
  625. }
  626. </script>
  627. <style lang="scss" scoped>
  628. .close-btn {
  629. @include coupons_border_color(theme);
  630. }
  631. .tui-modal-custom {
  632. width: 600rpx;
  633. position: relative;
  634. box-sizing: border-box;
  635. padding: 40rpx;
  636. border-radius: 16px;
  637. background-color: #fff;
  638. z-index: 9999;
  639. .h-342 {
  640. min-height: 268rpx;
  641. max-height: 268rpx;
  642. ;
  643. overflow-y: scroll;
  644. }
  645. }
  646. .signature {
  647. overflow: hidden;
  648. display: -webkit-box;
  649. -webkit-line-clamp: 5;
  650. -webkit-box-orient: vertical;
  651. text-overflow: ellipsis;
  652. width: 88%;
  653. }
  654. .goods-wrap {
  655. padding-top: 24rpx;
  656. }
  657. .more {
  658. font-weight: 600;
  659. margin-left: 8rpx;
  660. }
  661. .container {
  662. background: #ffffff;
  663. min-height: 100vh;
  664. }
  665. .header-bg {
  666. position: absolute;
  667. width: 100%;
  668. height: 650rpx;
  669. top: 0;
  670. /* #ifdef MP || APP-PLUS */
  671. z-index: -1;
  672. /* #endif */
  673. /* #ifdef H5 */
  674. z-index: 0;
  675. /* #endif */
  676. z-index: 0;
  677. filter: blur(0);
  678. overflow: hidden;
  679. img {
  680. width: 100%;
  681. height: 100%;
  682. filter: blur(16rpx);
  683. transform: scale(1.5);
  684. }
  685. .header-bg-mc {
  686. position: absolute;
  687. top: 0;
  688. width: 100%;
  689. height: 100%;
  690. background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.1) 39%, rgba(0, 0, 0, 0.7) 100%);
  691. }
  692. }
  693. .header {
  694. width: 750rpx;
  695. padding: 20rpx 0 0;
  696. box-sizing: border-box;
  697. background: linear-gradient(360deg, #72798E 0%, #384857 99%);
  698. opacity: 1;
  699. .tab_count {
  700. text-align: center;
  701. background: #ffffff;
  702. padding: 30rpx 0 15rpx 0;
  703. border-radius: 12px 12px 0 0;
  704. text {
  705. font-size: 28rpx;
  706. color: #999999;
  707. margin: 0 30rpx;
  708. position: relative;
  709. padding-bottom: 14rpx;
  710. &.on {
  711. font-size: 32rpx;
  712. color: #282828;
  713. font-weight: bold;
  714. &::after {
  715. content: "";
  716. width: 80%;
  717. height: 5rpx;
  718. @include main_bg_color(theme);
  719. position: absolute;
  720. bottom: 0;
  721. left: 12rpx;
  722. }
  723. .underline {
  724. opacity: 1;
  725. }
  726. }
  727. }
  728. }
  729. .user_wrapper {
  730. align-items: center;
  731. justify-content: space-between;
  732. padding: 0 34rpx;
  733. position: relative;
  734. .level_icon {
  735. position: absolute;
  736. width: 38rpx;
  737. height: 38rpx;
  738. margin: 4rpx 0 0 6rpx;
  739. border: none;
  740. z-index: 11;
  741. bottom: 2rpx;
  742. left: 124rpx;
  743. }
  744. .image,
  745. uni-image,
  746. image {
  747. width: 140rpx;
  748. height: 140rpx;
  749. border-radius: 100%;
  750. border: 4rpx solid #ffffff;
  751. }
  752. .user_text {
  753. margin-left: 30rpx;
  754. color: #FFFFFF;
  755. .name {
  756. font-size: 34rpx;
  757. font-weight: bold;
  758. align-items: center;
  759. }
  760. .user_id {
  761. text-overflow: ellipsis;
  762. white-space: nowrap;
  763. overflow: hidden;
  764. max-width: 300rpx;
  765. font-size: 24rpx;
  766. }
  767. }
  768. }
  769. .plant_info {
  770. position: relative;
  771. padding: 0 34rpx;
  772. margin-top: 30rpx;
  773. justify-content: space-between;
  774. color: #ffffff;
  775. font-size: 24rpx;
  776. .count_wrapper {
  777. color: #FFFFFF;
  778. font-size: 24rpx;
  779. .item {
  780. text-align: center;
  781. margin-right: 60rpx;
  782. &:last-child {
  783. margin-right: 0;
  784. }
  785. text {
  786. font-size: 30rpx;
  787. margin-top: 10rpx;
  788. }
  789. }
  790. }
  791. }
  792. .iconfont {
  793. font-size: 24rpx;
  794. margin-right: 12rpx;
  795. }
  796. .follow_btn {
  797. color: #ffffff;
  798. font-size: 26rpx;
  799. display: flex;
  800. align-items: center;
  801. justify-content: center;
  802. width: 146rpx;
  803. height: 62rpx;
  804. @include linear-gradient(theme);
  805. border-radius: 33rpx;
  806. .icon-fabu {
  807. font-size: 24rpx;
  808. }
  809. &.focused {
  810. background: transparent;
  811. color: #FFFFFF;
  812. border: 1px solid #FFFFFF;
  813. }
  814. }
  815. }
  816. .main {
  817. background: #ffffff;
  818. position: relative;
  819. }
  820. .goods {
  821. // display: flex;
  822. // flex-wrap: wrap;
  823. // justify-content: space-between;
  824. // width: 750rpx;
  825. padding: 0 24rpx;
  826. }
  827. .empty {
  828. margin: 130rpx 0 150rpx;
  829. text-align: center;
  830. image,
  831. uni-image {
  832. display: inline-block;
  833. width: 414rpx;
  834. height: 305rpx;
  835. }
  836. text {
  837. display: block;
  838. color: #999999;
  839. font-size: 26rpx;
  840. }
  841. }
  842. .end {
  843. margin-top: 50rpx 0;
  844. text-align: center;
  845. text {
  846. color: #999999;
  847. font-size: 22rpx;
  848. position: relative;
  849. &.loaded {
  850. &::before,
  851. &::after {
  852. content: "";
  853. display: inline-block;
  854. width: 22rpx;
  855. height: 1rpx;
  856. background: #999999;
  857. position: absolute;
  858. top: 18rpx;
  859. opacity: .5;
  860. }
  861. &::before {
  862. left: -30rpx;
  863. }
  864. &::after {
  865. right: -30rpx;
  866. }
  867. }
  868. }
  869. }
  870. .my-order .list {
  871. width: 690rpx;
  872. margin: 0 auto;
  873. }
  874. .my-order .list .item {
  875. background-color: #fff;
  876. border-radius: 14rpx;
  877. margin-bottom: 14rpx;
  878. }
  879. .my-order .list .item .title {
  880. height: 84rpx;
  881. padding: 0 24rpx;
  882. border-bottom: 1rpx solid #eee;
  883. font-size: 28rpx;
  884. color: #282828;
  885. }
  886. .my-order .list .item .title .sign {
  887. font-size: 24rpx;
  888. padding: 0 13rpx;
  889. height: 36rpx;
  890. margin-right: 15rpx;
  891. border-radius: 18rpx;
  892. @include coupons_border_color(theme);
  893. @include main_color(theme);
  894. }
  895. .my-order .list .item .item-info {
  896. padding: 0 30rpx;
  897. margin-top: 22rpx;
  898. }
  899. .my-order .list .item .item-info .pictrue {
  900. width: 120rpx;
  901. height: 120rpx;
  902. }
  903. .my-order .list .item .item-info .pictrue image {
  904. width: 100%;
  905. height: 100%;
  906. border-radius: 14rpx;
  907. overflow: hidden;
  908. }
  909. .my-order .list .item .item-info {
  910. .nameBox {
  911. position: relative;
  912. height: 120rpx;
  913. }
  914. .sku {
  915. font-size: 20rpx;
  916. position: absolute;
  917. bottom: 4rpx;
  918. width: 420rpx;
  919. }
  920. .text {
  921. width: 496rpx;
  922. font-size: 28rpx;
  923. color: #999;
  924. }
  925. }
  926. .my-order .list .item .item-info .text .name {
  927. width: 326rpx;
  928. color: #282828;
  929. }
  930. .my-order .list .item .item-info .text .money {
  931. text-align: right;
  932. }
  933. .font_color {
  934. @include main_color(theme);
  935. }
  936. .my-order .list .item .totalPrice {
  937. font-size: 26rpx;
  938. color: #282828;
  939. text-align: right;
  940. margin: 27rpx 0 0 30rpx;
  941. padding: 0 30rpx 30rpx 0;
  942. border-bottom: 1rpx solid #eee;
  943. }
  944. .my-order .list .item .totalPrice .money {
  945. font-size: 28rpx;
  946. font-weight: bold;
  947. @include price_color(theme);
  948. }
  949. .my-order .list .item .bottom {
  950. height: 107rpx;
  951. padding: 0 30rpx;
  952. }
  953. .my-order .list .item .bottom .bnt {
  954. width: 176rpx;
  955. height: 60rpx;
  956. text-align: center;
  957. line-height: 60rpx;
  958. color: #fff;
  959. border-radius: 50rpx;
  960. font-size: 27rpx;
  961. }
  962. .my-order .list .item .bottom .bnt.cancelBnt {
  963. border: 1rpx solid #ddd;
  964. color: #aaa;
  965. }
  966. .my-order .list .item .bottom .bnt~.bnt {
  967. margin-left: 17rpx;
  968. }
  969. .my-order {
  970. .header {
  971. height: 250rpx;
  972. padding: 0 30rpx;
  973. }
  974. }
  975. .bg_color {
  976. @include main_bg_color(theme);
  977. }
  978. .my-order .header .picTxt {
  979. height: 190rpx;
  980. }
  981. .my-order .header .picTxt .text {
  982. color: rgba(255, 255, 255, 0.8);
  983. font-size: 26rpx;
  984. font-family: 'Guildford Pro';
  985. }
  986. .my-order .header .picTxt .text .name {
  987. font-size: 34rpx;
  988. font-weight: bold;
  989. color: #fff;
  990. margin-bottom: 20rpx;
  991. }
  992. .my-order .header .picTxt .pictrue {
  993. width: 120rpx;
  994. height: 120rpx;
  995. }
  996. .my-order .header .picTxt .pictrue image {
  997. width: 100%;
  998. height: 100%;
  999. }
  1000. </style>